From 350eb8aebb385431abf3749b542263a5cf15c9e7 Mon Sep 17 00:00:00 2001 From: Viktor Vasilev Date: Wed, 12 Dec 2018 16:23:00 +0200 Subject: [PATCH 01/11] Allow bundles to be commited on master --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index c2d262455..aba7153aa 100644 --- a/.gitignore +++ b/.gitignore @@ -29,5 +29,4 @@ composer.lock # Bundled assets /assets/dist/ -/build carbon-fields.zip From bb0c9d2d5f7c37b3a002150e8daa021182b09c68 Mon Sep 17 00:00:00 2001 From: Viktor Vasilev Date: Wed, 12 Dec 2018 16:24:29 +0200 Subject: [PATCH 02/11] Add bundles --- build/classic/core.css | 1822 +++++++++++++ build/classic/core.js | 3986 +++++++++++++++++++++++++++++ build/classic/core.min.css | 1 + build/classic/core.min.js | 10 + build/classic/metaboxes.css | 350 +++ build/classic/metaboxes.js | 1333 ++++++++++ build/classic/metaboxes.min.css | 1 + build/classic/metaboxes.min.js | 1 + build/classic/report.html | 65 + build/classic/vendor.js | 1985 ++++++++++++++ build/classic/vendor.min.js | 57 + build/gutenberg/blocks.css | 658 +++++ build/gutenberg/blocks.js | 1157 +++++++++ build/gutenberg/blocks.min.css | 1 + build/gutenberg/blocks.min.js | 1 + build/gutenberg/core.css | 1822 +++++++++++++ build/gutenberg/core.js | 3986 +++++++++++++++++++++++++++++ build/gutenberg/core.min.css | 1 + build/gutenberg/core.min.js | 10 + build/gutenberg/metaboxes.css | 350 +++ build/gutenberg/metaboxes.js | 1333 ++++++++++ build/gutenberg/metaboxes.min.css | 1 + build/gutenberg/metaboxes.min.js | 1 + build/gutenberg/report.html | 65 + build/gutenberg/vendor.js | 579 +++++ build/gutenberg/vendor.min.js | 11 + languages/carbon-fields-ui.pot | 14 +- 27 files changed, 19594 insertions(+), 7 deletions(-) create mode 100644 build/classic/core.css create mode 100644 build/classic/core.js create mode 100644 build/classic/core.min.css create mode 100644 build/classic/core.min.js create mode 100644 build/classic/metaboxes.css create mode 100644 build/classic/metaboxes.js create mode 100644 build/classic/metaboxes.min.css create mode 100644 build/classic/metaboxes.min.js create mode 100644 build/classic/report.html create mode 100644 build/classic/vendor.js create mode 100644 build/classic/vendor.min.js create mode 100644 build/gutenberg/blocks.css create mode 100644 build/gutenberg/blocks.js create mode 100644 build/gutenberg/blocks.min.css create mode 100644 build/gutenberg/blocks.min.js create mode 100644 build/gutenberg/core.css create mode 100644 build/gutenberg/core.js create mode 100644 build/gutenberg/core.min.css create mode 100644 build/gutenberg/core.min.js create mode 100644 build/gutenberg/metaboxes.css create mode 100644 build/gutenberg/metaboxes.js create mode 100644 build/gutenberg/metaboxes.min.css create mode 100644 build/gutenberg/metaboxes.min.js create mode 100644 build/gutenberg/report.html create mode 100644 build/gutenberg/vendor.js create mode 100644 build/gutenberg/vendor.min.js diff --git a/build/classic/core.css b/build/classic/core.css new file mode 100644 index 000000000..c69eaffa1 --- /dev/null +++ b/build/classic/core.css @@ -0,0 +1,1822 @@ +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Association + ========================================================================== */ +.cf-association__bar { + position: relative; + z-index: 1; } + +.cf-association__counter { + position: absolute; + top: 50%; + right: 8px; + font-size: 12px; + line-height: 1; + color: #23282d; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + pointer-events: none; } + +.cf-association__cols { + background: #fff; + position: relative; + z-index: 0; + display: flex; + border-width: 0 1px 1px; + border-style: solid; + border-color: #e2e4e7; } + .cf-association__cols::before { + position: absolute; + top: 0; + left: 50%; + width: 1px; + height: 100%; + background-color: #e2e4e7; + content: ''; } + +.cf-association__col { + width: 50%; + max-height: 160px; + overflow-y: auto; } + +.cf-association__option { + display: flex; + align-items: center; + padding: 4px 8px; + height: 32px; + box-sizing: border-box; } + .cf-association__option--selected { + background-color: #fbfbfc; } + .cf-association__option + .cf-association__option { + border-top: 1px solid #e2e4e7; } + .cf-association__option.ui-sortable-helper { + border-top: 0; + background-color: #fbfbfc; } + +.cf-association__option-thumb { + flex: none; + display: block; + width: 24px; + height: 24px; + margin-right: 8px; } + +.cf-association__option-content { + display: flex; + align-items: center; + justify-content: space-between; + flex: 1; + margin-right: 8px; } + +.cf-association__option-title { + overflow: hidden; + font-size: 13px; + line-height: 1.4; + color: #32373c; + white-space: nowrap; + text-overflow: ellipsis; } + .cf-association__option--selected .cf-association__option-title { + color: #82878c; } + +.cf-association__option-type { + font-size: 9px; + line-height: 1; + text-transform: uppercase; + color: #82878c; } + +.cf-association__option-actions { + display: flex; + align-items: center; + justify-content: space-between; } + .cf-association__col:first-child .cf-association__option-actions { + min-width: 48px; } + +.cf-association__option-sort { + margin-right: 4px; + color: #82878c; + cursor: move; } + +.cf-association__option-action { + padding: 0; + border: 0; + outline: none; + color: #82878c; + transition: color 0.1s linear; + cursor: pointer; } + .cf-association__option-action:focus { + color: #82878c; + box-shadow: none; } + .cf-association__option-action:hover { + color: #23282d; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Search Input + ========================================================================== */ +.cf-search-input { + position: relative; } + .cf-search-input::before { + position: absolute; + top: 50%; + left: 9px; + margin-top: -10px; } + .postbox .cf-search-input::before { + color: #32373c; } + .wp-block .cf-search-input::before { + color: #555d66; } + +.cf-search-input__inner { + display: block; + width: 100%; + margin: 0; } + .cf-container .cf-search-input__inner, + .block-editor .cf-field .cf-search-input__inner { + padding-left: 35px; } + .cf-container .cf-search-input__inner { + padding-top: 8px; + padding-bottom: 8px; + border-color: #e2e4e7; } + .wp-block .cf-field .cf-search-input__inner { + border-radius: 0; + border-color: #e2e4e7; } + .wp-block .cf-field .cf-search-input__inner:focus { + box-shadow: none; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Checkbox + ========================================================================== */ +.cf-field .cf-checkbox__input { + margin-top: 0; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Color + ========================================================================== */ +.cf-color__inner { + display: flex; + align-items: center; } + +.cf-color__toggle { + position: relative; + overflow: hidden; } + +.cf-color__toggle-text { + margin-left: 27px; } + +.cf-color__preview { + position: absolute; + top: 0; + left: 0; + width: 26px; + height: 100%; + border-right: 1px solid #ccc; } + .cf-color__toggle:hover .cf-color__preview, + .cf-color__toggle:active .cf-color__preview { + border-color: #999; } + +.cf-color .cf-color__reset { + margin-left: 5px; + text-decoration: none; } + +.cf-color .cf-color__reset:focus { + box-shadow: none; } + +.cf-color__picker { + position: absolute; + z-index: 9999; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Complex + ========================================================================== */ +.cf-complex__groups { + position: relative; + z-index: 0; } + .cf-complex--tabbed-vertical .cf-complex__groups { + flex: 0 0 80%; } + +.cf-complex--grid .cf-complex__group { + position: relative; + margin-bottom: 12px; } + .cf-complex--grid .cf-complex__group:last-child { + margin-bottom: 0; } + +/** + * Head + */ +.cf-complex__group-head { + position: relative; + display: flex; + border: 1px solid #e2e4e7; + background-color: #fbfbfc; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + font-size: 13px; + font-weight: 600; + line-height: 1.4; + color: #23282d; + cursor: move; + transition: border-color 0.1s linear; } + .cf-complex__group-head:hover { + border-color: #82878c; } + +.cf-complex__group-index { + display: flex; + align-items: center; + justify-content: center; + width: 42px; + height: 42px; + border-right: 1px solid #e2e4e7; } + +.cf-complex__group-title { + display: flex; + align-items: center; + padding: 0 12px; } + +/** + * Body + */ +.cf-complex__group-body { + display: flex; + flex-wrap: wrap; + border-width: 0 0 1px 1px; + border-style: solid; + border-color: #e2e4e7; } + .cf-complex__group-body[hidden] { + display: none; } + .cf-complex--grid .cf-complex__group-body { + margin-top: -1px; } + +/** + * Actions + */ +.cf-complex__actions { + display: flex; + align-items: center; + margin-top: 12px; } + +.cf-complex__actions .cf-complex__toggler { + margin-left: auto; } + +/** + * Inserter + */ +.cf-complex__inserter { + position: relative; + display: inline-block; } + .cf-complex__tabs .cf-complex__inserter { + height: 36px; } + .cf-complex--tabbed-horizontal .cf-complex__inserter { + width: 36px; + align-self: flex-end; + margin-bottom: 4px; } + .cf-complex--tabbed-vertical .cf-complex__inserter { + display: block; } + +.cf-complex__tabs .cf-complex__inserter-button { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; + border: 1px solid #e2e4e7; + border-radius: 0; + margin: 0; + background-color: #fbfbfc; + box-shadow: none; + font-size: 18px; + line-height: 1; + transition: background-color 0.1s linear; } + .cf-complex__tabs .cf-complex__inserter-button:focus, .cf-complex__tabs .cf-complex__inserter-button:hover, .cf-complex__tabs .cf-complex__inserter-button:active { + border-color: #e2e4e7; + background-color: #fff; } + .cf-complex__tabs .cf-complex__inserter-button:focus { + box-shadow: none; } + .cf-complex__tabs .cf-complex__inserter-button:active { + box-shadow: none; + -webkit-transform: none; + transform: none; } + +.cf-complex__inserter-menu { + position: absolute; + top: 50%; + left: 100%; + min-width: 180px; + margin: 0; + -webkit-transform: translate(10px, -50%); + transform: translate(10px, -50%); } + +.cf-complex__inserter-item { + padding: 8px 12px; + margin: 0; + cursor: pointer; + transition: color 0.1s linear; } + +/** + * Group - Actions + */ +.cf-complex__group-actions { + display: flex; + align-items: center; } + .cf-complex__group-actions--tabbed { + justify-content: flex-end; + padding: 8px 12px; + border-width: 0 1px 1px; + border-style: solid; + border-color: #e2e4e7; + background-color: #fbfbfc; } + .cf-complex--grid .cf-complex__group-actions { + position: absolute; + top: 12px; + right: 12px; } + +.cf-complex__group-action { + display: inline-flex; + padding: 0; + border: 0; + margin-left: 12px; + outline: none; + background-color: transparent; + color: #82878c; + cursor: pointer; + transition: color 0.1s linear; } + .cf-complex__group-action:first-child { + margin-left: 0; } + .cf-complex__group-action:hover { + color: #23282d; } + +.cf-complex__group-action-text { + display: none; } + +/** + * Tabs + */ +.cf-complex__tabs { + position: relative; + z-index: 1; } + .cf-complex--tabbed-horizontal .cf-complex__tabs { + display: inline-flex; + margin-bottom: -5px; } + .cf-complex--tabbed-vertical .cf-complex__tabs { + flex: 0 0 20%; + margin-right: -1px; } + +.cf-complex__tabs-list { + margin: 0; } + .cf-complex--tabbed-horizontal .cf-complex__tabs-list { + display: flex; + flex-wrap: wrap; } + .cf-complex--tabbed-vertical .cf-complex__tabs-list { + margin-bottom: -1px; } + +.cf-complex__tabs-item { + display: flex; + align-items: center; + padding: 8px 12px; + border: 1px solid #e2e4e7; + margin: 0; + background-color: #fbfbfc; + font-size: 12px; + cursor: pointer; + transition: background-color 0.1s linear, border-color 0.1s linear; } + .cf-complex--tabbed-horizontal .cf-complex__tabs-item { + margin: 0 4px 4px 0; } + .cf-complex--tabbed-vertical .cf-complex__tabs-item ~ .cf-complex__tabs-item { + border-top-width: 0; } + .cf-complex__tabs-item:hover { + background-color: #fff; } + .cf-complex__tabs-item--current { + background-color: #fff; } + .cf-complex--tabbed-horizontal .cf-complex__tabs-item--current { + border-bottom-color: #fff !important; } + .cf-complex--tabbed-vertical .cf-complex__tabs-item--current { + border-right-color: #fff !important; } + +/** + * Placeholder + */ +.cf-complex__placeholder-label { + margin: 8px 0 12px; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +.flatpickr-calendar { + background: transparent; + opacity: 0; + display: none; + text-align: center; + visibility: hidden; + padding: 0; + -webkit-animation: none; + animation: none; + direction: ltr; + border: 0; + font-size: 14px; + line-height: 24px; + border-radius: 5px; + position: absolute; + width: 307.875px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + -ms-touch-action: manipulation; + touch-action: manipulation; + background: #fff; + -webkit-box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08); + box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08); } + +.flatpickr-calendar.open, .flatpickr-calendar.inline { + opacity: 1; + max-height: 640px; + visibility: visible; } + +.flatpickr-calendar.open { + display: inline-block; + z-index: 99999; } + +.flatpickr-calendar.animate.open { + -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1); + animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1); } + +.flatpickr-calendar.inline { + display: block; + position: relative; + top: 2px; } + +.flatpickr-calendar.static { + position: absolute; + top: calc(100% + 2px); } + +.flatpickr-calendar.static.open { + z-index: 999; + display: block; } + +.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) { + -webkit-box-shadow: none !important; + box-shadow: none !important; } + +.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) { + -webkit-box-shadow: -2px 0 0 #e6e6e6,5px 0 0 #e6e6e6; + box-shadow: -2px 0 0 #e6e6e6,5px 0 0 #e6e6e6; } + +.flatpickr-calendar .hasWeeks .dayContainer, .flatpickr-calendar .hasTime .dayContainer { + border-bottom: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; } + +.flatpickr-calendar .hasWeeks .dayContainer { + border-left: 0; } + +.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time { + height: 40px; + border-top: 1px solid #e6e6e6; } + +.flatpickr-calendar.noCalendar.hasTime .flatpickr-time { + height: auto; } + +.flatpickr-calendar:before, .flatpickr-calendar:after { + position: absolute; + display: block; + pointer-events: none; + border: solid transparent; + content: ''; + height: 0; + width: 0; + left: 22px; } + +.flatpickr-calendar.rightMost:before, .flatpickr-calendar.rightMost:after { + left: auto; + right: 22px; } + +.flatpickr-calendar:before { + border-width: 5px; + margin: 0 -5px; } + +.flatpickr-calendar:after { + border-width: 4px; + margin: 0 -4px; } + +.flatpickr-calendar.arrowTop:before, .flatpickr-calendar.arrowTop:after { + bottom: 100%; } + +.flatpickr-calendar.arrowTop:before { + border-bottom-color: #e6e6e6; } + +.flatpickr-calendar.arrowTop:after { + border-bottom-color: #fff; } + +.flatpickr-calendar.arrowBottom:before, .flatpickr-calendar.arrowBottom:after { + top: 100%; } + +.flatpickr-calendar.arrowBottom:before { + border-top-color: #e6e6e6; } + +.flatpickr-calendar.arrowBottom:after { + border-top-color: #fff; } + +.flatpickr-calendar:focus { + outline: 0; } + +.flatpickr-wrapper { + position: relative; + display: inline-block; } + +.flatpickr-months { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; } + +.flatpickr-months .flatpickr-month { + background: transparent; + color: rgba(0, 0, 0, 0.9); + fill: rgba(0, 0, 0, 0.9); + height: 28px; + line-height: 1; + text-align: center; + position: relative; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + overflow: hidden; + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; } + +.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { + text-decoration: none; + cursor: pointer; + position: absolute; + top: 0; + line-height: 16px; + height: 28px; + padding: 10px; + z-index: 3; + color: rgba(0, 0, 0, 0.9); + fill: rgba(0, 0, 0, 0.9); } + +.flatpickr-months .flatpickr-prev-month.disabled, .flatpickr-months .flatpickr-next-month.disabled { + display: none; } + +.flatpickr-months .flatpickr-prev-month i, .flatpickr-months .flatpickr-next-month i { + position: relative; } + +.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month, .flatpickr-months .flatpickr-next-month.flatpickr-prev-month { + /* + /*rtl:begin:ignore*/ + left: 0; + /* + /*rtl:end:ignore*/ } + +/* + /*rtl:begin:ignore*/ +/* + /*rtl:end:ignore*/ +.flatpickr-months .flatpickr-prev-month.flatpickr-next-month, .flatpickr-months .flatpickr-next-month.flatpickr-next-month { + /* + /*rtl:begin:ignore*/ + right: 0; + /* + /*rtl:end:ignore*/ } + +/* + /*rtl:begin:ignore*/ +/* + /*rtl:end:ignore*/ +.flatpickr-months .flatpickr-prev-month:hover, .flatpickr-months .flatpickr-next-month:hover { + color: #959ea9; } + +.flatpickr-months .flatpickr-prev-month:hover svg, .flatpickr-months .flatpickr-next-month:hover svg { + fill: #f64747; } + +.flatpickr-months .flatpickr-prev-month svg, .flatpickr-months .flatpickr-next-month svg { + width: 14px; + height: 14px; } + +.flatpickr-months .flatpickr-prev-month svg path, .flatpickr-months .flatpickr-next-month svg path { + -webkit-transition: fill .1s; + transition: fill .1s; + fill: inherit; } + +.numInputWrapper { + position: relative; + height: auto; } + +.numInputWrapper input, .numInputWrapper span { + display: inline-block; } + +.numInputWrapper input { + width: 100%; } + +.numInputWrapper input::-ms-clear { + display: none; } + +.numInputWrapper span { + position: absolute; + right: 0; + width: 14px; + padding: 0 4px 0 2px; + height: 50%; + line-height: 50%; + opacity: 0; + cursor: pointer; + border: 1px solid rgba(57, 57, 57, 0.15); + -webkit-box-sizing: border-box; + box-sizing: border-box; } + +.numInputWrapper span:hover { + background: rgba(0, 0, 0, 0.1); } + +.numInputWrapper span:active { + background: rgba(0, 0, 0, 0.2); } + +.numInputWrapper span:after { + display: block; + content: ""; + position: absolute; } + +.numInputWrapper span.arrowUp { + top: 0; + border-bottom: 0; } + +.numInputWrapper span.arrowUp:after { + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-bottom: 4px solid rgba(57, 57, 57, 0.6); + top: 26%; } + +.numInputWrapper span.arrowDown { + top: 50%; } + +.numInputWrapper span.arrowDown:after { + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid rgba(57, 57, 57, 0.6); + top: 40%; } + +.numInputWrapper span svg { + width: inherit; + height: auto; } + +.numInputWrapper span svg path { + fill: rgba(0, 0, 0, 0.5); } + +.numInputWrapper:hover { + background: rgba(0, 0, 0, 0.05); } + +.numInputWrapper:hover span { + opacity: 1; } + +.flatpickr-current-month { + font-size: 135%; + line-height: inherit; + font-weight: 300; + color: inherit; + position: absolute; + width: 75%; + left: 12.5%; + padding: 6.16px 0 0 0; + line-height: 1; + height: 28px; + display: inline-block; + text-align: center; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } + +.flatpickr-current-month span.cur-month { + font-family: inherit; + font-weight: 700; + color: inherit; + display: inline-block; + margin-left: .5ch; + padding: 0; } + +.flatpickr-current-month span.cur-month:hover { + background: rgba(0, 0, 0, 0.05); } + +.flatpickr-current-month .numInputWrapper { + width: 6ch; + width: 7ch\0; + display: inline-block; } + +.flatpickr-current-month .numInputWrapper span.arrowUp:after { + border-bottom-color: rgba(0, 0, 0, 0.9); } + +.flatpickr-current-month .numInputWrapper span.arrowDown:after { + border-top-color: rgba(0, 0, 0, 0.9); } + +.flatpickr-current-month input.cur-year { + background: transparent; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: inherit; + cursor: text; + padding: 0 0 0 .5ch; + margin: 0; + display: inline-block; + font-size: inherit; + font-family: inherit; + font-weight: 300; + line-height: inherit; + height: auto; + border: 0; + border-radius: 0; + vertical-align: baseline; + vertical-align: initial; } + +.flatpickr-current-month input.cur-year:focus { + outline: 0; } + +.flatpickr-current-month input.cur-year[disabled], .flatpickr-current-month input.cur-year[disabled]:hover { + font-size: 100%; + color: rgba(0, 0, 0, 0.5); + background: transparent; + pointer-events: none; } + +.flatpickr-weekdays { + background: transparent; + text-align: center; + overflow: hidden; + width: 100%; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + height: 28px; } + +.flatpickr-weekdays .flatpickr-weekdaycontainer { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; } + +span.flatpickr-weekday { + cursor: default; + font-size: 90%; + background: transparent; + color: rgba(0, 0, 0, 0.54); + line-height: 1; + margin: 0; + text-align: center; + display: block; + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + font-weight: bolder; } + +.dayContainer, .flatpickr-weeks { + padding: 1px 0 0 0; } + +.flatpickr-days { + position: relative; + overflow: hidden; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-align: start; + -webkit-align-items: flex-start; + -ms-flex-align: start; + align-items: flex-start; + width: 307.875px; } + +.flatpickr-days:focus { + outline: 0; } + +.dayContainer { + padding: 0; + outline: 0; + text-align: left; + width: 307.875px; + min-width: 307.875px; + max-width: 307.875px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + display: inline-block; + display: -ms-flexbox; + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-wrap: wrap; + -ms-flex-pack: justify; + -webkit-justify-content: space-around; + justify-content: space-around; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; } + +.dayContainer + .dayContainer { + -webkit-box-shadow: -1px 0 0 #e6e6e6; + box-shadow: -1px 0 0 #e6e6e6; } + +.flatpickr-day { + background: none; + border: 1px solid transparent; + border-radius: 150px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: #393939; + cursor: pointer; + font-weight: 400; + width: 14.2857143%; + -webkit-flex-basis: 14.2857143%; + -ms-flex-preferred-size: 14.2857143%; + flex-basis: 14.2857143%; + max-width: 39px; + height: 39px; + line-height: 39px; + margin: 0; + display: inline-block; + position: relative; + -webkit-box-pack: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + text-align: center; } + +.flatpickr-day.inRange, .flatpickr-day.prevMonthDay.inRange, .flatpickr-day.nextMonthDay.inRange, .flatpickr-day.today.inRange, .flatpickr-day.prevMonthDay.today.inRange, .flatpickr-day.nextMonthDay.today.inRange, .flatpickr-day:hover, .flatpickr-day.prevMonthDay:hover, .flatpickr-day.nextMonthDay:hover, .flatpickr-day:focus, .flatpickr-day.prevMonthDay:focus, .flatpickr-day.nextMonthDay:focus { + cursor: pointer; + outline: 0; + background: #e6e6e6; + border-color: #e6e6e6; } + +.flatpickr-day.today { + border-color: #959ea9; } + +.flatpickr-day.today:hover, .flatpickr-day.today:focus { + border-color: #959ea9; + background: #959ea9; + color: #fff; } + +.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay { + background: #569ff7; + -webkit-box-shadow: none; + box-shadow: none; + color: #fff; + border-color: #569ff7; } + +.flatpickr-day.selected.startRange, .flatpickr-day.startRange.startRange, .flatpickr-day.endRange.startRange { + border-radius: 50px 0 0 50px; } + +.flatpickr-day.selected.endRange, .flatpickr-day.startRange.endRange, .flatpickr-day.endRange.endRange { + border-radius: 0 50px 50px 0; } + +.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)), .flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)), .flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) { + -webkit-box-shadow: -10px 0 0 #569ff7; + box-shadow: -10px 0 0 #569ff7; } + +.flatpickr-day.selected.startRange.endRange, .flatpickr-day.startRange.startRange.endRange, .flatpickr-day.endRange.startRange.endRange { + border-radius: 50px; } + +.flatpickr-day.inRange { + border-radius: 0; + -webkit-box-shadow: -5px 0 0 #e6e6e6,5px 0 0 #e6e6e6; + box-shadow: -5px 0 0 #e6e6e6,5px 0 0 #e6e6e6; } + +.flatpickr-day.disabled, .flatpickr-day.disabled:hover, .flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay, .flatpickr-day.notAllowed, .flatpickr-day.notAllowed.prevMonthDay, .flatpickr-day.notAllowed.nextMonthDay { + color: rgba(57, 57, 57, 0.3); + background: transparent; + border-color: transparent; + cursor: default; } + +.flatpickr-day.disabled, .flatpickr-day.disabled:hover { + cursor: not-allowed; + color: rgba(57, 57, 57, 0.1); } + +.flatpickr-day.week.selected { + border-radius: 0; + -webkit-box-shadow: -5px 0 0 #569ff7,5px 0 0 #569ff7; + box-shadow: -5px 0 0 #569ff7,5px 0 0 #569ff7; } + +.flatpickr-day.hidden { + visibility: hidden; } + +.rangeMode .flatpickr-day { + margin-top: 1px; } + +.flatpickr-weekwrapper { + display: inline-block; + float: left; } + +.flatpickr-weekwrapper .flatpickr-weeks { + padding: 0 12px; + -webkit-box-shadow: 1px 0 0 #e6e6e6; + box-shadow: 1px 0 0 #e6e6e6; } + +.flatpickr-weekwrapper .flatpickr-weekday { + float: none; + width: 100%; + line-height: 28px; } + +.flatpickr-weekwrapper span.flatpickr-day, .flatpickr-weekwrapper span.flatpickr-day:hover { + display: block; + width: 100%; + max-width: none; + color: rgba(57, 57, 57, 0.3); + background: transparent; + cursor: default; + border: none; } + +.flatpickr-innerContainer { + display: block; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-sizing: border-box; + box-sizing: border-box; + overflow: hidden; } + +.flatpickr-rContainer { + display: inline-block; + padding: 0; + -webkit-box-sizing: border-box; + box-sizing: border-box; } + +.flatpickr-time { + text-align: center; + outline: 0; + display: block; + height: 0; + line-height: 40px; + max-height: 40px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + overflow: hidden; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; } + +.flatpickr-time:after { + content: ""; + display: table; + clear: both; } + +.flatpickr-time .numInputWrapper { + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + width: 40%; + height: 40px; + float: left; } + +.flatpickr-time .numInputWrapper span.arrowUp:after { + border-bottom-color: #393939; } + +.flatpickr-time .numInputWrapper span.arrowDown:after { + border-top-color: #393939; } + +.flatpickr-time.hasSeconds .numInputWrapper { + width: 26%; } + +.flatpickr-time.time24hr .numInputWrapper { + width: 49%; } + +.flatpickr-time input { + background: transparent; + -webkit-box-shadow: none; + box-shadow: none; + border: 0; + border-radius: 0; + text-align: center; + margin: 0; + padding: 0; + height: inherit; + line-height: inherit; + color: #393939; + font-size: 14px; + position: relative; + -webkit-box-sizing: border-box; + box-sizing: border-box; } + +.flatpickr-time input.flatpickr-hour { + font-weight: bold; } + +.flatpickr-time input.flatpickr-minute, .flatpickr-time input.flatpickr-second { + font-weight: 400; } + +.flatpickr-time input:focus { + outline: 0; + border: 0; } + +.flatpickr-time .flatpickr-time-separator, .flatpickr-time .flatpickr-am-pm { + height: inherit; + display: inline-block; + float: left; + line-height: inherit; + color: #393939; + font-weight: bold; + width: 2%; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-align-self: center; + -ms-flex-item-align: center; + align-self: center; } + +.flatpickr-time .flatpickr-am-pm { + outline: 0; + width: 18%; + cursor: pointer; + text-align: center; + font-weight: 400; } + +.flatpickr-time input:hover, .flatpickr-time .flatpickr-am-pm:hover, .flatpickr-time input:focus, .flatpickr-time .flatpickr-am-pm:focus { + background: #f3f3f3; } + +.flatpickr-input[readonly] { + cursor: pointer; } + +@-webkit-keyframes fpFadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); } + to { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } } + +@keyframes fpFadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); } + to { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + DateTime + ========================================================================== */ +.cf-datetime__inner { + display: flex; + align-items: stretch; } + .cf-datetime__inner::before { + display: none; } + +.cf-datetime__input { + flex: 1; + margin: 0; } + +.cf-datetime__button { + flex: 0 0 auto; } + .cf-field .cf-datetime__button { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + margin-bottom: 0; + box-shadow: none; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + File + ========================================================================== */ +.cf-file__inner { + position: relative; + display: flex; + align-items: center; + justify-content: center; + width: 130px; + height: 130px; + border: 1px dashed #b5bcc2; + box-sizing: border-box; } + +.cf-file__content { + position: absolute; + top: -1px; + right: -1px; + bottom: -1px; + left: -1px; + border: 1px solid #b5bcc2; } + +.cf-file__preview { + position: absolute; + top: 0; + left: 0; + bottom: 28px; + width: 100%; + overflow: hidden; + background-color: #e2e4e7; + box-shadow: 0 0 15px rgba(0, 0, 0, 0.1) inset; } + +.cf-file__image { + position: absolute; + top: 50%; + left: 50%; + height: auto; + max-width: 100%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); } + +.cf-file__name { + position: absolute; + bottom: 0; + left: 0; + right: 0; + padding: 5px; + border-top: 1px solid #b5bcc2; + overflow: hidden; + background-color: #f3f4f5; + white-space: nowrap; + text-overflow: ellipsis; } + +.cf-file__browse { + position: relative; } + .cf-file__content ~ .cf-file__browse { + margin-bottom: 29px; + visibility: hidden; + opacity: 0; + transition: visibility 0.1s linear, opacity 0.1s linear; } + .cf-file__inner:hover .cf-file__content ~ .cf-file__browse { + visibility: visible; + opacity: 1; } + +.cf-file__remove { + position: absolute; + top: 5px; + right: 5px; + padding: 0; + border: 0; + outline: none; + background-color: transparent; + cursor: pointer; + transition: opacity 0.1s linear; } + .cf-file__remove:hover { + opacity: .8; } + .cf-file__remove::before { + border-radius: 50%; + background-color: #191e23; + color: #fff; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Map + ========================================================================== */ +.cf-map__search { + position: relative; + z-index: 1; } + +.cf-map__canvas { + position: relative; + z-index: 0; + height: 300px; + border-width: 0 1px 1px; + border-style: solid; + border-color: #e2e4e7; + background-color: #f3f4f5; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Media Gallery + ========================================================================== */ +.cf-media-gallery__list { + display: flex; + flex-wrap: wrap; + max-height: 400px; + padding: 4px; + margin: 0; + overflow-y: auto; + list-style: none outside none; } + .cf-media-gallery__list:empty { + display: none; } + +.cf-media-gallery__actions { + padding: 8px; } + .cf-media-gallery__list:empty ~ .cf-media-gallery__actions { + border-top-width: 0; } + +.cf-media-gallery__item { + flex: 0 0 100%; + min-width: 0; + padding: 4px; + margin: 0; + box-sizing: border-box; } + @media (min-width: 320px) { + .cf-media-gallery__item { + flex-basis: 50%; } } + @media (min-width: 480px) { + .cf-media-gallery__item { + flex-basis: 33.3333%; } } + @media (min-width: 640px) { + .cf-media-gallery__item { + flex-basis: 25%; } } + @media (min-width: 768px) { + .cf-media-gallery__item { + flex-basis: 20%; } } + @media (min-width: 1280px) { + .cf-media-gallery__item { + flex-basis: 16.66667%; } } + @media (min-width: 1440px) { + .cf-media-gallery__item { + flex-basis: 12.5%; } } + @media (min-width: 1680px) { + .cf-media-gallery__item { + flex-basis: 10%; } } + +.cf-media-gallery__item-inner { + position: relative; + display: flex; + flex-direction: column; + height: 100%; } + +.cf-media-gallery__item-preview { + position: relative; + overflow: hidden; + padding-top: 100%; + flex: 1; } + +.cf-media-gallery__item-thumb { + position: absolute; + top: 50%; + left: 50%; + min-width: 100%; + min-height: 100%; + max-width: 150%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + pointer-events: none; } + +.cf-media-gallery__item-icon { + position: absolute; + top: 50%; + left: 50%; + max-width: 100%; + max-height: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); } + +.cf-media-gallery__item-name { + display: block; + padding: 4px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + cursor: move; } + +.cf-media-gallery__item-remove { + position: absolute; + top: 4px; + right: 4px; + padding: 0; + border: 0; + outline: none; + background-color: transparent; + cursor: pointer; } + .cf-media-gallery__item-remove::before { + border-radius: 50%; + background-color: #191e23; + color: #fff; + transition: color 0.1s linear; } + .cf-media-gallery__item-remove:hover::before { + color: #b5bcc2; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + oEmbed + ========================================================================== */ +.cf-oembed__preview { + padding: 12px; + border-width: 0 1px 1px; + border-style: solid; + border-color: #e2e4e7; } + +.cf-oembed__frame { + display: block; + width: 100%; + max-width: 600px; + margin: 0 auto; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Radio + ========================================================================== */ +.cf-radio__list { + margin: 0; } + .cf-radio-image .cf-radio__list { + display: flex; + flex-wrap: wrap; } + +.cf-radio__list-item:last-child { + margin-bottom: 0; } + +.cf-radio-image .cf-radio__list-item { + flex: 0 0 20%; + position: relative; + padding: 4px; } + +.cf-radio-image .cf-radio__label { + display: inline-block; } + +.cf-field .cf-radio__input { + margin-top: 0; } + +.cf-radio-image .cf-radio__input { + position: absolute; + z-index: -1; + top: 50%; + left: 50%; + width: 0; + height: 0; + margin: 0; + outline: 0; + opacity: 0; } + +.cf-radio-image__image { + display: block; + max-width: 100%; + padding: 5px; + box-sizing: border-box; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Radio + ========================================================================== */ +.wp-block .cf-radio__list { + list-style: none outside none; } + +.cf-radio__list-item { + box-sizing: border-box; } + .cf-container-term-meta .cf-radio__list-item { + flex: 0 0 20%; } + .cf-container-theme-options .cf-radio__list-item { + flex: 0 0 10%; } + +.cf-radio-image__image { + border: 1px solid #e2e4e7; } + .cf-radio__input:focus ~ .cf-radio__label .cf-radio-image__image, + .cf-radio__input:checked ~ .cf-radio__label .cf-radio-image__image { + outline: 4px solid #00a0d2; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Select + ========================================================================== */ +.cf-select__input { + display: block; + width: 100%; + margin: 0; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Separator + ========================================================================== */ +.cf-container-term-meta .cf-separator .cf-field__head { + display: none; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Set + ========================================================================== */ +.cf-set__list { + margin: 0; } + +.cf-set__list-item:last-child { + margin-bottom: 0; } + +.cf-field .cf-set__input { + margin-top: 0; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Text + ========================================================================== */ +.cf-text__input { + display: block; + width: 100%; + margin: 0; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Textarea + ========================================================================== */ +.cf-textarea__input { + display: block; + width: 100%; + resize: vertical; } + +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Field + ========================================================================== */ +.cf-field, +.cf-field__head, +.cf-field__body { + box-sizing: border-box; + flex: 1 1 100%; } + +.cf-rich-text .cf-field__body { + box-sizing: content-box; } + +.cf-complex--tabbed-vertical > .cf-field__body { + display: flex; + align-items: flex-start; } + +.cf-field__label { + display: block; } + .cf-html .cf-field__label, + .cf-separator .cf-field__label { + display: none; } + +.cf-field__asterisk { + color: #dc3232; } + +.cf-field__error { + display: block; + margin-top: 4px; + color: #dc3232; } + diff --git a/build/classic/core.js b/build/classic/core.js new file mode 100644 index 000000000..abb368d87 --- /dev/null +++ b/build/classic/core.js @@ -0,0 +1,3986 @@ +this["cf"] = this["cf"] || {}; this["cf"]["core"] = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./packages/core/index.js"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/arrayWithHoles.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nmodule.exports = _arrayWithoutHoles;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/assertThisInitialized.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/classCallCheck.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/classCallCheck.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/createClass.js": +/*!************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/createClass.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/createClass.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/defineProperty.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/extends.js": +/*!********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/extends.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/extends.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/getPrototypeOf.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/inherits.js": +/*!*********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/inherits.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/inherits.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nmodule.exports = _interopRequireDefault;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/interopRequireDefault.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js": +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/iterableToArray.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js": +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/nonIterableRest.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nmodule.exports = _nonIterableSpread;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/nonIterableSpread.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/objectSpread.js": +/*!*************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/objectSpread.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var defineProperty = __webpack_require__(/*! ./defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nmodule.exports = _objectSpread;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/objectSpread.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js": +/*!************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***! + \************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/objectWithoutProperties.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": +/*!**************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var _typeof = __webpack_require__(/*! ../helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n\nvar assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/setPrototypeOf.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js": +/*!**************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ \"./node_modules/@babel/runtime/helpers/arrayWithHoles.js\");\n\nvar iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ \"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js\");\n\nvar nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ \"./node_modules/@babel/runtime/helpers/nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/slicedToArray.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles */ \"./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js\");\n\nvar iterableToArray = __webpack_require__(/*! ./iterableToArray */ \"./node_modules/@babel/runtime/helpers/iterableToArray.js\");\n\nvar nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread */ \"./node_modules/@babel/runtime/helpers/nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/toConsumableArray.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/typeof.js": +/*!*******************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/typeof.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@babel/runtime/helpers/typeof.js?"); + +/***/ }), + +/***/ "./node_modules/@emotion/hash/dist/hash.esm.js": +/*!*****************************************************!*\ + !*** ./node_modules/@emotion/hash/dist/hash.esm.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* eslint-disable */\n// murmurhash2 via https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js\nfunction murmurhash2_32_gc(str) {\n var l = str.length,\n h = l ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n k ^= k >>> 24;\n k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n }\n\n h ^= h >>> 13;\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n h ^= h >>> 15;\n return (h >>> 0).toString(36);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (murmurhash2_32_gc);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@emotion/hash/dist/hash.esm.js?"); + +/***/ }), + +/***/ "./node_modules/@emotion/memoize/dist/memoize.esm.js": +/*!***********************************************************!*\ + !*** ./node_modules/@emotion/memoize/dist/memoize.esm.js ***! + \***********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nfunction memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (memoize);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@emotion/memoize/dist/memoize.esm.js?"); + +/***/ }), + +/***/ "./node_modules/@emotion/stylis/dist/stylis.esm.js": +/*!*********************************************************!*\ + !*** ./node_modules/@emotion/stylis/dist/stylis.esm.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nfunction stylis_min (W) {\n function M(d, c, e, h, a) {\n for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n g = e.charCodeAt(l);\n l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n\n if (0 === b + n + v + m) {\n if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n switch (g) {\n case 32:\n case 9:\n case 59:\n case 13:\n case 10:\n break;\n\n default:\n f += e.charAt(l);\n }\n\n g = 59;\n }\n\n switch (g) {\n case 123:\n f = f.trim();\n q = f.charCodeAt(0);\n k = 1;\n\n for (t = ++l; l < B;) {\n switch (g = e.charCodeAt(l)) {\n case 123:\n k++;\n break;\n\n case 125:\n k--;\n break;\n\n case 47:\n switch (g = e.charCodeAt(l + 1)) {\n case 42:\n case 47:\n a: {\n for (u = l + 1; u < J; ++u) {\n switch (e.charCodeAt(u)) {\n case 47:\n if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n l = u + 1;\n break a;\n }\n\n break;\n\n case 10:\n if (47 === g) {\n l = u + 1;\n break a;\n }\n\n }\n }\n\n l = u;\n }\n\n }\n\n break;\n\n case 91:\n g++;\n\n case 40:\n g++;\n\n case 34:\n case 39:\n for (; l++ < J && e.charCodeAt(l) !== g;) {\n }\n\n }\n\n if (0 === k) break;\n l++;\n }\n\n k = e.substring(t, l);\n 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n\n switch (q) {\n case 64:\n 0 < r && (f = f.replace(N, ''));\n g = f.charCodeAt(1);\n\n switch (g) {\n case 100:\n case 109:\n case 115:\n case 45:\n r = c;\n break;\n\n default:\n r = O;\n }\n\n k = M(c, r, k, g, a + 1);\n t = k.length;\n 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n if (0 < t) switch (g) {\n case 115:\n f = f.replace(da, ea);\n\n case 100:\n case 109:\n case 45:\n k = f + '{' + k + '}';\n break;\n\n case 107:\n f = f.replace(fa, '$1 $2');\n k = f + '{' + k + '}';\n k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n break;\n\n default:\n k = f + k, 112 === h && (k = (p += k, ''));\n } else k = '';\n break;\n\n default:\n k = M(c, X(c, f, I), k, h, a + 1);\n }\n\n F += k;\n k = I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n break;\n\n case 125:\n case 59:\n f = (0 < r ? f.replace(N, '') : f).trim();\n if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n case 0:\n break;\n\n case 64:\n if (105 === g || 99 === g) {\n G += f + e.charAt(l);\n break;\n }\n\n default:\n 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n }\n I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n }\n }\n\n switch (g) {\n case 13:\n case 10:\n 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n z = 1;\n D++;\n break;\n\n case 59:\n case 125:\n if (0 === b + n + v + m) {\n z++;\n break;\n }\n\n default:\n z++;\n y = e.charAt(l);\n\n switch (g) {\n case 9:\n case 32:\n if (0 === n + m + b) switch (x) {\n case 44:\n case 58:\n case 9:\n case 32:\n y = '';\n break;\n\n default:\n 32 !== g && (y = ' ');\n }\n break;\n\n case 0:\n y = '\\\\0';\n break;\n\n case 12:\n y = '\\\\f';\n break;\n\n case 11:\n y = '\\\\v';\n break;\n\n case 38:\n 0 === n + b + m && (r = I = 1, y = '\\f' + y);\n break;\n\n case 108:\n if (0 === n + b + m + E && 0 < u) switch (l - u) {\n case 2:\n 112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n\n case 8:\n 111 === K && (E = K);\n }\n break;\n\n case 58:\n 0 === n + b + m && (u = l);\n break;\n\n case 44:\n 0 === b + v + n + m && (r = 1, y += '\\r');\n break;\n\n case 34:\n case 39:\n 0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n break;\n\n case 91:\n 0 === n + b + v && m++;\n break;\n\n case 93:\n 0 === n + b + v && m--;\n break;\n\n case 41:\n 0 === n + b + m && v--;\n break;\n\n case 40:\n if (0 === n + b + m) {\n if (0 === q) switch (2 * x + 3 * K) {\n case 533:\n break;\n\n default:\n q = 1;\n }\n v++;\n }\n\n break;\n\n case 64:\n 0 === b + v + n + m + u + k && (k = 1);\n break;\n\n case 42:\n case 47:\n if (!(0 < n + m + v)) switch (b) {\n case 0:\n switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n case 235:\n b = 47;\n break;\n\n case 220:\n t = l, b = 42;\n }\n\n break;\n\n case 42:\n 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n }\n }\n\n 0 === b && (f += y);\n }\n\n K = x;\n x = g;\n l++;\n }\n\n t = p.length;\n\n if (0 < t) {\n r = c;\n if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n p = r.join(',') + '{' + p + '}';\n\n if (0 !== w * E) {\n 2 !== w || L(p, 2) || (E = 0);\n\n switch (E) {\n case 111:\n p = p.replace(ha, ':-moz-$1') + p;\n break;\n\n case 112:\n p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n }\n\n E = 0;\n }\n }\n\n return G + p + F;\n }\n\n function X(d, c, e) {\n var h = c.trim().split(ia);\n c = h;\n var a = h.length,\n m = d.length;\n\n switch (m) {\n case 0:\n case 1:\n var b = 0;\n\n for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n c[b] = Z(d, c[b], e, m).trim();\n }\n\n break;\n\n default:\n var v = b = 0;\n\n for (c = []; b < a; ++b) {\n for (var n = 0; n < m; ++n) {\n c[v++] = Z(d[n] + ' ', h[b], e, m).trim();\n }\n }\n\n }\n\n return c;\n }\n\n function Z(d, c, e) {\n var h = c.charCodeAt(0);\n 33 > h && (h = (c = c.trim()).charCodeAt(0));\n\n switch (h) {\n case 38:\n return c.replace(F, '$1' + d.trim());\n\n case 58:\n return d.trim() + c.replace(F, '$1' + d.trim());\n\n default:\n if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n }\n\n return d + c;\n }\n\n function P(d, c, e, h) {\n var a = d + ';',\n m = 2 * c + 3 * e + 4 * h;\n\n if (944 === m) {\n d = a.indexOf(':', 9) + 1;\n var b = a.substring(d, a.length - 1).trim();\n b = a.substring(0, d).trim() + b + ';';\n return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n }\n\n if (0 === w || 2 === w && !L(a, 1)) return a;\n\n switch (m) {\n case 1015:\n return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n\n case 951:\n return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n\n case 963:\n return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n\n case 1009:\n if (100 !== a.charCodeAt(4)) break;\n\n case 969:\n case 942:\n return '-webkit-' + a + a;\n\n case 978:\n return '-webkit-' + a + '-moz-' + a + a;\n\n case 1019:\n case 983:\n return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n\n case 883:\n if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n break;\n\n case 932:\n if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n case 103:\n return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n\n case 115:\n return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n\n case 98:\n return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n }\n return '-webkit-' + a + '-ms-' + a + a;\n\n case 964:\n return '-webkit-' + a + '-ms-flex-' + a + a;\n\n case 1023:\n if (99 !== a.charCodeAt(8)) break;\n b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n\n case 1005:\n return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n\n case 1e3:\n b = a.substring(13).trim();\n c = b.indexOf('-') + 1;\n\n switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n case 226:\n b = a.replace(G, 'tb');\n break;\n\n case 232:\n b = a.replace(G, 'tb-rl');\n break;\n\n case 220:\n b = a.replace(G, 'lr');\n break;\n\n default:\n return a;\n }\n\n return '-webkit-' + a + '-ms-' + b + a;\n\n case 1017:\n if (-1 === a.indexOf('sticky', 9)) break;\n\n case 975:\n c = (a = d).length - 10;\n b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n\n switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n case 203:\n if (111 > b.charCodeAt(8)) break;\n\n case 115:\n a = a.replace(b, '-webkit-' + b) + ';' + a;\n break;\n\n case 207:\n case 102:\n a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n }\n\n return a + ';';\n\n case 938:\n if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n case 105:\n return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n\n case 115:\n return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n\n default:\n return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n }\n break;\n\n case 973:\n case 989:\n if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n\n case 931:\n case 953:\n if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n break;\n\n case 962:\n if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n }\n\n return a;\n }\n\n function L(d, c) {\n var e = d.indexOf(1 === c ? ':' : '{'),\n h = d.substring(0, 3 !== c ? e : 10);\n e = d.substring(e + 1, d.length - 1);\n return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n }\n\n function ea(d, c) {\n var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n }\n\n function H(d, c, e, h, a, m, b, v, n, q) {\n for (var g = 0, x = c, w; g < A; ++g) {\n switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n case void 0:\n case !1:\n case !0:\n case null:\n break;\n\n default:\n x = w;\n }\n }\n\n if (x !== c) return x;\n }\n\n function T(d) {\n switch (d) {\n case void 0:\n case null:\n A = S.length = 0;\n break;\n\n default:\n switch (d.constructor) {\n case Array:\n for (var c = 0, e = d.length; c < e; ++c) {\n T(d[c]);\n }\n\n break;\n\n case Function:\n S[A++] = d;\n break;\n\n case Boolean:\n Y = !!d | 0;\n }\n\n }\n\n return T;\n }\n\n function U(d) {\n d = d.prefix;\n void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n return U;\n }\n\n function B(d, c) {\n var e = d;\n 33 > e.charCodeAt(0) && (e = e.trim());\n V = e;\n e = [V];\n\n if (0 < A) {\n var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n void 0 !== h && 'string' === typeof h && (c = h);\n }\n\n var a = M(O, e, c, 0, 0);\n 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n V = '';\n E = 0;\n z = D = 1;\n return a;\n }\n\n var ca = /^\\0+/g,\n N = /[\\0\\r\\f]/g,\n aa = /: */g,\n ka = /zoo|gra/,\n ma = /([,: ])(transform)/g,\n ia = /,\\r+?/g,\n F = /([\\t\\r\\n ])*\\f?&/g,\n fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n Q = /::(place)/g,\n ha = /:(read-only)/g,\n G = /[svh]\\w+-[tblr]{2}/,\n da = /\\(\\s*(.*)\\s*\\)/g,\n oa = /([\\s\\S]*?);/g,\n ba = /-self|flex-/g,\n na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n ja = /([^-])(image-set\\()/,\n z = 1,\n D = 1,\n E = 0,\n w = 1,\n O = [],\n S = [],\n A = 0,\n R = null,\n Y = 0,\n V = '';\n B.use = T;\n B.set = U;\n void 0 !== W && U(W);\n return B;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (stylis_min);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@emotion/stylis/dist/stylis.esm.js?"); + +/***/ }), + +/***/ "./node_modules/@emotion/unitless/dist/unitless.esm.js": +/*!*************************************************************!*\ + !*** ./node_modules/@emotion/unitless/dist/unitless.esm.js ***! + \*************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nvar unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (unitlessKeys);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/@emotion/unitless/dist/unitless.esm.js?"); + +/***/ }), + +/***/ "./node_modules/assert/assert.js": +/*!***************************************!*\ + !*** ./node_modules/assert/assert.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(global) {\n\n// compare and isBuffer taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js\n// original notice:\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\nfunction compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}\nfunction isBuffer(b) {\n if (global.Buffer && typeof global.Buffer.isBuffer === 'function') {\n return global.Buffer.isBuffer(b);\n }\n return !!(b != null && b._isBuffer);\n}\n\n// based on node assert, original notice:\n\n// http://wiki.commonjs.org/wiki/Unit_Testing/1.0\n//\n// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!\n//\n// Originally from narwhal.js (http://narwhaljs.org)\n// Copyright (c) 2009 Thomas Robinson <280north.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar util = __webpack_require__(/*! util/ */ \"./node_modules/util/util.js\");\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar pSlice = Array.prototype.slice;\nvar functionsHaveNames = (function () {\n return function foo() {}.name === 'foo';\n}());\nfunction pToString (obj) {\n return Object.prototype.toString.call(obj);\n}\nfunction isView(arrbuf) {\n if (isBuffer(arrbuf)) {\n return false;\n }\n if (typeof global.ArrayBuffer !== 'function') {\n return false;\n }\n if (typeof ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(arrbuf);\n }\n if (!arrbuf) {\n return false;\n }\n if (arrbuf instanceof DataView) {\n return true;\n }\n if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) {\n return true;\n }\n return false;\n}\n// 1. The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\n\n// 2. The AssertionError is defined in assert.\n// new assert.AssertionError({ message: message,\n// actual: actual,\n// expected: expected })\n\nvar regex = /\\s*function\\s+([^\\(\\s]*)\\s*/;\n// based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js\nfunction getName(func) {\n if (!util.isFunction(func)) {\n return;\n }\n if (functionsHaveNames) {\n return func.name;\n }\n var str = func.toString();\n var match = str.match(regex);\n return match && match[1];\n}\nassert.AssertionError = function AssertionError(options) {\n this.name = 'AssertionError';\n this.actual = options.actual;\n this.expected = options.expected;\n this.operator = options.operator;\n if (options.message) {\n this.message = options.message;\n this.generatedMessage = false;\n } else {\n this.message = getMessage(this);\n this.generatedMessage = true;\n }\n var stackStartFunction = options.stackStartFunction || fail;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, stackStartFunction);\n } else {\n // non v8 browsers so we can have a stacktrace\n var err = new Error();\n if (err.stack) {\n var out = err.stack;\n\n // try to strip useless frames\n var fn_name = getName(stackStartFunction);\n var idx = out.indexOf('\\n' + fn_name);\n if (idx >= 0) {\n // once we have located the function frame\n // we need to strip out everything before it (and its line)\n var next_line = out.indexOf('\\n', idx + 1);\n out = out.substring(next_line + 1);\n }\n\n this.stack = out;\n }\n }\n};\n\n// assert.AssertionError instanceof Error\nutil.inherits(assert.AssertionError, Error);\n\nfunction truncate(s, n) {\n if (typeof s === 'string') {\n return s.length < n ? s : s.slice(0, n);\n } else {\n return s;\n }\n}\nfunction inspect(something) {\n if (functionsHaveNames || !util.isFunction(something)) {\n return util.inspect(something);\n }\n var rawname = getName(something);\n var name = rawname ? ': ' + rawname : '';\n return '[Function' + name + ']';\n}\nfunction getMessage(self) {\n return truncate(inspect(self.actual), 128) + ' ' +\n self.operator + ' ' +\n truncate(inspect(self.expected), 128);\n}\n\n// At present only the three keys mentioned above are used and\n// understood by the spec. Implementations or sub modules can pass\n// other keys to the AssertionError's constructor - they will be\n// ignored.\n\n// 3. All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction fail(actual, expected, message, operator, stackStartFunction) {\n throw new assert.AssertionError({\n message: message,\n actual: actual,\n expected: expected,\n operator: operator,\n stackStartFunction: stackStartFunction\n });\n}\n\n// EXTENSION! allows for well behaved errors defined elsewhere.\nassert.fail = fail;\n\n// 4. Pure assertion tests whether a value is truthy, as determined\n// by !!guard.\n// assert.ok(guard, message_opt);\n// This statement is equivalent to assert.equal(true, !!guard,\n// message_opt);. To test strictly for the value true, use\n// assert.strictEqual(true, guard, message_opt);.\n\nfunction ok(value, message) {\n if (!value) fail(value, true, message, '==', assert.ok);\n}\nassert.ok = ok;\n\n// 5. The equality assertion tests shallow, coercive equality with\n// ==.\n// assert.equal(actual, expected, message_opt);\n\nassert.equal = function equal(actual, expected, message) {\n if (actual != expected) fail(actual, expected, message, '==', assert.equal);\n};\n\n// 6. The non-equality assertion tests for whether two objects are not equal\n// with != assert.notEqual(actual, expected, message_opt);\n\nassert.notEqual = function notEqual(actual, expected, message) {\n if (actual == expected) {\n fail(actual, expected, message, '!=', assert.notEqual);\n }\n};\n\n// 7. The equivalence assertion tests a deep equality relation.\n// assert.deepEqual(actual, expected, message_opt);\n\nassert.deepEqual = function deepEqual(actual, expected, message) {\n if (!_deepEqual(actual, expected, false)) {\n fail(actual, expected, message, 'deepEqual', assert.deepEqual);\n }\n};\n\nassert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {\n if (!_deepEqual(actual, expected, true)) {\n fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual);\n }\n};\n\nfunction _deepEqual(actual, expected, strict, memos) {\n // 7.1. All identical values are equivalent, as determined by ===.\n if (actual === expected) {\n return true;\n } else if (isBuffer(actual) && isBuffer(expected)) {\n return compare(actual, expected) === 0;\n\n // 7.2. If the expected value is a Date object, the actual value is\n // equivalent if it is also a Date object that refers to the same time.\n } else if (util.isDate(actual) && util.isDate(expected)) {\n return actual.getTime() === expected.getTime();\n\n // 7.3 If the expected value is a RegExp object, the actual value is\n // equivalent if it is also a RegExp object with the same source and\n // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).\n } else if (util.isRegExp(actual) && util.isRegExp(expected)) {\n return actual.source === expected.source &&\n actual.global === expected.global &&\n actual.multiline === expected.multiline &&\n actual.lastIndex === expected.lastIndex &&\n actual.ignoreCase === expected.ignoreCase;\n\n // 7.4. Other pairs that do not both pass typeof value == 'object',\n // equivalence is determined by ==.\n } else if ((actual === null || typeof actual !== 'object') &&\n (expected === null || typeof expected !== 'object')) {\n return strict ? actual === expected : actual == expected;\n\n // If both values are instances of typed arrays, wrap their underlying\n // ArrayBuffers in a Buffer each to increase performance\n // This optimization requires the arrays to have the same type as checked by\n // Object.prototype.toString (aka pToString). Never perform binary\n // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their\n // bit patterns are not identical.\n } else if (isView(actual) && isView(expected) &&\n pToString(actual) === pToString(expected) &&\n !(actual instanceof Float32Array ||\n actual instanceof Float64Array)) {\n return compare(new Uint8Array(actual.buffer),\n new Uint8Array(expected.buffer)) === 0;\n\n // 7.5 For all other Object pairs, including Array objects, equivalence is\n // determined by having the same number of owned properties (as verified\n // with Object.prototype.hasOwnProperty.call), the same set of keys\n // (although not necessarily the same order), equivalent values for every\n // corresponding key, and an identical 'prototype' property. Note: this\n // accounts for both named and indexed properties on Arrays.\n } else if (isBuffer(actual) !== isBuffer(expected)) {\n return false;\n } else {\n memos = memos || {actual: [], expected: []};\n\n var actualIndex = memos.actual.indexOf(actual);\n if (actualIndex !== -1) {\n if (actualIndex === memos.expected.indexOf(expected)) {\n return true;\n }\n }\n\n memos.actual.push(actual);\n memos.expected.push(expected);\n\n return objEquiv(actual, expected, strict, memos);\n }\n}\n\nfunction isArguments(object) {\n return Object.prototype.toString.call(object) == '[object Arguments]';\n}\n\nfunction objEquiv(a, b, strict, actualVisitedObjects) {\n if (a === null || a === undefined || b === null || b === undefined)\n return false;\n // if one is a primitive, the other must be same\n if (util.isPrimitive(a) || util.isPrimitive(b))\n return a === b;\n if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))\n return false;\n var aIsArgs = isArguments(a);\n var bIsArgs = isArguments(b);\n if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))\n return false;\n if (aIsArgs) {\n a = pSlice.call(a);\n b = pSlice.call(b);\n return _deepEqual(a, b, strict);\n }\n var ka = objectKeys(a);\n var kb = objectKeys(b);\n var key, i;\n // having the same number of owned properties (keys incorporates\n // hasOwnProperty)\n if (ka.length !== kb.length)\n return false;\n //the same set of keys (although not necessarily the same order),\n ka.sort();\n kb.sort();\n //~~~cheap key test\n for (i = ka.length - 1; i >= 0; i--) {\n if (ka[i] !== kb[i])\n return false;\n }\n //equivalent values for every corresponding key, and\n //~~~possibly expensive deep test\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects))\n return false;\n }\n return true;\n}\n\n// 8. The non-equivalence assertion tests for any deep inequality.\n// assert.notDeepEqual(actual, expected, message_opt);\n\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n if (_deepEqual(actual, expected, false)) {\n fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);\n }\n};\n\nassert.notDeepStrictEqual = notDeepStrictEqual;\nfunction notDeepStrictEqual(actual, expected, message) {\n if (_deepEqual(actual, expected, true)) {\n fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);\n }\n}\n\n\n// 9. The strict equality assertion tests strict equality, as determined by ===.\n// assert.strictEqual(actual, expected, message_opt);\n\nassert.strictEqual = function strictEqual(actual, expected, message) {\n if (actual !== expected) {\n fail(actual, expected, message, '===', assert.strictEqual);\n }\n};\n\n// 10. The strict non-equality assertion tests for strict inequality, as\n// determined by !==. assert.notStrictEqual(actual, expected, message_opt);\n\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n if (actual === expected) {\n fail(actual, expected, message, '!==', assert.notStrictEqual);\n }\n};\n\nfunction expectedException(actual, expected) {\n if (!actual || !expected) {\n return false;\n }\n\n if (Object.prototype.toString.call(expected) == '[object RegExp]') {\n return expected.test(actual);\n }\n\n try {\n if (actual instanceof expected) {\n return true;\n }\n } catch (e) {\n // Ignore. The instanceof check doesn't work for arrow functions.\n }\n\n if (Error.isPrototypeOf(expected)) {\n return false;\n }\n\n return expected.call({}, actual) === true;\n}\n\nfunction _tryBlock(block) {\n var error;\n try {\n block();\n } catch (e) {\n error = e;\n }\n return error;\n}\n\nfunction _throws(shouldThrow, block, expected, message) {\n var actual;\n\n if (typeof block !== 'function') {\n throw new TypeError('\"block\" argument must be a function');\n }\n\n if (typeof expected === 'string') {\n message = expected;\n expected = null;\n }\n\n actual = _tryBlock(block);\n\n message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +\n (message ? ' ' + message : '.');\n\n if (shouldThrow && !actual) {\n fail(actual, expected, 'Missing expected exception' + message);\n }\n\n var userProvidedMessage = typeof message === 'string';\n var isUnwantedException = !shouldThrow && util.isError(actual);\n var isUnexpectedException = !shouldThrow && actual && !expected;\n\n if ((isUnwantedException &&\n userProvidedMessage &&\n expectedException(actual, expected)) ||\n isUnexpectedException) {\n fail(actual, expected, 'Got unwanted exception' + message);\n }\n\n if ((shouldThrow && actual && expected &&\n !expectedException(actual, expected)) || (!shouldThrow && actual)) {\n throw actual;\n }\n}\n\n// 11. Expected to throw an error:\n// assert.throws(block, Error_opt, message_opt);\n\nassert.throws = function(block, /*optional*/error, /*optional*/message) {\n _throws(true, block, error, message);\n};\n\n// EXTENSION! This is annoying to write outside this module.\nassert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {\n _throws(false, block, error, message);\n};\n\nassert.ifError = function(err) { if (err) throw err; };\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n if (hasOwn.call(obj, key)) keys.push(key);\n }\n return keys;\n};\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/assert/assert.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-debounce/es/debounce.js": +/*!******************************************************!*\ + !*** ./node_modules/callbag-debounce/es/debounce.js ***! + \******************************************************/ +/*! exports provided: debounce */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"debounce\", function() { return debounce; });\n/**\n * Debounces the given listenable source\n *\n * @param {number} wait - The number of ms to wait before letting a value pass\n * @returns {Function}\n */\nfunction debounce(wait) {\n return function (source) { return function (start, sink) {\n if (start !== 0)\n return;\n var timeout;\n source(0, function (t, d) {\n if (t === 1 || (t === 2 && d === undefined)) {\n // t === 1 means the source is emitting a value\n // t === 2 and d === undefined means the source emits a completion\n if (!timeout && t === 2) {\n return sink(t, d);\n }\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(function () {\n sink(t, d);\n timeout = undefined;\n }, wait);\n }\n else\n sink(t, d);\n });\n }; };\n}\n//# sourceMappingURL=debounce.js.map\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-debounce/es/debounce.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js": +/*!***********************************************************************************************!*\ + !*** ./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js ***! + \***********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nvar is = function is(previous, current) {\n return previous === current;\n};\n\nfunction distinctUntilChanged(compare) {\n if (compare === void 0) {\n compare = is;\n }\n\n return function (source) {\n return function (start, sink) {\n if (start !== 0) return;\n var inited = false;\n var prev;\n var talkback;\n source(0, function (type, data) {\n if (type === 0) {\n talkback = data;\n }\n\n if (type !== 1) {\n sink(type, data);\n return;\n }\n\n if (inited && compare(prev, data)) {\n talkback(1);\n return;\n }\n\n inited = true;\n prev = data;\n sink(1, data);\n });\n };\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (distinctUntilChanged);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-drop-until/dist/callbag-drop-until.es.js": +/*!***********************************************************************!*\ + !*** ./node_modules/callbag-drop-until/dist/callbag-drop-until.es.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nfunction dropUntil(notifier) {\n return function (source) {\n return function (start, sink) {\n if (start !== 0) return;\n var sourceTalkback;\n var notifierTalkback;\n var notified = false;\n source(0, function (type, data) {\n if (type === 0) {\n sourceTalkback = data;\n notifier(0, function (type, data) {\n if (type === 0) {\n notifierTalkback = data;\n notifierTalkback(1);\n } else if (type === 1) {\n notified = true;\n notifierTalkback(2);\n }\n });\n }\n\n if (type !== 1) {\n sink(type, data);\n return;\n }\n\n if (!notified) {\n sourceTalkback(1);\n return;\n }\n\n sink(1, data);\n });\n };\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (dropUntil);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-drop-until/dist/callbag-drop-until.es.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-of/dist/callbag-of.esm.js": +/*!********************************************************!*\ + !*** ./node_modules/callbag-of/dist/callbag-of.esm.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nfunction of() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return function (start, sink) {\n if (start !== 0) return;\n var disposed = false;\n sink(0, function (type) {\n if (type !== 2) return;\n disposed = true;\n values.length = 0;\n });\n\n while (values.length !== 0) {\n sink(1, values.shift());\n }\n\n if (disposed) return;\n sink(2);\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (of);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-of/dist/callbag-of.esm.js?"); + +/***/ }), + +/***/ "./node_modules/create-emotion/dist/index.esm.js": +/*!*******************************************************!*\ + !*** ./node_modules/create-emotion/dist/index.esm.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ \"./node_modules/@emotion/memoize/dist/memoize.esm.js\");\n/* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/unitless */ \"./node_modules/@emotion/unitless/dist/unitless.esm.js\");\n/* harmony import */ var _emotion_hash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/hash */ \"./node_modules/@emotion/hash/dist/hash.esm.js\");\n/* harmony import */ var _emotion_stylis__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/stylis */ \"./node_modules/@emotion/stylis/dist/stylis.esm.js\");\n/* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! stylis-rule-sheet */ \"./node_modules/stylis-rule-sheet/index.js\");\n/* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\n\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar processStyleName = Object(_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function (styleName) {\n return styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\nvar processStyleValue = function processStyleValue(key, value) {\n if (value == null || typeof value === 'boolean') {\n return '';\n }\n\n if (_emotion_unitless__WEBPACK_IMPORTED_MODULE_1__[\"default\"][key] !== 1 && key.charCodeAt(1) !== 45 && // custom properties\n !isNaN(value) && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nif (true) {\n var contentValuePattern = /(attr|calc|counters?|url)\\(/;\n var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset'];\n var oldProcessStyleValue = processStyleValue;\n\n processStyleValue = function processStyleValue(key, value) {\n if (key === 'content') {\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n console.error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n\n return oldProcessStyleValue(key, value);\n };\n}\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'function':\n if (true) {\n console.error('Passing functions to cx is deprecated and will be removed in the next major version of Emotion.\\n' + 'Please call the function before passing it to cx.');\n }\n\n toAdd = classnames([arg()]);\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\nvar isBrowser = typeof document !== 'undefined';\n\n/*\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n- 'polyfills' on server side\n\n// usage\n\nimport StyleSheet from 'glamor/lib/sheet'\nlet styleSheet = new StyleSheet()\n\nstyleSheet.inject()\n- 'injects' the stylesheet into the page (or into memory if on server)\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i];\n }\n }\n}\n\nfunction makeStyleTag(opts) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', opts.key || '');\n\n if (opts.nonce !== undefined) {\n tag.setAttribute('nonce', opts.nonce);\n }\n\n tag.appendChild(document.createTextNode('')) // $FlowFixMe\n ;\n (opts.container !== undefined ? opts.container : document.head).appendChild(tag);\n return tag;\n}\n\nvar StyleSheet =\n/*#__PURE__*/\nfunction () {\n function StyleSheet(options) {\n this.isSpeedy = \"development\" === 'production'; // the big drawback here is that the css won't be editable in devtools\n\n this.tags = [];\n this.ctr = 0;\n this.opts = options;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.inject = function inject() {\n if (this.injected) {\n throw new Error('already injected!');\n }\n\n this.tags[0] = makeStyleTag(this.opts);\n this.injected = true;\n };\n\n _proto.speedy = function speedy(bool) {\n if (this.ctr !== 0) {\n // cannot change speedy mode after inserting any rule to sheet. Either call speedy(${bool}) earlier in your app, or call flush() before speedy(${bool})\n throw new Error(\"cannot change speedy now\");\n }\n\n this.isSpeedy = !!bool;\n };\n\n _proto.insert = function insert(rule, sourceMap) {\n // this is the ultrafast version, works across browsers\n if (this.isSpeedy) {\n var tag = this.tags[this.tags.length - 1];\n var sheet = sheetForTag(tag);\n\n try {\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n if (true) {\n console.warn('illegal rule', rule); // eslint-disable-line no-console\n }\n }\n } else {\n var _tag = makeStyleTag(this.opts);\n\n this.tags.push(_tag);\n\n _tag.appendChild(document.createTextNode(rule + (sourceMap || '')));\n }\n\n this.ctr++;\n\n if (this.ctr % 65000 === 0) {\n this.tags.push(makeStyleTag(this.opts));\n }\n };\n\n _proto.flush = function flush() {\n // $FlowFixMe\n this.tags.forEach(function (tag) {\n return tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0; // todo - look for remnants in document.styleSheets\n\n this.injected = false;\n };\n\n return StyleSheet;\n}();\n\nfunction createEmotion(context, options) {\n if (context.__SECRET_EMOTION__ !== undefined) {\n return context.__SECRET_EMOTION__;\n }\n\n if (options === undefined) options = {};\n var key = options.key || 'css';\n\n if (true) {\n if (/[^a-z-]/.test(key)) {\n throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n }\n }\n\n var current;\n\n function insertRule(rule) {\n current += rule;\n\n if (isBrowser) {\n sheet.insert(rule, currentSourceMap);\n }\n }\n\n var insertionPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_4___default()(insertRule);\n var stylisOptions;\n\n if (options.prefix !== undefined) {\n stylisOptions = {\n prefix: options.prefix\n };\n }\n\n var caches = {\n registered: {},\n inserted: {},\n nonce: options.nonce,\n key: key\n };\n var sheet = new StyleSheet(options);\n\n if (isBrowser) {\n // 🚀\n sheet.inject();\n }\n\n var stylis = new _emotion_stylis__WEBPACK_IMPORTED_MODULE_3__[\"default\"](stylisOptions);\n stylis.use(options.stylisPlugins)(insertionPlugin);\n var currentSourceMap = '';\n\n function handleInterpolation(interpolation, couldBeSelectorInterpolation) {\n if (interpolation == null) {\n return '';\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n return '';\n\n case 'function':\n if (interpolation.__emotion_styles !== undefined) {\n var selector = interpolation.toString();\n\n if (selector === 'NO_COMPONENT_SELECTOR' && \"development\" !== 'production') {\n throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n }\n\n return selector;\n }\n\n if (this === undefined && \"development\" !== 'production') {\n console.error('Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n\n return handleInterpolation.call(this, this === undefined ? interpolation() : // $FlowFixMe\n interpolation(this.mergedProps, this.context), couldBeSelectorInterpolation);\n\n case 'object':\n return createStringFromObject.call(this, interpolation);\n\n default:\n var cached = caches.registered[interpolation];\n return couldBeSelectorInterpolation === false && cached !== undefined ? cached : interpolation;\n }\n }\n\n var objectToStringCache = new WeakMap();\n\n function createStringFromObject(obj) {\n if (objectToStringCache.has(obj)) {\n // $FlowFixMe\n return objectToStringCache.get(obj);\n }\n\n var string = '';\n\n if (Array.isArray(obj)) {\n obj.forEach(function (interpolation) {\n string += handleInterpolation.call(this, interpolation, false);\n }, this);\n } else {\n Object.keys(obj).forEach(function (key) {\n if (typeof obj[key] !== 'object') {\n if (caches.registered[obj[key]] !== undefined) {\n string += key + \"{\" + caches.registered[obj[key]] + \"}\";\n } else {\n string += processStyleName(key) + \":\" + processStyleValue(key, obj[key]) + \";\";\n }\n } else {\n if (key === 'NO_COMPONENT_SELECTOR' && \"development\" !== 'production') {\n throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n }\n\n if (Array.isArray(obj[key]) && typeof obj[key][0] === 'string' && caches.registered[obj[key][0]] === undefined) {\n obj[key].forEach(function (value) {\n string += processStyleName(key) + \":\" + processStyleValue(key, value) + \";\";\n });\n } else {\n string += key + \"{\" + handleInterpolation.call(this, obj[key], false) + \"}\";\n }\n }\n }, this);\n }\n\n objectToStringCache.set(obj, string);\n return string;\n }\n\n var name;\n var stylesWithLabel;\n var labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*;/g;\n\n var createClassName = function createClassName(styles, identifierName) {\n return Object(_emotion_hash__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(styles + identifierName) + identifierName;\n };\n\n if (true) {\n var oldCreateClassName = createClassName;\n var sourceMappingUrlPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//g;\n\n createClassName = function createClassName(styles, identifierName) {\n return oldCreateClassName(styles.replace(sourceMappingUrlPattern, function (sourceMap) {\n currentSourceMap = sourceMap;\n return '';\n }), identifierName);\n };\n }\n\n var createStyles = function createStyles(strings) {\n var stringMode = true;\n var styles = '';\n var identifierName = '';\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation.call(this, strings, false);\n } else {\n styles += strings[0];\n }\n\n for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n interpolations.forEach(function (interpolation, i) {\n styles += handleInterpolation.call(this, interpolation, styles.charCodeAt(styles.length - 1) === 46 // .\n );\n\n if (stringMode === true && strings[i + 1] !== undefined) {\n styles += strings[i + 1];\n }\n }, this);\n stylesWithLabel = styles;\n styles = styles.replace(labelPattern, function (match, p1) {\n identifierName += \"-\" + p1;\n return '';\n });\n name = createClassName(styles, identifierName);\n return styles;\n };\n\n if (true) {\n var oldStylis = stylis;\n\n stylis = function stylis(selector, styles) {\n oldStylis(selector, styles);\n currentSourceMap = '';\n };\n }\n\n function insert(scope, styles) {\n if (caches.inserted[name] === undefined) {\n current = '';\n stylis(scope, styles);\n caches.inserted[name] = current;\n }\n }\n\n var css = function css() {\n var styles = createStyles.apply(this, arguments);\n var selector = key + \"-\" + name;\n\n if (caches.registered[selector] === undefined) {\n caches.registered[selector] = stylesWithLabel;\n }\n\n insert(\".\" + selector, styles);\n return selector;\n };\n\n var keyframes = function keyframes() {\n var styles = createStyles.apply(this, arguments);\n var animation = \"animation-\" + name;\n insert('', \"@keyframes \" + animation + \"{\" + styles + \"}\");\n return animation;\n };\n\n var injectGlobal = function injectGlobal() {\n var styles = createStyles.apply(this, arguments);\n insert('', styles);\n };\n\n function getRegisteredStyles(registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (caches.registered[className] !== undefined) {\n registeredStyles.push(className);\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n }\n\n function merge(className, sourceMap) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles, sourceMap);\n }\n\n function cx() {\n for (var _len2 = arguments.length, classNames = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n classNames[_key2] = arguments[_key2];\n }\n\n return merge(classnames(classNames));\n }\n\n function hydrateSingleId(id) {\n caches.inserted[id] = true;\n }\n\n function hydrate(ids) {\n ids.forEach(hydrateSingleId);\n }\n\n function flush() {\n if (isBrowser) {\n sheet.flush();\n sheet.inject();\n }\n\n caches.inserted = {};\n caches.registered = {};\n }\n\n if (isBrowser) {\n var chunks = document.querySelectorAll(\"[data-emotion-\" + key + \"]\");\n Array.prototype.forEach.call(chunks, function (node) {\n // $FlowFixMe\n sheet.tags[0].parentNode.insertBefore(node, sheet.tags[0]); // $FlowFixMe\n\n node.getAttribute(\"data-emotion-\" + key).split(' ').forEach(hydrateSingleId);\n });\n }\n\n var emotion = {\n flush: flush,\n hydrate: hydrate,\n cx: cx,\n merge: merge,\n getRegisteredStyles: getRegisteredStyles,\n injectGlobal: injectGlobal,\n keyframes: keyframes,\n css: css,\n sheet: sheet,\n caches: caches\n };\n context.__SECRET_EMOTION__ = emotion;\n return emotion;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createEmotion);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/create-emotion/dist/index.esm.js?"); + +/***/ }), + +/***/ "./node_modules/dom-helpers/class/addClass.js": +/*!****************************************************!*\ + !*** ./node_modules/dom-helpers/class/addClass.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.default = addClass;\n\nvar _hasClass = _interopRequireDefault(__webpack_require__(/*! ./hasClass */ \"./node_modules/dom-helpers/class/hasClass.js\"));\n\nfunction addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className);\n}\n\nmodule.exports = exports[\"default\"];\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/dom-helpers/class/addClass.js?"); + +/***/ }), + +/***/ "./node_modules/dom-helpers/class/hasClass.js": +/*!****************************************************!*\ + !*** ./node_modules/dom-helpers/class/hasClass.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nexports.__esModule = true;\nexports.default = hasClass;\n\nfunction hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);else return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}\n\nmodule.exports = exports[\"default\"];\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/dom-helpers/class/hasClass.js?"); + +/***/ }), + +/***/ "./node_modules/dom-helpers/class/removeClass.js": +/*!*******************************************************!*\ + !*** ./node_modules/dom-helpers/class/removeClass.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp('(^|\\\\s)' + classToRemove + '(?:\\\\s|$)', 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n\nmodule.exports = function removeClass(element, className) {\n if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n};\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/dom-helpers/class/removeClass.js?"); + +/***/ }), + +/***/ "./node_modules/emotion/dist/index.esm.js": +/*!************************************************!*\ + !*** ./node_modules/emotion/dist/index.esm.js ***! + \************************************************/ +/*! exports provided: flush, hydrate, cx, merge, getRegisteredStyles, injectGlobal, keyframes, css, sheet, caches */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flush\", function() { return flush; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hydrate\", function() { return hydrate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cx\", function() { return cx; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return merge; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getRegisteredStyles\", function() { return getRegisteredStyles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"injectGlobal\", function() { return injectGlobal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keyframes\", function() { return keyframes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"css\", function() { return css; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sheet\", function() { return sheet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"caches\", function() { return caches; });\n/* harmony import */ var create_emotion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! create-emotion */ \"./node_modules/create-emotion/dist/index.esm.js\");\n\n\nvar context = typeof global !== 'undefined' ? global : {};\n\nvar _createEmotion = Object(create_emotion__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(context),\n flush = _createEmotion.flush,\n hydrate = _createEmotion.hydrate,\n cx = _createEmotion.cx,\n merge = _createEmotion.merge,\n getRegisteredStyles = _createEmotion.getRegisteredStyles,\n injectGlobal = _createEmotion.injectGlobal,\n keyframes = _createEmotion.keyframes,\n css = _createEmotion.css,\n sheet = _createEmotion.sheet,\n caches = _createEmotion.caches;\n\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/emotion/dist/index.esm.js?"); + +/***/ }), + +/***/ "./node_modules/flatpickr/dist/flatpickr.js": +/*!**************************************************!*\ + !*** ./node_modules/flatpickr/dist/flatpickr.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* flatpickr v4.5.2, @license MIT */\n(function (global, factory) {\n true ? module.exports = factory() :\n undefined;\n}(this, (function () { 'use strict';\n\n var pad = function pad(number) {\n return (\"0\" + number).slice(-2);\n };\n var int = function int(bool) {\n return bool === true ? 1 : 0;\n };\n function debounce(func, wait, immediate) {\n if (immediate === void 0) {\n immediate = false;\n }\n\n var timeout;\n return function () {\n var context = this,\n args = arguments;\n timeout !== null && clearTimeout(timeout);\n timeout = window.setTimeout(function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n }\n var arrayify = function arrayify(obj) {\n return obj instanceof Array ? obj : [obj];\n };\n\n var do_nothing = function do_nothing() {\n return undefined;\n };\n\n var monthToStr = function monthToStr(monthNumber, shorthand, locale) {\n return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber];\n };\n var revFormat = {\n D: do_nothing,\n F: function F(dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function G(dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n H: function H(dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function J(dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function K(dateObj, amPM, locale) {\n dateObj.setHours(dateObj.getHours() % 12 + 12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function M(dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function S(dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function U(_, unixSeconds) {\n return new Date(parseFloat(unixSeconds) * 1000);\n },\n W: function W(dateObj, weekNum) {\n var weekNumber = parseInt(weekNum);\n return new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n },\n Y: function Y(dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function Z(_, ISODate) {\n return new Date(ISODate);\n },\n d: function d(dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function h(dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n i: function i(dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function j(dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: do_nothing,\n m: function m(dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function n(dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function s(dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n w: do_nothing,\n y: function y(dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n }\n };\n var tokenRegex = {\n D: \"(\\\\w+)\",\n F: \"(\\\\w+)\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"(\\\\w+)\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"(\\\\w+)\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\"\n };\n var formats = {\n Z: function Z(date) {\n return date.toISOString();\n },\n D: function D(date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n F: function F(date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n G: function G(date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n H: function H(date) {\n return pad(date.getHours());\n },\n J: function J(date, locale) {\n return locale.ordinal !== undefined ? date.getDate() + locale.ordinal(date.getDate()) : date.getDate();\n },\n K: function K(date, locale) {\n return locale.amPM[int(date.getHours() > 11)];\n },\n M: function M(date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n S: function S(date) {\n return pad(date.getSeconds());\n },\n U: function U(date) {\n return date.getTime() / 1000;\n },\n W: function W(date, _, options) {\n return options.getWeek(date);\n },\n Y: function Y(date) {\n return date.getFullYear();\n },\n d: function d(date) {\n return pad(date.getDate());\n },\n h: function h(date) {\n return date.getHours() % 12 ? date.getHours() % 12 : 12;\n },\n i: function i(date) {\n return pad(date.getMinutes());\n },\n j: function j(date) {\n return date.getDate();\n },\n l: function l(date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: function m(date) {\n return pad(date.getMonth() + 1);\n },\n n: function n(date) {\n return date.getMonth() + 1;\n },\n s: function s(date) {\n return date.getSeconds();\n },\n w: function w(date) {\n return date.getDay();\n },\n y: function y(date) {\n return String(date.getFullYear()).substring(2);\n }\n };\n\n var english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]\n },\n months: {\n shorthand: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n longhand: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function ordinal(nth) {\n var s = nth % 100;\n if (s > 3 && s < 21) return \"th\";\n\n switch (s % 10) {\n case 1:\n return \"st\";\n\n case 2:\n return \"nd\";\n\n case 3:\n return \"rd\";\n\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\"\n };\n\n var createDateFormatter = function createDateFormatter(_ref) {\n var _ref$config = _ref.config,\n config = _ref$config === void 0 ? defaults : _ref$config,\n _ref$l10n = _ref.l10n,\n l10n = _ref$l10n === void 0 ? english : _ref$l10n;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n\n if (config.formatDate !== undefined) {\n return config.formatDate(dateObj, frmt, locale);\n }\n\n return frmt.split(\"\").map(function (c, i, arr) {\n return formats[c] && arr[i - 1] !== \"\\\\\" ? formats[c](dateObj, locale, config) : c !== \"\\\\\" ? c : \"\";\n }).join(\"\");\n };\n };\n var createDateParser = function createDateParser(_ref2) {\n var _ref2$config = _ref2.config,\n config = _ref2$config === void 0 ? defaults : _ref2$config,\n _ref2$l10n = _ref2.l10n,\n l10n = _ref2$l10n === void 0 ? english : _ref2$l10n;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date) return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var date_orig = date;\n if (date instanceof Date) parsedDate = new Date(date.getTime());else if (typeof date !== \"string\" && date.toFixed !== undefined) parsedDate = new Date(date);else if (typeof date === \"string\") {\n var format = givenFormat || (config || defaults).dateFormat;\n var datestr = String(date).trim();\n\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n } else if (/Z$/.test(datestr) || /GMT$/.test(datestr)) parsedDate = new Date(date);else if (config && config.parseDate) parsedDate = config.parseDate(date, format);else {\n parsedDate = !config || !config.noCalendar ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0) : new Date(new Date().setHours(0, 0, 0, 0));\n var matched,\n ops = [];\n\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token = format[i];\n var isBackSlash = token === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n\n if (tokenRegex[token] && !escaped) {\n regexStr += tokenRegex[token];\n var match = new RegExp(regexStr).exec(date);\n\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token],\n val: match[++matchIndex]\n });\n }\n } else if (!isBackSlash) regexStr += \".\";\n\n ops.forEach(function (_ref3) {\n var fn = _ref3.fn,\n val = _ref3.val;\n return parsedDate = fn(parsedDate, val, locale) || parsedDate;\n });\n }\n\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + date_orig));\n return undefined;\n }\n\n if (timeless === true) parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n };\n function compareDates(date1, date2, timeless) {\n if (timeless === void 0) {\n timeless = true;\n }\n\n if (timeless !== false) {\n return new Date(date1.getTime()).setHours(0, 0, 0, 0) - new Date(date2.getTime()).setHours(0, 0, 0, 0);\n }\n\n return date1.getTime() - date2.getTime();\n }\n var getWeek = function getWeek(givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7);\n var week1 = new Date(date.getFullYear(), 0, 4);\n return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000 - 3 + (week1.getDay() + 6) % 7) / 7);\n };\n var isBetween = function isBetween(ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n };\n var duration = {\n DAY: 86400000\n };\n\n var HOOKS = [\"onChange\", \"onClose\", \"onDayCreate\", \"onDestroy\", \"onKeyDown\", \"onMonthChange\", \"onOpen\", \"onParseConfig\", \"onReady\", \"onValueUpdate\", \"onYearChange\", \"onPreCalendarPosition\"];\n var defaults = {\n _disable: [],\n _enable: [],\n allowInput: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" && window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enable: [],\n enableSeconds: false,\n enableTime: false,\n errorHandler: function errorHandler(err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: getWeek,\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n nextArrow: \"\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false\n };\n\n function toggleClass(elem, className, bool) {\n if (bool === true) return elem.classList.add(className);\n elem.classList.remove(className);\n }\n function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined) e.textContent = content;\n return e;\n }\n function clearNode(node) {\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n }\n function findParent(node, condition) {\n if (condition(node)) return node;else if (node.parentNode) return findParent(node.parentNode, condition);\n return undefined;\n }\n function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"),\n numInput = createElement(\"input\", \"numInput \" + inputClassName),\n arrowUp = createElement(\"span\", \"arrowUp\"),\n arrowDown = createElement(\"span\", \"arrowDown\");\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n if (opts !== undefined) for (var key in opts) {\n numInput.setAttribute(key, opts[key]);\n }\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n }\n\n if (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var _loop = function _loop() {\n var source = args[_i];\n\n if (source) {\n Object.keys(source).forEach(function (key) {\n return target[key] = source[key];\n });\n }\n };\n\n for (var _i = 0; _i < args.length; _i++) {\n _loop();\n }\n\n return target;\n };\n }\n\n var DEBOUNCED_CHANGE_MS = 300;\n\n function FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: Object.assign({}, flatpickr.defaultConfig),\n l10n: english\n };\n self.parseDate = createDateParser({\n config: self.config,\n l10n: self.l10n\n });\n self._handlers = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self._createElement = createElement;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function getDaysInMonth(month, yr) {\n if (month === void 0) {\n month = self.currentMonth;\n }\n\n if (yr === void 0) {\n yr = self.currentYear;\n }\n\n if (month === 1 && (yr % 4 === 0 && yr % 100 !== 0 || yr % 400 === 0)) return 29;\n return self.l10n.daysInMonth[month];\n }\n };\n }\n\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile) build();\n bindEvents();\n\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj || self.config.minDate : undefined);\n }\n\n updateValue(false);\n }\n\n setCalendarWidth();\n self.showTimeInput = self.selectedDates.length > 0 || self.config.noCalendar;\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n\n triggerEvent(\"onReady\");\n }\n\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) return;else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width = daysWidth + (self.weekWrapper !== undefined ? self.weekWrapper.offsetWidth : 0) + \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n\n function updateTime(e) {\n if (self.selectedDates.length === 0) return;\n\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n\n function ampm2military(hour, amPM) {\n return hour % 12 + 12 * int(amPM === self.l10n.amPM[1]);\n }\n\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n\n default:\n return hour % 12;\n }\n }\n\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined) return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24,\n minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60,\n seconds = self.secondElement !== undefined ? (parseInt(self.secondElement.value, 10) || 0) % 60 : 0;\n\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n\n var limitMinHours = self.config.minTime !== undefined || self.config.minDate && self.minDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.minDate, true) === 0;\n var limitMaxHours = self.config.maxTime !== undefined || self.config.maxDate && self.maxDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.maxDate, true) === 0;\n\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined ? self.config.maxTime : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours()) minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes()) seconds = Math.min(seconds, maxTime.getSeconds());\n }\n\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined ? self.config.minTime : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours()) minutes = Math.max(minutes, minTime.getMinutes());\n if (minutes === minTime.getMinutes()) seconds = Math.max(seconds, minTime.getSeconds());\n }\n\n setHours(hours, minutes, seconds);\n }\n\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date) setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n\n function setDefaultHours() {\n var hours = self.config.defaultHour;\n var minutes = self.config.defaultMinute;\n var seconds = self.config.defaultSeconds;\n\n if (self.config.minDate !== undefined) {\n var min_hr = self.config.minDate.getHours();\n var min_minutes = self.config.minDate.getMinutes();\n hours = Math.max(hours, min_hr);\n if (hours === min_hr) minutes = Math.max(min_minutes, minutes);\n if (hours === min_hr && minutes === min_minutes) seconds = self.config.minDate.getSeconds();\n }\n\n if (self.config.maxDate !== undefined) {\n var max_hr = self.config.maxDate.getHours();\n var max_minutes = self.config.maxDate.getMinutes();\n hours = Math.min(hours, max_hr);\n if (hours === max_hr) minutes = Math.min(max_minutes, minutes);\n if (hours === max_hr && minutes === max_minutes) seconds = self.config.maxDate.getSeconds();\n }\n\n setHours(hours, minutes, seconds);\n }\n\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n\n if (!self.hourElement || !self.minuteElement || self.isMobile) return;\n self.hourElement.value = pad(!self.config.time_24hr ? (12 + hours) % 12 + 12 * int(hours % 12 === 0) : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined) self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n if (self.secondElement !== undefined) self.secondElement.value = pad(seconds);\n }\n\n function onYearInput(event) {\n var year = parseInt(event.target.value) + (event.delta || 0);\n\n if (year / 1000 > 1 || event.key === \"Enter\" && !/[^\\d]/.test(year.toString())) {\n changeYear(year);\n }\n }\n\n function bind(element, event, handler, options) {\n if (event instanceof Array) return event.forEach(function (ev) {\n return bind(element, ev, handler, options);\n });\n if (element instanceof Array) return element.forEach(function (el) {\n return bind(el, event, handler, options);\n });\n element.addEventListener(event, handler, options);\n\n self._handlers.push({\n element: element,\n event: event,\n handler: handler,\n options: options\n });\n }\n\n function onClick(handler) {\n return function (evt) {\n evt.which === 1 && handler(evt);\n };\n }\n\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n\n if (self.isMobile) {\n setupMobile();\n return;\n }\n\n var debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent)) bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\") onMouseOver(e.target);\n });\n bind(window.document.body, \"keydown\", onKeyDown);\n if (!self.config.static) bind(self._input, \"keydown\", onKeyDown);\n if (!self.config.inline && !self.config.static) bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined) bind(window.document, \"click\", documentClick);else bind(window.document, \"mousedown\", onClick(documentClick));\n bind(window.document, \"focus\", documentClick, {\n capture: true\n });\n\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"mousedown\", onClick(self.open));\n }\n\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"mousedown\", onClick(onMonthNavClick));\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"mousedown\", onClick(selectDate));\n }\n\n if (self.timeContainer !== undefined && self.minuteElement !== undefined && self.hourElement !== undefined) {\n var selText = function selText(e) {\n return e.target.select();\n };\n\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, {\n capture: true\n });\n bind(self.timeContainer, \"mousedown\", onClick(timeIncrement));\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined) bind(self.secondElement, \"focus\", function () {\n return self.secondElement && self.secondElement.select();\n });\n\n if (self.amPM !== undefined) {\n bind(self.amPM, \"mousedown\", onClick(function (e) {\n updateTime(e);\n triggerChange();\n }));\n }\n }\n }\n\n function jumpToDate(jumpDate) {\n var jumpTo = jumpDate !== undefined ? self.parseDate(jumpDate) : self.latestSelectedDateObj || (self.config.minDate && self.config.minDate > self.now ? self.config.minDate : self.config.maxDate && self.config.maxDate < self.now ? self.config.maxDate : self.now);\n\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n } catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n\n self.redraw();\n }\n\n function timeIncrement(e) {\n if (~e.target.className.indexOf(\"arrow\")) incrementNumInput(e, e.target.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n\n function incrementNumInput(e, delta, inputElem) {\n var target = e && e.target;\n var input = inputElem || target && target.parentNode && target.parentNode.firstChild;\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n\n if (self.config.weekNumbers) {\n var _buildWeeks = buildWeeks(),\n weekWrapper = _buildWeeks.weekWrapper,\n weekNumbers = _buildWeeks.weekNumbers;\n\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined && self.config.appendTo.nodeType !== undefined;\n\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode) self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);else if (self.config.appendTo !== undefined) self.config.appendTo.appendChild(self.calendarContainer);\n }\n\n if (self.config.static) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode) self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput) wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n\n if (!self.config.static && !self.config.inline) (self.config.appendTo !== undefined ? self.config.appendTo : window.document.body).appendChild(self.calendarContainer);\n }\n\n function createDay(className, date, dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true),\n dayElement = createElement(\"span\", \"flatpickr-day \" + className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n\n if (className.indexOf(\"hidden\") === -1 && compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] && compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] && compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\") dayElement.classList.add(\"inRange\");\n }\n }\n } else {\n dayElement.classList.add(\"disabled\");\n }\n\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date)) dayElement.classList.add(\"inRange\");\n }\n\n if (self.weekNumbers && self.config.showMonths === 1 && className !== \"prevMonthDay\" && dayNumber % 7 === 1) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \"\");\n }\n\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\") onMouseOver(targetNode);\n }\n\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj)) return c;\n }\n }\n\n return undefined;\n }\n\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1 ? current.dateObj.getMonth() : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m ? current.$i + delta : delta < 0 ? month.children.length - 1 : 0;\n var numMonthDays = month.children.length;\n\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj) && Math.abs(current.$i - i) >= Math.abs(delta)) return focusOnDayElem(c);\n }\n }\n\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n\n function focusOnDay(current, offset) {\n var dayFocused = isInView(document.activeElement || document.body);\n var startElem = current !== undefined ? current : dayFocused ? document.activeElement : self.selectedDateElem !== undefined && isInView(self.selectedDateElem) ? self.selectedDateElem : self.todayDateElem !== undefined && isInView(self.todayDateElem) ? self.todayDateElem : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) return self._input.focus();\n if (!dayFocused) return focusOnDayElem(startElem);\n getNextAvailableDay(startElem, offset);\n }\n\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12);\n var daysInMonth = self.utils.getDaysInMonth(month),\n days = window.document.createDocumentFragment(),\n isMultiMonth = self.config.showMonths > 1,\n prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\",\n nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth,\n dayIndex = 0;\n\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth && (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n\n clearNode(self.daysContainer);\n if (self.weekNumbers) clearNode(self.weekNumbers);\n var frag = document.createDocumentFragment();\n\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n\n function buildMonth() {\n var container = createElement(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement = createElement(\"span\", \"cur-month\");\n var yearInput = createNumberInput(\"cur-year\", {\n tabindex: \"-1\"\n });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) yearElement.setAttribute(\"data-min\", self.config.minDate.getFullYear().toString());\n\n if (self.config.maxDate) {\n yearElement.setAttribute(\"data-max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled = !!self.config.minDate && self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n\n var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement\n };\n }\n\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n\n self.monthNav.appendChild(self.nextMonthNav);\n }\n\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function get() {\n return self.__hidePrevMonthArrow;\n },\n set: function set(bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n }\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function get() {\n return self.__hideNextMonthArrow;\n },\n set: function set(bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n }\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar) self.calendarContainer.classList.add(\"noCalendar\");\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\");\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\");\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getHours() : self.config.time_24hr ? self.config.defaultHour : military2ampm(self.config.defaultHour));\n self.minuteElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getMinutes() : self.config.defaultMinute);\n self.hourElement.setAttribute(\"data-step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"data-step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"data-min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"data-max\", self.config.time_24hr ? \"23\" : \"12\");\n self.minuteElement.setAttribute(\"data-min\", \"0\");\n self.minuteElement.setAttribute(\"data-max\", \"59\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr) self.timeContainer.classList.add(\"time24hr\");\n\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getSeconds() : self.config.defaultSeconds);\n self.secondElement.setAttribute(\"data-step\", self.minuteElement.getAttribute(\"data-step\"));\n self.secondElement.setAttribute(\"data-min\", self.minuteElement.getAttribute(\"data-min\"));\n self.secondElement.setAttribute(\"data-max\", self.minuteElement.getAttribute(\"data-max\"));\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n\n if (!self.config.time_24hr) {\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj ? self.hourElement.value : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n\n return self.timeContainer;\n }\n\n function buildWeekdays() {\n if (!self.weekdayContainer) self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");else clearNode(self.weekdayContainer);\n\n for (var i = self.config.showMonths; i--;) {\n var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n\n updateWeekdays();\n return self.weekdayContainer;\n }\n\n function updateWeekdays() {\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = self.l10n.weekdays.shorthand.concat();\n\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = weekdays.splice(firstDayOfWeek, weekdays.length).concat(weekdays.splice(0, firstDayOfWeek));\n }\n\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n \\n \" + weekdays.join(\"\") + \"\\n \\n \";\n }\n }\n\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers\n };\n }\n\n function changeMonth(value, is_offset) {\n if (is_offset === void 0) {\n is_offset = true;\n }\n\n var delta = is_offset ? value : value - self.currentMonth;\n if (delta < 0 && self._hidePrevMonthArrow === true || delta > 0 && self._hideNextMonthArrow === true) return;\n self.currentMonth += delta;\n\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n }\n\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n\n function clear(triggerChangeEvent) {\n if (triggerChangeEvent === void 0) {\n triggerChangeEvent = true;\n }\n\n self.input.value = \"\";\n if (self.altInput !== undefined) self.altInput.value = \"\";\n if (self.mobileInput !== undefined) self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n self.showTimeInput = false;\n\n if (self.config.enableTime === true) {\n setDefaultHours();\n }\n\n self.redraw();\n if (triggerChangeEvent) triggerEvent(\"onChange\");\n }\n\n function close() {\n self.isOpen = false;\n\n if (!self.isMobile) {\n self.calendarContainer.classList.remove(\"open\");\n\n self._input.classList.remove(\"active\");\n }\n\n triggerEvent(\"onClose\");\n }\n\n function destroy() {\n if (self.config !== undefined) triggerEvent(\"onDestroy\");\n\n for (var i = self._handlers.length; i--;) {\n var h = self._handlers[i];\n h.element.removeEventListener(h.event, h.handler, h.options);\n }\n\n self._handlers = [];\n\n if (self.mobileInput) {\n if (self.mobileInput.parentNode) self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n } else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n\n if (wrapper.parentNode) {\n while (wrapper.firstChild) {\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n }\n\n wrapper.parentNode.removeChild(wrapper);\n }\n } else self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode) self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n self.input.value = \"\";\n }\n\n [\"_showTimeInput\", \"latestSelectedDateObj\", \"_hideNextMonthArrow\", \"_hidePrevMonthArrow\", \"__hideNextMonthArrow\", \"__hidePrevMonthArrow\", \"isMobile\", \"isOpen\", \"selectedDateElem\", \"minDateHasTime\", \"maxDateHasTime\", \"days\", \"daysContainer\", \"_input\", \"_positionElement\", \"innerContainer\", \"rContainer\", \"monthNav\", \"todayDateElem\", \"calendarContainer\", \"weekdayContainer\", \"prevMonthNav\", \"nextMonthNav\", \"currentMonthElement\", \"currentYearElement\", \"navigationCurrentMonth\", \"selectedDateElem\", \"config\"].forEach(function (k) {\n try {\n delete self[k];\n } catch (_) {}\n });\n }\n\n function isCalendarElem(elem) {\n if (self.config.appendTo && self.config.appendTo.contains(elem)) return true;\n return self.calendarContainer.contains(elem);\n }\n\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var isCalendarElement = isCalendarElem(e.target);\n var isInput = e.target === self.input || e.target === self.altInput || self.element.contains(e.target) || e.path && e.path.indexOf && (~e.path.indexOf(self.input) || ~e.path.indexOf(self.altInput));\n var lostFocus = e.type === \"blur\" ? isInput && e.relatedTarget && !isCalendarElem(e.relatedTarget) : !isInput && !isCalendarElement;\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(e.target);\n });\n\n if (lostFocus && isIgnored) {\n self.close();\n\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n self.clear(false);\n self.redraw();\n }\n }\n }\n }\n\n function changeYear(newYear) {\n if (!newYear || self.config.minDate && newYear < self.config.minDate.getFullYear() || self.config.maxDate && newYear > self.config.maxDate.getFullYear()) return;\n var newYearNum = newYear,\n isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n\n if (self.config.maxDate && self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n } else if (self.config.minDate && self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n }\n }\n\n function isEnabled(date, timeless) {\n if (timeless === void 0) {\n timeless = true;\n }\n\n var dateToCheck = self.parseDate(date, undefined, timeless);\n if (self.config.minDate && dateToCheck && compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0 || self.config.maxDate && dateToCheck && compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0) return false;\n if (self.config.enable.length === 0 && self.config.disable.length === 0) return true;\n if (dateToCheck === undefined) return false;\n var bool = self.config.enable.length > 0,\n array = bool ? self.config.enable : self.config.disable;\n\n for (var i = 0, d; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" && d(dateToCheck)) return bool;else if (d instanceof Date && dateToCheck !== undefined && d.getTime() === dateToCheck.getTime()) return bool;else if (typeof d === \"string\" && dateToCheck !== undefined) {\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime() ? bool : !bool;\n } else if (typeof d === \"object\" && dateToCheck !== undefined && d.from && d.to && dateToCheck.getTime() >= d.from.getTime() && dateToCheck.getTime() <= d.to.getTime()) return bool;\n }\n\n return !bool;\n }\n\n function isInView(elem) {\n if (self.daysContainer !== undefined) return elem.className.indexOf(\"hidden\") === -1 && self.daysContainer.contains(elem);\n return false;\n }\n\n function onKeyDown(e) {\n var isInput = e.target === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, e.target === self.altInput ? self.config.altFormat : self.config.dateFormat);\n return e.target.blur();\n } else self.open();\n } else if (isCalendarElem(e.target) || allowKeydown || allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer && self.timeContainer.contains(e.target);\n\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) updateTime();else selectDate(e);\n break;\n\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n\n break;\n\n case 37:\n case 39:\n if (!isTimeObj) {\n e.preventDefault();\n\n if (self.daysContainer !== undefined && (allowInput === false || isInView(document.activeElement))) {\n var _delta = e.keyCode === 39 ? 1 : -1;\n\n if (!e.ctrlKey) focusOnDay(undefined, _delta);else {\n changeMonth(_delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n } else if (self.hourElement) self.hourElement.focus();\n\n break;\n\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n\n if (self.daysContainer && e.target.$i !== undefined) {\n if (e.ctrlKey) {\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n } else if (!isTimeObj) focusOnDay(undefined, delta * 7);\n } else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement) self.hourElement.focus();\n updateTime(e);\n\n self._debouncedChange();\n }\n\n break;\n\n case 9:\n if (!isTimeObj) {\n self.element.focus();\n break;\n }\n\n var elems = [self.hourElement, self.minuteElement, self.secondElement, self.amPM].filter(function (x) {\n return x;\n });\n var i = elems.indexOf(e.target);\n\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n\n if (target !== undefined) {\n e.preventDefault();\n target.focus();\n } else {\n self.element.focus();\n }\n }\n\n break;\n\n default:\n break;\n }\n }\n\n if (self.amPM !== undefined && e.target === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n\n triggerEvent(\"onKeyDown\", e);\n }\n\n function onMouseOver(elem) {\n if (self.selectedDates.length !== 1 || elem && (!elem.classList.contains(\"flatpickr-day\") || elem.classList.contains(\"disabled\"))) return;\n var hoverDate = elem ? elem.dateObj.getTime() : self.days.firstElementChild.dateObj.getTime(),\n initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(),\n rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()),\n rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime()),\n lastDate = self.daysContainer.lastChild.lastChild.dateObj.getTime();\n var containsDisabled = false;\n var minRange = 0,\n maxRange = 0;\n\n for (var t = rangeStartDate; t < lastDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled = containsDisabled || t > rangeStartDate && t < rangeEndDate;\n if (t < initialDate && (!minRange || t > minRange)) minRange = t;else if (t > initialDate && (!maxRange || t < maxRange)) maxRange = t;\n }\n }\n\n for (var m = 0; m < self.config.showMonths; m++) {\n var month = self.daysContainer.children[m];\n var prevMonth = self.daysContainer.children[m - 1];\n\n var _loop = function _loop(i, l) {\n var dayElem = month.children[i],\n date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = minRange > 0 && timestamp < minRange || maxRange > 0 && timestamp > maxRange;\n\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return \"continue\";\n } else if (containsDisabled && !outOfRange) return \"continue\";\n\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n\n if (elem !== undefined) {\n elem.classList.add(hoverDate < self.selectedDates[0].getTime() ? \"startRange\" : \"endRange\");\n\n if (month.contains(elem) || !(m > 0 && prevMonth && prevMonth.lastChild.dateObj.getTime() >= timestamp)) {\n if (initialDate < hoverDate && timestamp === initialDate) dayElem.classList.add(\"startRange\");else if (initialDate > hoverDate && timestamp === initialDate) dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange && (maxRange === 0 || timestamp <= maxRange) && isBetween(timestamp, initialDate, hoverDate)) dayElem.classList.add(\"inRange\");\n }\n }\n };\n\n for (var i = 0, l = month.children.length; i < l; i++) {\n var _ret = _loop(i, l);\n\n if (_ret === \"continue\") continue;\n }\n }\n }\n\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline) positionCalendar();\n }\n\n function open(e, positionElement) {\n if (positionElement === void 0) {\n positionElement = self._positionElement;\n }\n\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n e.target && e.target.blur();\n }\n\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n\n triggerEvent(\"onOpen\");\n return;\n }\n\n if (self._input.disabled || self.config.inline) return;\n var wasOpen = self.isOpen;\n self.isOpen = true;\n\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n\n self._input.classList.add(\"active\");\n\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.selectedDates.length === 0) {\n self.setDate(self.config.minDate !== undefined ? new Date(self.config.minDate.getTime()) : new Date(), false);\n setDefaultHours();\n updateValue();\n }\n\n if (self.config.allowInput === false && (e === undefined || !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () {\n return self.hourElement.select();\n }, 50);\n }\n }\n }\n\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat);\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] = dateObj.getHours() > 0 || dateObj.getMinutes() > 0 || dateObj.getSeconds() > 0;\n }\n\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) {\n return isEnabled(d);\n });\n if (!self.selectedDates.length && type === \"min\") setHoursFromDate(dateObj);\n updateValue();\n }\n\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined) self.currentYearElement[type] = dateObj.getFullYear().toString();else self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled = !!inverseDateObj && dateObj !== undefined && inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n\n function parseConfig() {\n var boolOpts = [\"wrap\", \"weekNumbers\", \"allowInput\", \"clickOpens\", \"time_24hr\", \"enableTime\", \"noCalendar\", \"altInput\", \"shorthandCurrentMonth\", \"inline\", \"static\", \"enableSeconds\", \"disableMobile\"];\n var userConfig = Object.assign({}, instanceConfig, JSON.parse(JSON.stringify(element.dataset || {})));\n var formats$$1 = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function get() {\n return self.config._enable;\n },\n set: function set(dates) {\n self.config._enable = parseDateRules(dates);\n }\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function get() {\n return self.config._disable;\n },\n set: function set(dates) {\n self.config._disable = parseDateRules(dates);\n }\n });\n var timeMode = userConfig.mode === \"time\";\n\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n formats$$1.dateFormat = userConfig.noCalendar || timeMode ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\") : flatpickr.defaultConfig.dateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n\n if (userConfig.altInput && (userConfig.enableTime || timeMode) && !userConfig.altFormat) {\n formats$$1.altFormat = userConfig.noCalendar || timeMode ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\") : flatpickr.defaultConfig.altFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n\n Object.defineProperty(self.config, \"minDate\", {\n get: function get() {\n return self.config._minDate;\n },\n set: minMaxDateSetter(\"min\")\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function get() {\n return self.config._maxDate;\n },\n set: minMaxDateSetter(\"max\")\n });\n\n var minMaxTimeSetter = function minMaxTimeSetter(type) {\n return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i\");\n };\n };\n\n Object.defineProperty(self.config, \"minTime\", {\n get: function get() {\n return self.config._minTime;\n },\n set: minMaxTimeSetter(\"min\")\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function get() {\n return self.config._maxTime;\n },\n set: minMaxTimeSetter(\"max\")\n });\n\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n\n Object.assign(self.config, formats$$1, userConfig);\n\n for (var i = 0; i < boolOpts.length; i++) {\n self.config[boolOpts[i]] = self.config[boolOpts[i]] === true || self.config[boolOpts[i]] === \"true\";\n }\n\n HOOKS.filter(function (hook) {\n return self.config[hook] !== undefined;\n }).forEach(function (hook) {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile = !self.config.disableMobile && !self.config.inline && self.config.mode === \"single\" && !self.config.disable.length && !self.config.enable.length && !self.config.weekNumbers && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n\n for (var _i = 0; _i < self.config.plugins.length; _i++) {\n var pluginConf = self.config.plugins[_i](self) || {};\n\n for (var key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key]).map(bindToInstance).concat(self.config[key]);\n } else if (typeof userConfig[key] === \"undefined\") self.config[key] = pluginConf[key];\n }\n }\n\n triggerEvent(\"onParseConfig\");\n }\n\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" && typeof flatpickr.l10ns[self.config.locale] === \"undefined\") self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = Object.assign({}, flatpickr.l10ns.default, typeof self.config.locale === \"object\" ? self.config.locale : self.config.locale !== \"default\" ? flatpickr.l10ns[self.config.locale] : undefined);\n tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({\n config: self.config,\n l10n: self.l10n\n });\n }\n\n function positionCalendar(customPositionElement) {\n if (self.calendarContainer === undefined) return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, function (acc, child) {\n return acc + child.offsetHeight;\n }, 0),\n calendarWidth = self.calendarContainer.offsetWidth,\n configPos = self.config.position.split(\" \"),\n configPosVertical = configPos[0],\n configPosHorizontal = configPos.length > 1 ? configPos[1] : null,\n inputBounds = positionElement.getBoundingClientRect(),\n distanceFromBottom = window.innerHeight - inputBounds.bottom,\n showOnTop = configPosVertical === \"above\" || configPosVertical !== \"below\" && distanceFromBottom < calendarHeight && inputBounds.top > calendarHeight;\n var top = window.pageYOffset + inputBounds.top + (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline) return;\n var left = window.pageXOffset + inputBounds.left - (configPosHorizontal != null && configPosHorizontal === \"center\" ? (calendarWidth - inputBounds.width) / 2 : 0);\n var right = window.document.body.offsetWidth - inputBounds.right;\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static) return;\n self.calendarContainer.style.top = top + \"px\";\n\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n } else {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n }\n\n function redraw() {\n if (self.config.noCalendar || self.isMobile) return;\n updateNavigationCurrentMonth();\n buildDays();\n }\n\n function focusAndClose() {\n self._input.focus();\n\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 || navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n } else {\n self.close();\n }\n }\n\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n\n var isSelectable = function isSelectable(day) {\n return day.classList && day.classList.contains(\"flatpickr-day\") && !day.classList.contains(\"disabled\") && !day.classList.contains(\"notAllowed\");\n };\n\n var t = findParent(e.target, isSelectable);\n if (t === undefined) return;\n var target = t;\n var selectedDate = self.latestSelectedDateObj = new Date(target.dateObj.getTime());\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth || selectedDate.getMonth() > self.currentMonth + self.config.showMonths - 1) && self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\") self.selectedDates = [selectedDate];else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex) self.selectedDates.splice(parseInt(selectedIndex), 1);else self.selectedDates.push(selectedDate);\n } else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) self.clear(false);\n self.selectedDates.push(selectedDate);\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0) self.selectedDates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n }\n setHoursFromInputs();\n\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) triggerEvent(\"onYearChange\");\n triggerEvent(\"onMonthChange\");\n }\n\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (self.config.enableTime) setTimeout(function () {\n return self.showTimeInput = true;\n }, 50);\n if (!shouldChangeMonth && self.config.mode !== \"range\" && self.config.showMonths === 1) focusOnDayElem(target);else self.selectedDateElem && self.selectedDateElem.focus();\n if (self.hourElement !== undefined) setTimeout(function () {\n return self.hourElement !== undefined && self.hourElement.select();\n }, 451);\n\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" && self.selectedDates.length === 2 && !self.config.enableTime;\n\n if (single || range) {\n focusAndClose();\n }\n }\n\n triggerChange();\n }\n\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays]\n };\n\n function set(option, value) {\n if (option !== null && typeof option === \"object\") Object.assign(self.config, option);else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined) CALLBACKS[option].forEach(function (x) {\n return x();\n });else if (HOOKS.indexOf(option) > -1) self.config[option] = arrayify(value);\n }\n self.redraw();\n jumpToDate();\n updateValue(false);\n }\n\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array) dates = inputDate.map(function (d) {\n return self.parseDate(d, format);\n });else if (inputDate instanceof Date || typeof inputDate === \"number\") dates = [self.parseDate(inputDate, format)];else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n\n case \"multiple\":\n dates = inputDate.split(self.config.conjunction).map(function (date) {\n return self.parseDate(date, format);\n });\n break;\n\n case \"range\":\n dates = inputDate.split(self.l10n.rangeSeparator).map(function (date) {\n return self.parseDate(date, format);\n });\n break;\n\n default:\n break;\n }\n } else self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = dates.filter(function (d) {\n return d instanceof Date && isEnabled(d, false);\n });\n if (self.config.mode === \"range\") self.selectedDates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n }\n\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) {\n triggerChange = false;\n }\n\n if (format === void 0) {\n format = self.config.dateFormat;\n }\n\n if (date !== 0 && !date || date instanceof Array && date.length === 0) return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.showTimeInput = self.selectedDates.length > 0;\n self.latestSelectedDateObj = self.selectedDates[0];\n self.redraw();\n jumpToDate();\n setHoursFromDate();\n updateValue(triggerChange);\n if (triggerChange) triggerEvent(\"onChange\");\n }\n\n function parseDateRules(arr) {\n return arr.slice().map(function (rule) {\n if (typeof rule === \"string\" || typeof rule === \"number\" || rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n } else if (rule && typeof rule === \"object\" && rule.from && rule.to) return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined)\n };\n\n return rule;\n }).filter(function (x) {\n return x;\n });\n }\n\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n var preloadedDate = self.config.defaultDate || ((self.input.nodeName === \"INPUT\" || self.input.nodeName === \"TEXTAREA\") && self.input.placeholder && self.input.value === self.input.placeholder ? null : self.input.value);\n if (preloadedDate) setSelectedDate(preloadedDate, self.config.dateFormat);\n var initialDate = self.selectedDates.length > 0 ? self.selectedDates[0] : self.config.minDate && self.config.minDate.getTime() > self.now.getTime() ? self.config.minDate : self.config.maxDate && self.config.maxDate.getTime() < self.now.getTime() ? self.config.maxDate : self.now;\n self.currentYear = initialDate.getFullYear();\n self.currentMonth = initialDate.getMonth();\n if (self.selectedDates.length > 0) self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined) self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined) self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime = !!self.config.minDate && (self.config.minDate.getHours() > 0 || self.config.minDate.getMinutes() > 0 || self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime = !!self.config.maxDate && (self.config.maxDate.getHours() > 0 || self.config.maxDate.getMinutes() > 0 || self.config.maxDate.getSeconds() > 0);\n Object.defineProperty(self, \"showTimeInput\", {\n get: function get() {\n return self._showTimeInput;\n },\n set: function set(bool) {\n self._showTimeInput = bool;\n if (self.calendarContainer) toggleClass(self.calendarContainer, \"showTimeInput\", bool);\n self.isOpen && positionCalendar();\n }\n });\n }\n\n function setupInputs() {\n self.input = self.config.wrap ? element.querySelector(\"[data-input]\") : element;\n\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n\n if (self.config.altInput) {\n self.altInput = createElement(self.input.nodeName, self.input.className + \" \" + self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode) self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n\n if (!self.config.allowInput) self._input.setAttribute(\"readonly\", \"readonly\");\n self._positionElement = self.config.positionElement || self._input;\n }\n\n function setupMobile() {\n var inputType = self.config.enableTime ? self.config.noCalendar ? \"time\" : \"datetime-local\" : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.step = self.input.getAttribute(\"step\") || \"any\";\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr = inputType === \"datetime-local\" ? \"Y-m-d\\\\TH:i:S\" : inputType === \"date\" ? \"Y-m-d\" : \"H:i:S\";\n\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n\n if (self.config.minDate) self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate) self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n self.input.type = \"hidden\";\n if (self.altInput !== undefined) self.altInput.type = \"hidden\";\n\n try {\n if (self.input.parentNode) self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n } catch (_a) {}\n\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate(e.target.value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n\n function toggle(e) {\n if (self.isOpen === true) return self.close();\n self.open(e);\n }\n\n function triggerEvent(event, data) {\n if (self.config === undefined) return;\n var hooks = self.config[event];\n\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++) {\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n }\n\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n if (compareDates(self.selectedDates[i], date) === 0) return \"\" + i;\n }\n\n return false;\n }\n\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2) return false;\n return compareDates(date, self.selectedDates[0]) >= 0 && compareDates(date, self.selectedDates[1]) <= 0;\n }\n\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav) return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n self.monthElements[i].textContent = monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow = self.config.minDate !== undefined && (self.currentYear === self.config.minDate.getFullYear() ? self.currentMonth <= self.config.minDate.getMonth() : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow = self.config.maxDate !== undefined && (self.currentYear === self.config.maxDate.getFullYear() ? self.currentMonth + 1 > self.config.maxDate.getMonth() : self.currentYear > self.config.maxDate.getFullYear());\n }\n\n function getDateStr(format) {\n return self.selectedDates.map(function (dObj) {\n return self.formatDate(dObj, format);\n }).filter(function (d, i, arr) {\n return self.config.mode !== \"range\" || self.config.enableTime || arr.indexOf(d) === i;\n }).join(self.config.mode !== \"range\" ? self.config.conjunction : self.l10n.rangeSeparator);\n }\n\n function updateValue(triggerChange) {\n if (triggerChange === void 0) {\n triggerChange = true;\n }\n\n if (self.selectedDates.length === 0) return self.clear(triggerChange);\n\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value = self.latestSelectedDateObj !== undefined ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr) : \"\";\n }\n\n self.input.value = getDateStr(self.config.dateFormat);\n\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n\n if (triggerChange !== false) triggerEvent(\"onValueUpdate\");\n }\n\n function onMonthNavClick(e) {\n e.preventDefault();\n var isPrevMonth = self.prevMonthNav.contains(e.target);\n var isNextMonth = self.nextMonthNav.contains(e.target);\n\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n } else if (self.yearElements.indexOf(e.target) >= 0) {\n e.target.select();\n } else if (e.target.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n } else if (e.target.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\",\n input = e.target;\n\n if (self.amPM !== undefined && e.target === self.amPM) {\n self.amPM.textContent = self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n\n var min = parseFloat(input.getAttribute(\"data-min\")),\n max = parseFloat(input.getAttribute(\"data-max\")),\n step = parseFloat(input.getAttribute(\"data-step\")),\n curValue = parseInt(input.value, 10),\n delta = e.delta || (isKeyDown ? e.which === 38 ? 1 : -1 : 0);\n var newValue = curValue + step * delta;\n\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement,\n isMinuteElem = input === self.minuteElement;\n\n if (newValue < min) {\n newValue = max + newValue + int(!isHourElem) + (int(isHourElem) && int(!self.amPM));\n if (isMinuteElem) incrementNumInput(undefined, -1, self.hourElement);\n } else if (newValue > max) {\n newValue = input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n if (isMinuteElem) incrementNumInput(undefined, 1, self.hourElement);\n }\n\n if (self.amPM && isHourElem && (step === 1 ? newValue + curValue === 23 : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent = self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n\n input.value = pad(newValue);\n }\n }\n\n init();\n return self;\n }\n\n function _flatpickr(nodeList, config) {\n var nodes = Array.prototype.slice.call(nodeList);\n var instances = [];\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null) continue;\n\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n\n node._flatpickr = undefined;\n }\n\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n } catch (e) {\n console.error(e);\n }\n }\n\n return instances.length === 1 ? instances[0] : instances;\n }\n\n if (typeof HTMLElement !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n }\n\n var flatpickr = function flatpickr(selector, config) {\n if (selector instanceof NodeList) return _flatpickr(selector, config);else if (typeof selector === \"string\") return _flatpickr(window.document.querySelectorAll(selector), config);\n return _flatpickr([selector], config);\n };\n\n flatpickr.defaultConfig = defaults;\n flatpickr.l10ns = {\n en: Object.assign({}, english),\n default: Object.assign({}, english)\n };\n\n flatpickr.localize = function (l10n) {\n flatpickr.l10ns.default = Object.assign({}, flatpickr.l10ns.default, l10n);\n };\n\n flatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = Object.assign({}, flatpickr.defaultConfig, config);\n };\n\n flatpickr.parseDate = createDateParser({});\n flatpickr.formatDate = createDateFormatter({});\n flatpickr.compareDates = compareDates;\n\n if (typeof jQuery !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n }\n\n Date.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n };\n\n if (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n }\n\n return flatpickr;\n\n})));\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/flatpickr/dist/flatpickr.js?"); + +/***/ }), + +/***/ "./node_modules/inherits/inherits_browser.js": +/*!***************************************************!*\ + !*** ./node_modules/inherits/inherits_browser.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/inherits/inherits_browser.js?"); + +/***/ }), + +/***/ "./node_modules/insert-styles/index.js": +/*!*********************************************!*\ + !*** ./node_modules/insert-styles/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(global) {\n\nvar cache = {}\n\nfunction noop () {}\n\nmodule.exports = !global.document ? noop : insertStyles\n\nfunction insertStyles (styles, options) {\n var id = options && options.id || styles\n\n var element = cache[id] = (cache[id] || createStyle(id))\n\n if ('textContent' in element) {\n element.textContent = styles\n } else {\n element.styleSheet.cssText = styles\n }\n}\n\nfunction createStyle (id) {\n var element = document.getElementById(id)\n\n if (element) return element\n\n element = document.createElement('style')\n element.setAttribute('type', 'text/css')\n\n document.head.appendChild(element)\n\n return element\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/insert-styles/index.js?"); + +/***/ }), + +/***/ "./node_modules/is-dom/index.js": +/*!**************************************!*\ + !*** ./node_modules/is-dom/index.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = isNode\n\nfunction isNode (val) {\n return (!val || typeof val !== 'object')\n ? false\n : (typeof window === 'object' && typeof window.Node === 'object')\n ? (val instanceof window.Node)\n : (typeof val.nodeType === 'number') &&\n (typeof val.nodeName === 'string')\n}\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/is-dom/index.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_DataView.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_DataView.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_DataView.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_Hash.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/_Hash.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var hashClear = __webpack_require__(/*! ./_hashClear */ \"./node_modules/lodash/_hashClear.js\"),\n hashDelete = __webpack_require__(/*! ./_hashDelete */ \"./node_modules/lodash/_hashDelete.js\"),\n hashGet = __webpack_require__(/*! ./_hashGet */ \"./node_modules/lodash/_hashGet.js\"),\n hashHas = __webpack_require__(/*! ./_hashHas */ \"./node_modules/lodash/_hashHas.js\"),\n hashSet = __webpack_require__(/*! ./_hashSet */ \"./node_modules/lodash/_hashSet.js\");\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_Hash.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_ListCache.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_ListCache.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ \"./node_modules/lodash/_listCacheClear.js\"),\n listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ \"./node_modules/lodash/_listCacheDelete.js\"),\n listCacheGet = __webpack_require__(/*! ./_listCacheGet */ \"./node_modules/lodash/_listCacheGet.js\"),\n listCacheHas = __webpack_require__(/*! ./_listCacheHas */ \"./node_modules/lodash/_listCacheHas.js\"),\n listCacheSet = __webpack_require__(/*! ./_listCacheSet */ \"./node_modules/lodash/_listCacheSet.js\");\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_ListCache.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_Map.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/_Map.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_Map.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_MapCache.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_MapCache.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ \"./node_modules/lodash/_mapCacheClear.js\"),\n mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ \"./node_modules/lodash/_mapCacheDelete.js\"),\n mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ \"./node_modules/lodash/_mapCacheGet.js\"),\n mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ \"./node_modules/lodash/_mapCacheHas.js\"),\n mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ \"./node_modules/lodash/_mapCacheSet.js\");\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_MapCache.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_Promise.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_Promise.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_Promise.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_Set.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/_Set.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_Set.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_SetCache.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_SetCache.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var MapCache = __webpack_require__(/*! ./_MapCache */ \"./node_modules/lodash/_MapCache.js\"),\n setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ \"./node_modules/lodash/_setCacheAdd.js\"),\n setCacheHas = __webpack_require__(/*! ./_setCacheHas */ \"./node_modules/lodash/_setCacheHas.js\");\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_SetCache.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_Stack.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/_Stack.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var ListCache = __webpack_require__(/*! ./_ListCache */ \"./node_modules/lodash/_ListCache.js\"),\n stackClear = __webpack_require__(/*! ./_stackClear */ \"./node_modules/lodash/_stackClear.js\"),\n stackDelete = __webpack_require__(/*! ./_stackDelete */ \"./node_modules/lodash/_stackDelete.js\"),\n stackGet = __webpack_require__(/*! ./_stackGet */ \"./node_modules/lodash/_stackGet.js\"),\n stackHas = __webpack_require__(/*! ./_stackHas */ \"./node_modules/lodash/_stackHas.js\"),\n stackSet = __webpack_require__(/*! ./_stackSet */ \"./node_modules/lodash/_stackSet.js\");\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_Stack.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_Symbol.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/_Symbol.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_Symbol.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_Uint8Array.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_Uint8Array.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_Uint8Array.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_WeakMap.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_WeakMap.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_WeakMap.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_arrayEach.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_arrayEach.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_arrayEach.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_arrayFilter.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_arrayFilter.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_arrayFilter.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_arrayLikeKeys.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_arrayLikeKeys.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseTimes = __webpack_require__(/*! ./_baseTimes */ \"./node_modules/lodash/_baseTimes.js\"),\n isArguments = __webpack_require__(/*! ./isArguments */ \"./node_modules/lodash/isArguments.js\"),\n isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n isBuffer = __webpack_require__(/*! ./isBuffer */ \"./node_modules/lodash/isBuffer.js\"),\n isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\"),\n isTypedArray = __webpack_require__(/*! ./isTypedArray */ \"./node_modules/lodash/isTypedArray.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_arrayLikeKeys.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_arrayMap.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_arrayMap.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_arrayMap.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_arrayPush.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_arrayPush.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_arrayPush.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_arraySome.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_arraySome.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_arraySome.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_assignValue.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_assignValue.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ \"./node_modules/lodash/_baseAssignValue.js\"),\n eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_assignValue.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_assocIndexOf.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_assocIndexOf.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\");\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_assocIndexOf.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseAssign.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseAssign.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var copyObject = __webpack_require__(/*! ./_copyObject */ \"./node_modules/lodash/_copyObject.js\"),\n keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseAssign.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseAssignIn.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_baseAssignIn.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var copyObject = __webpack_require__(/*! ./_copyObject */ \"./node_modules/lodash/_copyObject.js\"),\n keysIn = __webpack_require__(/*! ./keysIn */ \"./node_modules/lodash/keysIn.js\");\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseAssignIn.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseAssignValue.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_baseAssignValue.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var defineProperty = __webpack_require__(/*! ./_defineProperty */ \"./node_modules/lodash/_defineProperty.js\");\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseAssignValue.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseClone.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseClone.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var Stack = __webpack_require__(/*! ./_Stack */ \"./node_modules/lodash/_Stack.js\"),\n arrayEach = __webpack_require__(/*! ./_arrayEach */ \"./node_modules/lodash/_arrayEach.js\"),\n assignValue = __webpack_require__(/*! ./_assignValue */ \"./node_modules/lodash/_assignValue.js\"),\n baseAssign = __webpack_require__(/*! ./_baseAssign */ \"./node_modules/lodash/_baseAssign.js\"),\n baseAssignIn = __webpack_require__(/*! ./_baseAssignIn */ \"./node_modules/lodash/_baseAssignIn.js\"),\n cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ \"./node_modules/lodash/_cloneBuffer.js\"),\n copyArray = __webpack_require__(/*! ./_copyArray */ \"./node_modules/lodash/_copyArray.js\"),\n copySymbols = __webpack_require__(/*! ./_copySymbols */ \"./node_modules/lodash/_copySymbols.js\"),\n copySymbolsIn = __webpack_require__(/*! ./_copySymbolsIn */ \"./node_modules/lodash/_copySymbolsIn.js\"),\n getAllKeys = __webpack_require__(/*! ./_getAllKeys */ \"./node_modules/lodash/_getAllKeys.js\"),\n getAllKeysIn = __webpack_require__(/*! ./_getAllKeysIn */ \"./node_modules/lodash/_getAllKeysIn.js\"),\n getTag = __webpack_require__(/*! ./_getTag */ \"./node_modules/lodash/_getTag.js\"),\n initCloneArray = __webpack_require__(/*! ./_initCloneArray */ \"./node_modules/lodash/_initCloneArray.js\"),\n initCloneByTag = __webpack_require__(/*! ./_initCloneByTag */ \"./node_modules/lodash/_initCloneByTag.js\"),\n initCloneObject = __webpack_require__(/*! ./_initCloneObject */ \"./node_modules/lodash/_initCloneObject.js\"),\n isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n isBuffer = __webpack_require__(/*! ./isBuffer */ \"./node_modules/lodash/isBuffer.js\"),\n isMap = __webpack_require__(/*! ./isMap */ \"./node_modules/lodash/isMap.js\"),\n isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n isSet = __webpack_require__(/*! ./isSet */ \"./node_modules/lodash/isSet.js\"),\n keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n\n return result;\n }\n\n if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n\n return result;\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseClone.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseCreate.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseCreate.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\");\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseCreate.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseEach.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_baseEach.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ \"./node_modules/lodash/_baseForOwn.js\"),\n createBaseEach = __webpack_require__(/*! ./_createBaseEach */ \"./node_modules/lodash/_createBaseEach.js\");\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseEach.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseFor.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_baseFor.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ \"./node_modules/lodash/_createBaseFor.js\");\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseFor.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseForOwn.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseForOwn.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseFor = __webpack_require__(/*! ./_baseFor */ \"./node_modules/lodash/_baseFor.js\"),\n keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseForOwn.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseGet.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_baseGet.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var castPath = __webpack_require__(/*! ./_castPath */ \"./node_modules/lodash/_castPath.js\"),\n toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseGet.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseGetAllKeys.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_baseGetAllKeys.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var arrayPush = __webpack_require__(/*! ./_arrayPush */ \"./node_modules/lodash/_arrayPush.js\"),\n isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseGetAllKeys.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseGetTag.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseGetTag.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\"),\n getRawTag = __webpack_require__(/*! ./_getRawTag */ \"./node_modules/lodash/_getRawTag.js\"),\n objectToString = __webpack_require__(/*! ./_objectToString */ \"./node_modules/lodash/_objectToString.js\");\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseGetTag.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseHasIn.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseHasIn.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseHasIn.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseIsArguments.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_baseIsArguments.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseIsArguments.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseIsEqual.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_baseIsEqual.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseIsEqualDeep = __webpack_require__(/*! ./_baseIsEqualDeep */ \"./node_modules/lodash/_baseIsEqualDeep.js\"),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseIsEqual.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseIsEqualDeep.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_baseIsEqualDeep.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var Stack = __webpack_require__(/*! ./_Stack */ \"./node_modules/lodash/_Stack.js\"),\n equalArrays = __webpack_require__(/*! ./_equalArrays */ \"./node_modules/lodash/_equalArrays.js\"),\n equalByTag = __webpack_require__(/*! ./_equalByTag */ \"./node_modules/lodash/_equalByTag.js\"),\n equalObjects = __webpack_require__(/*! ./_equalObjects */ \"./node_modules/lodash/_equalObjects.js\"),\n getTag = __webpack_require__(/*! ./_getTag */ \"./node_modules/lodash/_getTag.js\"),\n isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n isBuffer = __webpack_require__(/*! ./isBuffer */ \"./node_modules/lodash/isBuffer.js\"),\n isTypedArray = __webpack_require__(/*! ./isTypedArray */ \"./node_modules/lodash/isTypedArray.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseIsEqualDeep.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseIsMap.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseIsMap.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getTag = __webpack_require__(/*! ./_getTag */ \"./node_modules/lodash/_getTag.js\"),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseIsMap.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseIsMatch.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_baseIsMatch.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var Stack = __webpack_require__(/*! ./_Stack */ \"./node_modules/lodash/_Stack.js\"),\n baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ \"./node_modules/lodash/_baseIsEqual.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseIsMatch.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseIsNative.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_baseIsNative.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isFunction = __webpack_require__(/*! ./isFunction */ \"./node_modules/lodash/isFunction.js\"),\n isMasked = __webpack_require__(/*! ./_isMasked */ \"./node_modules/lodash/_isMasked.js\"),\n isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n toSource = __webpack_require__(/*! ./_toSource */ \"./node_modules/lodash/_toSource.js\");\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseIsNative.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseIsSet.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseIsSet.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getTag = __webpack_require__(/*! ./_getTag */ \"./node_modules/lodash/_getTag.js\"),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseIsSet.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseIsTypedArray.js": +/*!**************************************************!*\ + !*** ./node_modules/lodash/_baseIsTypedArray.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n isLength = __webpack_require__(/*! ./isLength */ \"./node_modules/lodash/isLength.js\"),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseIsTypedArray.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseIteratee.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_baseIteratee.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseMatches = __webpack_require__(/*! ./_baseMatches */ \"./node_modules/lodash/_baseMatches.js\"),\n baseMatchesProperty = __webpack_require__(/*! ./_baseMatchesProperty */ \"./node_modules/lodash/_baseMatchesProperty.js\"),\n identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\"),\n isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n property = __webpack_require__(/*! ./property */ \"./node_modules/lodash/property.js\");\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseIteratee.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseKeys.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_baseKeys.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isPrototype = __webpack_require__(/*! ./_isPrototype */ \"./node_modules/lodash/_isPrototype.js\"),\n nativeKeys = __webpack_require__(/*! ./_nativeKeys */ \"./node_modules/lodash/_nativeKeys.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseKeys.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseKeysIn.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseKeysIn.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n isPrototype = __webpack_require__(/*! ./_isPrototype */ \"./node_modules/lodash/_isPrototype.js\"),\n nativeKeysIn = __webpack_require__(/*! ./_nativeKeysIn */ \"./node_modules/lodash/_nativeKeysIn.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseKeysIn.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseMap.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_baseMap.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseEach = __webpack_require__(/*! ./_baseEach */ \"./node_modules/lodash/_baseEach.js\"),\n isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\");\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseMap.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseMatches.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_baseMatches.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseIsMatch = __webpack_require__(/*! ./_baseIsMatch */ \"./node_modules/lodash/_baseIsMatch.js\"),\n getMatchData = __webpack_require__(/*! ./_getMatchData */ \"./node_modules/lodash/_getMatchData.js\"),\n matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ \"./node_modules/lodash/_matchesStrictComparable.js\");\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseMatches.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseMatchesProperty.js": +/*!*****************************************************!*\ + !*** ./node_modules/lodash/_baseMatchesProperty.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ \"./node_modules/lodash/_baseIsEqual.js\"),\n get = __webpack_require__(/*! ./get */ \"./node_modules/lodash/get.js\"),\n hasIn = __webpack_require__(/*! ./hasIn */ \"./node_modules/lodash/hasIn.js\"),\n isKey = __webpack_require__(/*! ./_isKey */ \"./node_modules/lodash/_isKey.js\"),\n isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ \"./node_modules/lodash/_isStrictComparable.js\"),\n matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ \"./node_modules/lodash/_matchesStrictComparable.js\"),\n toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseMatchesProperty.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseProperty.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_baseProperty.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseProperty.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_basePropertyDeep.js": +/*!**************************************************!*\ + !*** ./node_modules/lodash/_basePropertyDeep.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseGet = __webpack_require__(/*! ./_baseGet */ \"./node_modules/lodash/_baseGet.js\");\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_basePropertyDeep.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseTimes.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseTimes.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseTimes.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseToString.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_baseToString.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\"),\n arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseToString.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_baseUnary.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseUnary.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_baseUnary.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_cacheHas.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_cacheHas.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_cacheHas.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_castFunction.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_castFunction.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\");\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nmodule.exports = castFunction;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_castFunction.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_castPath.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_castPath.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n isKey = __webpack_require__(/*! ./_isKey */ \"./node_modules/lodash/_isKey.js\"),\n stringToPath = __webpack_require__(/*! ./_stringToPath */ \"./node_modules/lodash/_stringToPath.js\"),\n toString = __webpack_require__(/*! ./toString */ \"./node_modules/lodash/toString.js\");\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_castPath.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_cloneArrayBuffer.js": +/*!**************************************************!*\ + !*** ./node_modules/lodash/_cloneArrayBuffer.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var Uint8Array = __webpack_require__(/*! ./_Uint8Array */ \"./node_modules/lodash/_Uint8Array.js\");\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_cloneArrayBuffer.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_cloneBuffer.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_cloneBuffer.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/** Detect free variable `exports`. */\nvar freeExports = true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_cloneBuffer.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_cloneDataView.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_cloneDataView.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ \"./node_modules/lodash/_cloneArrayBuffer.js\");\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_cloneDataView.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_cloneRegExp.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_cloneRegExp.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_cloneRegExp.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_cloneSymbol.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_cloneSymbol.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\");\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_cloneSymbol.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_cloneTypedArray.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_cloneTypedArray.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ \"./node_modules/lodash/_cloneArrayBuffer.js\");\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_cloneTypedArray.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_copyArray.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_copyArray.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_copyArray.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_copyObject.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_copyObject.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var assignValue = __webpack_require__(/*! ./_assignValue */ \"./node_modules/lodash/_assignValue.js\"),\n baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ \"./node_modules/lodash/_baseAssignValue.js\");\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_copyObject.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_copySymbols.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_copySymbols.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var copyObject = __webpack_require__(/*! ./_copyObject */ \"./node_modules/lodash/_copyObject.js\"),\n getSymbols = __webpack_require__(/*! ./_getSymbols */ \"./node_modules/lodash/_getSymbols.js\");\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_copySymbols.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_copySymbolsIn.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_copySymbolsIn.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var copyObject = __webpack_require__(/*! ./_copyObject */ \"./node_modules/lodash/_copyObject.js\"),\n getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ \"./node_modules/lodash/_getSymbolsIn.js\");\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_copySymbolsIn.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_coreJsData.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_coreJsData.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_coreJsData.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_createBaseEach.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_createBaseEach.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\");\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_createBaseEach.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_createBaseFor.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_createBaseFor.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_createBaseFor.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_defineProperty.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_defineProperty.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\");\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_defineProperty.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_equalArrays.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_equalArrays.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var SetCache = __webpack_require__(/*! ./_SetCache */ \"./node_modules/lodash/_SetCache.js\"),\n arraySome = __webpack_require__(/*! ./_arraySome */ \"./node_modules/lodash/_arraySome.js\"),\n cacheHas = __webpack_require__(/*! ./_cacheHas */ \"./node_modules/lodash/_cacheHas.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_equalArrays.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_equalByTag.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_equalByTag.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\"),\n Uint8Array = __webpack_require__(/*! ./_Uint8Array */ \"./node_modules/lodash/_Uint8Array.js\"),\n eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\"),\n equalArrays = __webpack_require__(/*! ./_equalArrays */ \"./node_modules/lodash/_equalArrays.js\"),\n mapToArray = __webpack_require__(/*! ./_mapToArray */ \"./node_modules/lodash/_mapToArray.js\"),\n setToArray = __webpack_require__(/*! ./_setToArray */ \"./node_modules/lodash/_setToArray.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_equalByTag.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_equalObjects.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_equalObjects.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getAllKeys = __webpack_require__(/*! ./_getAllKeys */ \"./node_modules/lodash/_getAllKeys.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_equalObjects.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_freeGlobal.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_freeGlobal.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_freeGlobal.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_getAllKeys.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_getAllKeys.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ \"./node_modules/lodash/_baseGetAllKeys.js\"),\n getSymbols = __webpack_require__(/*! ./_getSymbols */ \"./node_modules/lodash/_getSymbols.js\"),\n keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_getAllKeys.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_getAllKeysIn.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_getAllKeysIn.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ \"./node_modules/lodash/_baseGetAllKeys.js\"),\n getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ \"./node_modules/lodash/_getSymbolsIn.js\"),\n keysIn = __webpack_require__(/*! ./keysIn */ \"./node_modules/lodash/keysIn.js\");\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_getAllKeysIn.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_getMapData.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_getMapData.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isKeyable = __webpack_require__(/*! ./_isKeyable */ \"./node_modules/lodash/_isKeyable.js\");\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_getMapData.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_getMatchData.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_getMatchData.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ \"./node_modules/lodash/_isStrictComparable.js\"),\n keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_getMatchData.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_getNative.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_getNative.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ \"./node_modules/lodash/_baseIsNative.js\"),\n getValue = __webpack_require__(/*! ./_getValue */ \"./node_modules/lodash/_getValue.js\");\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_getNative.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_getPrototype.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_getPrototype.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var overArg = __webpack_require__(/*! ./_overArg */ \"./node_modules/lodash/_overArg.js\");\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_getPrototype.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_getRawTag.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_getRawTag.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_getRawTag.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_getSymbols.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_getSymbols.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ \"./node_modules/lodash/_arrayFilter.js\"),\n stubArray = __webpack_require__(/*! ./stubArray */ \"./node_modules/lodash/stubArray.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_getSymbols.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_getSymbolsIn.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_getSymbolsIn.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var arrayPush = __webpack_require__(/*! ./_arrayPush */ \"./node_modules/lodash/_arrayPush.js\"),\n getPrototype = __webpack_require__(/*! ./_getPrototype */ \"./node_modules/lodash/_getPrototype.js\"),\n getSymbols = __webpack_require__(/*! ./_getSymbols */ \"./node_modules/lodash/_getSymbols.js\"),\n stubArray = __webpack_require__(/*! ./stubArray */ \"./node_modules/lodash/stubArray.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_getSymbolsIn.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_getTag.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/_getTag.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var DataView = __webpack_require__(/*! ./_DataView */ \"./node_modules/lodash/_DataView.js\"),\n Map = __webpack_require__(/*! ./_Map */ \"./node_modules/lodash/_Map.js\"),\n Promise = __webpack_require__(/*! ./_Promise */ \"./node_modules/lodash/_Promise.js\"),\n Set = __webpack_require__(/*! ./_Set */ \"./node_modules/lodash/_Set.js\"),\n WeakMap = __webpack_require__(/*! ./_WeakMap */ \"./node_modules/lodash/_WeakMap.js\"),\n baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n toSource = __webpack_require__(/*! ./_toSource */ \"./node_modules/lodash/_toSource.js\");\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_getTag.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_getValue.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_getValue.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_getValue.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_hasPath.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_hasPath.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var castPath = __webpack_require__(/*! ./_castPath */ \"./node_modules/lodash/_castPath.js\"),\n isArguments = __webpack_require__(/*! ./isArguments */ \"./node_modules/lodash/isArguments.js\"),\n isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\"),\n isLength = __webpack_require__(/*! ./isLength */ \"./node_modules/lodash/isLength.js\"),\n toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_hasPath.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_hashClear.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_hashClear.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ \"./node_modules/lodash/_nativeCreate.js\");\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_hashClear.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_hashDelete.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_hashDelete.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_hashDelete.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_hashGet.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_hashGet.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ \"./node_modules/lodash/_nativeCreate.js\");\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_hashGet.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_hashHas.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_hashHas.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ \"./node_modules/lodash/_nativeCreate.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_hashHas.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_hashSet.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_hashSet.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ \"./node_modules/lodash/_nativeCreate.js\");\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_hashSet.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_initCloneArray.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_initCloneArray.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_initCloneArray.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_initCloneByTag.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_initCloneByTag.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ \"./node_modules/lodash/_cloneArrayBuffer.js\"),\n cloneDataView = __webpack_require__(/*! ./_cloneDataView */ \"./node_modules/lodash/_cloneDataView.js\"),\n cloneRegExp = __webpack_require__(/*! ./_cloneRegExp */ \"./node_modules/lodash/_cloneRegExp.js\"),\n cloneSymbol = __webpack_require__(/*! ./_cloneSymbol */ \"./node_modules/lodash/_cloneSymbol.js\"),\n cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ \"./node_modules/lodash/_cloneTypedArray.js\");\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_initCloneByTag.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_initCloneObject.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_initCloneObject.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseCreate = __webpack_require__(/*! ./_baseCreate */ \"./node_modules/lodash/_baseCreate.js\"),\n getPrototype = __webpack_require__(/*! ./_getPrototype */ \"./node_modules/lodash/_getPrototype.js\"),\n isPrototype = __webpack_require__(/*! ./_isPrototype */ \"./node_modules/lodash/_isPrototype.js\");\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_initCloneObject.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_isIndex.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_isIndex.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_isIndex.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_isKey.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/_isKey.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_isKey.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_isKeyable.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_isKeyable.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_isKeyable.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_isMasked.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_isMasked.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var coreJsData = __webpack_require__(/*! ./_coreJsData */ \"./node_modules/lodash/_coreJsData.js\");\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_isMasked.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_isPrototype.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_isPrototype.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_isPrototype.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_isStrictComparable.js": +/*!****************************************************!*\ + !*** ./node_modules/lodash/_isStrictComparable.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\");\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_isStrictComparable.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_listCacheClear.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_listCacheClear.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_listCacheClear.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_listCacheDelete.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_listCacheDelete.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ \"./node_modules/lodash/_assocIndexOf.js\");\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_listCacheDelete.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_listCacheGet.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_listCacheGet.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ \"./node_modules/lodash/_assocIndexOf.js\");\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_listCacheGet.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_listCacheHas.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_listCacheHas.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ \"./node_modules/lodash/_assocIndexOf.js\");\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_listCacheHas.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_listCacheSet.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_listCacheSet.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ \"./node_modules/lodash/_assocIndexOf.js\");\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_listCacheSet.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_mapCacheClear.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_mapCacheClear.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var Hash = __webpack_require__(/*! ./_Hash */ \"./node_modules/lodash/_Hash.js\"),\n ListCache = __webpack_require__(/*! ./_ListCache */ \"./node_modules/lodash/_ListCache.js\"),\n Map = __webpack_require__(/*! ./_Map */ \"./node_modules/lodash/_Map.js\");\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_mapCacheClear.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_mapCacheDelete.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_mapCacheDelete.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getMapData = __webpack_require__(/*! ./_getMapData */ \"./node_modules/lodash/_getMapData.js\");\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_mapCacheDelete.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_mapCacheGet.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_mapCacheGet.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getMapData = __webpack_require__(/*! ./_getMapData */ \"./node_modules/lodash/_getMapData.js\");\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_mapCacheGet.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_mapCacheHas.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_mapCacheHas.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getMapData = __webpack_require__(/*! ./_getMapData */ \"./node_modules/lodash/_getMapData.js\");\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_mapCacheHas.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_mapCacheSet.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_mapCacheSet.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getMapData = __webpack_require__(/*! ./_getMapData */ \"./node_modules/lodash/_getMapData.js\");\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_mapCacheSet.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_mapToArray.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_mapToArray.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_mapToArray.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_matchesStrictComparable.js": +/*!*********************************************************!*\ + !*** ./node_modules/lodash/_matchesStrictComparable.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_matchesStrictComparable.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_memoizeCapped.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_memoizeCapped.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var memoize = __webpack_require__(/*! ./memoize */ \"./node_modules/lodash/memoize.js\");\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_memoizeCapped.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_nativeCreate.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_nativeCreate.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\");\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_nativeCreate.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_nativeKeys.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_nativeKeys.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var overArg = __webpack_require__(/*! ./_overArg */ \"./node_modules/lodash/_overArg.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_nativeKeys.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_nativeKeysIn.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_nativeKeysIn.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_nativeKeysIn.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_nodeUtil.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_nodeUtil.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ \"./node_modules/lodash/_freeGlobal.js\");\n\n/** Detect free variable `exports`. */\nvar freeExports = true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_nodeUtil.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_objectToString.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_objectToString.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_objectToString.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_overArg.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_overArg.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_overArg.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_root.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/_root.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ \"./node_modules/lodash/_freeGlobal.js\");\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_root.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_setCacheAdd.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_setCacheAdd.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_setCacheAdd.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_setCacheHas.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_setCacheHas.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_setCacheHas.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_setToArray.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_setToArray.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_setToArray.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_stackClear.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_stackClear.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var ListCache = __webpack_require__(/*! ./_ListCache */ \"./node_modules/lodash/_ListCache.js\");\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_stackClear.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_stackDelete.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_stackDelete.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_stackDelete.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_stackGet.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_stackGet.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_stackGet.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_stackHas.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_stackHas.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_stackHas.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_stackSet.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_stackSet.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var ListCache = __webpack_require__(/*! ./_ListCache */ \"./node_modules/lodash/_ListCache.js\"),\n Map = __webpack_require__(/*! ./_Map */ \"./node_modules/lodash/_Map.js\"),\n MapCache = __webpack_require__(/*! ./_MapCache */ \"./node_modules/lodash/_MapCache.js\");\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_stackSet.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_stringToPath.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_stringToPath.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var memoizeCapped = __webpack_require__(/*! ./_memoizeCapped */ \"./node_modules/lodash/_memoizeCapped.js\");\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_stringToPath.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_toKey.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/_toKey.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_toKey.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/_toSource.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_toSource.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/_toSource.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/cloneDeep.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/cloneDeep.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseClone = __webpack_require__(/*! ./_baseClone */ \"./node_modules/lodash/_baseClone.js\");\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/cloneDeep.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/debounce.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/debounce.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n now = __webpack_require__(/*! ./now */ \"./node_modules/lodash/now.js\"),\n toNumber = __webpack_require__(/*! ./toNumber */ \"./node_modules/lodash/toNumber.js\");\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/debounce.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/each.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/each.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("module.exports = __webpack_require__(/*! ./forEach */ \"./node_modules/lodash/forEach.js\");\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/each.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/eq.js": +/*!***********************************!*\ + !*** ./node_modules/lodash/eq.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/eq.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/forEach.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/forEach.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var arrayEach = __webpack_require__(/*! ./_arrayEach */ \"./node_modules/lodash/_arrayEach.js\"),\n baseEach = __webpack_require__(/*! ./_baseEach */ \"./node_modules/lodash/_baseEach.js\"),\n castFunction = __webpack_require__(/*! ./_castFunction */ \"./node_modules/lodash/_castFunction.js\"),\n isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nmodule.exports = forEach;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/forEach.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/forOwn.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/forOwn.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ \"./node_modules/lodash/_baseForOwn.js\"),\n castFunction = __webpack_require__(/*! ./_castFunction */ \"./node_modules/lodash/_castFunction.js\");\n\n/**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forOwn(object, iteratee) {\n return object && baseForOwn(object, castFunction(iteratee));\n}\n\nmodule.exports = forOwn;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/forOwn.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/get.js": +/*!************************************!*\ + !*** ./node_modules/lodash/get.js ***! + \************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseGet = __webpack_require__(/*! ./_baseGet */ \"./node_modules/lodash/_baseGet.js\");\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/get.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/hasIn.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/hasIn.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseHasIn = __webpack_require__(/*! ./_baseHasIn */ \"./node_modules/lodash/_baseHasIn.js\"),\n hasPath = __webpack_require__(/*! ./_hasPath */ \"./node_modules/lodash/_hasPath.js\");\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/hasIn.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/identity.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/identity.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/identity.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isArguments.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/isArguments.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ \"./node_modules/lodash/_baseIsArguments.js\"),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isArguments.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isArray.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/isArray.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isArray.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isArrayLike.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/isArrayLike.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isFunction = __webpack_require__(/*! ./isFunction */ \"./node_modules/lodash/isFunction.js\"),\n isLength = __webpack_require__(/*! ./isLength */ \"./node_modules/lodash/isLength.js\");\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isArrayLike.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isBuffer.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isBuffer.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\"),\n stubFalse = __webpack_require__(/*! ./stubFalse */ \"./node_modules/lodash/stubFalse.js\");\n\n/** Detect free variable `exports`. */\nvar freeExports = true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isBuffer.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isFunction.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/isFunction.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\");\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isFunction.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isLength.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isLength.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isLength.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isMap.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/isMap.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseIsMap = __webpack_require__(/*! ./_baseIsMap */ \"./node_modules/lodash/_baseIsMap.js\"),\n baseUnary = __webpack_require__(/*! ./_baseUnary */ \"./node_modules/lodash/_baseUnary.js\"),\n nodeUtil = __webpack_require__(/*! ./_nodeUtil */ \"./node_modules/lodash/_nodeUtil.js\");\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isMap.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isObject.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isObject.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isObject.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isObjectLike.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/isObjectLike.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isObjectLike.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isPlainObject.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/isPlainObject.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n getPrototype = __webpack_require__(/*! ./_getPrototype */ \"./node_modules/lodash/_getPrototype.js\"),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isPlainObject.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isSet.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/isSet.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseIsSet = __webpack_require__(/*! ./_baseIsSet */ \"./node_modules/lodash/_baseIsSet.js\"),\n baseUnary = __webpack_require__(/*! ./_baseUnary */ \"./node_modules/lodash/_baseUnary.js\"),\n nodeUtil = __webpack_require__(/*! ./_nodeUtil */ \"./node_modules/lodash/_nodeUtil.js\");\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isSet.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isString.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isString.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isString.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isSymbol.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isSymbol.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isSymbol.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/isTypedArray.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/isTypedArray.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ \"./node_modules/lodash/_baseIsTypedArray.js\"),\n baseUnary = __webpack_require__(/*! ./_baseUnary */ \"./node_modules/lodash/_baseUnary.js\"),\n nodeUtil = __webpack_require__(/*! ./_nodeUtil */ \"./node_modules/lodash/_nodeUtil.js\");\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/isTypedArray.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/keys.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/keys.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ \"./node_modules/lodash/_arrayLikeKeys.js\"),\n baseKeys = __webpack_require__(/*! ./_baseKeys */ \"./node_modules/lodash/_baseKeys.js\"),\n isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\");\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/keys.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/keysIn.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/keysIn.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ \"./node_modules/lodash/_arrayLikeKeys.js\"),\n baseKeysIn = __webpack_require__(/*! ./_baseKeysIn */ \"./node_modules/lodash/_baseKeysIn.js\"),\n isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\");\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/keysIn.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/map.js": +/*!************************************!*\ + !*** ./node_modules/lodash/map.js ***! + \************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n baseMap = __webpack_require__(/*! ./_baseMap */ \"./node_modules/lodash/_baseMap.js\"),\n isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nmodule.exports = map;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/map.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/memoize.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/memoize.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var MapCache = __webpack_require__(/*! ./_MapCache */ \"./node_modules/lodash/_MapCache.js\");\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/memoize.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/now.js": +/*!************************************!*\ + !*** ./node_modules/lodash/now.js ***! + \************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/now.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/property.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/property.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseProperty = __webpack_require__(/*! ./_baseProperty */ \"./node_modules/lodash/_baseProperty.js\"),\n basePropertyDeep = __webpack_require__(/*! ./_basePropertyDeep */ \"./node_modules/lodash/_basePropertyDeep.js\"),\n isKey = __webpack_require__(/*! ./_isKey */ \"./node_modules/lodash/_isKey.js\"),\n toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/property.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/stubArray.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/stubArray.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/stubArray.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/stubFalse.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/stubFalse.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/stubFalse.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/throttle.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/throttle.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var debounce = __webpack_require__(/*! ./debounce */ \"./node_modules/lodash/debounce.js\"),\n isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\");\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/throttle.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/toNumber.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/toNumber.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/toNumber.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/toString.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/toString.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var baseToString = __webpack_require__(/*! ./_baseToString */ \"./node_modules/lodash/_baseToString.js\");\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/lodash/toString.js?"); + +/***/ }), + +/***/ "./node_modules/memoize-one/dist/memoize-one.esm.js": +/*!**********************************************************!*\ + !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***! + \**********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nvar simpleIsEqual = function simpleIsEqual(a, b) {\n return a === b;\n};\n\nfunction index (resultFn, isEqual) {\n if (isEqual === void 0) {\n isEqual = simpleIsEqual;\n }\n\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n\n var isNewArgEqualToLast = function isNewArgEqualToLast(newArg, index) {\n return isEqual(newArg, lastArgs[index]);\n };\n\n var result = function result() {\n for (var _len = arguments.length, newArgs = new Array(_len), _key = 0; _key < _len; _key++) {\n newArgs[_key] = arguments[_key];\n }\n\n if (calledOnce && lastThis === this && newArgs.length === lastArgs.length && newArgs.every(isNewArgEqualToLast)) {\n return lastResult;\n }\n\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n };\n\n return result;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (index);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/memoize-one/dist/memoize-one.esm.js?"); + +/***/ }), + +/***/ "./node_modules/nanoid/format.js": +/*!***************************************!*\ + !*** ./node_modules/nanoid/format.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * Secure random string generator with custom alphabet.\n *\n * Alphabet must contain 256 symbols or less. Otherwise, the generator\n * will not be secure.\n *\n * @param {generator} random The random bytes generator.\n * @param {string} alphabet Symbols to be used in new random string.\n * @param {size} size The number of symbols in new random string.\n *\n * @return {string} Random string.\n *\n * @example\n * const format = require('nanoid/format')\n *\n * function random (size) {\n * const result = []\n * for (let i = 0; i < size; i++) {\n * result.push(randomByte())\n * }\n * return result\n * }\n *\n * format(random, \"abcdef\", 5) //=> \"fbaef\"\n *\n * @name format\n * @function\n */\nmodule.exports = function (random, alphabet, size) {\n var mask = (2 << Math.log(alphabet.length - 1) / Math.LN2) - 1\n var step = Math.ceil(1.6 * mask * size / alphabet.length)\n\n var id = ''\n while (true) {\n var bytes = random(step)\n for (var i = 0; i < step; i++) {\n var byte = bytes[i] & mask\n if (alphabet[byte]) {\n id += alphabet[byte]\n if (id.length === size) return id\n }\n }\n }\n}\n\n/**\n * @callback generator\n * @param {number} bytes The number of bytes to generate.\n * @return {number[]} Random bytes.\n */\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/nanoid/format.js?"); + +/***/ }), + +/***/ "./node_modules/nanoid/generate.js": +/*!*****************************************!*\ + !*** ./node_modules/nanoid/generate.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var random = __webpack_require__(/*! ./random */ \"./node_modules/nanoid/random.browser.js\")\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/nanoid/format.js\")\n\n/**\n * Low-level function to change alphabet and ID size.\n *\n * Alphabet must contain 256 symbols or less. Otherwise, the generator\n * will not be secure.\n *\n * @param {string} alphabet Symbols to be used in ID.\n * @param {number} size The number of symbols in ID.\n *\n * @return {string} Unique ID.\n *\n * @example\n * const generate = require('nanoid/generate')\n * model.id = generate('0123456789абвгдеё', 5) //=> \"8ё56а\"\n *\n * @name generate\n * @function\n */\nmodule.exports = function (alphabet, size) {\n return format(random, alphabet, size)\n}\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/nanoid/generate.js?"); + +/***/ }), + +/***/ "./node_modules/nanoid/random.browser.js": +/*!***********************************************!*\ + !*** ./node_modules/nanoid/random.browser.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("var crypto = self.crypto || self.msCrypto\n\nmodule.exports = function (bytes) {\n return crypto.getRandomValues(new Uint8Array(bytes))\n}\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/nanoid/random.browser.js?"); + +/***/ }), + +/***/ "./node_modules/object-assign/index.js": +/*!*********************************************!*\ + !*** ./node_modules/object-assign/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/object-assign/index.js?"); + +/***/ }), + +/***/ "./node_modules/observe-resize/index.js": +/*!**********************************************!*\ + !*** ./node_modules/observe-resize/index.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var insert = __webpack_require__(/*! insert-styles */ \"./node_modules/insert-styles/index.js\")\nvar assert = __webpack_require__(/*! assert */ \"./node_modules/assert/assert.js\")\nvar isDom = __webpack_require__(/*! is-dom */ \"./node_modules/is-dom/index.js\")\n\ninsert('.__observe-resize__ { position: absolute; left: 0; top: -100%; width: 100%; height: 100%; margin: 1px 0 0; border: none; opacity: 0; visibility: hidden; pointer-events: none; }')\n\nmodule.exports = observeResize\n\n// Trigger a callback when an element is resized\nfunction observeResize (el, cb) {\n assert.ok(isDom(el), 'observe-resize: el should be a valid DOM element')\n assert.equal(typeof cb, 'function', 'observe-resize: cb should be type function')\n\n // Make this function a noop in non-browser environments\n if (typeof window !== 'object') return\n\n var called = false\n var frame = document.createElement('iframe')\n frame.setAttribute('class', '__observe-resize__')\n el.appendChild(frame)\n\n assert.ok(frame.contentWindow, 'observe-resize: no contentWindow detected - cannot start observing')\n frame.contentWindow.onresize = handleResize\n\n return function stopObserving () {\n if (frame.parentNode) frame.parentNode.removeChild(frame)\n }\n\n function handleResize () {\n if (called) return\n called = true\n window.requestAnimationFrame(function () {\n called = false\n cb(el)\n })\n }\n}\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/observe-resize/index.js?"); + +/***/ }), + +/***/ "./node_modules/performance-now/lib/performance-now.js": +/*!*************************************************************!*\ + !*** ./node_modules/performance-now/lib/performance-now.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/performance-now/lib/performance-now.js?"); + +/***/ }), + +/***/ "./node_modules/process/browser.js": +/*!*****************************************!*\ + !*** ./node_modules/process/browser.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/process/browser.js?"); + +/***/ }), + +/***/ "./node_modules/prop-types/checkPropTypes.js": +/*!***************************************************!*\ + !*** ./node_modules/prop-types/checkPropTypes.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar printWarning = function() {};\n\nif (true) {\n var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n var loggedTypeFailures = {};\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (true) {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n )\n\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/prop-types/checkPropTypes.js?"); + +/***/ }), + +/***/ "./node_modules/prop-types/factoryWithTypeCheckers.js": +/*!************************************************************!*\ + !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\nvar checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ \"./node_modules/prop-types/checkPropTypes.js\");\n\nvar printWarning = function() {};\n\nif (true) {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (true) {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if ( true && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n true ? printWarning('Invalid argument supplied to oneOf, expected an instance of array.') : undefined;\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/prop-types/factoryWithTypeCheckers.js?"); + +/***/ }), + +/***/ "./node_modules/prop-types/index.js": +/*!******************************************!*\ + !*** ./node_modules/prop-types/index.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ \"./node_modules/prop-types/factoryWithTypeCheckers.js\")(isValidElement, throwOnDirectAccess);\n} else {}\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/prop-types/index.js?"); + +/***/ }), + +/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js": +/*!*************************************************************!*\ + !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/prop-types/lib/ReactPropTypesSecret.js?"); + +/***/ }), + +/***/ "./node_modules/raf/index.js": +/*!***********************************!*\ + !*** ./node_modules/raf/index.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(/*! performance-now */ \"./node_modules/performance-now/lib/performance-now.js\")\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n if (!object) {\n object = root;\n }\n object.requestAnimationFrame = raf\n object.cancelAnimationFrame = caf\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/raf/index.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/Sketch.js": +/*!************************************************!*\ + !*** ./node_modules/react-color/lib/Sketch.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = undefined;\n\nvar _Sketch = __webpack_require__(/*! ./components/sketch/Sketch */ \"./node_modules/react-color/lib/components/sketch/Sketch.js\");\n\nvar _Sketch2 = _interopRequireDefault(_Sketch);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Sketch2.default;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/Sketch.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/components/common/Alpha.js": +/*!*****************************************************************!*\ + !*** ./node_modules/react-color/lib/components/common/Alpha.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Alpha = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = __webpack_require__(/*! reactcss */ \"./node_modules/reactcss/lib/index.js\");\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _alpha = __webpack_require__(/*! ../../helpers/alpha */ \"./node_modules/react-color/lib/helpers/alpha.js\");\n\nvar alpha = _interopRequireWildcard(_alpha);\n\nvar _Checkboard = __webpack_require__(/*! ./Checkboard */ \"./node_modules/react-color/lib/components/common/Checkboard.js\");\n\nvar _Checkboard2 = _interopRequireDefault(_Checkboard);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Alpha = exports.Alpha = function (_ref) {\n _inherits(Alpha, _ref);\n\n function Alpha() {\n var _ref2;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Alpha);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref2 = Alpha.__proto__ || Object.getPrototypeOf(Alpha)).call.apply(_ref2, [this].concat(args))), _this), _this.handleChange = function (e, skip) {\n var change = alpha.calculateChange(e, skip, _this.props, _this.container);\n change && _this.props.onChange && _this.props.onChange(change, e);\n }, _this.handleMouseDown = function (e) {\n _this.handleChange(e, true);\n window.addEventListener('mousemove', _this.handleChange);\n window.addEventListener('mouseup', _this.handleMouseUp);\n }, _this.handleMouseUp = function () {\n _this.unbindEventListeners();\n }, _this.unbindEventListeners = function () {\n window.removeEventListener('mousemove', _this.handleChange);\n window.removeEventListener('mouseup', _this.handleMouseUp);\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Alpha, [{\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.unbindEventListeners();\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var rgb = this.props.rgb;\n var styles = (0, _reactcss2.default)({\n 'default': {\n alpha: {\n absolute: '0px 0px 0px 0px',\n borderRadius: this.props.radius\n },\n checkboard: {\n absolute: '0px 0px 0px 0px',\n overflow: 'hidden',\n borderRadius: this.props.radius\n },\n gradient: {\n absolute: '0px 0px 0px 0px',\n background: 'linear-gradient(to right, rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 0) 0%,\\n rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 1) 100%)',\n boxShadow: this.props.shadow,\n borderRadius: this.props.radius\n },\n container: {\n position: 'relative',\n height: '100%',\n margin: '0 3px'\n },\n pointer: {\n position: 'absolute',\n left: rgb.a * 100 + '%'\n },\n slider: {\n width: '4px',\n borderRadius: '1px',\n height: '8px',\n boxShadow: '0 0 2px rgba(0, 0, 0, .6)',\n background: '#fff',\n marginTop: '1px',\n transform: 'translateX(-2px)'\n }\n },\n 'vertical': {\n gradient: {\n background: 'linear-gradient(to bottom, rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 0) 0%,\\n rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 1) 100%)'\n },\n pointer: {\n left: 0,\n top: rgb.a * 100 + '%'\n }\n },\n 'overwrite': _extends({}, this.props.style)\n }, {\n vertical: this.props.direction === 'vertical',\n overwrite: true\n });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.alpha },\n _react2.default.createElement(\n 'div',\n { style: styles.checkboard },\n _react2.default.createElement(_Checkboard2.default, { renderers: this.props.renderers })\n ),\n _react2.default.createElement('div', { style: styles.gradient }),\n _react2.default.createElement(\n 'div',\n {\n style: styles.container,\n ref: function ref(container) {\n return _this2.container = container;\n },\n onMouseDown: this.handleMouseDown,\n onTouchMove: this.handleChange,\n onTouchStart: this.handleChange\n },\n _react2.default.createElement(\n 'div',\n { style: styles.pointer },\n this.props.pointer ? _react2.default.createElement(this.props.pointer, this.props) : _react2.default.createElement('div', { style: styles.slider })\n )\n )\n );\n }\n }]);\n\n return Alpha;\n}(_react.PureComponent || _react.Component);\n\nexports.default = Alpha;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/components/common/Alpha.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/components/common/Checkboard.js": +/*!**********************************************************************!*\ + !*** ./node_modules/react-color/lib/components/common/Checkboard.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Checkboard = undefined;\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = __webpack_require__(/*! reactcss */ \"./node_modules/reactcss/lib/index.js\");\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _checkboard = __webpack_require__(/*! ../../helpers/checkboard */ \"./node_modules/react-color/lib/helpers/checkboard.js\");\n\nvar checkboard = _interopRequireWildcard(_checkboard);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Checkboard = exports.Checkboard = function Checkboard(_ref) {\n var white = _ref.white,\n grey = _ref.grey,\n size = _ref.size,\n renderers = _ref.renderers,\n borderRadius = _ref.borderRadius,\n boxShadow = _ref.boxShadow;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n grid: {\n borderRadius: borderRadius,\n boxShadow: boxShadow,\n absolute: '0px 0px 0px 0px',\n background: 'url(' + checkboard.get(white, grey, size, renderers.canvas) + ') center left'\n }\n }\n });\n\n return _react2.default.createElement('div', { style: styles.grid });\n};\n\nCheckboard.defaultProps = {\n size: 8,\n white: 'transparent',\n grey: 'rgba(0,0,0,.08)',\n renderers: {}\n};\n\nexports.default = Checkboard;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/components/common/Checkboard.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/components/common/ColorWrap.js": +/*!*********************************************************************!*\ + !*** ./node_modules/react-color/lib/components/common/ColorWrap.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ColorWrap = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _debounce = __webpack_require__(/*! lodash/debounce */ \"./node_modules/lodash/debounce.js\");\n\nvar _debounce2 = _interopRequireDefault(_debounce);\n\nvar _color = __webpack_require__(/*! ../../helpers/color */ \"./node_modules/react-color/lib/helpers/color.js\");\n\nvar _color2 = _interopRequireDefault(_color);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ColorWrap = exports.ColorWrap = function ColorWrap(Picker) {\n var ColorPicker = function (_ref) {\n _inherits(ColorPicker, _ref);\n\n function ColorPicker(props) {\n _classCallCheck(this, ColorPicker);\n\n var _this = _possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this));\n\n _this.handleChange = function (data, event) {\n var isValidColor = _color2.default.simpleCheckForValidColor(data);\n if (isValidColor) {\n var colors = _color2.default.toState(data, data.h || _this.state.oldHue);\n _this.setState(colors);\n _this.props.onChangeComplete && _this.debounce(_this.props.onChangeComplete, colors, event);\n _this.props.onChange && _this.props.onChange(colors, event);\n }\n };\n\n _this.handleSwatchHover = function (data, event) {\n var isValidColor = _color2.default.simpleCheckForValidColor(data);\n if (isValidColor) {\n var colors = _color2.default.toState(data, data.h || _this.state.oldHue);\n _this.setState(colors);\n _this.props.onSwatchHover && _this.props.onSwatchHover(colors, event);\n }\n };\n\n _this.state = _extends({}, _color2.default.toState(props.color, 0));\n\n _this.debounce = (0, _debounce2.default)(function (fn, data, event) {\n fn(data, event);\n }, 100);\n return _this;\n }\n\n _createClass(ColorPicker, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n this.setState(_extends({}, _color2.default.toState(nextProps.color, this.state.oldHue)));\n }\n }, {\n key: 'render',\n value: function render() {\n var optionalEvents = {};\n if (this.props.onSwatchHover) {\n optionalEvents.onSwatchHover = this.handleSwatchHover;\n }\n\n return _react2.default.createElement(Picker, _extends({}, this.props, this.state, {\n onChange: this.handleChange\n }, optionalEvents));\n }\n }]);\n\n return ColorPicker;\n }(_react.PureComponent || _react.Component);\n\n ColorPicker.propTypes = _extends({}, Picker.propTypes);\n\n ColorPicker.defaultProps = _extends({}, Picker.defaultProps, {\n color: {\n h: 250,\n s: 0.50,\n l: 0.20,\n a: 1\n }\n });\n\n return ColorPicker;\n};\n\nexports.default = ColorWrap;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/components/common/ColorWrap.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/components/common/EditableInput.js": +/*!*************************************************************************!*\ + !*** ./node_modules/react-color/lib/components/common/EditableInput.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.EditableInput = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = __webpack_require__(/*! reactcss */ \"./node_modules/reactcss/lib/index.js\");\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar EditableInput = exports.EditableInput = function (_ref) {\n _inherits(EditableInput, _ref);\n\n function EditableInput(props) {\n _classCallCheck(this, EditableInput);\n\n var _this = _possibleConstructorReturn(this, (EditableInput.__proto__ || Object.getPrototypeOf(EditableInput)).call(this));\n\n _this.handleBlur = function () {\n if (_this.state.blurValue) {\n _this.setState({ value: _this.state.blurValue, blurValue: null });\n }\n };\n\n _this.handleChange = function (e) {\n if (_this.props.label) {\n _this.props.onChange && _this.props.onChange(_defineProperty({}, _this.props.label, e.target.value), e);\n } else {\n _this.props.onChange && _this.props.onChange(e.target.value, e);\n }\n\n _this.setState({ value: e.target.value });\n };\n\n _this.handleKeyDown = function (e) {\n // In case `e.target.value` is a percentage remove the `%` character\n // and update accordingly with a percentage\n // https://github.com/casesandberg/react-color/issues/383\n var stringValue = String(e.target.value);\n var isPercentage = stringValue.indexOf('%') > -1;\n var number = Number(stringValue.replace(/%/g, ''));\n if (!isNaN(number)) {\n var amount = _this.props.arrowOffset || 1;\n\n // Up\n if (e.keyCode === 38) {\n if (_this.props.label !== null) {\n _this.props.onChange && _this.props.onChange(_defineProperty({}, _this.props.label, number + amount), e);\n } else {\n _this.props.onChange && _this.props.onChange(number + amount, e);\n }\n\n if (isPercentage) {\n _this.setState({ value: number + amount + '%' });\n } else {\n _this.setState({ value: number + amount });\n }\n }\n\n // Down\n if (e.keyCode === 40) {\n if (_this.props.label !== null) {\n _this.props.onChange && _this.props.onChange(_defineProperty({}, _this.props.label, number - amount), e);\n } else {\n _this.props.onChange && _this.props.onChange(number - amount, e);\n }\n\n if (isPercentage) {\n _this.setState({ value: number - amount + '%' });\n } else {\n _this.setState({ value: number - amount });\n }\n }\n }\n };\n\n _this.handleDrag = function (e) {\n if (_this.props.dragLabel) {\n var newValue = Math.round(_this.props.value + e.movementX);\n if (newValue >= 0 && newValue <= _this.props.dragMax) {\n _this.props.onChange && _this.props.onChange(_defineProperty({}, _this.props.label, newValue), e);\n }\n }\n };\n\n _this.handleMouseDown = function (e) {\n if (_this.props.dragLabel) {\n e.preventDefault();\n _this.handleDrag(e);\n window.addEventListener('mousemove', _this.handleDrag);\n window.addEventListener('mouseup', _this.handleMouseUp);\n }\n };\n\n _this.handleMouseUp = function () {\n _this.unbindEventListeners();\n };\n\n _this.unbindEventListeners = function () {\n window.removeEventListener('mousemove', _this.handleDrag);\n window.removeEventListener('mouseup', _this.handleMouseUp);\n };\n\n _this.state = {\n value: String(props.value).toUpperCase(),\n blurValue: String(props.value).toUpperCase()\n };\n return _this;\n }\n\n _createClass(EditableInput, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n var input = this.input;\n if (nextProps.value !== this.state.value) {\n if (input === document.activeElement) {\n this.setState({ blurValue: String(nextProps.value).toUpperCase() });\n } else {\n this.setState({ value: String(nextProps.value).toUpperCase(), blurValue: !this.state.blurValue && String(nextProps.value).toUpperCase() });\n }\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.unbindEventListeners();\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n wrap: {\n position: 'relative'\n }\n },\n 'user-override': {\n wrap: this.props.style && this.props.style.wrap ? this.props.style.wrap : {},\n input: this.props.style && this.props.style.input ? this.props.style.input : {},\n label: this.props.style && this.props.style.label ? this.props.style.label : {}\n },\n 'dragLabel-true': {\n label: {\n cursor: 'ew-resize'\n }\n }\n }, {\n 'user-override': true\n }, this.props);\n\n return _react2.default.createElement(\n 'div',\n { style: styles.wrap },\n _react2.default.createElement('input', {\n style: styles.input,\n ref: function ref(input) {\n return _this2.input = input;\n },\n value: this.state.value,\n onKeyDown: this.handleKeyDown,\n onChange: this.handleChange,\n onBlur: this.handleBlur,\n placeholder: this.props.placeholder,\n spellCheck: 'false'\n }),\n this.props.label && !this.props.hideLabel ? _react2.default.createElement(\n 'span',\n { style: styles.label, onMouseDown: this.handleMouseDown },\n this.props.label\n ) : null\n );\n }\n }]);\n\n return EditableInput;\n}(_react.PureComponent || _react.Component);\n\nexports.default = EditableInput;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/components/common/EditableInput.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/components/common/Hue.js": +/*!***************************************************************!*\ + !*** ./node_modules/react-color/lib/components/common/Hue.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Hue = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = __webpack_require__(/*! reactcss */ \"./node_modules/reactcss/lib/index.js\");\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _hue = __webpack_require__(/*! ../../helpers/hue */ \"./node_modules/react-color/lib/helpers/hue.js\");\n\nvar hue = _interopRequireWildcard(_hue);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Hue = exports.Hue = function (_ref) {\n _inherits(Hue, _ref);\n\n function Hue() {\n var _ref2;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Hue);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref2 = Hue.__proto__ || Object.getPrototypeOf(Hue)).call.apply(_ref2, [this].concat(args))), _this), _this.handleChange = function (e, skip) {\n var change = hue.calculateChange(e, skip, _this.props, _this.container);\n change && _this.props.onChange && _this.props.onChange(change, e);\n }, _this.handleMouseDown = function (e) {\n _this.handleChange(e, true);\n window.addEventListener('mousemove', _this.handleChange);\n window.addEventListener('mouseup', _this.handleMouseUp);\n }, _this.handleMouseUp = function () {\n _this.unbindEventListeners();\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Hue, [{\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.unbindEventListeners();\n }\n }, {\n key: 'unbindEventListeners',\n value: function unbindEventListeners() {\n window.removeEventListener('mousemove', this.handleChange);\n window.removeEventListener('mouseup', this.handleMouseUp);\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _props$direction = this.props.direction,\n direction = _props$direction === undefined ? 'horizontal' : _props$direction;\n\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n hue: {\n absolute: '0px 0px 0px 0px',\n borderRadius: this.props.radius,\n boxShadow: this.props.shadow\n },\n container: {\n padding: '0 2px',\n position: 'relative',\n height: '100%',\n borderRadius: this.props.radius\n },\n pointer: {\n position: 'absolute',\n left: this.props.hsl.h * 100 / 360 + '%'\n },\n slider: {\n marginTop: '1px',\n width: '4px',\n borderRadius: '1px',\n height: '8px',\n boxShadow: '0 0 2px rgba(0, 0, 0, .6)',\n background: '#fff',\n transform: 'translateX(-2px)'\n }\n },\n 'vertical': {\n pointer: {\n left: '0px',\n top: -(this.props.hsl.h * 100 / 360) + 100 + '%'\n }\n }\n }, { vertical: direction === 'vertical' });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.hue },\n _react2.default.createElement(\n 'div',\n {\n className: 'hue-' + direction,\n style: styles.container,\n ref: function ref(container) {\n return _this2.container = container;\n },\n onMouseDown: this.handleMouseDown,\n onTouchMove: this.handleChange,\n onTouchStart: this.handleChange\n },\n _react2.default.createElement(\n 'style',\n null,\n '\\n .hue-horizontal {\\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\\n }\\n\\n .hue-vertical {\\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\\n }\\n '\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.pointer },\n this.props.pointer ? _react2.default.createElement(this.props.pointer, this.props) : _react2.default.createElement('div', { style: styles.slider })\n )\n )\n );\n }\n }]);\n\n return Hue;\n}(_react.PureComponent || _react.Component);\n\nexports.default = Hue;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/components/common/Hue.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/components/common/Raised.js": +/*!******************************************************************!*\ + !*** ./node_modules/react-color/lib/components/common/Raised.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Raised = undefined;\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = __webpack_require__(/*! reactcss */ \"./node_modules/reactcss/lib/index.js\");\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Raised = exports.Raised = function Raised(_ref) {\n var zDepth = _ref.zDepth,\n radius = _ref.radius,\n background = _ref.background,\n children = _ref.children;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n wrap: {\n position: 'relative',\n display: 'inline-block'\n },\n content: {\n position: 'relative'\n },\n bg: {\n absolute: '0px 0px 0px 0px',\n boxShadow: '0 ' + zDepth + 'px ' + zDepth * 4 + 'px rgba(0,0,0,.24)',\n borderRadius: radius,\n background: background\n }\n },\n 'zDepth-0': {\n bg: {\n boxShadow: 'none'\n }\n },\n\n 'zDepth-1': {\n bg: {\n boxShadow: '0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)'\n }\n },\n 'zDepth-2': {\n bg: {\n boxShadow: '0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)'\n }\n },\n 'zDepth-3': {\n bg: {\n boxShadow: '0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)'\n }\n },\n 'zDepth-4': {\n bg: {\n boxShadow: '0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)'\n }\n },\n 'zDepth-5': {\n bg: {\n boxShadow: '0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)'\n }\n },\n 'square': {\n bg: {\n borderRadius: '0'\n }\n },\n 'circle': {\n bg: {\n borderRadius: '50%'\n }\n }\n }, { 'zDepth-1': zDepth === 1 });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.wrap },\n _react2.default.createElement('div', { style: styles.bg }),\n _react2.default.createElement(\n 'div',\n { style: styles.content },\n children\n )\n );\n};\n\nRaised.propTypes = {\n background: _propTypes2.default.string,\n zDepth: _propTypes2.default.oneOf([0, 1, 2, 3, 4, 5]),\n radius: _propTypes2.default.number\n};\n\nRaised.defaultProps = {\n background: '#fff',\n zDepth: 1,\n radius: 2\n};\n\nexports.default = Raised;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/components/common/Raised.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/components/common/Saturation.js": +/*!**********************************************************************!*\ + !*** ./node_modules/react-color/lib/components/common/Saturation.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Saturation = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = __webpack_require__(/*! reactcss */ \"./node_modules/reactcss/lib/index.js\");\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _throttle = __webpack_require__(/*! lodash/throttle */ \"./node_modules/lodash/throttle.js\");\n\nvar _throttle2 = _interopRequireDefault(_throttle);\n\nvar _saturation = __webpack_require__(/*! ../../helpers/saturation */ \"./node_modules/react-color/lib/helpers/saturation.js\");\n\nvar saturation = _interopRequireWildcard(_saturation);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Saturation = exports.Saturation = function (_ref) {\n _inherits(Saturation, _ref);\n\n function Saturation(props) {\n _classCallCheck(this, Saturation);\n\n var _this = _possibleConstructorReturn(this, (Saturation.__proto__ || Object.getPrototypeOf(Saturation)).call(this, props));\n\n _this.handleChange = function (e, skip) {\n _this.props.onChange && _this.throttle(_this.props.onChange, saturation.calculateChange(e, skip, _this.props, _this.container), e);\n };\n\n _this.handleMouseDown = function (e) {\n _this.handleChange(e, true);\n window.addEventListener('mousemove', _this.handleChange);\n window.addEventListener('mouseup', _this.handleMouseUp);\n };\n\n _this.handleMouseUp = function () {\n _this.unbindEventListeners();\n };\n\n _this.throttle = (0, _throttle2.default)(function (fn, data, e) {\n fn(data, e);\n }, 50);\n return _this;\n }\n\n _createClass(Saturation, [{\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.unbindEventListeners();\n }\n }, {\n key: 'unbindEventListeners',\n value: function unbindEventListeners() {\n window.removeEventListener('mousemove', this.handleChange);\n window.removeEventListener('mouseup', this.handleMouseUp);\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _ref2 = this.props.style || {},\n color = _ref2.color,\n white = _ref2.white,\n black = _ref2.black,\n pointer = _ref2.pointer,\n circle = _ref2.circle;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n color: {\n absolute: '0px 0px 0px 0px',\n background: 'hsl(' + this.props.hsl.h + ',100%, 50%)',\n borderRadius: this.props.radius\n },\n white: {\n absolute: '0px 0px 0px 0px',\n borderRadius: this.props.radius\n },\n black: {\n absolute: '0px 0px 0px 0px',\n boxShadow: this.props.shadow,\n borderRadius: this.props.radius\n },\n pointer: {\n position: 'absolute',\n top: -(this.props.hsv.v * 100) + 100 + '%',\n left: this.props.hsv.s * 100 + '%',\n cursor: 'default'\n },\n circle: {\n width: '4px',\n height: '4px',\n boxShadow: '0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\\n 0 0 1px 2px rgba(0,0,0,.4)',\n borderRadius: '50%',\n cursor: 'hand',\n transform: 'translate(-2px, -2px)'\n }\n },\n 'custom': {\n color: color,\n white: white,\n black: black,\n pointer: pointer,\n circle: circle\n }\n }, { 'custom': !!this.props.style });\n\n return _react2.default.createElement(\n 'div',\n {\n style: styles.color,\n ref: function ref(container) {\n return _this2.container = container;\n },\n onMouseDown: this.handleMouseDown,\n onTouchMove: this.handleChange,\n onTouchStart: this.handleChange\n },\n _react2.default.createElement(\n 'style',\n null,\n '\\n .saturation-white {\\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\\n }\\n .saturation-black {\\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\\n }\\n '\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.white, className: 'saturation-white' },\n _react2.default.createElement('div', { style: styles.black, className: 'saturation-black' }),\n _react2.default.createElement(\n 'div',\n { style: styles.pointer },\n this.props.pointer ? _react2.default.createElement(this.props.pointer, this.props) : _react2.default.createElement('div', { style: styles.circle })\n )\n )\n );\n }\n }]);\n\n return Saturation;\n}(_react.PureComponent || _react.Component);\n\nexports.default = Saturation;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/components/common/Saturation.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/components/common/Swatch.js": +/*!******************************************************************!*\ + !*** ./node_modules/react-color/lib/components/common/Swatch.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Swatch = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = __webpack_require__(/*! reactcss */ \"./node_modules/reactcss/lib/index.js\");\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _interaction = __webpack_require__(/*! ../../helpers/interaction */ \"./node_modules/react-color/lib/helpers/interaction.js\");\n\nvar _ = __webpack_require__(/*! ./ */ \"./node_modules/react-color/lib/components/common/index.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ENTER = 13;\n\nvar Swatch = exports.Swatch = function Swatch(_ref) {\n var color = _ref.color,\n style = _ref.style,\n _ref$onClick = _ref.onClick,\n onClick = _ref$onClick === undefined ? function () {} : _ref$onClick,\n onHover = _ref.onHover,\n _ref$title = _ref.title,\n title = _ref$title === undefined ? color : _ref$title,\n children = _ref.children,\n focus = _ref.focus,\n _ref$focusStyle = _ref.focusStyle,\n focusStyle = _ref$focusStyle === undefined ? {} : _ref$focusStyle;\n\n var transparent = color === 'transparent';\n var styles = (0, _reactcss2.default)({\n default: {\n swatch: _extends({\n background: color,\n height: '100%',\n width: '100%',\n cursor: 'pointer',\n position: 'relative',\n outline: 'none'\n }, style, focus ? focusStyle : {})\n }\n });\n\n var handleClick = function handleClick(e) {\n return onClick(color, e);\n };\n var handleKeyDown = function handleKeyDown(e) {\n return e.keyCode === ENTER && onClick(color, e);\n };\n var handleHover = function handleHover(e) {\n return onHover(color, e);\n };\n\n var optionalEvents = {};\n if (onHover) {\n optionalEvents.onMouseOver = handleHover;\n }\n\n return _react2.default.createElement(\n 'div',\n _extends({\n style: styles.swatch,\n onClick: handleClick,\n title: title,\n tabIndex: 0,\n onKeyDown: handleKeyDown\n }, optionalEvents),\n children,\n transparent && _react2.default.createElement(_.Checkboard, {\n borderRadius: styles.swatch.borderRadius,\n boxShadow: 'inset 0 0 0 1px rgba(0,0,0,0.1)'\n })\n );\n};\n\nexports.default = (0, _interaction.handleFocus)(Swatch);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/components/common/Swatch.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/components/common/index.js": +/*!*****************************************************************!*\ + !*** ./node_modules/react-color/lib/components/common/index.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Alpha = __webpack_require__(/*! ./Alpha */ \"./node_modules/react-color/lib/components/common/Alpha.js\");\n\nObject.defineProperty(exports, 'Alpha', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Alpha).default;\n }\n});\n\nvar _Checkboard = __webpack_require__(/*! ./Checkboard */ \"./node_modules/react-color/lib/components/common/Checkboard.js\");\n\nObject.defineProperty(exports, 'Checkboard', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Checkboard).default;\n }\n});\n\nvar _EditableInput = __webpack_require__(/*! ./EditableInput */ \"./node_modules/react-color/lib/components/common/EditableInput.js\");\n\nObject.defineProperty(exports, 'EditableInput', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_EditableInput).default;\n }\n});\n\nvar _Hue = __webpack_require__(/*! ./Hue */ \"./node_modules/react-color/lib/components/common/Hue.js\");\n\nObject.defineProperty(exports, 'Hue', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Hue).default;\n }\n});\n\nvar _Raised = __webpack_require__(/*! ./Raised */ \"./node_modules/react-color/lib/components/common/Raised.js\");\n\nObject.defineProperty(exports, 'Raised', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Raised).default;\n }\n});\n\nvar _Saturation = __webpack_require__(/*! ./Saturation */ \"./node_modules/react-color/lib/components/common/Saturation.js\");\n\nObject.defineProperty(exports, 'Saturation', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Saturation).default;\n }\n});\n\nvar _ColorWrap = __webpack_require__(/*! ./ColorWrap */ \"./node_modules/react-color/lib/components/common/ColorWrap.js\");\n\nObject.defineProperty(exports, 'ColorWrap', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_ColorWrap).default;\n }\n});\n\nvar _Swatch = __webpack_require__(/*! ./Swatch */ \"./node_modules/react-color/lib/components/common/Swatch.js\");\n\nObject.defineProperty(exports, 'Swatch', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Swatch).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/components/common/index.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/components/sketch/Sketch.js": +/*!******************************************************************!*\ + !*** ./node_modules/react-color/lib/components/sketch/Sketch.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Sketch = undefined;\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = __webpack_require__(/*! reactcss */ \"./node_modules/reactcss/lib/index.js\");\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _common = __webpack_require__(/*! ../common */ \"./node_modules/react-color/lib/components/common/index.js\");\n\nvar _SketchFields = __webpack_require__(/*! ./SketchFields */ \"./node_modules/react-color/lib/components/sketch/SketchFields.js\");\n\nvar _SketchFields2 = _interopRequireDefault(_SketchFields);\n\nvar _SketchPresetColors = __webpack_require__(/*! ./SketchPresetColors */ \"./node_modules/react-color/lib/components/sketch/SketchPresetColors.js\");\n\nvar _SketchPresetColors2 = _interopRequireDefault(_SketchPresetColors);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Sketch = exports.Sketch = function Sketch(_ref) {\n var width = _ref.width,\n rgb = _ref.rgb,\n hex = _ref.hex,\n hsv = _ref.hsv,\n hsl = _ref.hsl,\n onChange = _ref.onChange,\n onSwatchHover = _ref.onSwatchHover,\n disableAlpha = _ref.disableAlpha,\n presetColors = _ref.presetColors,\n renderers = _ref.renderers,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n picker: {\n width: width,\n padding: '10px 10px 0',\n boxSizing: 'initial',\n background: '#fff',\n borderRadius: '4px',\n boxShadow: '0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)'\n },\n saturation: {\n width: '100%',\n paddingBottom: '75%',\n position: 'relative',\n overflow: 'hidden'\n },\n Saturation: {\n radius: '3px',\n shadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)'\n },\n controls: {\n display: 'flex'\n },\n sliders: {\n padding: '4px 0',\n flex: '1'\n },\n color: {\n width: '24px',\n height: '24px',\n position: 'relative',\n marginTop: '4px',\n marginLeft: '4px',\n borderRadius: '3px'\n },\n activeColor: {\n absolute: '0px 0px 0px 0px',\n borderRadius: '2px',\n background: 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + rgb.a + ')',\n boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)'\n },\n hue: {\n position: 'relative',\n height: '10px',\n overflow: 'hidden'\n },\n Hue: {\n radius: '2px',\n shadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)'\n },\n\n alpha: {\n position: 'relative',\n height: '10px',\n marginTop: '4px',\n overflow: 'hidden'\n },\n Alpha: {\n radius: '2px',\n shadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)'\n }\n },\n 'disableAlpha': {\n color: {\n height: '10px'\n },\n hue: {\n height: '10px'\n },\n alpha: {\n display: 'none'\n }\n }\n }, { disableAlpha: disableAlpha });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.picker, className: 'sketch-picker ' + className },\n _react2.default.createElement(\n 'div',\n { style: styles.saturation },\n _react2.default.createElement(_common.Saturation, {\n style: styles.Saturation,\n hsl: hsl,\n hsv: hsv,\n onChange: onChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.controls, className: 'flexbox-fix' },\n _react2.default.createElement(\n 'div',\n { style: styles.sliders },\n _react2.default.createElement(\n 'div',\n { style: styles.hue },\n _react2.default.createElement(_common.Hue, {\n style: styles.Hue,\n hsl: hsl,\n onChange: onChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.alpha },\n _react2.default.createElement(_common.Alpha, {\n style: styles.Alpha,\n rgb: rgb,\n hsl: hsl,\n renderers: renderers,\n onChange: onChange\n })\n )\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.color },\n _react2.default.createElement(_common.Checkboard, null),\n _react2.default.createElement('div', { style: styles.activeColor })\n )\n ),\n _react2.default.createElement(_SketchFields2.default, {\n rgb: rgb,\n hsl: hsl,\n hex: hex,\n onChange: onChange,\n disableAlpha: disableAlpha\n }),\n _react2.default.createElement(_SketchPresetColors2.default, {\n colors: presetColors,\n onClick: onChange,\n onSwatchHover: onSwatchHover\n })\n );\n};\n\nSketch.propTypes = {\n disableAlpha: _propTypes2.default.bool,\n width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number])\n};\n\nSketch.defaultProps = {\n disableAlpha: false,\n width: 200,\n presetColors: ['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#417505', '#BD10E0', '#9013FE', '#4A90E2', '#50E3C2', '#B8E986', '#000000', '#4A4A4A', '#9B9B9B', '#FFFFFF']\n};\n\nexports.default = (0, _common.ColorWrap)(Sketch);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/components/sketch/Sketch.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/components/sketch/SketchFields.js": +/*!************************************************************************!*\ + !*** ./node_modules/react-color/lib/components/sketch/SketchFields.js ***! + \************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SketchFields = undefined;\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = __webpack_require__(/*! reactcss */ \"./node_modules/reactcss/lib/index.js\");\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _color = __webpack_require__(/*! ../../helpers/color */ \"./node_modules/react-color/lib/helpers/color.js\");\n\nvar _color2 = _interopRequireDefault(_color);\n\nvar _common = __webpack_require__(/*! ../common */ \"./node_modules/react-color/lib/components/common/index.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint-disable no-param-reassign */\n\nvar SketchFields = exports.SketchFields = function SketchFields(_ref) {\n var onChange = _ref.onChange,\n rgb = _ref.rgb,\n hsl = _ref.hsl,\n hex = _ref.hex,\n disableAlpha = _ref.disableAlpha;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n fields: {\n display: 'flex',\n paddingTop: '4px'\n },\n single: {\n flex: '1',\n paddingLeft: '6px'\n },\n alpha: {\n flex: '1',\n paddingLeft: '6px'\n },\n double: {\n flex: '2'\n },\n input: {\n width: '80%',\n padding: '4px 10% 3px',\n border: 'none',\n boxShadow: 'inset 0 0 0 1px #ccc',\n fontSize: '11px'\n },\n label: {\n display: 'block',\n textAlign: 'center',\n fontSize: '11px',\n color: '#222',\n paddingTop: '3px',\n paddingBottom: '4px',\n textTransform: 'capitalize'\n }\n },\n 'disableAlpha': {\n alpha: {\n display: 'none'\n }\n }\n }, { disableAlpha: disableAlpha });\n\n var handleChange = function handleChange(data, e) {\n if (data.hex) {\n _color2.default.isValidHex(data.hex) && onChange({\n hex: data.hex,\n source: 'hex'\n }, e);\n } else if (data.r || data.g || data.b) {\n onChange({\n r: data.r || rgb.r,\n g: data.g || rgb.g,\n b: data.b || rgb.b,\n a: rgb.a,\n source: 'rgb'\n }, e);\n } else if (data.a) {\n if (data.a < 0) {\n data.a = 0;\n } else if (data.a > 100) {\n data.a = 100;\n }\n\n data.a /= 100;\n onChange({\n h: hsl.h,\n s: hsl.s,\n l: hsl.l,\n a: data.a,\n source: 'rgb'\n }, e);\n }\n };\n\n return _react2.default.createElement(\n 'div',\n { style: styles.fields, className: 'flexbox-fix' },\n _react2.default.createElement(\n 'div',\n { style: styles.double },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'hex',\n value: hex.replace('#', ''),\n onChange: handleChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.single },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'r',\n value: rgb.r,\n onChange: handleChange,\n dragLabel: 'true',\n dragMax: '255'\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.single },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'g',\n value: rgb.g,\n onChange: handleChange,\n dragLabel: 'true',\n dragMax: '255'\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.single },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'b',\n value: rgb.b,\n onChange: handleChange,\n dragLabel: 'true',\n dragMax: '255'\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.alpha },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'a',\n value: Math.round(rgb.a * 100),\n onChange: handleChange,\n dragLabel: 'true',\n dragMax: '100'\n })\n )\n );\n};\n\nexports.default = SketchFields;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/components/sketch/SketchFields.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/components/sketch/SketchPresetColors.js": +/*!******************************************************************************!*\ + !*** ./node_modules/react-color/lib/components/sketch/SketchPresetColors.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SketchPresetColors = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = __webpack_require__(/*! reactcss */ \"./node_modules/reactcss/lib/index.js\");\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _common = __webpack_require__(/*! ../common */ \"./node_modules/react-color/lib/components/common/index.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SketchPresetColors = exports.SketchPresetColors = function SketchPresetColors(_ref) {\n var colors = _ref.colors,\n _ref$onClick = _ref.onClick,\n onClick = _ref$onClick === undefined ? function () {} : _ref$onClick,\n onSwatchHover = _ref.onSwatchHover;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n colors: {\n margin: '0 -10px',\n padding: '10px 0 0 10px',\n borderTop: '1px solid #eee',\n display: 'flex',\n flexWrap: 'wrap',\n position: 'relative'\n },\n swatchWrap: {\n width: '16px',\n height: '16px',\n margin: '0 10px 10px 0'\n },\n swatch: {\n borderRadius: '3px',\n boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.15)'\n }\n },\n 'no-presets': {\n colors: {\n display: 'none'\n }\n }\n }, {\n 'no-presets': !colors || !colors.length\n });\n\n var handleClick = function handleClick(hex, e) {\n onClick({\n hex: hex,\n source: 'hex'\n }, e);\n };\n\n return _react2.default.createElement(\n 'div',\n { style: styles.colors, className: 'flexbox-fix' },\n colors.map(function (colorObjOrString) {\n var c = typeof colorObjOrString === 'string' ? { color: colorObjOrString } : colorObjOrString;\n var key = '' + c.color + (c.title || '');\n return _react2.default.createElement(\n 'div',\n { key: key, style: styles.swatchWrap },\n _react2.default.createElement(_common.Swatch, _extends({}, c, {\n style: styles.swatch,\n onClick: handleClick,\n onHover: onSwatchHover,\n focusStyle: {\n boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px ' + c.color\n }\n }))\n );\n })\n );\n};\n\nSketchPresetColors.propTypes = {\n colors: _propTypes2.default.arrayOf(_propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n color: _propTypes2.default.string,\n title: _propTypes2.default.string\n })])).isRequired\n};\n\nexports.default = SketchPresetColors;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/components/sketch/SketchPresetColors.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/helpers/alpha.js": +/*!*******************************************************!*\ + !*** ./node_modules/react-color/lib/helpers/alpha.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar calculateChange = exports.calculateChange = function calculateChange(e, skip, props, container) {\n e.preventDefault();\n var containerWidth = container.clientWidth;\n var containerHeight = container.clientHeight;\n var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX;\n var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY;\n var left = x - (container.getBoundingClientRect().left + window.pageXOffset);\n var top = y - (container.getBoundingClientRect().top + window.pageYOffset);\n\n if (props.direction === 'vertical') {\n var a = void 0;\n if (top < 0) {\n a = 0;\n } else if (top > containerHeight) {\n a = 1;\n } else {\n a = Math.round(top * 100 / containerHeight) / 100;\n }\n\n if (props.hsl.a !== a) {\n return {\n h: props.hsl.h,\n s: props.hsl.s,\n l: props.hsl.l,\n a: a,\n source: 'rgb'\n };\n }\n } else {\n var _a = void 0;\n if (left < 0) {\n _a = 0;\n } else if (left > containerWidth) {\n _a = 1;\n } else {\n _a = Math.round(left * 100 / containerWidth) / 100;\n }\n\n if (props.a !== _a) {\n return {\n h: props.hsl.h,\n s: props.hsl.s,\n l: props.hsl.l,\n a: _a,\n source: 'rgb'\n };\n }\n }\n return null;\n};\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/helpers/alpha.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/helpers/checkboard.js": +/*!************************************************************!*\ + !*** ./node_modules/react-color/lib/helpers/checkboard.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar checkboardCache = {};\n\nvar render = exports.render = function render(c1, c2, size, serverCanvas) {\n if (typeof document === 'undefined' && !serverCanvas) {\n return null;\n }\n var canvas = serverCanvas ? new serverCanvas() : document.createElement('canvas');\n canvas.width = size * 2;\n canvas.height = size * 2;\n var ctx = canvas.getContext('2d');\n if (!ctx) {\n return null;\n } // If no context can be found, return early.\n ctx.fillStyle = c1;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n ctx.fillStyle = c2;\n ctx.fillRect(0, 0, size, size);\n ctx.translate(size, size);\n ctx.fillRect(0, 0, size, size);\n return canvas.toDataURL();\n};\n\nvar get = exports.get = function get(c1, c2, size, serverCanvas) {\n var key = c1 + '-' + c2 + '-' + size + (serverCanvas ? '-server' : '');\n var checkboard = render(c1, c2, size, serverCanvas);\n\n if (checkboardCache[key]) {\n return checkboardCache[key];\n }\n checkboardCache[key] = checkboard;\n return checkboard;\n};\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/helpers/checkboard.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/helpers/color.js": +/*!*******************************************************!*\ + !*** ./node_modules/react-color/lib/helpers/color.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.red = undefined;\n\nvar _each = __webpack_require__(/*! lodash/each */ \"./node_modules/lodash/each.js\");\n\nvar _each2 = _interopRequireDefault(_each);\n\nvar _tinycolor = __webpack_require__(/*! tinycolor2 */ \"./node_modules/tinycolor2/tinycolor.js\");\n\nvar _tinycolor2 = _interopRequireDefault(_tinycolor);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n simpleCheckForValidColor: function simpleCheckForValidColor(data) {\n var keysToCheck = ['r', 'g', 'b', 'a', 'h', 's', 'l', 'v'];\n var checked = 0;\n var passed = 0;\n (0, _each2.default)(keysToCheck, function (letter) {\n if (data[letter]) {\n checked += 1;\n if (!isNaN(data[letter])) {\n passed += 1;\n }\n if (letter === 's' || letter === 'l') {\n var percentPatt = /^\\d+%$/;\n if (percentPatt.test(data[letter])) {\n passed += 1;\n }\n }\n }\n });\n return checked === passed ? data : false;\n },\n toState: function toState(data, oldHue) {\n var color = data.hex ? (0, _tinycolor2.default)(data.hex) : (0, _tinycolor2.default)(data);\n var hsl = color.toHsl();\n var hsv = color.toHsv();\n var rgb = color.toRgb();\n var hex = color.toHex();\n if (hsl.s === 0) {\n hsl.h = oldHue || 0;\n hsv.h = oldHue || 0;\n }\n var transparent = hex === '000000' && rgb.a === 0;\n\n return {\n hsl: hsl,\n hex: transparent ? 'transparent' : '#' + hex,\n rgb: rgb,\n hsv: hsv,\n oldHue: data.h || oldHue || hsl.h,\n source: data.source\n };\n },\n isValidHex: function isValidHex(hex) {\n // disable hex4 and hex8\n var lh = String(hex).charAt(0) === '#' ? 1 : 0;\n return hex.length !== 4 + lh && hex.length < 7 + lh && (0, _tinycolor2.default)(hex).isValid();\n },\n getContrastingColor: function getContrastingColor(data) {\n if (!data) {\n return '#fff';\n }\n var col = this.toState(data);\n if (col.hex === 'transparent') {\n return 'rgba(0,0,0,0.4)';\n }\n var yiq = (col.rgb.r * 299 + col.rgb.g * 587 + col.rgb.b * 114) / 1000;\n return yiq >= 128 ? '#000' : '#fff';\n }\n};\nvar red = exports.red = {\n hsl: { a: 1, h: 0, l: 0.5, s: 1 },\n hex: '#ff0000',\n rgb: { r: 255, g: 0, b: 0, a: 1 },\n hsv: { h: 0, s: 1, v: 1, a: 1 }\n};\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/helpers/color.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/helpers/hue.js": +/*!*****************************************************!*\ + !*** ./node_modules/react-color/lib/helpers/hue.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar calculateChange = exports.calculateChange = function calculateChange(e, skip, props, container) {\n e.preventDefault();\n var containerWidth = container.clientWidth;\n var containerHeight = container.clientHeight;\n var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX;\n var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY;\n var left = x - (container.getBoundingClientRect().left + window.pageXOffset);\n var top = y - (container.getBoundingClientRect().top + window.pageYOffset);\n\n if (props.direction === 'vertical') {\n var h = void 0;\n if (top < 0) {\n h = 359;\n } else if (top > containerHeight) {\n h = 0;\n } else {\n var percent = -(top * 100 / containerHeight) + 100;\n h = 360 * percent / 100;\n }\n\n if (props.hsl.h !== h) {\n return {\n h: h,\n s: props.hsl.s,\n l: props.hsl.l,\n a: props.hsl.a,\n source: 'rgb'\n };\n }\n } else {\n var _h = void 0;\n if (left < 0) {\n _h = 0;\n } else if (left > containerWidth) {\n _h = 359;\n } else {\n var _percent = left * 100 / containerWidth;\n _h = 360 * _percent / 100;\n }\n\n if (props.hsl.h !== _h) {\n return {\n h: _h,\n s: props.hsl.s,\n l: props.hsl.l,\n a: props.hsl.a,\n source: 'rgb'\n };\n }\n }\n return null;\n};\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/helpers/hue.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/helpers/interaction.js": +/*!*************************************************************!*\ + !*** ./node_modules/react-color/lib/helpers/interaction.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleFocus = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable no-invalid-this */\n\n\nvar handleFocus = exports.handleFocus = function handleFocus(Component) {\n var Span = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'span';\n return function (_React$Component) {\n _inherits(Focus, _React$Component);\n\n function Focus() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Focus);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Focus.__proto__ || Object.getPrototypeOf(Focus)).call.apply(_ref, [this].concat(args))), _this), _this.state = { focus: false }, _this.handleFocus = function () {\n return _this.setState({ focus: true });\n }, _this.handleBlur = function () {\n return _this.setState({ focus: false });\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Focus, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n Span,\n { onFocus: this.handleFocus, onBlur: this.handleBlur },\n _react2.default.createElement(Component, _extends({}, this.props, this.state))\n );\n }\n }]);\n\n return Focus;\n }(_react2.default.Component);\n};\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/helpers/interaction.js?"); + +/***/ }), + +/***/ "./node_modules/react-color/lib/helpers/saturation.js": +/*!************************************************************!*\ + !*** ./node_modules/react-color/lib/helpers/saturation.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar calculateChange = exports.calculateChange = function calculateChange(e, skip, props, container) {\n e.preventDefault();\n\n var _container$getBoundin = container.getBoundingClientRect(),\n containerWidth = _container$getBoundin.width,\n containerHeight = _container$getBoundin.height;\n\n var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX;\n var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY;\n var left = x - (container.getBoundingClientRect().left + window.pageXOffset);\n var top = y - (container.getBoundingClientRect().top + window.pageYOffset);\n\n if (left < 0) {\n left = 0;\n } else if (left > containerWidth) {\n left = containerWidth;\n } else if (top < 0) {\n top = 0;\n } else if (top > containerHeight) {\n top = containerHeight;\n }\n\n var saturation = left * 100 / containerWidth;\n var bright = -(top * 100 / containerHeight) + 100;\n\n return {\n h: props.hsl.h,\n s: saturation,\n v: bright,\n a: props.hsl.a,\n source: 'rgb'\n };\n};\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-color/lib/helpers/saturation.js?"); + +/***/ }), + +/***/ "./node_modules/react-flatpickr/build/index.js": +/*!*****************************************************!*\ + !*** ./node_modules/react-flatpickr/build/index.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _flatpickr = __webpack_require__(/*! flatpickr */ \"./node_modules/flatpickr/dist/flatpickr.js\");\n\nvar _flatpickr2 = _interopRequireDefault(_flatpickr);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar hooks = ['onChange', 'onOpen', 'onClose', 'onMonthChange', 'onYearChange', 'onReady', 'onValueUpdate', 'onDayCreate'];\n\nvar DateTimePicker = function (_Component) {\n _inherits(DateTimePicker, _Component);\n\n function DateTimePicker() {\n _classCallCheck(this, DateTimePicker);\n\n return _possibleConstructorReturn(this, (DateTimePicker.__proto__ || Object.getPrototypeOf(DateTimePicker)).apply(this, arguments));\n }\n\n _createClass(DateTimePicker, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(props) {\n var _this2 = this;\n\n var options = props.options;\n\n var prevOptions = this.props.options;\n\n // Add prop hooks to options\n hooks.forEach(function (hook) {\n if (props.hasOwnProperty(hook)) {\n options[hook] = props[hook];\n }\n // Add prev ones too so we can compare against them later\n if (_this2.props.hasOwnProperty(hook)) {\n prevOptions[hook] = _this2.props[hook];\n }\n });\n\n var optionsKeys = Object.getOwnPropertyNames(options);\n\n for (var index = optionsKeys.length - 1; index >= 0; index--) {\n var key = optionsKeys[index];\n var value = options[key];\n\n if (value !== prevOptions[key]) {\n // Hook handlers must be set as an array\n if (hooks.indexOf(key) !== -1 && !Array.isArray(value)) {\n value = [value];\n }\n\n this.flatpickr.set(key, value);\n }\n }\n\n if (props.hasOwnProperty('value') && props.value !== this.props.value) {\n this.flatpickr.setDate(props.value, false);\n }\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this3 = this;\n\n var options = _extends({\n onClose: function onClose() {\n _this3.node.blur && _this3.node.blur();\n }\n }, this.props.options);\n\n // Add prop hooks to options\n hooks.forEach(function (hook) {\n if (_this3.props[hook]) {\n options[hook] = _this3.props[hook];\n }\n });\n\n this.flatpickr = new _flatpickr2.default(this.node, options);\n\n if (this.props.hasOwnProperty('value')) {\n this.flatpickr.setDate(this.props.value, false);\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.flatpickr.destroy();\n }\n }, {\n key: 'render',\n value: function render() {\n var _this4 = this;\n\n // eslint-disable-next-line no-unused-vars\n var _props = this.props,\n options = _props.options,\n defaultValue = _props.defaultValue,\n value = _props.value,\n children = _props.children,\n props = _objectWithoutProperties(_props, ['options', 'defaultValue', 'value', 'children']);\n\n // Don't pass hooks to dom node\n\n\n hooks.forEach(function (hook) {\n delete props[hook];\n });\n\n return options.wrap ? _react2.default.createElement(\n 'div',\n _extends({}, props, { ref: function ref(node) {\n _this4.node = node;\n } }),\n children\n ) : _react2.default.createElement('input', _extends({}, props, { defaultValue: defaultValue,\n ref: function ref(node) {\n _this4.node = node;\n } }));\n }\n }]);\n\n return DateTimePicker;\n}(_react.Component);\n\nDateTimePicker.propTypes = {\n defaultValue: _propTypes2.default.string,\n options: _propTypes2.default.object,\n onChange: _propTypes2.default.func,\n onOpen: _propTypes2.default.func,\n onClose: _propTypes2.default.func,\n onMonthChange: _propTypes2.default.func,\n onYearChange: _propTypes2.default.func,\n onReady: _propTypes2.default.func,\n onValueUpdate: _propTypes2.default.func,\n onDayCreate: _propTypes2.default.func,\n value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.array, _propTypes2.default.object, _propTypes2.default.number]),\n children: _propTypes2.default.node\n};\nDateTimePicker.defaultProps = {\n options: {}\n};\nexports.default = DateTimePicker;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-flatpickr/build/index.js?"); + +/***/ }), + +/***/ "./node_modules/react-input-autosize/lib/AutosizeInput.js": +/*!****************************************************************!*\ + !*** ./node_modules/react-input-autosize/lib/AutosizeInput.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar sizerStyle = {\n\tposition: 'absolute',\n\ttop: 0,\n\tleft: 0,\n\tvisibility: 'hidden',\n\theight: 0,\n\toverflow: 'scroll',\n\twhiteSpace: 'pre'\n};\n\nvar INPUT_PROPS_BLACKLIST = ['extraWidth', 'injectStyles', 'inputClassName', 'inputRef', 'inputStyle', 'minWidth', 'onAutosize', 'placeholderIsMinWidth'];\n\nvar cleanInputProps = function cleanInputProps(inputProps) {\n\tINPUT_PROPS_BLACKLIST.forEach(function (field) {\n\t\treturn delete inputProps[field];\n\t});\n\treturn inputProps;\n};\n\nvar copyStyles = function copyStyles(styles, node) {\n\tnode.style.fontSize = styles.fontSize;\n\tnode.style.fontFamily = styles.fontFamily;\n\tnode.style.fontWeight = styles.fontWeight;\n\tnode.style.fontStyle = styles.fontStyle;\n\tnode.style.letterSpacing = styles.letterSpacing;\n\tnode.style.textTransform = styles.textTransform;\n};\n\nvar isIE = typeof window !== 'undefined' && window.navigator ? /MSIE |Trident\\/|Edge\\//.test(window.navigator.userAgent) : false;\n\nvar generateId = function generateId() {\n\t// we only need an auto-generated ID for stylesheet injection, which is only\n\t// used for IE. so if the browser is not IE, this should return undefined.\n\treturn isIE ? '_' + Math.random().toString(36).substr(2, 12) : undefined;\n};\n\nvar AutosizeInput = function (_Component) {\n\t_inherits(AutosizeInput, _Component);\n\n\tfunction AutosizeInput(props) {\n\t\t_classCallCheck(this, AutosizeInput);\n\n\t\tvar _this = _possibleConstructorReturn(this, (AutosizeInput.__proto__ || Object.getPrototypeOf(AutosizeInput)).call(this, props));\n\n\t\t_this.inputRef = function (el) {\n\t\t\t_this.input = el;\n\t\t\tif (typeof _this.props.inputRef === 'function') {\n\t\t\t\t_this.props.inputRef(el);\n\t\t\t}\n\t\t};\n\n\t\t_this.placeHolderSizerRef = function (el) {\n\t\t\t_this.placeHolderSizer = el;\n\t\t};\n\n\t\t_this.sizerRef = function (el) {\n\t\t\t_this.sizer = el;\n\t\t};\n\n\t\t_this.state = {\n\t\t\tinputWidth: props.minWidth,\n\t\t\tinputId: props.id || generateId()\n\t\t};\n\t\treturn _this;\n\t}\n\n\t_createClass(AutosizeInput, [{\n\t\tkey: 'componentDidMount',\n\t\tvalue: function componentDidMount() {\n\t\t\tthis.mounted = true;\n\t\t\tthis.copyInputStyles();\n\t\t\tthis.updateInputWidth();\n\t\t}\n\t}, {\n\t\tkey: 'componentWillReceiveProps',\n\t\tvalue: function componentWillReceiveProps(nextProps) {\n\t\t\tvar id = nextProps.id;\n\n\t\t\tif (id !== this.props.id) {\n\t\t\t\tthis.setState({ inputId: id || generateId() });\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'componentDidUpdate',\n\t\tvalue: function componentDidUpdate(prevProps, prevState) {\n\t\t\tif (prevState.inputWidth !== this.state.inputWidth) {\n\t\t\t\tif (typeof this.props.onAutosize === 'function') {\n\t\t\t\t\tthis.props.onAutosize(this.state.inputWidth);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.updateInputWidth();\n\t\t}\n\t}, {\n\t\tkey: 'componentWillUnmount',\n\t\tvalue: function componentWillUnmount() {\n\t\t\tthis.mounted = false;\n\t\t}\n\t}, {\n\t\tkey: 'copyInputStyles',\n\t\tvalue: function copyInputStyles() {\n\t\t\tif (!this.mounted || !window.getComputedStyle) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar inputStyles = this.input && window.getComputedStyle(this.input);\n\t\t\tif (!inputStyles) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcopyStyles(inputStyles, this.sizer);\n\t\t\tif (this.placeHolderSizer) {\n\t\t\t\tcopyStyles(inputStyles, this.placeHolderSizer);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'updateInputWidth',\n\t\tvalue: function updateInputWidth() {\n\t\t\tif (!this.mounted || !this.sizer || typeof this.sizer.scrollWidth === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar newInputWidth = void 0;\n\t\t\tif (this.props.placeholder && (!this.props.value || this.props.value && this.props.placeholderIsMinWidth)) {\n\t\t\t\tnewInputWidth = Math.max(this.sizer.scrollWidth, this.placeHolderSizer.scrollWidth) + 2;\n\t\t\t} else {\n\t\t\t\tnewInputWidth = this.sizer.scrollWidth + 2;\n\t\t\t}\n\t\t\t// add extraWidth to the detected width. for number types, this defaults to 16 to allow for the stepper UI\n\t\t\tvar extraWidth = this.props.type === 'number' && this.props.extraWidth === undefined ? 16 : parseInt(this.props.extraWidth) || 0;\n\t\t\tnewInputWidth += extraWidth;\n\t\t\tif (newInputWidth < this.props.minWidth) {\n\t\t\t\tnewInputWidth = this.props.minWidth;\n\t\t\t}\n\t\t\tif (newInputWidth !== this.state.inputWidth) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tinputWidth: newInputWidth\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'getInput',\n\t\tvalue: function getInput() {\n\t\t\treturn this.input;\n\t\t}\n\t}, {\n\t\tkey: 'focus',\n\t\tvalue: function focus() {\n\t\t\tthis.input.focus();\n\t\t}\n\t}, {\n\t\tkey: 'blur',\n\t\tvalue: function blur() {\n\t\t\tthis.input.blur();\n\t\t}\n\t}, {\n\t\tkey: 'select',\n\t\tvalue: function select() {\n\t\t\tthis.input.select();\n\t\t}\n\t}, {\n\t\tkey: 'renderStyles',\n\t\tvalue: function renderStyles() {\n\t\t\t// this method injects styles to hide IE's clear indicator, which messes\n\t\t\t// with input size detection. the stylesheet is only injected when the\n\t\t\t// browser is IE, and can also be disabled by the `injectStyles` prop.\n\t\t\tvar injectStyles = this.props.injectStyles;\n\n\t\t\treturn isIE && injectStyles ? _react2.default.createElement('style', { dangerouslySetInnerHTML: {\n\t\t\t\t\t__html: 'input#' + this.state.inputId + '::-ms-clear {display: none;}'\n\t\t\t\t} }) : null;\n\t\t}\n\t}, {\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\tvar sizerValue = [this.props.defaultValue, this.props.value, ''].reduce(function (previousValue, currentValue) {\n\t\t\t\tif (previousValue !== null && previousValue !== undefined) {\n\t\t\t\t\treturn previousValue;\n\t\t\t\t}\n\t\t\t\treturn currentValue;\n\t\t\t});\n\n\t\t\tvar wrapperStyle = _extends({}, this.props.style);\n\t\t\tif (!wrapperStyle.display) wrapperStyle.display = 'inline-block';\n\n\t\t\tvar inputStyle = _extends({\n\t\t\t\tboxSizing: 'content-box',\n\t\t\t\twidth: this.state.inputWidth + 'px'\n\t\t\t}, this.props.inputStyle);\n\n\t\t\tvar inputProps = _objectWithoutProperties(this.props, []);\n\n\t\t\tcleanInputProps(inputProps);\n\t\t\tinputProps.className = this.props.inputClassName;\n\t\t\tinputProps.id = this.state.inputId;\n\t\t\tinputProps.style = inputStyle;\n\n\t\t\treturn _react2.default.createElement(\n\t\t\t\t'div',\n\t\t\t\t{ className: this.props.className, style: wrapperStyle },\n\t\t\t\tthis.renderStyles(),\n\t\t\t\t_react2.default.createElement('input', _extends({}, inputProps, { ref: this.inputRef })),\n\t\t\t\t_react2.default.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ ref: this.sizerRef, style: sizerStyle },\n\t\t\t\t\tsizerValue\n\t\t\t\t),\n\t\t\t\tthis.props.placeholder ? _react2.default.createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ ref: this.placeHolderSizerRef, style: sizerStyle },\n\t\t\t\t\tthis.props.placeholder\n\t\t\t\t) : null\n\t\t\t);\n\t\t}\n\t}]);\n\n\treturn AutosizeInput;\n}(_react.Component);\n\nAutosizeInput.propTypes = {\n\tclassName: _propTypes2.default.string, // className for the outer element\n\tdefaultValue: _propTypes2.default.any, // default field value\n\textraWidth: _propTypes2.default.oneOfType([// additional width for input element\n\t_propTypes2.default.number, _propTypes2.default.string]),\n\tid: _propTypes2.default.string, // id to use for the input, can be set for consistent snapshots\n\tinjectStyles: _propTypes2.default.bool, // inject the custom stylesheet to hide clear UI, defaults to true\n\tinputClassName: _propTypes2.default.string, // className for the input element\n\tinputRef: _propTypes2.default.func, // ref callback for the input element\n\tinputStyle: _propTypes2.default.object, // css styles for the input element\n\tminWidth: _propTypes2.default.oneOfType([// minimum width for input element\n\t_propTypes2.default.number, _propTypes2.default.string]),\n\tonAutosize: _propTypes2.default.func, // onAutosize handler: function(newWidth) {}\n\tonChange: _propTypes2.default.func, // onChange handler: function(event) {}\n\tplaceholder: _propTypes2.default.string, // placeholder text\n\tplaceholderIsMinWidth: _propTypes2.default.bool, // don't collapse size to less than the placeholder\n\tstyle: _propTypes2.default.object, // css styles for the outer element\n\tvalue: _propTypes2.default.any // field value\n};\nAutosizeInput.defaultProps = {\n\tminWidth: 1,\n\tinjectStyles: true\n};\n\nexports.default = AutosizeInput;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-input-autosize/lib/AutosizeInput.js?"); + +/***/ }), + +/***/ "./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js": +/*!****************************************************************************!*\ + !*** ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js ***! + \****************************************************************************/ +/*! exports provided: polyfill */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"polyfill\", function() { return polyfill; });\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n // Call this.constructor.gDSFP to support sub-classes.\n // Use the setState() updater to ensure state isn't stale in certain edge cases.\n function updater(prevState) {\n var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n return state !== null && state !== undefined ? state : null;\n }\n // Binding \"this\" is important for shallow renderer support.\n this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n try {\n var prevProps = this.props;\n var prevState = this.state;\n this.props = nextProps;\n this.state = nextState;\n this.__reactInternalSnapshotFlag = true;\n this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(\n prevProps,\n prevState\n );\n } finally {\n this.props = prevProps;\n this.state = prevState;\n }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n\n if (\n typeof Component.getDerivedStateFromProps !== 'function' &&\n typeof prototype.getSnapshotBeforeUpdate !== 'function'\n ) {\n return Component;\n }\n\n // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Error if any of these lifecycles are present,\n // Because they would work differently between older and newer (16.3+) versions of React.\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n if (\n foundWillMountName !== null ||\n foundWillReceivePropsName !== null ||\n foundWillUpdateName !== null\n ) {\n var componentName = Component.displayName || Component.name;\n var newApiName =\n typeof Component.getDerivedStateFromProps === 'function'\n ? 'getDerivedStateFromProps()'\n : 'getSnapshotBeforeUpdate()';\n\n throw Error(\n 'Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' +\n componentName +\n ' uses ' +\n newApiName +\n ' but also contains the following legacy lifecycles:' +\n (foundWillMountName !== null ? '\\n ' + foundWillMountName : '') +\n (foundWillReceivePropsName !== null\n ? '\\n ' + foundWillReceivePropsName\n : '') +\n (foundWillUpdateName !== null ? '\\n ' + foundWillUpdateName : '') +\n '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' +\n 'https://fb.me/react-async-component-lifecycle-hooks'\n );\n }\n\n // React <= 16.2 does not support static getDerivedStateFromProps.\n // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n // Newer versions of React will ignore these lifecycles if gDSFP exists.\n if (typeof Component.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\n }\n\n // React <= 16.2 does not support getSnapshotBeforeUpdate.\n // As a workaround, use cWU to invoke the new lifecycle.\n // Newer versions of React will ignore that lifecycle if gSBU exists.\n if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n if (typeof prototype.componentDidUpdate !== 'function') {\n throw new Error(\n 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'\n );\n }\n\n prototype.componentWillUpdate = componentWillUpdate;\n\n var componentDidUpdate = prototype.componentDidUpdate;\n\n prototype.componentDidUpdate = function componentDidUpdatePolyfill(\n prevProps,\n prevState,\n maybeSnapshot\n ) {\n // 16.3+ will not execute our will-update method;\n // It will pass a snapshot value to did-update though.\n // Older versions will require our polyfilled will-update value.\n // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n // Because for <= 15.x versions this might be a \"prevContext\" object.\n // We also can't just check \"__reactInternalSnapshot\",\n // Because get-snapshot might return a falsy value.\n // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n var snapshot = this.__reactInternalSnapshotFlag\n ? this.__reactInternalSnapshot\n : maybeSnapshot;\n\n componentDidUpdate.call(this, prevProps, prevState, snapshot);\n };\n }\n\n return Component;\n}\n\n\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js?"); + +/***/ }), + +/***/ "./node_modules/react-onclickoutside/dist/react-onclickoutside.es.js": +/*!***************************************************************************!*\ + !*** ./node_modules/react-onclickoutside/dist/react-onclickoutside.es.js ***! + \***************************************************************************/ +/*! exports provided: IGNORE_CLASS_NAME, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"IGNORE_CLASS_NAME\", function() { return IGNORE_CLASS_NAME; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n/**\n * Check whether some DOM node is our Component's node.\n */\nfunction isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // SVG elements do not technically reside in the rendered DOM, so\n // they do not have classList directly, but they offer a link to their\n // corresponding element, which can have classList. This extra check is for\n // that case.\n // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement\n // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17\n\n\n if (current.correspondingElement) {\n return current.correspondingElement.classList.contains(ignoreClass);\n }\n\n return current.classList.contains(ignoreClass);\n}\n/**\n * Try to find our node in a hierarchy of nodes, returning the document\n * node as highest node if our node is not found in the path up.\n */\n\nfunction findHighest(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // If source=local then this event came from 'somewhere'\n // inside and should be ignored. We could handle this with\n // a layered approach, too, but that requires going back to\n // thinking in terms of Dom node nesting, running counter\n // to React's 'you shouldn't care about the DOM' philosophy.\n\n\n while (current.parentNode) {\n if (isNodeFound(current, componentNode, ignoreClass)) {\n return true;\n }\n\n current = current.parentNode;\n }\n\n return current;\n}\n/**\n * Check if the browser scrollbar was clicked\n */\n\nfunction clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n}\n\n// ideally will get replaced with external dep\n// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in\nvar testPassiveEventSupport = function testPassiveEventSupport() {\n if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {\n return;\n }\n\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n\n var noop = function noop() {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n return passive;\n};\n\nfunction autoInc(seed) {\n if (seed === void 0) {\n seed = 0;\n }\n\n return function () {\n return ++seed;\n };\n}\n\nvar uid = autoInc();\n\nvar passiveEventSupport;\nvar handlersMap = {};\nvar enabledInstances = {};\nvar touchEvents = ['touchstart', 'touchmove'];\nvar IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';\n/**\n * Options for addEventHandler and removeEventHandler\n */\n\nfunction getEventHandlerOptions(instance, eventName) {\n var handlerOptions = null;\n var isTouchEvent = touchEvents.indexOf(eventName) !== -1;\n\n if (isTouchEvent && passiveEventSupport) {\n handlerOptions = {\n passive: !instance.props.preventDefault\n };\n }\n\n return handlerOptions;\n}\n/**\n * This function generates the HOC function that you'll use\n * in order to impart onOutsideClick listening to an\n * arbitrary component. It gets called at the end of the\n * bootstrapping code to yield an instance of the\n * onClickOutsideHOC function defined inside setupHOC().\n */\n\n\nfunction onClickOutsideHOC(WrappedComponent, config) {\n var _class, _temp;\n\n return _temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(onClickOutside, _Component);\n\n function onClickOutside(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n\n _this.__outsideClickHandler = function (event) {\n if (typeof _this.__clickOutsideHandlerProp === 'function') {\n _this.__clickOutsideHandlerProp(event);\n\n return;\n }\n\n var instance = _this.getInstance();\n\n if (typeof instance.props.handleClickOutside === 'function') {\n instance.props.handleClickOutside(event);\n return;\n }\n\n if (typeof instance.handleClickOutside === 'function') {\n instance.handleClickOutside(event);\n return;\n }\n\n throw new Error('WrappedComponent lacks a handleClickOutside(event) function for processing outside click events.');\n };\n\n _this.enableOnClickOutside = function () {\n if (typeof document === 'undefined' || enabledInstances[_this._uid]) {\n return;\n }\n\n if (typeof passiveEventSupport === 'undefined') {\n passiveEventSupport = testPassiveEventSupport();\n }\n\n enabledInstances[_this._uid] = true;\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n handlersMap[_this._uid] = function (event) {\n if (_this.props.disableOnClickOutside) return;\n if (_this.componentNode === null) return;\n\n if (_this.props.preventDefault) {\n event.preventDefault();\n }\n\n if (_this.props.stopPropagation) {\n event.stopPropagation();\n }\n\n if (_this.props.excludeScrollbar && clickedScrollbar(event)) return;\n var current = event.target;\n\n if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {\n return;\n }\n\n _this.__outsideClickHandler(event);\n };\n\n events.forEach(function (eventName) {\n document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_this, eventName));\n });\n };\n\n _this.disableOnClickOutside = function () {\n delete enabledInstances[_this._uid];\n var fn = handlersMap[_this._uid];\n\n if (fn && typeof document !== 'undefined') {\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n events.forEach(function (eventName) {\n return document.removeEventListener(eventName, fn, getEventHandlerOptions(_this, eventName));\n });\n delete handlersMap[_this._uid];\n }\n };\n\n _this.getRef = function (ref) {\n return _this.instanceRef = ref;\n };\n\n _this._uid = uid();\n return _this;\n }\n /**\n * Access the WrappedComponent's instance.\n */\n\n\n var _proto = onClickOutside.prototype;\n\n _proto.getInstance = function getInstance() {\n if (!WrappedComponent.prototype.isReactComponent) {\n return this;\n }\n\n var ref = this.instanceRef;\n return ref.getInstance ? ref.getInstance() : ref;\n };\n\n /**\n * Add click listeners to the current document,\n * linked to this component's state.\n */\n _proto.componentDidMount = function componentDidMount() {\n // If we are in an environment without a DOM such\n // as shallow rendering or snapshots then we exit\n // early to prevent any unhandled errors being thrown.\n if (typeof document === 'undefined' || !document.createElement) {\n return;\n }\n\n var instance = this.getInstance();\n\n if (config && typeof config.handleClickOutside === 'function') {\n this.__clickOutsideHandlerProp = config.handleClickOutside(instance);\n\n if (typeof this.__clickOutsideHandlerProp !== 'function') {\n throw new Error('WrappedComponent lacks a function for processing outside click events specified by the handleClickOutside config option.');\n }\n }\n\n this.componentNode = Object(react_dom__WEBPACK_IMPORTED_MODULE_1__[\"findDOMNode\"])(this.getInstance());\n this.enableOnClickOutside();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.componentNode = Object(react_dom__WEBPACK_IMPORTED_MODULE_1__[\"findDOMNode\"])(this.getInstance());\n };\n /**\n * Remove all document's event listeners for this component\n */\n\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.disableOnClickOutside();\n };\n /**\n * Can be called to explicitly enable event listening\n * for clicks and touches outside of this element.\n */\n\n\n /**\n * Pass-through render\n */\n _proto.render = function render() {\n // eslint-disable-next-line no-unused-vars\n var _props = this.props,\n excludeScrollbar = _props.excludeScrollbar,\n props = _objectWithoutProperties(_props, [\"excludeScrollbar\"]);\n\n if (WrappedComponent.prototype.isReactComponent) {\n props.ref = this.getRef;\n } else {\n props.wrappedRef = this.getRef;\n }\n\n props.disableOnClickOutside = this.disableOnClickOutside;\n props.enableOnClickOutside = this.enableOnClickOutside;\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(WrappedComponent, props);\n };\n\n return onClickOutside;\n }(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]), _class.displayName = \"OnClickOutside(\" + (WrappedComponent.displayName || WrappedComponent.name || 'Component') + \")\", _class.defaultProps = {\n eventTypes: ['mousedown', 'touchstart'],\n excludeScrollbar: config && config.excludeScrollbar || false,\n outsideClickIgnoreClass: IGNORE_CLASS_NAME,\n preventDefault: false,\n stopPropagation: false\n }, _class.getClass = function () {\n return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;\n }, _temp;\n}\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (onClickOutsideHOC);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-onclickoutside/dist/react-onclickoutside.es.js?"); + +/***/ }), + +/***/ "./node_modules/react-select/dist/react-select.esm.js": +/*!************************************************************!*\ + !*** ./node_modules/react-select/dist/react-select.esm.js ***! + \************************************************************/ +/*! exports provided: default, SelectBase, Async, AsyncCreatable, Creatable, createFilter, makeAnimated, components, mergeStyles, defaultTheme */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SelectBase\", function() { return Select; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Async\", function() { return Async; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AsyncCreatable\", function() { return AsyncCreatable; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Creatable\", function() { return Creatable; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createFilter\", function() { return createFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"makeAnimated\", function() { return index; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"components\", function() { return components; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mergeStyles\", function() { return mergeStyles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultTheme\", function() { return defaultTheme; });\n/* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raf */ \"./node_modules/raf/index.js\");\n/* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var emotion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! emotion */ \"./node_modules/emotion/dist/index.esm.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_input_autosize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-input-autosize */ \"./node_modules/react-input-autosize/lib/AutosizeInput.js\");\n/* harmony import */ var react_input_autosize__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_input_autosize__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! memoize-one */ \"./node_modules/memoize-one/dist/memoize-one.esm.js\");\n/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-transition-group */ \"./node_modules/react-transition-group/index.js\");\n/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_transition_group__WEBPACK_IMPORTED_MODULE_7__);\n\n\n\n\n\n\n\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nvar slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\n\nvar toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n};\n\n// ==============================\n// NO OP\n// ==============================\n\nvar noop = function noop() {};\n\n// ==============================\n// Class Name Prefixer\n// ==============================\n\n/**\n String representation of component state for styling with class names.\n\n Expects an array of strings OR a string/object pair:\n - className(['comp', 'comp-arg', 'comp-arg-2'])\n @returns 'react-select__comp react-select__comp-arg react-select__comp-arg-2'\n - className('comp', { some: true, state: false })\n @returns 'react-select__comp react-select__comp--some'\n*/\nfunction applyPrefixToName(prefix, name) {\n if (!name) {\n return prefix;\n } else if (name[0] === '-') {\n return prefix + name;\n } else {\n return prefix + '__' + name;\n }\n}\n\nfunction classNames(prefix, cssKey, state, className) {\n var arr = [cssKey, className];\n if (state && prefix) {\n for (var key in state) {\n if (state.hasOwnProperty(key) && state[key]) {\n arr.push('' + applyPrefixToName(prefix, key));\n }\n }\n }\n\n return arr.filter(function (i) {\n return i;\n }).map(function (i) {\n return String(i).trim();\n }).join(' ');\n}\n// ==============================\n// Clean Value\n// ==============================\n\nvar cleanValue = function cleanValue(value) {\n if (Array.isArray(value)) return value.filter(Boolean);\n if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value !== null) return [value];\n return [];\n};\n\n// ==============================\n// Handle Input Change\n// ==============================\n\nfunction handleInputChange(inputValue, actionMeta, onInputChange) {\n if (onInputChange) {\n var newValue = onInputChange(inputValue, actionMeta);\n if (typeof newValue === 'string') return newValue;\n }\n return inputValue;\n}\n\n// ==============================\n// Scroll Helpers\n// ==============================\n\nfunction isDocumentElement(el) {\n return [document.documentElement, document.body, window].indexOf(el) > -1;\n}\n\n// Normalized scrollTo & scrollTop\n// ------------------------------\n\nfunction getScrollTop(el) {\n if (isDocumentElement(el)) {\n return window.pageYOffset;\n }\n return el.scrollTop;\n}\n\nfunction scrollTo(el, top) {\n // with a scroll distance, we perform scroll on the element\n if (isDocumentElement(el)) {\n window.scrollTo(0, top);\n return;\n }\n\n el.scrollTop = top;\n}\n\n// Get Scroll Parent\n// ------------------------------\n\nfunction getScrollParent(element) {\n var style = getComputedStyle(element);\n var excludeStaticParent = style.position === 'absolute';\n var overflowRx = /(auto|scroll)/;\n var docEl = document.documentElement; // suck it, flow...\n\n if (style.position === 'fixed') return docEl;\n\n for (var parent = element; parent = parent.parentElement;) {\n style = getComputedStyle(parent);\n if (excludeStaticParent && style.position === 'static') {\n continue;\n }\n if (overflowRx.test(style.overflow + style.overflowY + style.overflowX)) {\n return parent;\n }\n }\n\n return docEl;\n}\n\n// Animated Scroll To\n// ------------------------------\n\n/**\n @param t: time (elapsed)\n @param b: initial value\n @param c: amount of change\n @param d: duration\n*/\nfunction easeOutCubic(t, b, c, d) {\n return c * ((t = t / d - 1) * t * t + 1) + b;\n}\n\nfunction animatedScrollTo(element, to) {\n var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;\n var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop;\n\n var start = getScrollTop(element);\n var change = to - start;\n var increment = 10;\n var currentTime = 0;\n\n function animateScroll() {\n currentTime += increment;\n var val = easeOutCubic(currentTime, start, change, duration);\n scrollTo(element, val);\n if (currentTime < duration) {\n raf__WEBPACK_IMPORTED_MODULE_0___default()(animateScroll);\n } else {\n callback(element);\n }\n }\n animateScroll();\n}\n\n// Scroll Into View\n// ------------------------------\n\nfunction scrollIntoView(menuEl, focusedEl) {\n var menuRect = menuEl.getBoundingClientRect();\n var focusedRect = focusedEl.getBoundingClientRect();\n var overScroll = focusedEl.offsetHeight / 3;\n\n if (focusedRect.bottom + overScroll > menuRect.bottom) {\n scrollTo(menuEl, Math.min(focusedEl.offsetTop + focusedEl.clientHeight - menuEl.offsetHeight + overScroll, menuEl.scrollHeight));\n } else if (focusedRect.top - overScroll < menuRect.top) {\n scrollTo(menuEl, Math.max(focusedEl.offsetTop - overScroll, 0));\n }\n}\n\n// ==============================\n// Get bounding client object\n// ==============================\n\n// cannot get keys using array notation with DOMRect\nfunction getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n}\n\n// ==============================\n// Touch Capability Detector\n// ==============================\n\nfunction isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n// ==============================\n// Mobile Device Detector\n// ==============================\n\nfunction isMobileDevice() {\n try {\n return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)\n );\n } catch (e) {\n return false;\n }\n}\n\n// ==============================\n// Menu\n// ==============================\n\n// Get Menu Placement\n// ------------------------------\n\nfunction getMenuPlacement(_ref) {\n var maxHeight = _ref.maxHeight,\n menuEl = _ref.menuEl,\n minHeight = _ref.minHeight,\n placement = _ref.placement,\n shouldScroll = _ref.shouldScroll,\n isFixedPosition = _ref.isFixedPosition,\n theme = _ref.theme;\n var spacing = theme.spacing;\n\n var scrollParent = getScrollParent(menuEl);\n var defaultState = { placement: 'bottom', maxHeight: maxHeight };\n\n // something went wrong, return default state\n if (!menuEl || !menuEl.offsetParent) return defaultState;\n\n // we can't trust `scrollParent.scrollHeight` --> it may increase when\n // the menu is rendered\n\n var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),\n scrollHeight = _scrollParent$getBoun.height;\n\n var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),\n menuBottom = _menuEl$getBoundingCl.bottom,\n menuHeight = _menuEl$getBoundingCl.height,\n menuTop = _menuEl$getBoundingCl.top;\n\n // $FlowFixMe function returns above if there's no offsetParent\n\n\n var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(),\n containerTop = _menuEl$offsetParent$.top;\n\n var viewHeight = window.innerHeight;\n var scrollTop = getScrollTop(scrollParent);\n\n var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);\n var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);\n var viewSpaceAbove = containerTop - marginTop;\n var viewSpaceBelow = viewHeight - menuTop;\n var scrollSpaceAbove = viewSpaceAbove + scrollTop;\n var scrollSpaceBelow = scrollHeight - scrollTop - menuTop;\n\n var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom;\n var scrollUp = scrollTop + menuTop - marginTop;\n var scrollDuration = 160;\n\n switch (placement) {\n case 'auto':\n case 'bottom':\n // 1: the menu will fit, do nothing\n if (viewSpaceBelow >= menuHeight) {\n return { placement: 'bottom', maxHeight: maxHeight };\n }\n\n // 2: the menu will fit, if scrolled\n if (scrollSpaceBelow >= menuHeight && !isFixedPosition) {\n if (shouldScroll) {\n animatedScrollTo(scrollParent, scrollDown, scrollDuration);\n }\n\n return { placement: 'bottom', maxHeight: maxHeight };\n }\n\n // 3: the menu will fit, if constrained\n if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) {\n if (shouldScroll) {\n animatedScrollTo(scrollParent, scrollDown, scrollDuration);\n }\n\n // we want to provide as much of the menu as possible to the user,\n // so give them whatever is available below rather than the minHeight.\n var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom;\n\n return {\n placement: 'bottom',\n maxHeight: constrainedHeight\n };\n }\n\n // 4. Forked beviour when there isn't enough space below\n\n // AUTO: flip the menu, render above\n if (placement === 'auto' || isFixedPosition) {\n // may need to be constrained after flipping\n var _constrainedHeight = maxHeight;\n\n if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {\n _constrainedHeight = isFixedPosition ? viewSpaceAbove - marginBottom - spacing.controlHeight : scrollSpaceAbove - marginBottom - spacing.controlHeight;\n }\n\n return { placement: 'top', maxHeight: _constrainedHeight };\n }\n\n // BOTTOM: allow browser to increase scrollable area and immediately set scroll\n if (placement === 'bottom') {\n scrollTo(scrollParent, scrollDown);\n return { placement: 'bottom', maxHeight: maxHeight };\n }\n break;\n case 'top':\n // 1: the menu will fit, do nothing\n if (viewSpaceAbove >= menuHeight) {\n return { placement: 'top', maxHeight: maxHeight };\n }\n\n // 2: the menu will fit, if scrolled\n if (scrollSpaceAbove >= menuHeight && !isFixedPosition) {\n if (shouldScroll) {\n animatedScrollTo(scrollParent, scrollUp, scrollDuration);\n }\n\n return { placement: 'top', maxHeight: maxHeight };\n }\n\n // 3: the menu will fit, if constrained\n if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {\n var _constrainedHeight2 = maxHeight;\n\n // we want to provide as much of the menu as possible to the user,\n // so give them whatever is available below rather than the minHeight.\n if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {\n _constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop;\n }\n\n if (shouldScroll) {\n animatedScrollTo(scrollParent, scrollUp, scrollDuration);\n }\n\n return {\n placement: 'top',\n maxHeight: _constrainedHeight2\n };\n }\n\n // 4. not enough space, the browser WILL NOT increase scrollable area when\n // absolutely positioned element rendered above the viewport (only below).\n // Flip the menu, render below\n return { placement: 'bottom', maxHeight: maxHeight };\n default:\n throw new Error('Invalid placement provided \"' + placement + '\".');\n }\n\n // fulfil contract with flow: implicit return value of undefined\n return defaultState;\n}\n\n// Menu Component\n// ------------------------------\n\nfunction alignToControl(placement) {\n var placementToCSSProp = { bottom: 'top', top: 'bottom' };\n return placement ? placementToCSSProp[placement] : 'bottom';\n}\nvar coercePlacement = function coercePlacement(p) {\n return p === 'auto' ? 'bottom' : p;\n};\n\nvar menuCSS = function menuCSS(_ref2) {\n var _ref3;\n\n var placement = _ref2.placement,\n _ref2$theme = _ref2.theme,\n borderRadius = _ref2$theme.borderRadius,\n spacing = _ref2$theme.spacing,\n colors = _ref2$theme.colors;\n return _ref3 = {}, defineProperty(_ref3, alignToControl(placement), '100%'), defineProperty(_ref3, 'backgroundColor', colors.neutral0), defineProperty(_ref3, 'borderRadius', borderRadius), defineProperty(_ref3, 'boxShadow', '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), defineProperty(_ref3, 'marginBottom', spacing.menuGutter), defineProperty(_ref3, 'marginTop', spacing.menuGutter), defineProperty(_ref3, 'position', 'absolute'), defineProperty(_ref3, 'width', '100%'), defineProperty(_ref3, 'zIndex', 1), _ref3;\n};\n\n// NOTE: internal only\nvar MenuPlacer = function (_Component) {\n inherits(MenuPlacer, _Component);\n\n function MenuPlacer() {\n var _ref4;\n\n var _temp, _this, _ret;\n\n classCallCheck(this, MenuPlacer);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref4 = MenuPlacer.__proto__ || Object.getPrototypeOf(MenuPlacer)).call.apply(_ref4, [this].concat(args))), _this), _this.state = {\n maxHeight: _this.props.maxMenuHeight,\n placement: null\n }, _this.getPlacement = function (ref) {\n var _this$props = _this.props,\n minMenuHeight = _this$props.minMenuHeight,\n maxMenuHeight = _this$props.maxMenuHeight,\n menuPlacement = _this$props.menuPlacement,\n menuPosition = _this$props.menuPosition,\n menuShouldScrollIntoView = _this$props.menuShouldScrollIntoView,\n theme = _this$props.theme;\n var getPortalPlacement = _this.context.getPortalPlacement;\n\n\n if (!ref) return;\n\n // DO NOT scroll if position is fixed\n var isFixedPosition = menuPosition === 'fixed';\n var shouldScroll = menuShouldScrollIntoView && !isFixedPosition;\n\n var state = getMenuPlacement({\n maxHeight: maxMenuHeight,\n menuEl: ref,\n minHeight: minMenuHeight,\n placement: menuPlacement,\n shouldScroll: shouldScroll,\n isFixedPosition: isFixedPosition,\n theme: theme\n });\n\n if (getPortalPlacement) getPortalPlacement(state);\n\n _this.setState(state);\n }, _this.getUpdatedProps = function () {\n var menuPlacement = _this.props.menuPlacement;\n\n var placement = _this.state.placement || coercePlacement(menuPlacement);\n\n return _extends({}, _this.props, { placement: placement, maxHeight: _this.state.maxHeight });\n }, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n createClass(MenuPlacer, [{\n key: 'render',\n value: function render() {\n var children = this.props.children;\n\n\n return children({\n ref: this.getPlacement,\n placerProps: this.getUpdatedProps()\n });\n }\n }]);\n return MenuPlacer;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\n\nMenuPlacer.contextTypes = {\n getPortalPlacement: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func\n};\nvar Menu = function Menu(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerRef = props.innerRef,\n innerProps = props.innerProps;\n\n var cn = cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('menu', props)), { menu: true }, className);\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n _extends({ className: cn }, innerProps, { ref: innerRef }),\n children\n );\n};\n\n// ==============================\n// Menu List\n// ==============================\n\nvar menuListCSS = function menuListCSS(_ref5) {\n var maxHeight = _ref5.maxHeight,\n baseUnit = _ref5.theme.spacing.baseUnit;\n return {\n maxHeight: maxHeight,\n overflowY: 'auto',\n paddingBottom: baseUnit,\n paddingTop: baseUnit,\n position: 'relative', // required for offset[Height, Top] > keyboard scroll\n WebkitOverflowScrolling: 'touch'\n };\n};\nvar MenuList = function MenuList(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n isMulti = props.isMulti,\n innerRef = props.innerRef;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n {\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('menuList', props)), {\n 'menu-list': true,\n 'menu-list--is-multi': isMulti\n }, className),\n ref: innerRef\n },\n children\n );\n};\n\n// ==============================\n// Menu Notices\n// ==============================\n\nvar noticeCSS = function noticeCSS(_ref6) {\n var _ref6$theme = _ref6.theme,\n baseUnit = _ref6$theme.spacing.baseUnit,\n colors = _ref6$theme.colors;\n return {\n color: colors.neutral40,\n padding: baseUnit * 2 + 'px ' + baseUnit * 3 + 'px',\n textAlign: 'center'\n };\n};\nvar noOptionsMessageCSS = noticeCSS;\nvar loadingMessageCSS = noticeCSS;\n\nvar NoOptionsMessage = function NoOptionsMessage(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n _extends({\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('noOptionsMessage', props)), {\n 'menu-notice': true,\n 'menu-notice--no-options': true\n }, className)\n }, innerProps),\n children\n );\n};\nNoOptionsMessage.defaultProps = {\n children: 'No options'\n};\n\nvar LoadingMessage = function LoadingMessage(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n _extends({\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('loadingMessage', props)), {\n 'menu-notice': true,\n 'menu-notice--loading': true\n }, className)\n }, innerProps),\n children\n );\n};\nLoadingMessage.defaultProps = {\n children: 'Loading...'\n};\n\n// ==============================\n// Menu Portal\n// ==============================\n\nvar menuPortalCSS = function menuPortalCSS(_ref7) {\n var rect = _ref7.rect,\n offset = _ref7.offset,\n position = _ref7.position;\n return {\n left: rect.left,\n position: position,\n top: offset,\n width: rect.width,\n zIndex: 1\n };\n};\n\nvar MenuPortal = function (_Component2) {\n inherits(MenuPortal, _Component2);\n\n function MenuPortal() {\n var _ref8;\n\n var _temp2, _this2, _ret2;\n\n classCallCheck(this, MenuPortal);\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _ret2 = (_temp2 = (_this2 = possibleConstructorReturn(this, (_ref8 = MenuPortal.__proto__ || Object.getPrototypeOf(MenuPortal)).call.apply(_ref8, [this].concat(args))), _this2), _this2.state = { placement: null }, _this2.getPortalPlacement = function (_ref9) {\n var placement = _ref9.placement;\n\n var initialPlacement = coercePlacement(_this2.props.menuPlacement);\n\n // avoid re-renders if the placement has not changed\n if (placement !== initialPlacement) {\n _this2.setState({ placement: placement });\n }\n }, _temp2), possibleConstructorReturn(_this2, _ret2);\n }\n\n createClass(MenuPortal, [{\n key: 'getChildContext',\n value: function getChildContext() {\n return {\n getPortalPlacement: this.getPortalPlacement\n };\n }\n\n // callback for occassions where the menu must \"flip\"\n\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n appendTo = _props.appendTo,\n children = _props.children,\n controlElement = _props.controlElement,\n menuPlacement = _props.menuPlacement,\n position = _props.menuPosition,\n getStyles = _props.getStyles;\n\n var isFixed = position === 'fixed';\n\n // bail early if required elements aren't present\n if (!appendTo && !isFixed || !controlElement) {\n return null;\n }\n\n var placement = this.state.placement || coercePlacement(menuPlacement);\n var rect = getBoundingClientObj(controlElement);\n var scrollDistance = isFixed ? 0 : window.pageYOffset;\n var offset = rect[placement] + scrollDistance;\n var state = { offset: offset, position: position, rect: rect };\n\n // same wrapper element whether fixed or portalled\n var menuWrapper = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n { className: /*#__PURE__*/ /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('menuPortal', state)) },\n children\n );\n\n return appendTo ? Object(react_dom__WEBPACK_IMPORTED_MODULE_3__[\"createPortal\"])(menuWrapper, appendTo) : menuWrapper;\n }\n }]);\n return MenuPortal;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\nMenuPortal.childContextTypes = {\n getPortalPlacement: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func\n};\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\n\nfunction equal(a, b) {\n // fast-deep-equal index.js 2.0.1\n if (a === b) return true;\n\n if (a && b && (typeof a === 'undefined' ? 'undefined' : _typeof(a)) == 'object' && (typeof b === 'undefined' ? 'undefined' : _typeof(b)) == 'object') {\n var arrA = isArray(a),\n arrB = isArray(b),\n i,\n length,\n key;\n\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!equal(a[i], b[i])) return false;\n }\n return true;\n }\n\n if (arrA != arrB) return false;\n\n var dateA = a instanceof Date,\n dateB = b instanceof Date;\n if (dateA != dateB) return false;\n if (dateA && dateB) return a.getTime() == b.getTime();\n\n var regexpA = a instanceof RegExp,\n regexpB = b instanceof RegExp;\n if (regexpA != regexpB) return false;\n if (regexpA && regexpB) return a.toString() == b.toString();\n\n var keys = keyList(a);\n length = keys.length;\n\n if (length !== keyList(b).length) {\n return false;\n }\n\n for (i = length; i-- !== 0;) {\n if (!hasProp.call(b, keys[i])) return false;\n }\n // end fast-deep-equal\n\n // Custom handling for React\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner.\n // _owner contains circular references\n // and is not needed when comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of a react element\n continue;\n } else {\n // all other properties should be traversed as usual\n if (!equal(a[key], b[key])) return false;\n }\n }\n\n // fast-deep-equal index.js 2.0.1\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nfunction exportedEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (error.message && error.message.match(/stack|recursion/i)) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n}\n\nvar diacritics = [{ base: 'A', letters: /[\\u0041\\u24B6\\uFF21\\u00C0\\u00C1\\u00C2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\u00C3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\u00C4\\u01DE\\u1EA2\\u00C5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F]/g }, { base: 'AA', letters: /[\\uA732]/g }, { base: 'AE', letters: /[\\u00C6\\u01FC\\u01E2]/g }, { base: 'AO', letters: /[\\uA734]/g }, { base: 'AU', letters: /[\\uA736]/g }, { base: 'AV', letters: /[\\uA738\\uA73A]/g }, { base: 'AY', letters: /[\\uA73C]/g }, { base: 'B', letters: /[\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181]/g }, { base: 'C', letters: /[\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E]/g }, { base: 'D', letters: /[\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779]/g }, { base: 'DZ', letters: /[\\u01F1\\u01C4]/g }, { base: 'Dz', letters: /[\\u01F2\\u01C5]/g }, { base: 'E', letters: /[\\u0045\\u24BA\\uFF25\\u00C8\\u00C9\\u00CA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\u00CB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E]/g }, { base: 'F', letters: /[\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B]/g }, { base: 'G', letters: /[\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E]/g }, { base: 'H', letters: /[\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D]/g }, { base: 'I', letters: /[\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197]/g }, { base: 'J', letters: /[\\u004A\\u24BF\\uFF2A\\u0134\\u0248]/g }, { base: 'K', letters: /[\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2]/g }, { base: 'L', letters: /[\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780]/g }, { base: 'LJ', letters: /[\\u01C7]/g }, { base: 'Lj', letters: /[\\u01C8]/g }, { base: 'M', letters: /[\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C]/g }, { base: 'N', letters: /[\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4]/g }, { base: 'NJ', letters: /[\\u01CA]/g }, { base: 'Nj', letters: /[\\u01CB]/g }, { base: 'O', letters: /[\\u004F\\u24C4\\uFF2F\\u00D2\\u00D3\\u00D4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\u00D5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\u00D6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\u00D8\\u01FE\\u0186\\u019F\\uA74A\\uA74C]/g }, { base: 'OI', letters: /[\\u01A2]/g }, { base: 'OO', letters: /[\\uA74E]/g }, { base: 'OU', letters: /[\\u0222]/g }, { base: 'P', letters: /[\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754]/g }, { base: 'Q', letters: /[\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A]/g }, { base: 'R', letters: /[\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782]/g }, { base: 'S', letters: /[\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784]/g }, { base: 'T', letters: /[\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786]/g }, { base: 'TZ', letters: /[\\uA728]/g }, { base: 'U', letters: /[\\u0055\\u24CA\\uFF35\\u00D9\\u00DA\\u00DB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\u00DC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244]/g }, { base: 'V', letters: /[\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245]/g }, { base: 'VY', letters: /[\\uA760]/g }, { base: 'W', letters: /[\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72]/g }, { base: 'X', letters: /[\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C]/g }, { base: 'Y', letters: /[\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE]/g }, { base: 'Z', letters: /[\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762]/g }, { base: 'a', letters: /[\\u0061\\u24D0\\uFF41\\u1E9A\\u00E0\\u00E1\\u00E2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\u00E3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\u00E4\\u01DF\\u1EA3\\u00E5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250]/g }, { base: 'aa', letters: /[\\uA733]/g }, { base: 'ae', letters: /[\\u00E6\\u01FD\\u01E3]/g }, { base: 'ao', letters: /[\\uA735]/g }, { base: 'au', letters: /[\\uA737]/g }, { base: 'av', letters: /[\\uA739\\uA73B]/g }, { base: 'ay', letters: /[\\uA73D]/g }, { base: 'b', letters: /[\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253]/g }, { base: 'c', letters: /[\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184]/g }, { base: 'd', letters: /[\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A]/g }, { base: 'dz', letters: /[\\u01F3\\u01C6]/g }, { base: 'e', letters: /[\\u0065\\u24D4\\uFF45\\u00E8\\u00E9\\u00EA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\u00EB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD]/g }, { base: 'f', letters: /[\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C]/g }, { base: 'g', letters: /[\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F]/g }, { base: 'h', letters: /[\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265]/g }, { base: 'hv', letters: /[\\u0195]/g }, { base: 'i', letters: /[\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131]/g }, { base: 'j', letters: /[\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249]/g }, { base: 'k', letters: /[\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3]/g }, { base: 'l', letters: /[\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747]/g }, { base: 'lj', letters: /[\\u01C9]/g }, { base: 'm', letters: /[\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F]/g }, { base: 'n', letters: /[\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5]/g }, { base: 'nj', letters: /[\\u01CC]/g }, { base: 'o', letters: /[\\u006F\\u24DE\\uFF4F\\u00F2\\u00F3\\u00F4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\u00F5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\u00F6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\u00F8\\u01FF\\u0254\\uA74B\\uA74D\\u0275]/g }, { base: 'oi', letters: /[\\u01A3]/g }, { base: 'ou', letters: /[\\u0223]/g }, { base: 'oo', letters: /[\\uA74F]/g }, { base: 'p', letters: /[\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755]/g }, { base: 'q', letters: /[\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759]/g }, { base: 'r', letters: /[\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783]/g }, { base: 's', letters: /[\\u0073\\u24E2\\uFF53\\u00DF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B]/g }, { base: 't', letters: /[\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787]/g }, { base: 'tz', letters: /[\\uA729]/g }, { base: 'u', letters: /[\\u0075\\u24E4\\uFF55\\u00F9\\u00FA\\u00FB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\u00FC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289]/g }, { base: 'v', letters: /[\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C]/g }, { base: 'vy', letters: /[\\uA761]/g }, { base: 'w', letters: /[\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73]/g }, { base: 'x', letters: /[\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D]/g }, { base: 'y', letters: /[\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF]/g }, { base: 'z', letters: /[\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763]/g }];\n\nvar stripDiacritics = function stripDiacritics(str) {\n\tfor (var i = 0; i < diacritics.length; i++) {\n\t\tstr = str.replace(diacritics[i].letters, diacritics[i].base);\n\t}\n\treturn str;\n};\n\nvar trimString = function trimString(str) {\n return str.replace(/^\\s+|\\s+$/g, '');\n};\nvar defaultStringify = function defaultStringify(option) {\n return option.label + ' ' + option.value;\n};\n\nvar createFilter = function createFilter(config) {\n return function (option, rawInput) {\n var _ignoreCase$ignoreAcc = _extends({\n ignoreCase: true,\n ignoreAccents: true,\n stringify: defaultStringify,\n trim: true,\n matchFrom: 'any'\n }, config),\n ignoreCase = _ignoreCase$ignoreAcc.ignoreCase,\n ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents,\n stringify = _ignoreCase$ignoreAcc.stringify,\n trim = _ignoreCase$ignoreAcc.trim,\n matchFrom = _ignoreCase$ignoreAcc.matchFrom;\n\n var input = trim ? trimString(rawInput) : rawInput;\n var candidate = trim ? trimString(stringify(option)) : stringify(option);\n if (ignoreCase) {\n input = input.toLowerCase();\n candidate = candidate.toLowerCase();\n }\n if (ignoreAccents) {\n input = stripDiacritics(input);\n candidate = stripDiacritics(candidate);\n }\n return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;\n };\n};\n\n// Assistive text to describe visual elements. Hidden for sighted users.\nvar A11yText = function A11yText(props) {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('span', _extends({\n className: Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])({\n zIndex: 9999,\n border: 0,\n clip: 'rect(1px, 1px, 1px, 1px)',\n height: 1,\n width: 1,\n position: 'absolute',\n overflow: 'hidden',\n padding: 0,\n whiteSpace: 'nowrap',\n backgroundColor: 'red',\n color: 'blue'\n })\n }, props));\n};\n\nvar DummyInput = function (_Component) {\n inherits(DummyInput, _Component);\n\n function DummyInput() {\n classCallCheck(this, DummyInput);\n return possibleConstructorReturn(this, (DummyInput.__proto__ || Object.getPrototypeOf(DummyInput)).apply(this, arguments));\n }\n\n createClass(DummyInput, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n inProp = _props.in,\n out = _props.out,\n onExited = _props.onExited,\n appear = _props.appear,\n enter = _props.enter,\n exit = _props.exit,\n innerRef = _props.innerRef,\n props = objectWithoutProperties(_props, ['in', 'out', 'onExited', 'appear', 'enter', 'exit', 'innerRef']);\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('input', _extends({\n ref: innerRef\n }, props, {\n className: Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])({\n // get rid of any default styles\n background: 0,\n border: 0,\n fontSize: 'inherit',\n outline: 0,\n padding: 0,\n\n // important! without `width` browsers won't allow focus\n width: 1,\n\n // remove cursor on desktop\n color: 'transparent',\n\n // remove cursor on mobile whilst maintaining \"scroll into view\" behaviour\n left: -100,\n opacity: 0,\n position: 'relative',\n transform: 'scale(0)'\n })\n }));\n }\n }]);\n return DummyInput;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\n\nvar NodeResolver = function (_Component) {\n inherits(NodeResolver, _Component);\n\n function NodeResolver() {\n classCallCheck(this, NodeResolver);\n return possibleConstructorReturn(this, (NodeResolver.__proto__ || Object.getPrototypeOf(NodeResolver)).apply(this, arguments));\n }\n\n createClass(NodeResolver, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.props.innerRef(Object(react_dom__WEBPACK_IMPORTED_MODULE_3__[\"findDOMNode\"])(this));\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.props.innerRef(null);\n }\n }, {\n key: 'render',\n value: function render() {\n return this.props.children;\n }\n }]);\n return NodeResolver;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\n\nvar STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position'];\n\nvar LOCK_STYLES = {\n boxSizing: 'border-box', // account for possible declaration `width: 100%;` on body\n overflow: 'hidden',\n position: 'relative',\n height: '100%'\n};\n\nfunction preventTouchMove(e) {\n e.preventDefault();\n}\n\nfunction allowTouchMove(e) {\n e.stopPropagation();\n}\n\nfunction preventInertiaScroll() {\n var top = this.scrollTop;\n var totalScroll = this.scrollHeight;\n var currentScroll = top + this.offsetHeight;\n\n if (top === 0) {\n this.scrollTop = 1;\n } else if (currentScroll === totalScroll) {\n this.scrollTop = top - 1;\n }\n}\n\n// `ontouchstart` check works on most browsers\n// `maxTouchPoints` works on IE10/11 and Surface\nfunction isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar activeScrollLocks = 0;\n\nvar ScrollLock = function (_Component) {\n inherits(ScrollLock, _Component);\n\n function ScrollLock() {\n var _ref;\n\n var _temp, _this, _ret;\n\n classCallCheck(this, ScrollLock);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = ScrollLock.__proto__ || Object.getPrototypeOf(ScrollLock)).call.apply(_ref, [this].concat(args))), _this), _this.originalStyles = {}, _this.listenerOptions = {\n capture: false,\n passive: false\n }, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n createClass(ScrollLock, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n if (!canUseDOM) return;\n\n var _props = this.props,\n accountForScrollbars = _props.accountForScrollbars,\n touchScrollTarget = _props.touchScrollTarget;\n\n var target = document.body;\n var targetStyle = target && target.style;\n\n if (accountForScrollbars) {\n // store any styles already applied to the body\n STYLE_KEYS.forEach(function (key) {\n var val = targetStyle && targetStyle[key];\n _this2.originalStyles[key] = val;\n });\n }\n\n // apply the lock styles and padding if this is the first scroll lock\n if (accountForScrollbars && activeScrollLocks < 1) {\n var currentPadding = parseInt(this.originalStyles.paddingRight, 10) || 0;\n var clientWidth = document.body ? document.body.clientWidth : 0;\n var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0;\n\n Object.keys(LOCK_STYLES).forEach(function (key) {\n var val = LOCK_STYLES[key];\n if (targetStyle) {\n targetStyle[key] = val;\n }\n });\n\n if (targetStyle) {\n targetStyle.paddingRight = adjustedPadding + 'px';\n }\n }\n\n // account for touch devices\n if (target && isTouchDevice()) {\n // Mobile Safari ignores { overflow: hidden } declaration on the body.\n target.addEventListener('touchmove', preventTouchMove, this.listenerOptions);\n\n // Allow scroll on provided target\n if (touchScrollTarget) {\n touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, this.listenerOptions);\n touchScrollTarget.addEventListener('touchmove', allowTouchMove, this.listenerOptions);\n }\n }\n\n // increment active scroll locks\n activeScrollLocks += 1;\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n var _this3 = this;\n\n if (!canUseDOM) return;\n\n var _props2 = this.props,\n accountForScrollbars = _props2.accountForScrollbars,\n touchScrollTarget = _props2.touchScrollTarget;\n\n var target = document.body;\n var targetStyle = target && target.style;\n\n // safely decrement active scroll locks\n activeScrollLocks = Math.max(activeScrollLocks - 1, 0);\n\n // reapply original body styles, if any\n if (accountForScrollbars && activeScrollLocks < 1) {\n STYLE_KEYS.forEach(function (key) {\n var val = _this3.originalStyles[key];\n if (targetStyle) {\n targetStyle[key] = val;\n }\n });\n }\n\n // remove touch listeners\n if (target && isTouchDevice()) {\n target.removeEventListener('touchmove', preventTouchMove, this.listenerOptions);\n\n if (touchScrollTarget) {\n touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, this.listenerOptions);\n touchScrollTarget.removeEventListener('touchmove', allowTouchMove, this.listenerOptions);\n }\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return null;\n }\n }]);\n return ScrollLock;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\n\nScrollLock.defaultProps = {\n accountForScrollbars: true\n};\n\n// NOTE:\n// We shouldn't need this after updating to React v16.3.0, which introduces:\n// - createRef() https://reactjs.org/docs/react-api.html#reactcreateref\n// - forwardRef() https://reactjs.org/docs/react-api.html#reactforwardref\n\nvar ScrollBlock = function (_PureComponent) {\n inherits(ScrollBlock, _PureComponent);\n\n function ScrollBlock() {\n var _ref;\n\n var _temp, _this, _ret;\n\n classCallCheck(this, ScrollBlock);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = ScrollBlock.__proto__ || Object.getPrototypeOf(ScrollBlock)).call.apply(_ref, [this].concat(args))), _this), _this.state = { touchScrollTarget: null }, _this.getScrollTarget = function (ref) {\n if (ref === _this.state.touchScrollTarget) return;\n _this.setState({ touchScrollTarget: ref });\n }, _this.blurSelectInput = function () {\n if (document.activeElement) {\n document.activeElement.blur();\n }\n }, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n // must be in state to trigger a re-render, only runs once per instance\n\n\n // this will close the menu when a user clicks outside\n\n\n createClass(ScrollBlock, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n isEnabled = _props.isEnabled;\n var touchScrollTarget = this.state.touchScrollTarget;\n\n // bail early if not enabled\n\n if (!isEnabled) return children;\n\n /*\n * Div\n * ------------------------------\n * blocks scrolling on non-body elements behind the menu\n * NodeResolver\n * ------------------------------\n * we need a reference to the scrollable element to \"unlock\" scroll on\n * mobile devices\n * ScrollLock\n * ------------------------------\n * actually does the scroll locking\n */\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n null,\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('div', {\n onClick: this.blurSelectInput,\n className: Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])({ position: 'fixed', left: 0, bottom: 0, right: 0, top: 0 })\n }),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n NodeResolver,\n { innerRef: this.getScrollTarget },\n children\n ),\n touchScrollTarget ? react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(ScrollLock, { touchScrollTarget: touchScrollTarget }) : null\n );\n }\n }]);\n return ScrollBlock;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"PureComponent\"]);\n\nvar ScrollCaptor = function (_Component) {\n inherits(ScrollCaptor, _Component);\n\n function ScrollCaptor() {\n var _ref;\n\n var _temp, _this, _ret;\n\n classCallCheck(this, ScrollCaptor);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = ScrollCaptor.__proto__ || Object.getPrototypeOf(ScrollCaptor)).call.apply(_ref, [this].concat(args))), _this), _this.isBottom = false, _this.isTop = false, _this.cancelScroll = function (event) {\n event.preventDefault();\n event.stopPropagation();\n }, _this.handleEventDelta = function (event, delta) {\n var _this$props = _this.props,\n onBottomArrive = _this$props.onBottomArrive,\n onBottomLeave = _this$props.onBottomLeave,\n onTopArrive = _this$props.onTopArrive,\n onTopLeave = _this$props.onTopLeave;\n var _this$scrollTarget = _this.scrollTarget,\n scrollTop = _this$scrollTarget.scrollTop,\n scrollHeight = _this$scrollTarget.scrollHeight,\n clientHeight = _this$scrollTarget.clientHeight;\n\n var target = _this.scrollTarget;\n var isDeltaPositive = delta > 0;\n var availableScroll = scrollHeight - clientHeight - scrollTop;\n var shouldCancelScroll = false;\n\n // reset bottom/top flags\n if (availableScroll > delta && _this.isBottom) {\n if (onBottomLeave) onBottomLeave(event);\n _this.isBottom = false;\n }\n if (isDeltaPositive && _this.isTop) {\n if (onTopLeave) onTopLeave(event);\n _this.isTop = false;\n }\n\n // bottom limit\n if (isDeltaPositive && delta > availableScroll) {\n if (onBottomArrive && !_this.isBottom) {\n onBottomArrive(event);\n }\n target.scrollTop = scrollHeight;\n shouldCancelScroll = true;\n _this.isBottom = true;\n\n // top limit\n } else if (!isDeltaPositive && -delta > scrollTop) {\n if (onTopArrive && !_this.isTop) {\n onTopArrive(event);\n }\n target.scrollTop = 0;\n shouldCancelScroll = true;\n _this.isTop = true;\n }\n\n // cancel scroll\n if (shouldCancelScroll) {\n _this.cancelScroll(event);\n }\n }, _this.onWheel = function (event) {\n _this.handleEventDelta(event, event.deltaY);\n }, _this.onTouchStart = function (event) {\n // set touch start so we can calculate touchmove delta\n _this.touchStart = event.changedTouches[0].clientY;\n }, _this.onTouchMove = function (event) {\n var deltaY = _this.touchStart - event.changedTouches[0].clientY;\n _this.handleEventDelta(event, deltaY);\n }, _this.getScrollTarget = function (ref) {\n _this.scrollTarget = ref;\n }, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n createClass(ScrollCaptor, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.startListening(this.scrollTarget);\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.stopListening(this.scrollTarget);\n }\n }, {\n key: 'startListening',\n value: function startListening(el) {\n // bail early if no scroll available\n if (el.scrollHeight <= el.clientHeight) return;\n\n // all the if statements are to appease Flow 😢\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('wheel', this.onWheel, false);\n }\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('touchstart', this.onTouchStart, false);\n }\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('touchmove', this.onTouchMove, false);\n }\n }\n }, {\n key: 'stopListening',\n value: function stopListening(el) {\n // bail early if no scroll available\n if (el.scrollHeight <= el.clientHeight) return;\n\n // all the if statements are to appease Flow 😢\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('wheel', this.onWheel, false);\n }\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('touchstart', this.onTouchStart, false);\n }\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('touchmove', this.onTouchMove, false);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n NodeResolver,\n { innerRef: this.getScrollTarget },\n this.props.children\n );\n }\n }]);\n return ScrollCaptor;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\n\nvar ScrollCaptorSwitch = function (_Component2) {\n inherits(ScrollCaptorSwitch, _Component2);\n\n function ScrollCaptorSwitch() {\n classCallCheck(this, ScrollCaptorSwitch);\n return possibleConstructorReturn(this, (ScrollCaptorSwitch.__proto__ || Object.getPrototypeOf(ScrollCaptorSwitch)).apply(this, arguments));\n }\n\n createClass(ScrollCaptorSwitch, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n isEnabled = _props.isEnabled,\n props = objectWithoutProperties(_props, ['isEnabled']);\n\n return isEnabled ? react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(ScrollCaptor, props) : this.props.children;\n }\n }]);\n return ScrollCaptorSwitch;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\n\nScrollCaptorSwitch.defaultProps = { isEnabled: true };\n\nvar instructionsAriaMessage = function instructionsAriaMessage(event) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var isSearchable = context.isSearchable,\n isMulti = context.isMulti,\n label = context.label;\n\n switch (event) {\n case 'menu':\n return 'Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.';\n case 'input':\n return (label ? label : 'Select') + ' is focused ' + (isSearchable ? ',type to refine list' : '') + ', press Down to open the menu, ' + (isMulti ? ' press left to focus selected values' : '');\n case 'value':\n return 'Use left and right to toggle between focused values, press Enter to remove the currently focused value';\n }\n};\n\nvar valueEventAriaMessage = function valueEventAriaMessage(event, context) {\n var value = context.value;\n\n if (!value) return;\n switch (event) {\n case 'deselect-option':\n case 'pop-value':\n case 'remove-value':\n return 'option ' + value + ', deselected.';\n case 'select-option':\n return 'option ' + value + ', selected.';\n }\n};\n\nvar valueFocusAriaMessage = function valueFocusAriaMessage(_ref) {\n var focusedValue = _ref.focusedValue,\n getOptionLabel = _ref.getOptionLabel,\n selectValue = _ref.selectValue;\n return 'value ' + getOptionLabel(focusedValue) + ' focused, ' + (selectValue.indexOf(focusedValue) + 1) + ' of ' + selectValue.length + '.';\n};\nvar optionFocusAriaMessage = function optionFocusAriaMessage(_ref2) {\n var focusedOption = _ref2.focusedOption,\n getOptionLabel = _ref2.getOptionLabel,\n options = _ref2.options;\n return 'option ' + getOptionLabel(focusedOption) + ' focused, ' + (options.indexOf(focusedOption) + 1) + ' of ' + options.length + '.';\n};\nvar resultsAriaMessage = function resultsAriaMessage(_ref3) {\n var inputValue = _ref3.inputValue,\n screenReaderMessage = _ref3.screenReaderMessage;\n return '' + screenReaderMessage + (inputValue ? ' for search term ' + inputValue : '') + '.';\n};\n\nvar formatGroupLabel = function formatGroupLabel(group) {\n return group.label;\n};\n\nvar getOptionLabel = function getOptionLabel(option) {\n return option.label;\n};\n\nvar getOptionValue = function getOptionValue(option) {\n return option.value;\n};\n\nvar isOptionDisabled = function isOptionDisabled(option) {\n return !!option.isDisabled;\n};\n\n// ==============================\n// Root Container\n// ==============================\n\nvar containerCSS = function containerCSS(_ref) {\n var isDisabled = _ref.isDisabled,\n isRtl = _ref.isRtl;\n return {\n direction: isRtl ? 'rtl' : null,\n pointerEvents: isDisabled ? 'none' : null, // cancel mouse events when disabled\n position: 'relative'\n };\n};\nvar SelectContainer = function SelectContainer(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps,\n isDisabled = props.isDisabled,\n isRtl = props.isRtl;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n _extends({\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('container', props)), {\n '--is-disabled': isDisabled,\n '--is-rtl': isRtl\n }, className)\n }, innerProps),\n children\n );\n};\n\n// ==============================\n// Value Container\n// ==============================\n\nvar valueContainerCSS = function valueContainerCSS(_ref2) {\n var spacing = _ref2.theme.spacing;\n return {\n alignItems: 'center',\n display: 'flex',\n flex: 1,\n flexWrap: 'wrap',\n padding: spacing.baseUnit / 2 + 'px ' + spacing.baseUnit * 2 + 'px',\n WebkitOverflowScrolling: 'touch',\n position: 'relative',\n overflow: 'hidden'\n };\n};\nvar ValueContainer = function (_Component) {\n inherits(ValueContainer, _Component);\n\n function ValueContainer() {\n classCallCheck(this, ValueContainer);\n return possibleConstructorReturn(this, (ValueContainer.__proto__ || Object.getPrototypeOf(ValueContainer)).apply(this, arguments));\n }\n\n createClass(ValueContainer, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n className = _props.className,\n cx = _props.cx,\n isMulti = _props.isMulti,\n getStyles = _props.getStyles,\n hasValue = _props.hasValue;\n\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n {\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('valueContainer', this.props)), {\n 'value-container': true,\n 'value-container--is-multi': isMulti,\n 'value-container--has-value': hasValue\n }, className)\n },\n children\n );\n }\n }]);\n return ValueContainer;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\n\n// ==============================\n// Indicator Container\n// ==============================\n\nvar indicatorsContainerCSS = function indicatorsContainerCSS() {\n return {\n alignItems: 'center',\n alignSelf: 'stretch',\n display: 'flex',\n flexShrink: 0\n };\n};\nvar IndicatorsContainer = function IndicatorsContainer(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles;\n\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n {\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('indicatorsContainer', props)), {\n 'indicators': true\n }, className)\n },\n children\n );\n};\n\n// ==============================\n// Dropdown & Clear Icons\n// ==============================\n\nvar Svg = function Svg(_ref) {\n var size = _ref.size,\n props = objectWithoutProperties(_ref, ['size']);\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('svg', _extends({\n height: size,\n width: size,\n viewBox: '0 0 20 20',\n 'aria-hidden': 'true',\n focusable: 'false',\n className: /*#__PURE__*/ /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])({\n display: 'inline-block',\n fill: 'currentColor',\n lineHeight: 1,\n stroke: 'currentColor',\n strokeWidth: 0\n })\n }, props));\n};\n\nvar CrossIcon = function CrossIcon(props) {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n Svg,\n _extends({ size: 20 }, props),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('path', { d: 'M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z' })\n );\n};\nvar DownChevron = function DownChevron(props) {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n Svg,\n _extends({ size: 20 }, props),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('path', { d: 'M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z' })\n );\n};\n\n// ==============================\n// Dropdown & Clear Buttons\n// ==============================\n\nvar baseCSS = function baseCSS(_ref2) {\n var isFocused = _ref2.isFocused,\n _ref2$theme = _ref2.theme,\n baseUnit = _ref2$theme.spacing.baseUnit,\n colors = _ref2$theme.colors;\n return {\n color: isFocused ? colors.neutral60 : colors.neutral20,\n display: 'flex',\n padding: baseUnit * 2,\n transition: 'color 150ms',\n\n ':hover': {\n color: isFocused ? colors.neutral80 : colors.neutral40\n }\n };\n};\n\nvar dropdownIndicatorCSS = baseCSS;\nvar DropdownIndicator = function DropdownIndicator(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n _extends({}, innerProps, {\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('dropdownIndicator', props)), {\n 'indicator': true,\n 'dropdown-indicator': true\n }, className)\n }),\n children\n );\n};\nDropdownIndicator.defaultProps = {\n children: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(DownChevron, null)\n};\n\nvar clearIndicatorCSS = baseCSS;\nvar ClearIndicator = function ClearIndicator(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n _extends({}, innerProps, {\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('clearIndicator', props)), {\n 'indicator': true,\n 'clear-indicator': true\n }, className)\n }),\n children\n );\n};\n\nClearIndicator.defaultProps = {\n children: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(CrossIcon, null)\n};\n\n// ==============================\n// Separator\n// ==============================\n\nvar indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref3) {\n var isDisabled = _ref3.isDisabled,\n _ref3$theme = _ref3.theme,\n baseUnit = _ref3$theme.spacing.baseUnit,\n colors = _ref3$theme.colors;\n return {\n alignSelf: 'stretch',\n backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20,\n marginBottom: baseUnit * 2,\n marginTop: baseUnit * 2,\n width: 1\n };\n};\n\nvar IndicatorSeparator = function IndicatorSeparator(props) {\n var className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('span', _extends({}, innerProps, {\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('indicatorSeparator', props)), { 'indicator-separator': true }, className)\n }));\n};\n\n// ==============================\n// Loading\n// ==============================\n\nvar keyframesName = 'react-select-loading-indicator';\n\nvar loadingIndicatorCSS = function loadingIndicatorCSS(_ref4) {\n var isFocused = _ref4.isFocused,\n size = _ref4.size,\n _ref4$theme = _ref4.theme,\n colors = _ref4$theme.colors,\n baseUnit = _ref4$theme.spacing.baseUnit;\n return {\n color: isFocused ? colors.neutral60 : colors.neutral20,\n display: 'flex',\n padding: baseUnit * 2,\n transition: 'color 150ms',\n alignSelf: 'center',\n fontSize: size,\n lineHeight: 1,\n marginRight: size,\n textAlign: 'center',\n verticalAlign: 'middle'\n };\n};\n\nvar LoadingDot = function LoadingDot(_ref5) {\n var color = _ref5.color,\n delay = _ref5.delay,\n offset = _ref5.offset;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('span', {\n className: Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])({\n animationDuration: '1s',\n animationDelay: delay + 'ms',\n animationIterationCount: 'infinite',\n animationName: keyframesName,\n animationTimingFunction: 'ease-in-out',\n backgroundColor: color,\n borderRadius: '1em',\n display: 'inline-block',\n marginLeft: offset ? '1em' : null,\n height: '1em',\n verticalAlign: 'top',\n width: '1em'\n })\n });\n};\n\n// eslint-disable-next-line no-unused-expressions\nObject(emotion__WEBPACK_IMPORTED_MODULE_2__[\"injectGlobal\"])('@keyframes ', keyframesName, '{0%,80%,100%{opacity:0;}40%{opacity:1;}};');\n\nvar LoadingIndicator = function LoadingIndicator(props) {\n var className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps,\n isFocused = props.isFocused,\n isRtl = props.isRtl,\n colors = props.theme.colors;\n\n var color = isFocused ? colors.neutral80 : colors.neutral20;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n _extends({}, innerProps, {\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('loadingIndicator', props)), {\n 'indicator': true,\n 'loading-indicator': true\n }, className)\n }),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(LoadingDot, { color: color, delay: 0, offset: isRtl }),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(LoadingDot, { color: color, delay: 160, offset: true }),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(LoadingDot, { color: color, delay: 320, offset: !isRtl })\n );\n};\nLoadingIndicator.defaultProps = { size: 4 };\n\nvar css$1 = function css$$1(_ref) {\n var isDisabled = _ref.isDisabled,\n isFocused = _ref.isFocused,\n _ref$theme = _ref.theme,\n colors = _ref$theme.colors,\n borderRadius = _ref$theme.borderRadius,\n spacing = _ref$theme.spacing;\n return {\n alignItems: 'center',\n backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0,\n borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20,\n borderRadius: borderRadius,\n borderStyle: 'solid',\n borderWidth: 1,\n boxShadow: isFocused ? '0 0 0 1px ' + colors.primary : null,\n cursor: 'default',\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n minHeight: spacing.controlHeight,\n outline: '0 !important',\n position: 'relative',\n transition: 'all 100ms',\n\n '&:hover': {\n borderColor: isFocused ? colors.primary : colors.neutral30\n }\n };\n};\n\nvar Control = function Control(props) {\n var children = props.children,\n cx = props.cx,\n getStyles = props.getStyles,\n className = props.className,\n isDisabled = props.isDisabled,\n isFocused = props.isFocused,\n innerRef = props.innerRef,\n innerProps = props.innerProps;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n _extends({\n ref: innerRef,\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('control', props)), {\n 'control': true,\n 'control--is-disabled': isDisabled,\n 'control--is-focused': isFocused\n }, className)\n }, innerProps),\n children\n );\n};\n\nvar groupCSS = function groupCSS(_ref) {\n var spacing = _ref.theme.spacing;\n return {\n paddingBottom: spacing.baseUnit * 2,\n paddingTop: spacing.baseUnit * 2\n };\n};\n\nvar Group = function Group(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n Heading = props.Heading,\n headingProps = props.headingProps,\n label = props.label,\n theme = props.theme;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n {\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('group', props)), { 'group': true }, className)\n },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n Heading,\n _extends({}, headingProps, { theme: theme, getStyles: getStyles, cx: cx }),\n label\n ),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n null,\n children\n )\n );\n};\n\nvar groupHeadingCSS = function groupHeadingCSS(_ref2) {\n var spacing = _ref2.theme.spacing;\n return {\n color: '#999',\n cursor: 'default',\n display: 'block',\n fontSize: '75%',\n fontWeight: '500',\n marginBottom: '0.25em',\n paddingLeft: spacing.baseUnit * 3,\n paddingRight: spacing.baseUnit * 3,\n textTransform: 'uppercase'\n };\n};\n\nvar GroupHeading = function GroupHeading(props) {\n var className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n theme = props.theme,\n cleanProps = objectWithoutProperties(props, ['className', 'cx', 'getStyles', 'theme']);\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('div', _extends({\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('groupHeading', _extends({ theme: theme }, cleanProps))), { 'group-heading': true }, className)\n }, cleanProps));\n};\n\nvar inputCSS = function inputCSS(_ref) {\n var isDisabled = _ref.isDisabled,\n _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n margin: spacing.baseUnit / 2,\n paddingBottom: spacing.baseUnit / 2,\n paddingTop: spacing.baseUnit / 2,\n visibility: isDisabled ? 'hidden' : 'visible',\n color: colors.neutral80\n };\n};\nvar inputStyle = function inputStyle(isHidden) {\n return {\n background: 0,\n border: 0,\n fontSize: 'inherit',\n opacity: isHidden ? 0 : 1,\n outline: 0,\n padding: 0,\n color: 'inherit'\n };\n};\n\nvar Input = function Input(_ref2) {\n var className = _ref2.className,\n cx = _ref2.cx,\n getStyles = _ref2.getStyles,\n innerRef = _ref2.innerRef,\n isHidden = _ref2.isHidden,\n isDisabled = _ref2.isDisabled,\n theme = _ref2.theme,\n props = objectWithoutProperties(_ref2, ['className', 'cx', 'getStyles', 'innerRef', 'isHidden', 'isDisabled', 'theme']);\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n {\n className: Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('input', _extends({ theme: theme }, props)))\n },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react_input_autosize__WEBPACK_IMPORTED_MODULE_5___default.a, _extends({\n className: cx(null, { 'input': true }, className),\n inputRef: innerRef,\n inputStyle: inputStyle(isHidden),\n disabled: isDisabled\n }, props))\n );\n};\n\nvar multiValueCSS = function multiValueCSS(_ref) {\n var _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n borderRadius = _ref$theme.borderRadius,\n colors = _ref$theme.colors;\n return {\n backgroundColor: colors.neutral10,\n borderRadius: borderRadius / 2,\n display: 'flex',\n margin: spacing.baseUnit / 2,\n minWidth: 0 // resolves flex/text-overflow bug\n };\n};\n\nvar multiValueLabelCSS = function multiValueLabelCSS(_ref2) {\n var _ref2$theme = _ref2.theme,\n borderRadius = _ref2$theme.borderRadius,\n colors = _ref2$theme.colors,\n cropWithEllipsis = _ref2.cropWithEllipsis;\n return {\n borderRadius: borderRadius / 2,\n color: colors.neutral80,\n fontSize: '85%',\n overflow: 'hidden',\n padding: 3,\n paddingLeft: 6,\n textOverflow: cropWithEllipsis ? 'ellipsis' : null,\n whiteSpace: 'nowrap'\n };\n};\n\nvar multiValueRemoveCSS = function multiValueRemoveCSS(_ref3) {\n var _ref3$theme = _ref3.theme,\n spacing = _ref3$theme.spacing,\n borderRadius = _ref3$theme.borderRadius,\n colors = _ref3$theme.colors,\n isFocused = _ref3.isFocused;\n return {\n alignItems: 'center',\n borderRadius: borderRadius / 2,\n backgroundColor: isFocused && colors.dangerLight,\n display: 'flex',\n paddingLeft: spacing.baseUnit,\n paddingRight: spacing.baseUnit,\n ':hover': {\n backgroundColor: colors.dangerLight,\n color: colors.danger\n }\n };\n};\n\nvar MultiValueGeneric = function MultiValueGeneric(_ref4) {\n var children = _ref4.children,\n innerProps = _ref4.innerProps;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n innerProps,\n children\n );\n};\n\nvar MultiValueContainer = MultiValueGeneric;\nvar MultiValueLabel = MultiValueGeneric;\n\nvar MultiValueRemove = function (_Component) {\n inherits(MultiValueRemove, _Component);\n\n function MultiValueRemove() {\n classCallCheck(this, MultiValueRemove);\n return possibleConstructorReturn(this, (MultiValueRemove.__proto__ || Object.getPrototypeOf(MultiValueRemove)).apply(this, arguments));\n }\n\n createClass(MultiValueRemove, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n innerProps = _props.innerProps;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n innerProps,\n children\n );\n }\n }]);\n return MultiValueRemove;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\n\nMultiValueRemove.defaultProps = {\n children: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(CrossIcon, { size: 14 })\n};\n\nvar MultiValue = function (_Component2) {\n inherits(MultiValue, _Component2);\n\n function MultiValue() {\n classCallCheck(this, MultiValue);\n return possibleConstructorReturn(this, (MultiValue.__proto__ || Object.getPrototypeOf(MultiValue)).apply(this, arguments));\n }\n\n createClass(MultiValue, [{\n key: 'render',\n value: function render() {\n var _props2 = this.props,\n children = _props2.children,\n className = _props2.className,\n components = _props2.components,\n cx = _props2.cx,\n data = _props2.data,\n getStyles = _props2.getStyles,\n innerProps = _props2.innerProps,\n isDisabled = _props2.isDisabled,\n removeProps = _props2.removeProps,\n selectProps = _props2.selectProps;\n var Container = components.Container,\n Label = components.Label,\n Remove = components.Remove;\n\n\n var containerInnerProps = _extends({\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('multiValue', this.props)), {\n 'multi-value': true,\n 'multi-value--is-disabled': isDisabled\n }, className)\n }, innerProps);\n\n var labelInnerProps = {\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('multiValueLabel', this.props)), {\n 'multi-value__label': true\n }, className)\n };\n\n var removeInnerProps = _extends({\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('multiValueRemove', this.props)), {\n 'multi-value__remove': true\n }, className)\n }, removeProps);\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n Container,\n {\n data: data,\n innerProps: containerInnerProps,\n selectProps: selectProps\n },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n Label,\n {\n data: data,\n innerProps: labelInnerProps,\n selectProps: selectProps\n },\n children\n ),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Remove, {\n data: data,\n innerProps: removeInnerProps,\n selectProps: selectProps\n })\n );\n }\n }]);\n return MultiValue;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\n\nMultiValue.defaultProps = {\n cropWithEllipsis: true\n};\n\nvar optionCSS = function optionCSS(_ref) {\n var isDisabled = _ref.isDisabled,\n isFocused = _ref.isFocused,\n isSelected = _ref.isSelected,\n _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent',\n color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit',\n cursor: 'default',\n display: 'block',\n fontSize: 'inherit',\n padding: spacing.baseUnit * 2 + 'px ' + spacing.baseUnit * 3 + 'px',\n width: '100%',\n userSelect: 'none',\n WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',\n\n // provide some affordance on touch devices\n ':active': {\n backgroundColor: isSelected ? colors.primary : colors.primary50\n }\n };\n};\n\nvar Option = function Option(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n isDisabled = props.isDisabled,\n isFocused = props.isFocused,\n isSelected = props.isSelected,\n innerRef = props.innerRef,\n innerProps = props.innerProps;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n _extends({\n ref: innerRef,\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('option', props)), {\n 'option': true,\n 'option--is-disabled': isDisabled,\n 'option--is-focused': isFocused,\n 'option--is-selected': isSelected\n }, className)\n }, innerProps),\n children\n );\n};\n\nvar placeholderCSS = function placeholderCSS(_ref) {\n var _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n color: colors.neutral50,\n marginLeft: spacing.baseUnit / 2,\n marginRight: spacing.baseUnit / 2,\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)'\n };\n};\n\nvar Placeholder = function Placeholder(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n _extends({\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('placeholder', props)), {\n 'placeholder': true\n }, className)\n }, innerProps),\n children\n );\n};\n\nvar css$2 = function css$$1(_ref) {\n var isDisabled = _ref.isDisabled,\n _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n color: isDisabled ? colors.neutral40 : colors.neutral80,\n marginLeft: spacing.baseUnit / 2,\n marginRight: spacing.baseUnit / 2,\n maxWidth: 'calc(100% - ' + spacing.baseUnit * 2 + 'px)',\n overflow: 'hidden',\n position: 'absolute',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n top: '50%',\n transform: 'translateY(-50%)'\n };\n};\n\nvar SingleValue = function SingleValue(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n isDisabled = props.isDisabled,\n innerProps = props.innerProps;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n _extends({\n className: cx( /*#__PURE__*/Object(emotion__WEBPACK_IMPORTED_MODULE_2__[\"css\"])(getStyles('singleValue', props)), {\n 'single-value': true,\n 'single-value--is-disabled': isDisabled\n }, className)\n }, innerProps),\n children\n );\n};\n\nvar components = {\n ClearIndicator: ClearIndicator,\n Control: Control,\n DropdownIndicator: DropdownIndicator,\n DownChevron: DownChevron,\n CrossIcon: CrossIcon,\n Group: Group,\n GroupHeading: GroupHeading,\n IndicatorsContainer: IndicatorsContainer,\n IndicatorSeparator: IndicatorSeparator,\n Input: Input,\n LoadingIndicator: LoadingIndicator,\n Menu: Menu,\n MenuList: MenuList,\n MenuPortal: MenuPortal,\n LoadingMessage: LoadingMessage,\n NoOptionsMessage: NoOptionsMessage,\n MultiValue: MultiValue,\n MultiValueContainer: MultiValueContainer,\n MultiValueLabel: MultiValueLabel,\n MultiValueRemove: MultiValueRemove,\n Option: Option,\n Placeholder: Placeholder,\n SelectContainer: SelectContainer,\n SingleValue: SingleValue,\n ValueContainer: ValueContainer\n};\n\nvar defaultComponents = function defaultComponents(props) {\n return _extends({}, components, props.components);\n};\n\nvar defaultStyles = {\n clearIndicator: clearIndicatorCSS,\n container: containerCSS,\n control: css$1,\n dropdownIndicator: dropdownIndicatorCSS,\n group: groupCSS,\n groupHeading: groupHeadingCSS,\n indicatorsContainer: indicatorsContainerCSS,\n indicatorSeparator: indicatorSeparatorCSS,\n input: inputCSS,\n loadingIndicator: loadingIndicatorCSS,\n loadingMessage: loadingMessageCSS,\n menu: menuCSS,\n menuList: menuListCSS,\n menuPortal: menuPortalCSS,\n multiValue: multiValueCSS,\n multiValueLabel: multiValueLabelCSS,\n multiValueRemove: multiValueRemoveCSS,\n noOptionsMessage: noOptionsMessageCSS,\n option: optionCSS,\n placeholder: placeholderCSS,\n singleValue: css$2,\n valueContainer: valueContainerCSS\n};\n\n// Merge Utility\n// Allows consumers to extend a base Select with additional styles\n\nfunction mergeStyles(source) {\n var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // initialize with source styles\n var styles = _extends({}, source);\n\n // massage in target styles\n Object.keys(target).forEach(function (key) {\n if (source[key]) {\n styles[key] = function (rsCss, props) {\n return target[key](source[key](rsCss, props), props);\n };\n } else {\n styles[key] = target[key];\n }\n });\n\n return styles;\n}\n\nvar colors = {\n primary: '#2684FF',\n primary75: '#4C9AFF',\n primary50: '#B2D4FF',\n primary25: '#DEEBFF',\n\n danger: '#DE350B',\n dangerLight: '#FFBDAD',\n\n neutral0: 'hsl(0, 0%, 100%)',\n neutral5: 'hsl(0, 0%, 95%)',\n neutral10: 'hsl(0, 0%, 90%)',\n neutral20: 'hsl(0, 0%, 80%)',\n neutral30: 'hsl(0, 0%, 70%)',\n neutral40: 'hsl(0, 0%, 60%)',\n neutral50: 'hsl(0, 0%, 50%)',\n neutral60: 'hsl(0, 0%, 40%)',\n neutral70: 'hsl(0, 0%, 30%)',\n neutral80: 'hsl(0, 0%, 20%)',\n neutral90: 'hsl(0, 0%, 10%)'\n};\n\nvar borderRadius = 4;\nvar baseUnit = 4; /* Used to calculate consistent margin/padding on elements */\nvar controlHeight = 38; /* The minimum height of the control */\nvar menuGutter = baseUnit * 2; /* The amount of space between the control and menu */\n\nvar spacing = {\n baseUnit: baseUnit,\n controlHeight: controlHeight,\n menuGutter: menuGutter\n};\n\nvar defaultTheme = {\n borderRadius: borderRadius,\n colors: colors,\n spacing: spacing\n};\n\nvar defaultProps = {\n backspaceRemovesValue: true,\n blurInputOnSelect: isTouchCapable(),\n captureMenuScroll: !isTouchCapable(),\n closeMenuOnSelect: true,\n closeMenuOnScroll: false,\n components: {},\n controlShouldRenderValue: true,\n escapeClearsValue: false,\n filterOption: createFilter(),\n formatGroupLabel: formatGroupLabel,\n getOptionLabel: getOptionLabel,\n getOptionValue: getOptionValue,\n isDisabled: false,\n isLoading: false,\n isMulti: false,\n isRtl: false,\n isSearchable: true,\n isOptionDisabled: isOptionDisabled,\n loadingMessage: function loadingMessage() {\n return 'Loading...';\n },\n maxMenuHeight: 300,\n minMenuHeight: 140,\n menuIsOpen: false,\n menuPlacement: 'bottom',\n menuPosition: 'absolute',\n menuShouldBlockScroll: false,\n menuShouldScrollIntoView: !isMobileDevice(),\n noOptionsMessage: function noOptionsMessage() {\n return 'No options';\n },\n openMenuOnFocus: false,\n openMenuOnClick: true,\n options: [],\n pageSize: 5,\n placeholder: 'Select...',\n screenReaderStatus: function screenReaderStatus(_ref) {\n var count = _ref.count;\n return count + ' result' + (count !== 1 ? 's' : '') + ' available';\n },\n styles: {},\n tabIndex: '0',\n tabSelectsValue: true\n};\n\nvar instanceId = 1;\n\nvar Select = function (_Component) {\n inherits(Select, _Component);\n\n // Lifecycle\n // ------------------------------\n\n // Refs\n // ------------------------------\n\n // Misc. Instance Properties\n // ------------------------------\n\n function Select(props) {\n classCallCheck(this, Select);\n\n var _this = possibleConstructorReturn(this, (Select.__proto__ || Object.getPrototypeOf(Select)).call(this, props));\n\n _initialiseProps.call(_this);\n\n var value = props.value;\n\n _this.cacheComponents = Object(memoize_one__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_this.cacheComponents, exportedEqual).bind(_this);\n _this.cacheComponents(props.components);\n _this.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId);\n\n var selectValue = cleanValue(value);\n var menuOptions = _this.buildMenuOptions(props, selectValue);\n\n _this.state.menuOptions = menuOptions;\n _this.state.selectValue = selectValue;\n return _this;\n } // TODO\n\n\n createClass(Select, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.startListeningComposition();\n this.startListeningToTouch();\n\n if (this.props.closeMenuOnScroll && document && document.addEventListener) {\n // Listen to all scroll events, and filter them out inside of 'onScroll'\n document.addEventListener('scroll', this.onScroll, true);\n }\n\n if (this.props.autoFocus) {\n this.focusInput();\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n var _props = this.props,\n options = _props.options,\n value = _props.value,\n inputValue = _props.inputValue;\n // re-cache custom components\n\n this.cacheComponents(nextProps.components);\n // rebuild the menu options\n if (nextProps.value !== value || nextProps.options !== options || nextProps.inputValue !== inputValue) {\n var _selectValue = cleanValue(nextProps.value);\n var _menuOptions = this.buildMenuOptions(nextProps, _selectValue);\n var _focusedValue = this.getNextFocusedValue(_selectValue);\n var _focusedOption = this.getNextFocusedOption(_menuOptions.focusable);\n this.setState({ menuOptions: _menuOptions, selectValue: _selectValue, focusedOption: _focusedOption, focusedValue: _focusedValue });\n }\n // some updates should toggle the state of the input visibility\n if (this.inputIsHiddenAfterUpdate != null) {\n this.setState({\n inputIsHidden: this.inputIsHiddenAfterUpdate\n });\n delete this.inputIsHiddenAfterUpdate;\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n var _props2 = this.props,\n isDisabled = _props2.isDisabled,\n menuIsOpen = _props2.menuIsOpen;\n var isFocused = this.state.isFocused;\n\n\n if (\n // ensure focus is restored correctly when the control becomes enabled\n isFocused && !isDisabled && prevProps.isDisabled ||\n // ensure focus is on the Input when the menu opens\n isFocused && menuIsOpen && !prevProps.menuIsOpen) {\n this.focusInput();\n }\n\n // scroll the focused option into view if necessary\n if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) {\n scrollIntoView(this.menuListRef, this.focusedOptionRef);\n }\n this.scrollToFocusedOptionOnUpdate = false;\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.stopListeningComposition();\n this.stopListeningToTouch();\n document.removeEventListener('scroll', this.onScroll, true);\n }\n }, {\n key: 'onMenuOpen',\n\n // ==============================\n // Consumer Handlers\n // ==============================\n\n value: function onMenuOpen() {\n this.props.onMenuOpen();\n }\n }, {\n key: 'onMenuClose',\n value: function onMenuClose() {\n var _props3 = this.props,\n isSearchable = _props3.isSearchable,\n isMulti = _props3.isMulti;\n\n this.announceAriaLiveContext({\n event: 'input',\n context: { isSearchable: isSearchable, isMulti: isMulti }\n });\n this.onInputChange('', { action: 'menu-close' });\n this.props.onMenuClose();\n }\n }, {\n key: 'onInputChange',\n value: function onInputChange(newValue, actionMeta) {\n this.props.onInputChange(newValue, actionMeta);\n }\n\n // ==============================\n // Methods\n // ==============================\n\n }, {\n key: 'focusInput',\n value: function focusInput() {\n if (!this.inputRef) return;\n this.inputRef.focus();\n }\n }, {\n key: 'blurInput',\n value: function blurInput() {\n if (!this.inputRef) return;\n this.inputRef.blur();\n }\n\n // aliased for consumers\n\n }, {\n key: 'openMenu',\n value: function openMenu(focusOption) {\n var _state = this.state,\n menuOptions = _state.menuOptions,\n selectValue = _state.selectValue;\n var isMulti = this.props.isMulti;\n\n var openAtIndex = focusOption === 'first' ? 0 : menuOptions.focusable.length - 1;\n\n if (!isMulti) {\n var selectedIndex = menuOptions.focusable.indexOf(selectValue[0]);\n if (selectedIndex > -1) {\n openAtIndex = selectedIndex;\n }\n }\n\n this.scrollToFocusedOptionOnUpdate = true;\n this.inputIsHiddenAfterUpdate = false;\n\n this.onMenuOpen();\n this.setState({\n focusedValue: null,\n focusedOption: menuOptions.focusable[openAtIndex]\n });\n\n this.announceAriaLiveContext({ event: 'menu' });\n }\n }, {\n key: 'focusValue',\n value: function focusValue(direction) {\n var _props4 = this.props,\n isMulti = _props4.isMulti,\n isSearchable = _props4.isSearchable;\n var _state2 = this.state,\n selectValue = _state2.selectValue,\n focusedValue = _state2.focusedValue;\n\n // Only multiselects support value focusing\n\n if (!isMulti) return;\n\n this.setState({\n focusedOption: null\n });\n\n var focusedIndex = selectValue.indexOf(focusedValue);\n if (!focusedValue) {\n focusedIndex = -1;\n this.announceAriaLiveContext({ event: 'value' });\n }\n\n var lastIndex = selectValue.length - 1;\n var nextFocus = -1;\n if (!selectValue.length) return;\n\n switch (direction) {\n case 'previous':\n if (focusedIndex === 0) {\n // don't cycle from the start to the end\n nextFocus = 0;\n } else if (focusedIndex === -1) {\n // if nothing is focused, focus the last value first\n nextFocus = lastIndex;\n } else {\n nextFocus = focusedIndex - 1;\n }\n break;\n case 'next':\n if (focusedIndex > -1 && focusedIndex < lastIndex) {\n nextFocus = focusedIndex + 1;\n }\n break;\n }\n\n if (nextFocus === -1) {\n this.announceAriaLiveContext({\n event: 'input',\n context: { isSearchable: isSearchable, isMulti: isMulti }\n });\n }\n\n this.setState({\n inputIsHidden: nextFocus === -1 ? false : true,\n focusedValue: selectValue[nextFocus]\n });\n }\n }, {\n key: 'focusOption',\n value: function focusOption() {\n var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first';\n var pageSize = this.props.pageSize;\n var _state3 = this.state,\n focusedOption = _state3.focusedOption,\n menuOptions = _state3.menuOptions;\n\n var options = menuOptions.focusable;\n\n if (!options.length) return;\n var nextFocus = 0; // handles 'first'\n var focusedIndex = options.indexOf(focusedOption);\n if (!focusedOption) {\n focusedIndex = -1;\n this.announceAriaLiveContext({ event: 'menu' });\n }\n\n if (direction === 'up') {\n nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1;\n } else if (direction === 'down') {\n nextFocus = (focusedIndex + 1) % options.length;\n } else if (direction === 'pageup') {\n nextFocus = focusedIndex - pageSize;\n if (nextFocus < 0) nextFocus = 0;\n } else if (direction === 'pagedown') {\n nextFocus = focusedIndex + pageSize;\n if (nextFocus > options.length - 1) nextFocus = options.length - 1;\n } else if (direction === 'last') {\n nextFocus = options.length - 1;\n }\n this.scrollToFocusedOptionOnUpdate = true;\n this.setState({\n focusedOption: options[nextFocus],\n focusedValue: null\n });\n }\n }, {\n key: 'getTheme',\n\n\n // ==============================\n // Getters\n // ==============================\n\n value: function getTheme() {\n // Use the default theme if there are no customizations.\n if (!this.props.theme) {\n return defaultTheme;\n }\n // If the theme prop is a function, assume the function\n // knows how to merge the passed-in default theme with\n // its own modifications.\n if (typeof this.props.theme === 'function') {\n return this.props.theme(defaultTheme);\n }\n // Otherwise, if a plain theme object was passed in,\n // overlay it with the default theme.\n return _extends({}, defaultTheme, this.props.theme);\n }\n }, {\n key: 'getCommonProps',\n value: function getCommonProps() {\n var clearValue = this.clearValue,\n getStyles = this.getStyles,\n setValue = this.setValue,\n selectOption = this.selectOption,\n props = this.props;\n var classNamePrefix = props.classNamePrefix,\n isMulti = props.isMulti,\n isRtl = props.isRtl,\n options = props.options;\n var selectValue = this.state.selectValue;\n\n var hasValue = this.hasValue();\n var getValue = function getValue() {\n return selectValue;\n };\n var cxPrefix = classNamePrefix;\n\n var cx = classNames.bind(null, cxPrefix);\n return {\n cx: cx,\n clearValue: clearValue,\n getStyles: getStyles,\n getValue: getValue,\n hasValue: hasValue,\n isMulti: isMulti,\n isRtl: isRtl,\n options: options,\n selectOption: selectOption,\n setValue: setValue,\n selectProps: props,\n theme: this.getTheme()\n };\n }\n }, {\n key: 'getNextFocusedValue',\n value: function getNextFocusedValue(nextSelectValue) {\n if (this.clearFocusValueOnUpdate) {\n this.clearFocusValueOnUpdate = false;\n return null;\n }\n var _state4 = this.state,\n focusedValue = _state4.focusedValue,\n lastSelectValue = _state4.selectValue;\n\n var lastFocusedIndex = lastSelectValue.indexOf(focusedValue);\n if (lastFocusedIndex > -1) {\n var nextFocusedIndex = nextSelectValue.indexOf(focusedValue);\n if (nextFocusedIndex > -1) {\n // the focused value is still in the selectValue, return it\n return focusedValue;\n } else if (lastFocusedIndex < nextSelectValue.length) {\n // the focusedValue is not present in the next selectValue array by\n // reference, so return the new value at the same index\n return nextSelectValue[lastFocusedIndex];\n }\n }\n return null;\n }\n }, {\n key: 'getNextFocusedOption',\n value: function getNextFocusedOption(options) {\n var lastFocusedOption = this.state.focusedOption;\n\n return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0];\n }\n\n // ==============================\n // Helpers\n // ==============================\n\n }, {\n key: 'hasValue',\n value: function hasValue() {\n var selectValue = this.state.selectValue;\n\n return selectValue.length > 0;\n }\n }, {\n key: 'hasOptions',\n value: function hasOptions() {\n return !!this.state.menuOptions.render.length;\n }\n }, {\n key: 'countOptions',\n value: function countOptions() {\n return this.state.menuOptions.focusable.length;\n }\n }, {\n key: 'isClearable',\n value: function isClearable() {\n var _props5 = this.props,\n isClearable = _props5.isClearable,\n isMulti = _props5.isMulti;\n\n // single select, by default, IS NOT clearable\n // multi select, by default, IS clearable\n\n if (isClearable === undefined) return isMulti;\n\n return isClearable;\n }\n }, {\n key: 'isOptionDisabled',\n value: function isOptionDisabled$$1(option, selectValue) {\n return typeof this.props.isOptionDisabled === 'function' ? this.props.isOptionDisabled(option, selectValue) : false;\n }\n }, {\n key: 'isOptionSelected',\n value: function isOptionSelected(option, selectValue) {\n var _this2 = this;\n\n if (selectValue.indexOf(option) > -1) return true;\n if (typeof this.props.isOptionSelected === 'function') {\n return this.props.isOptionSelected(option, selectValue);\n }\n var candidate = this.getOptionValue(option);\n return selectValue.some(function (i) {\n return _this2.getOptionValue(i) === candidate;\n });\n }\n }, {\n key: 'filterOption',\n value: function filterOption(option, inputValue) {\n return this.props.filterOption ? this.props.filterOption(option, inputValue) : true;\n }\n }, {\n key: 'formatOptionLabel',\n value: function formatOptionLabel(data, context) {\n if (typeof this.props.formatOptionLabel === 'function') {\n var _inputValue = this.props.inputValue;\n var _selectValue2 = this.state.selectValue;\n\n return this.props.formatOptionLabel(data, {\n context: context,\n inputValue: _inputValue,\n selectValue: _selectValue2\n });\n } else {\n return this.getOptionLabel(data);\n }\n }\n }, {\n key: 'formatGroupLabel',\n value: function formatGroupLabel$$1(data) {\n return this.props.formatGroupLabel(data);\n }\n\n // ==============================\n // Mouse Handlers\n // ==============================\n\n }, {\n key: 'startListeningComposition',\n\n\n // ==============================\n // Composition Handlers\n // ==============================\n\n value: function startListeningComposition() {\n if (document && document.addEventListener) {\n document.addEventListener('compositionstart', this.onCompositionStart, false);\n document.addEventListener('compositionend', this.onCompositionEnd, false);\n }\n }\n }, {\n key: 'stopListeningComposition',\n value: function stopListeningComposition() {\n if (document && document.removeEventListener) {\n document.removeEventListener('compositionstart', this.onCompositionStart);\n document.removeEventListener('compositionend', this.onCompositionEnd);\n }\n }\n }, {\n key: 'startListeningToTouch',\n\n\n // ==============================\n // Touch Handlers\n // ==============================\n\n value: function startListeningToTouch() {\n if (document && document.addEventListener) {\n document.addEventListener('touchstart', this.onTouchStart, false);\n document.addEventListener('touchmove', this.onTouchMove, false);\n document.addEventListener('touchend', this.onTouchEnd, false);\n }\n }\n }, {\n key: 'stopListeningToTouch',\n value: function stopListeningToTouch() {\n if (document && document.removeEventListener) {\n document.removeEventListener('touchstart', this.onTouchStart);\n document.removeEventListener('touchmove', this.onTouchMove);\n document.removeEventListener('touchend', this.onTouchEnd);\n }\n }\n\n // ==============================\n // Focus Handlers\n // ==============================\n\n // ==============================\n // Keyboard Handlers\n // ==============================\n\n }, {\n key: 'buildMenuOptions',\n\n\n // ==============================\n // Menu Options\n // ==============================\n\n value: function buildMenuOptions(props, selectValue) {\n var _this3 = this;\n\n var _props$inputValue = props.inputValue,\n inputValue = _props$inputValue === undefined ? '' : _props$inputValue,\n options = props.options;\n\n\n var toOption = function toOption(option, id) {\n var isDisabled = _this3.isOptionDisabled(option, selectValue);\n var isSelected = _this3.isOptionSelected(option, selectValue);\n var label = _this3.getOptionLabel(option);\n var value = _this3.getOptionValue(option);\n\n if (_this3.shouldHideSelectedOptions() && isSelected || !_this3.filterOption({ label: label, value: value, data: option }, inputValue)) {\n return;\n }\n\n var onHover = isDisabled ? undefined : function () {\n return _this3.onOptionHover(option);\n };\n var onSelect = isDisabled ? undefined : function () {\n return _this3.selectOption(option);\n };\n var optionId = _this3.getElementId('option') + '-' + id;\n\n return {\n innerProps: {\n id: optionId,\n onClick: onSelect,\n onMouseMove: onHover,\n onMouseOver: onHover,\n role: 'option',\n tabIndex: -1\n },\n data: option,\n isDisabled: isDisabled,\n isSelected: isSelected,\n key: optionId,\n label: label,\n type: 'option',\n value: value\n };\n };\n\n return options.reduce(function (acc, item, itemIndex) {\n if (item.options) {\n // TODO needs a tidier implementation\n if (!_this3.hasGroups) _this3.hasGroups = true;\n\n var items = item.options;\n\n var children = items.map(function (child, i) {\n var option = toOption(child, itemIndex + '-' + i);\n if (option && !option.isDisabled) acc.focusable.push(child);\n return option;\n }).filter(Boolean);\n if (children.length) {\n var groupId = _this3.getElementId('group') + '-' + itemIndex;\n acc.render.push({\n type: 'group',\n key: groupId,\n data: item,\n options: children\n });\n }\n } else {\n var option = toOption(item, '' + itemIndex);\n if (option) {\n acc.render.push(option);\n if (!option.isDisabled) acc.focusable.push(item);\n }\n }\n return acc;\n }, { render: [], focusable: [] });\n }\n\n // ==============================\n // Renderers\n // ==============================\n\n }, {\n key: 'constructAriaLiveMessage',\n value: function constructAriaLiveMessage() {\n var _state5 = this.state,\n ariaLiveContext = _state5.ariaLiveContext,\n selectValue = _state5.selectValue,\n focusedValue = _state5.focusedValue,\n focusedOption = _state5.focusedOption;\n var _props6 = this.props,\n options = _props6.options,\n menuIsOpen = _props6.menuIsOpen,\n inputValue = _props6.inputValue,\n screenReaderStatus = _props6.screenReaderStatus;\n\n // An aria live message representing the currently focused value in the select.\n\n var focusedValueMsg = focusedValue ? valueFocusAriaMessage({\n focusedValue: focusedValue,\n getOptionLabel: this.getOptionLabel,\n selectValue: selectValue\n }) : '';\n // An aria live message representing the currently focused option in the select.\n var focusedOptionMsg = focusedOption && menuIsOpen ? optionFocusAriaMessage({\n focusedOption: focusedOption,\n getOptionLabel: this.getOptionLabel,\n options: options\n }) : '';\n // An aria live message representing the set of focusable results and current searchterm/inputvalue.\n var resultsMsg = resultsAriaMessage({\n inputValue: inputValue,\n screenReaderMessage: screenReaderStatus({ count: this.countOptions() })\n });\n\n return focusedValueMsg + ' ' + focusedOptionMsg + ' ' + resultsMsg + ' ' + ariaLiveContext;\n }\n }, {\n key: 'renderInput',\n value: function renderInput() {\n var _props7 = this.props,\n isDisabled = _props7.isDisabled,\n isSearchable = _props7.isSearchable,\n inputId = _props7.inputId,\n inputValue = _props7.inputValue,\n tabIndex = _props7.tabIndex;\n var Input = this.components.Input;\n var inputIsHidden = this.state.inputIsHidden;\n\n\n var id = inputId || this.getElementId('input');\n\n if (!isSearchable) {\n // use a dummy input to maintain focus/blur functionality\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(DummyInput, {\n id: id,\n innerRef: this.getInputRef,\n onBlur: this.onInputBlur,\n onChange: noop,\n onFocus: this.onInputFocus,\n readOnly: true,\n tabIndex: tabIndex,\n value: ''\n });\n }\n\n // aria attributes makes the JSX \"noisy\", separated for clarity\n var ariaAttributes = {\n 'aria-autocomplete': 'list',\n 'aria-label': this.props['aria-label'],\n 'aria-labelledby': this.props['aria-labelledby']\n };\n\n var _commonProps = this.commonProps,\n cx = _commonProps.cx,\n theme = _commonProps.theme;\n\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Input, _extends({\n autoCapitalize: 'none',\n autoComplete: 'off',\n autoCorrect: 'off',\n cx: cx,\n getStyles: this.getStyles,\n id: id,\n innerRef: this.getInputRef,\n isDisabled: isDisabled,\n isHidden: inputIsHidden,\n onBlur: this.onInputBlur,\n onChange: this.handleInputChange,\n onFocus: this.onInputFocus,\n spellCheck: 'false',\n tabIndex: tabIndex,\n theme: theme,\n type: 'text',\n value: inputValue\n }, ariaAttributes));\n }\n }, {\n key: 'renderPlaceholderOrValue',\n value: function renderPlaceholderOrValue() {\n var _this4 = this;\n\n var _components = this.components,\n MultiValue = _components.MultiValue,\n MultiValueContainer = _components.MultiValueContainer,\n MultiValueLabel = _components.MultiValueLabel,\n MultiValueRemove = _components.MultiValueRemove,\n SingleValue = _components.SingleValue,\n Placeholder = _components.Placeholder;\n var commonProps = this.commonProps;\n var _props8 = this.props,\n controlShouldRenderValue = _props8.controlShouldRenderValue,\n isDisabled = _props8.isDisabled,\n isMulti = _props8.isMulti,\n inputValue = _props8.inputValue,\n placeholder = _props8.placeholder;\n var _state6 = this.state,\n selectValue = _state6.selectValue,\n focusedValue = _state6.focusedValue;\n\n\n if (!this.hasValue() || !controlShouldRenderValue) {\n return inputValue ? null : react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n Placeholder,\n _extends({}, commonProps, { key: 'placeholder', isDisabled: isDisabled }),\n placeholder\n );\n }\n\n if (isMulti) {\n var selectValues = selectValue.map(function (opt) {\n var isFocused = opt === focusedValue;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n MultiValue,\n _extends({}, commonProps, {\n components: {\n Container: MultiValueContainer,\n Label: MultiValueLabel,\n Remove: MultiValueRemove\n },\n isFocused: isFocused,\n isDisabled: isDisabled,\n key: _this4.getOptionValue(opt),\n removeProps: {\n onClick: function onClick() {\n return _this4.removeValue(opt);\n },\n onTouchEnd: function onTouchEnd() {\n return _this4.removeValue(opt);\n },\n onMouseDown: function onMouseDown(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n },\n data: opt\n }),\n _this4.formatOptionLabel(opt, 'value')\n );\n });\n return selectValues;\n }\n\n if (inputValue) {\n return null;\n }\n\n var singleValue = selectValue[0];\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n SingleValue,\n _extends({}, commonProps, { data: singleValue, isDisabled: isDisabled }),\n this.formatOptionLabel(singleValue, 'value')\n );\n }\n }, {\n key: 'renderClearIndicator',\n value: function renderClearIndicator() {\n var ClearIndicator = this.components.ClearIndicator;\n var commonProps = this.commonProps;\n var _props9 = this.props,\n isDisabled = _props9.isDisabled,\n isLoading = _props9.isLoading;\n var isFocused = this.state.isFocused;\n\n\n if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {\n return null;\n }\n\n var innerProps = {\n onMouseDown: this.onClearIndicatorMouseDown,\n onTouchEnd: this.onClearIndicatorTouchEnd,\n 'aria-hidden': 'true'\n };\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(ClearIndicator, _extends({}, commonProps, {\n innerProps: innerProps,\n isFocused: isFocused\n }));\n }\n }, {\n key: 'renderLoadingIndicator',\n value: function renderLoadingIndicator() {\n var LoadingIndicator = this.components.LoadingIndicator;\n var commonProps = this.commonProps;\n var _props10 = this.props,\n isDisabled = _props10.isDisabled,\n isLoading = _props10.isLoading;\n var isFocused = this.state.isFocused;\n\n\n if (!LoadingIndicator || !isLoading) return null;\n\n var innerProps = { 'aria-hidden': 'true' };\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(LoadingIndicator, _extends({}, commonProps, {\n innerProps: innerProps,\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n }\n }, {\n key: 'renderIndicatorSeparator',\n value: function renderIndicatorSeparator() {\n var _components2 = this.components,\n DropdownIndicator = _components2.DropdownIndicator,\n IndicatorSeparator = _components2.IndicatorSeparator;\n\n // separator doesn't make sense without the dropdown indicator\n\n if (!DropdownIndicator || !IndicatorSeparator) return null;\n\n var commonProps = this.commonProps;\n var isDisabled = this.props.isDisabled;\n var isFocused = this.state.isFocused;\n\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(IndicatorSeparator, _extends({}, commonProps, {\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n }\n }, {\n key: 'renderDropdownIndicator',\n value: function renderDropdownIndicator() {\n var DropdownIndicator = this.components.DropdownIndicator;\n\n if (!DropdownIndicator) return null;\n var commonProps = this.commonProps;\n var isDisabled = this.props.isDisabled;\n var isFocused = this.state.isFocused;\n\n\n var innerProps = {\n onMouseDown: this.onDropdownIndicatorMouseDown,\n onTouchEnd: this.onDropdownIndicatorTouchEnd,\n 'aria-hidden': 'true'\n };\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(DropdownIndicator, _extends({}, commonProps, {\n innerProps: innerProps,\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n }\n }, {\n key: 'renderMenu',\n value: function renderMenu() {\n var _this5 = this;\n\n var _components3 = this.components,\n Group = _components3.Group,\n GroupHeading = _components3.GroupHeading,\n Menu$$1 = _components3.Menu,\n MenuList$$1 = _components3.MenuList,\n MenuPortal$$1 = _components3.MenuPortal,\n LoadingMessage$$1 = _components3.LoadingMessage,\n NoOptionsMessage$$1 = _components3.NoOptionsMessage,\n Option = _components3.Option;\n var commonProps = this.commonProps;\n var _state7 = this.state,\n focusedOption = _state7.focusedOption,\n menuOptions = _state7.menuOptions;\n var _props11 = this.props,\n captureMenuScroll = _props11.captureMenuScroll,\n inputValue = _props11.inputValue,\n isLoading = _props11.isLoading,\n loadingMessage = _props11.loadingMessage,\n minMenuHeight = _props11.minMenuHeight,\n maxMenuHeight = _props11.maxMenuHeight,\n menuIsOpen = _props11.menuIsOpen,\n menuPlacement = _props11.menuPlacement,\n menuPosition = _props11.menuPosition,\n menuPortalTarget = _props11.menuPortalTarget,\n menuShouldBlockScroll = _props11.menuShouldBlockScroll,\n menuShouldScrollIntoView = _props11.menuShouldScrollIntoView,\n noOptionsMessage = _props11.noOptionsMessage,\n onMenuScrollToTop = _props11.onMenuScrollToTop,\n onMenuScrollToBottom = _props11.onMenuScrollToBottom;\n\n\n if (!menuIsOpen) return null;\n\n // TODO: Internal Option Type here\n var render = function render(props) {\n // for performance, the menu options in state aren't changed when the\n // focused option changes so we calculate additional props based on that\n var isFocused = focusedOption === props.data;\n props.innerRef = isFocused ? _this5.getFocusedOptionRef : undefined;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n Option,\n _extends({}, commonProps, props, { isFocused: isFocused }),\n _this5.formatOptionLabel(props.data, 'menu')\n );\n };\n\n var menuUI = void 0;\n\n if (this.hasOptions()) {\n menuUI = menuOptions.render.map(function (item) {\n if (item.type === 'group') {\n var type = item.type,\n group = objectWithoutProperties(item, ['type']);\n\n var headingId = item.key + '-heading';\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n Group,\n _extends({}, commonProps, group, {\n Heading: GroupHeading,\n headingProps: {\n id: headingId\n },\n label: _this5.formatGroupLabel(item.data)\n }),\n item.options.map(function (option) {\n return render(option);\n })\n );\n } else if (item.type === 'option') {\n return render(item);\n }\n });\n } else if (isLoading) {\n var message = loadingMessage({ inputValue: inputValue });\n if (message === null) return null;\n menuUI = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n LoadingMessage$$1,\n commonProps,\n message\n );\n } else {\n var _message = noOptionsMessage({ inputValue: inputValue });\n if (_message === null) return null;\n menuUI = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n NoOptionsMessage$$1,\n commonProps,\n _message\n );\n }\n var menuPlacementProps = {\n minMenuHeight: minMenuHeight,\n maxMenuHeight: maxMenuHeight,\n menuPlacement: menuPlacement,\n menuPosition: menuPosition,\n menuShouldScrollIntoView: menuShouldScrollIntoView\n };\n\n var menuElement = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n MenuPlacer,\n _extends({}, commonProps, menuPlacementProps),\n function (_ref2) {\n var ref = _ref2.ref,\n _ref2$placerProps = _ref2.placerProps,\n placement = _ref2$placerProps.placement,\n maxHeight = _ref2$placerProps.maxHeight;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n Menu$$1,\n _extends({}, commonProps, menuPlacementProps, {\n innerRef: ref,\n innerProps: {\n onMouseDown: _this5.onMenuMouseDown,\n onMouseMove: _this5.onMenuMouseMove\n },\n isLoading: isLoading,\n placement: placement\n }),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n ScrollCaptorSwitch,\n {\n isEnabled: captureMenuScroll,\n onTopArrive: onMenuScrollToTop,\n onBottomArrive: onMenuScrollToBottom\n },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n ScrollBlock,\n { isEnabled: menuShouldBlockScroll },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n MenuList$$1,\n _extends({}, commonProps, {\n innerRef: _this5.getMenuListRef,\n isLoading: isLoading,\n maxHeight: maxHeight\n }),\n menuUI\n )\n )\n )\n );\n }\n );\n\n // positioning behaviour is almost identical for portalled and fixed,\n // so we use the same component. the actual portalling logic is forked\n // within the component based on `menuPosition`\n return menuPortalTarget || menuPosition === 'fixed' ? react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n MenuPortal$$1,\n _extends({}, commonProps, {\n appendTo: menuPortalTarget,\n controlElement: this.controlRef,\n menuPlacement: menuPlacement,\n menuPosition: menuPosition\n }),\n menuElement\n ) : menuElement;\n }\n }, {\n key: 'renderFormField',\n value: function renderFormField() {\n var _this6 = this;\n\n var _props12 = this.props,\n delimiter = _props12.delimiter,\n isDisabled = _props12.isDisabled,\n isMulti = _props12.isMulti,\n name = _props12.name;\n var selectValue = this.state.selectValue;\n\n\n if (!name || isDisabled) return;\n\n if (isMulti) {\n if (delimiter) {\n var _value = selectValue.map(function (opt) {\n return _this6.getOptionValue(opt);\n }).join(delimiter);\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('input', { name: name, type: 'hidden', value: _value });\n } else {\n var input = selectValue.length > 0 ? selectValue.map(function (opt, i) {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('input', {\n key: 'i-' + i,\n name: name,\n type: 'hidden',\n value: _this6.getOptionValue(opt)\n });\n }) : react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('input', { name: name, type: 'hidden' });\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n null,\n input\n );\n }\n } else {\n var _value2 = selectValue[0] ? this.getOptionValue(selectValue[0]) : '';\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('input', { name: name, type: 'hidden', value: _value2 });\n }\n }\n }, {\n key: 'renderLiveRegion',\n value: function renderLiveRegion() {\n if (!this.state.isFocused) return null;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n A11yText,\n { 'aria-live': 'assertive' },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'p',\n { id: 'aria-selection-event' },\n '\\xA0',\n this.state.ariaLiveSelection\n ),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'p',\n { id: 'aria-context' },\n '\\xA0',\n this.constructAriaLiveMessage()\n )\n );\n }\n }, {\n key: 'render',\n value: function render() {\n var _components4 = this.components,\n Control = _components4.Control,\n IndicatorsContainer = _components4.IndicatorsContainer,\n SelectContainer = _components4.SelectContainer,\n ValueContainer = _components4.ValueContainer;\n var _props13 = this.props,\n className = _props13.className,\n id = _props13.id,\n isDisabled = _props13.isDisabled;\n var isFocused = this.state.isFocused;\n\n\n var commonProps = this.commonProps = this.getCommonProps();\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n SelectContainer,\n _extends({}, commonProps, {\n className: className,\n innerProps: {\n id: id,\n onKeyDown: this.onKeyDown\n },\n isDisabled: isDisabled,\n isFocused: isFocused\n }),\n this.renderLiveRegion(),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n Control,\n _extends({}, commonProps, {\n innerRef: this.getControlRef,\n innerProps: {\n onMouseDown: this.onControlMouseDown,\n onTouchEnd: this.onControlTouchEnd\n },\n isDisabled: isDisabled,\n isFocused: isFocused\n }),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n ValueContainer,\n _extends({}, commonProps, { isDisabled: isDisabled }),\n this.renderPlaceholderOrValue(),\n this.renderInput()\n ),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n IndicatorsContainer,\n _extends({}, commonProps, { isDisabled: isDisabled }),\n this.renderClearIndicator(),\n this.renderLoadingIndicator(),\n this.renderIndicatorSeparator(),\n this.renderDropdownIndicator()\n )\n ),\n this.renderMenu(),\n this.renderFormField()\n );\n }\n }]);\n return Select;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\n\nSelect.defaultProps = defaultProps;\n\nvar _initialiseProps = function _initialiseProps() {\n var _this7 = this;\n\n this.state = {\n ariaLiveSelection: '',\n ariaLiveContext: '',\n focusedOption: null,\n focusedValue: null,\n inputIsHidden: false,\n isFocused: false,\n isComposing: false,\n menuOptions: { render: [], focusable: [] },\n selectValue: []\n };\n this.blockOptionHover = false;\n this.clearFocusValueOnUpdate = false;\n this.hasGroups = false;\n this.initialTouchX = 0;\n this.initialTouchY = 0;\n this.instancePrefix = '';\n this.openAfterFocus = false;\n this.scrollToFocusedOptionOnUpdate = false;\n this.controlRef = null;\n\n this.getControlRef = function (ref) {\n _this7.controlRef = ref;\n };\n\n this.focusedOptionRef = null;\n\n this.getFocusedOptionRef = function (ref) {\n _this7.focusedOptionRef = ref;\n };\n\n this.menuListRef = null;\n\n this.getMenuListRef = function (ref) {\n _this7.menuListRef = ref;\n };\n\n this.inputRef = null;\n\n this.getInputRef = function (ref) {\n _this7.inputRef = ref;\n };\n\n this.cacheComponents = function (components$$1) {\n _this7.components = defaultComponents({ components: components$$1 });\n };\n\n this.focus = this.focusInput;\n this.blur = this.blurInput;\n\n this.setValue = function (newValue) {\n var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'set-value';\n var option = arguments[2];\n var _props14 = _this7.props,\n closeMenuOnSelect = _props14.closeMenuOnSelect,\n isMulti = _props14.isMulti,\n onChange = _props14.onChange;\n\n _this7.onInputChange('', { action: 'set-value' });\n if (closeMenuOnSelect) {\n _this7.inputIsHiddenAfterUpdate = !isMulti;\n _this7.onMenuClose();\n }\n // when the select value should change, we should reset focusedValue\n _this7.clearFocusValueOnUpdate = true;\n onChange(newValue, { action: action, option: option });\n };\n\n this.selectOption = function (newValue) {\n var _props15 = _this7.props,\n blurInputOnSelect = _props15.blurInputOnSelect,\n isMulti = _props15.isMulti;\n\n\n if (isMulti) {\n var _selectValue3 = _this7.state.selectValue;\n\n if (_this7.isOptionSelected(newValue, _selectValue3)) {\n var candidate = _this7.getOptionValue(newValue);\n _this7.setValue(_selectValue3.filter(function (i) {\n return _this7.getOptionValue(i) !== candidate;\n }), 'deselect-option', newValue);\n _this7.announceAriaLiveSelection({\n event: 'deselect-option',\n context: { value: _this7.getOptionLabel(newValue) }\n });\n } else {\n _this7.setValue([].concat(toConsumableArray(_selectValue3), [newValue]), 'select-option', newValue);\n _this7.announceAriaLiveSelection({\n event: 'select-option',\n context: { value: _this7.getOptionLabel(newValue) }\n });\n }\n } else {\n _this7.setValue(newValue, 'select-option');\n _this7.announceAriaLiveSelection({\n event: 'select-option',\n context: { value: _this7.getOptionLabel(newValue) }\n });\n }\n\n if (blurInputOnSelect) {\n _this7.blurInput();\n }\n };\n\n this.removeValue = function (removedValue) {\n var onChange = _this7.props.onChange;\n var selectValue = _this7.state.selectValue;\n\n var candidate = _this7.getOptionValue(removedValue);\n onChange(selectValue.filter(function (i) {\n return _this7.getOptionValue(i) !== candidate;\n }), {\n action: 'remove-value',\n removedValue: removedValue\n });\n _this7.announceAriaLiveSelection({\n event: 'remove-value',\n context: {\n value: removedValue ? _this7.getOptionLabel(removedValue) : undefined\n }\n });\n _this7.focusInput();\n };\n\n this.clearValue = function () {\n var _props16 = _this7.props,\n isMulti = _props16.isMulti,\n onChange = _props16.onChange;\n\n onChange(isMulti ? [] : null, { action: 'clear' });\n };\n\n this.popValue = function () {\n var onChange = _this7.props.onChange;\n var selectValue = _this7.state.selectValue;\n\n var lastSelectedValue = selectValue[selectValue.length - 1];\n _this7.announceAriaLiveSelection({\n event: 'pop-value',\n context: {\n value: lastSelectedValue ? _this7.getOptionLabel(lastSelectedValue) : undefined\n }\n });\n onChange(selectValue.slice(0, selectValue.length - 1), {\n action: 'pop-value',\n removedValue: lastSelectedValue\n });\n };\n\n this.getOptionLabel = function (data) {\n return _this7.props.getOptionLabel(data);\n };\n\n this.getOptionValue = function (data) {\n return _this7.props.getOptionValue(data);\n };\n\n this.getStyles = function (key, props) {\n var base = defaultStyles[key](props);\n base.boxSizing = 'border-box';\n var custom = _this7.props.styles[key];\n return custom ? custom(base, props) : base;\n };\n\n this.getElementId = function (element) {\n return _this7.instancePrefix + '-' + element;\n };\n\n this.getActiveDescendentId = function () {\n var menuIsOpen = _this7.props.menuIsOpen;\n var _state8 = _this7.state,\n menuOptions = _state8.menuOptions,\n focusedOption = _state8.focusedOption;\n\n\n if (!focusedOption || !menuIsOpen) return undefined;\n\n var index = menuOptions.focusable.indexOf(focusedOption);\n var option = menuOptions.render[index];\n\n return option && option.key;\n };\n\n this.announceAriaLiveSelection = function (_ref3) {\n var event = _ref3.event,\n context = _ref3.context;\n\n _this7.setState({\n ariaLiveSelection: valueEventAriaMessage(event, context)\n });\n };\n\n this.announceAriaLiveContext = function (_ref4) {\n var event = _ref4.event,\n context = _ref4.context;\n\n _this7.setState({\n ariaLiveContext: instructionsAriaMessage(event, _extends({}, context, {\n label: _this7.props['aria-label']\n }))\n });\n };\n\n this.onMenuMouseDown = function (event) {\n if (event.button !== 0) {\n return;\n }\n event.stopPropagation();\n event.preventDefault();\n _this7.focusInput();\n };\n\n this.onMenuMouseMove = function (event) {\n _this7.blockOptionHover = false;\n };\n\n this.onControlMouseDown = function (event) {\n var openMenuOnClick = _this7.props.openMenuOnClick;\n\n if (!_this7.state.isFocused) {\n if (openMenuOnClick) {\n _this7.openAfterFocus = true;\n }\n _this7.focusInput();\n } else if (!_this7.props.menuIsOpen) {\n _this7.openMenu('first');\n } else {\n _this7.onMenuClose();\n }\n // $FlowFixMe HTMLElement type does not have tagName property\n if (event.target.tagName !== 'INPUT') {\n event.preventDefault();\n }\n };\n\n this.onDropdownIndicatorMouseDown = function (event) {\n // ignore mouse events that weren't triggered by the primary button\n if (event && event.type === 'mousedown' && event.button !== 0) {\n return;\n }\n if (_this7.props.isDisabled) return;\n var _props17 = _this7.props,\n isMulti = _props17.isMulti,\n menuIsOpen = _props17.menuIsOpen;\n\n _this7.focusInput();\n if (menuIsOpen) {\n _this7.inputIsHiddenAfterUpdate = !isMulti;\n _this7.onMenuClose();\n } else {\n _this7.openMenu('first');\n }\n event.preventDefault();\n event.stopPropagation();\n };\n\n this.onClearIndicatorMouseDown = function (event) {\n // ignore mouse events that weren't triggered by the primary button\n if (event && event.type === 'mousedown' && event.button !== 0) {\n return;\n }\n _this7.clearValue();\n event.stopPropagation();\n _this7.openAfterFocus = false;\n setTimeout(function () {\n return _this7.focusInput();\n });\n };\n\n this.onScroll = function (event) {\n if (typeof _this7.props.closeMenuOnScroll === 'boolean') {\n if (event.target instanceof HTMLElement && isDocumentElement(event.target)) {\n _this7.props.onMenuClose();\n }\n } else if (typeof _this7.props.closeMenuOnScroll === 'function') {\n if (_this7.props.closeMenuOnScroll(event)) {\n _this7.props.onMenuClose();\n }\n }\n };\n\n this.onCompositionStart = function () {\n _this7.setState({\n isComposing: true\n });\n };\n\n this.onCompositionEnd = function () {\n _this7.setState({\n isComposing: false\n });\n };\n\n this.onTouchStart = function (_ref5) {\n var _ref5$touches = slicedToArray(_ref5.touches, 1),\n touch = _ref5$touches[0];\n\n _this7.initialTouchX = touch.clientX;\n _this7.initialTouchY = touch.clientY;\n _this7.userIsDragging = false;\n };\n\n this.onTouchMove = function (_ref6) {\n var _ref6$touches = slicedToArray(_ref6.touches, 1),\n touch = _ref6$touches[0];\n\n var deltaX = Math.abs(touch.clientX - _this7.initialTouchX);\n var deltaY = Math.abs(touch.clientY - _this7.initialTouchY);\n var moveThreshold = 5;\n\n _this7.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold;\n };\n\n this.onTouchEnd = function (event) {\n if (_this7.userIsDragging) return;\n\n // type cast the EventTarget\n var target = event.target;\n\n // close the menu if the user taps outside\n if (_this7.controlRef && !_this7.controlRef.contains(target) && _this7.menuListRef && !_this7.menuListRef.contains(target)) {\n _this7.blurInput();\n }\n\n // reset move vars\n _this7.initialTouchX = 0;\n _this7.initialTouchY = 0;\n };\n\n this.onControlTouchEnd = function (event) {\n if (_this7.userIsDragging) return;\n\n _this7.onControlMouseDown(event);\n };\n\n this.onClearIndicatorTouchEnd = function (event) {\n if (_this7.userIsDragging) return;\n\n _this7.onClearIndicatorMouseDown(event);\n };\n\n this.onDropdownIndicatorTouchEnd = function (event) {\n if (_this7.userIsDragging) return;\n\n _this7.onDropdownIndicatorMouseDown(event);\n };\n\n this.handleInputChange = function (event) {\n var inputValue = event.currentTarget.value;\n _this7.inputIsHiddenAfterUpdate = false;\n _this7.onInputChange(inputValue, { action: 'input-change' });\n _this7.onMenuOpen();\n };\n\n this.onInputFocus = function (event) {\n var _props18 = _this7.props,\n isSearchable = _props18.isSearchable,\n isMulti = _props18.isMulti;\n\n if (_this7.props.onFocus) {\n _this7.props.onFocus(event);\n }\n _this7.inputIsHiddenAfterUpdate = false;\n _this7.announceAriaLiveContext({\n event: 'input',\n context: { isSearchable: isSearchable, isMulti: isMulti }\n });\n _this7.setState({\n isFocused: true\n });\n if (_this7.openAfterFocus || _this7.props.openMenuOnFocus) {\n _this7.openMenu('first');\n }\n _this7.openAfterFocus = false;\n };\n\n this.onInputBlur = function (event) {\n if (_this7.props.onBlur) {\n _this7.props.onBlur(event);\n }\n _this7.onInputChange('', { action: 'input-blur' });\n _this7.onMenuClose();\n _this7.setState({\n focusedValue: null,\n isFocused: false\n });\n };\n\n this.onOptionHover = function (focusedOption) {\n if (_this7.blockOptionHover || _this7.state.focusedOption === focusedOption) {\n return;\n }\n _this7.setState({ focusedOption: focusedOption });\n };\n\n this.shouldHideSelectedOptions = function () {\n var _props19 = _this7.props,\n hideSelectedOptions = _props19.hideSelectedOptions,\n isMulti = _props19.isMulti;\n\n if (hideSelectedOptions === undefined) return isMulti;\n return hideSelectedOptions;\n };\n\n this.onKeyDown = function (event) {\n var _props20 = _this7.props,\n isMulti = _props20.isMulti,\n backspaceRemovesValue = _props20.backspaceRemovesValue,\n escapeClearsValue = _props20.escapeClearsValue,\n inputValue = _props20.inputValue,\n isClearable = _props20.isClearable,\n isDisabled = _props20.isDisabled,\n menuIsOpen = _props20.menuIsOpen,\n onKeyDown = _props20.onKeyDown,\n tabSelectsValue = _props20.tabSelectsValue,\n openMenuOnFocus = _props20.openMenuOnFocus;\n var _state9 = _this7.state,\n isComposing = _state9.isComposing,\n focusedOption = _state9.focusedOption,\n focusedValue = _state9.focusedValue,\n selectValue = _state9.selectValue;\n\n\n if (isDisabled) return;\n\n if (typeof onKeyDown === 'function') {\n onKeyDown(event);\n if (event.defaultPrevented) {\n return;\n }\n }\n\n // Block option hover events when the user has just pressed a key\n _this7.blockOptionHover = true;\n switch (event.key) {\n case 'ArrowLeft':\n if (!isMulti || inputValue) return;\n _this7.focusValue('previous');\n break;\n case 'ArrowRight':\n if (!isMulti || inputValue) return;\n _this7.focusValue('next');\n break;\n case 'Delete':\n case 'Backspace':\n if (inputValue) return;\n if (focusedValue) {\n _this7.removeValue(focusedValue);\n } else {\n if (!backspaceRemovesValue) return;\n _this7.popValue();\n }\n break;\n case 'Tab':\n if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption ||\n // don't capture the event if the menu opens on focus and the focused\n // option is already selected; it breaks the flow of navigation\n openMenuOnFocus && _this7.isOptionSelected(focusedOption, selectValue)) {\n return;\n }\n _this7.selectOption(focusedOption);\n break;\n case 'Enter':\n if (menuIsOpen) {\n if (!focusedOption) return;\n if (isComposing) return;\n _this7.selectOption(focusedOption);\n } else {\n _this7.focusOption('first');\n }\n break;\n case 'Escape':\n if (menuIsOpen) {\n _this7.inputIsHiddenAfterUpdate = false;\n _this7.onInputChange('', { action: 'menu-close' });\n _this7.onMenuClose();\n } else if (isClearable && escapeClearsValue) {\n _this7.clearValue();\n }\n break;\n case ' ':\n // space\n if (inputValue) {\n return;\n }\n if (!menuIsOpen) {\n _this7.openMenu('first');\n break;\n }\n if (!focusedOption) return;\n _this7.selectOption(focusedOption);\n break;\n case 'ArrowUp':\n if (menuIsOpen) {\n _this7.focusOption('up');\n } else {\n _this7.openMenu('last');\n }\n break;\n case 'ArrowDown':\n if (menuIsOpen) {\n _this7.focusOption('down');\n } else {\n _this7.openMenu('first');\n }\n break;\n case 'PageUp':\n if (!menuIsOpen) return;\n _this7.focusOption('pageup');\n break;\n case 'PageDown':\n if (!menuIsOpen) return;\n _this7.focusOption('pagedown');\n break;\n case 'Home':\n if (!menuIsOpen) return;\n _this7.focusOption('first');\n break;\n case 'End':\n if (!menuIsOpen) return;\n _this7.focusOption('last');\n break;\n default:\n return;\n }\n event.preventDefault();\n };\n};\n\nvar manageState = function manageState(SelectComponent) {\n var _class, _temp2;\n\n return _temp2 = _class = function (_Component) {\n inherits(StateManager, _Component);\n\n function StateManager() {\n var _ref;\n\n var _temp, _this, _ret;\n\n classCallCheck(this, StateManager);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = StateManager.__proto__ || Object.getPrototypeOf(StateManager)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n inputValue: _this.props.inputValue !== undefined ? _this.props.inputValue : _this.props.defaultInputValue,\n menuIsOpen: _this.props.menuIsOpen !== undefined ? _this.props.menuIsOpen : _this.props.defaultMenuIsOpen,\n value: _this.props.value !== undefined ? _this.props.value : _this.props.defaultValue\n }, _this.onChange = function (value, actionMeta) {\n _this.callProp('onChange', value, actionMeta);\n _this.setState({ value: value });\n }, _this.onInputChange = function (value, actionMeta) {\n // TODO: for backwards compatibility, we allow the prop to return a new\n // value, but now inputValue is a controllable prop we probably shouldn't\n var newValue = _this.callProp('onInputChange', value, actionMeta);\n _this.setState({\n inputValue: newValue !== undefined ? newValue : value\n });\n }, _this.onMenuOpen = function () {\n _this.callProp('onMenuOpen');\n _this.setState({ menuIsOpen: true });\n }, _this.onMenuClose = function () {\n _this.callProp('onMenuClose');\n _this.setState({ menuIsOpen: false });\n }, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n createClass(StateManager, [{\n key: 'focus',\n value: function focus() {\n this.select.focus();\n }\n }, {\n key: 'blur',\n value: function blur() {\n this.select.blur();\n }\n }, {\n key: 'getProp',\n value: function getProp(key) {\n return this.props[key] !== undefined ? this.props[key] : this.state[key];\n }\n }, {\n key: 'callProp',\n value: function callProp(name) {\n if (typeof this.props[name] === 'function') {\n var _props;\n\n for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return (_props = this.props)[name].apply(_props, toConsumableArray(args));\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(SelectComponent, _extends({}, this.props, {\n ref: function ref(_ref2) {\n _this2.select = _ref2;\n },\n inputValue: this.getProp('inputValue'),\n menuIsOpen: this.getProp('menuIsOpen'),\n onChange: this.onChange,\n onInputChange: this.onInputChange,\n onMenuClose: this.onMenuClose,\n onMenuOpen: this.onMenuOpen,\n value: this.getProp('value')\n }));\n }\n }]);\n return StateManager;\n }(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]), _class.defaultProps = {\n defaultInputValue: '',\n defaultMenuIsOpen: false,\n defaultValue: null\n }, _temp2;\n};\n\nvar defaultProps$1 = {\n cacheOptions: false,\n defaultOptions: false\n};\n\nvar makeAsyncSelect = function makeAsyncSelect(SelectComponent) {\n var _class, _temp;\n\n return _temp = _class = function (_Component) {\n inherits(Async, _Component);\n\n function Async(props) {\n classCallCheck(this, Async);\n\n var _this = possibleConstructorReturn(this, (Async.__proto__ || Object.getPrototypeOf(Async)).call(this));\n\n _this.mounted = false;\n _this.optionsCache = {};\n\n _this.handleInputChange = function (newValue, actionMeta) {\n var _this$props = _this.props,\n cacheOptions = _this$props.cacheOptions,\n onInputChange = _this$props.onInputChange;\n // TODO\n\n var inputValue = handleInputChange(newValue, actionMeta, onInputChange);\n if (!inputValue) {\n delete _this.lastRequest;\n _this.setState({\n inputValue: '',\n loadedInputValue: '',\n loadedOptions: [],\n isLoading: false,\n passEmptyOptions: false\n });\n return;\n }\n if (cacheOptions && _this.optionsCache[inputValue]) {\n _this.setState({\n inputValue: inputValue,\n loadedInputValue: inputValue,\n loadedOptions: _this.optionsCache[inputValue],\n isLoading: false,\n passEmptyOptions: false\n });\n } else {\n var request = _this.lastRequest = {};\n _this.setState({\n inputValue: inputValue,\n isLoading: true,\n passEmptyOptions: !_this.state.loadedInputValue\n }, function () {\n _this.loadOptions(inputValue, function (options) {\n if (!_this.mounted) return;\n if (options) {\n _this.optionsCache[inputValue] = options;\n }\n if (request !== _this.lastRequest) return;\n delete _this.lastRequest;\n _this.setState({\n isLoading: false,\n loadedInputValue: inputValue,\n loadedOptions: options || [],\n passEmptyOptions: false\n });\n });\n });\n }\n return inputValue;\n };\n\n _this.state = {\n defaultOptions: Array.isArray(props.defaultOptions) ? props.defaultOptions : undefined,\n inputValue: '',\n isLoading: props.defaultOptions === true ? true : false,\n loadedOptions: [],\n passEmptyOptions: false\n };\n return _this;\n }\n\n createClass(Async, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n this.mounted = true;\n var defaultOptions = this.props.defaultOptions;\n\n if (defaultOptions === true) {\n this.loadOptions('', function (options) {\n if (!_this2.mounted) return;\n var isLoading = !!_this2.lastRequest;\n _this2.setState({ defaultOptions: options || [], isLoading: isLoading });\n });\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n // if the cacheOptions prop changes, clear the cache\n if (nextProps.cacheOptions !== this.props.cacheOptions) {\n this.optionsCache = {};\n }\n if (nextProps.defaultOptions !== this.props.defaultOptions) {\n this.setState({\n defaultOptions: Array.isArray(nextProps.defaultOptions) ? nextProps.defaultOptions : undefined\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.mounted = false;\n }\n }, {\n key: 'focus',\n value: function focus() {\n this.select.focus();\n }\n }, {\n key: 'blur',\n value: function blur() {\n this.select.blur();\n }\n }, {\n key: 'loadOptions',\n value: function loadOptions(inputValue, callback) {\n var loadOptions = this.props.loadOptions;\n\n if (!loadOptions) return callback();\n var loader = loadOptions(inputValue, callback);\n if (loader && typeof loader.then === 'function') {\n loader.then(callback, function () {\n return callback();\n });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _this3 = this;\n\n var _props = this.props,\n loadOptions = _props.loadOptions,\n props = objectWithoutProperties(_props, ['loadOptions']);\n var _state = this.state,\n defaultOptions = _state.defaultOptions,\n inputValue = _state.inputValue,\n isLoading = _state.isLoading,\n loadedInputValue = _state.loadedInputValue,\n loadedOptions = _state.loadedOptions,\n passEmptyOptions = _state.passEmptyOptions;\n\n var options = passEmptyOptions ? [] : inputValue && loadedInputValue ? loadedOptions : defaultOptions || [];\n return (\n // $FlowFixMe\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(SelectComponent, _extends({}, props, {\n filterOption: this.props.filterOption || null,\n ref: function ref(_ref) {\n _this3.select = _ref;\n },\n options: options,\n isLoading: isLoading,\n onInputChange: this.handleInputChange\n }))\n );\n }\n }]);\n return Async;\n }(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]), _class.defaultProps = defaultProps$1, _temp;\n};\nvar Async = makeAsyncSelect(manageState(Select));\n\nvar compareOption = function compareOption(inputValue, option) {\n var candidate = inputValue.toLowerCase();\n return option.value.toLowerCase() === candidate || option.label.toLowerCase() === candidate;\n};\n\nvar builtins = {\n formatCreateLabel: function formatCreateLabel(inputValue) {\n return 'Create \"' + inputValue + '\"';\n },\n isValidNewOption: function isValidNewOption(inputValue, selectValue, selectOptions) {\n return !(!inputValue || selectValue.some(function (option) {\n return compareOption(inputValue, option);\n }) || selectOptions.some(function (option) {\n return compareOption(inputValue, option);\n }));\n },\n getNewOptionData: function getNewOptionData(inputValue, optionLabel) {\n return {\n label: optionLabel,\n value: inputValue,\n __isNew__: true\n };\n }\n};\n\nvar defaultProps$2 = _extends({\n allowCreateWhileLoading: false,\n createOptionPosition: 'last'\n}, builtins);\n\nvar makeCreatableSelect = function makeCreatableSelect(SelectComponent) {\n var _class, _temp;\n\n return _temp = _class = function (_Component) {\n inherits(Creatable, _Component);\n\n function Creatable(props) {\n classCallCheck(this, Creatable);\n\n var _this = possibleConstructorReturn(this, (Creatable.__proto__ || Object.getPrototypeOf(Creatable)).call(this, props));\n\n _this.onChange = function (newValue, actionMeta) {\n var _this$props = _this.props,\n getNewOptionData = _this$props.getNewOptionData,\n inputValue = _this$props.inputValue,\n isMulti = _this$props.isMulti,\n onChange = _this$props.onChange,\n onCreateOption = _this$props.onCreateOption,\n value = _this$props.value;\n\n if (actionMeta.action !== 'select-option') {\n return onChange(newValue, actionMeta);\n }\n var newOption = _this.state.newOption;\n\n var valueArray = Array.isArray(newValue) ? newValue : [newValue];\n\n if (valueArray[valueArray.length - 1] === newOption) {\n if (onCreateOption) onCreateOption(inputValue);else {\n var newOptionData = getNewOptionData(inputValue, inputValue);\n var newActionMeta = { action: 'create-option' };\n if (isMulti) {\n onChange([].concat(toConsumableArray(cleanValue(value)), [newOptionData]), newActionMeta);\n } else {\n onChange(newOptionData, newActionMeta);\n }\n }\n return;\n }\n onChange(newValue, actionMeta);\n };\n\n var options = props.options || [];\n _this.state = {\n newOption: undefined,\n options: options\n };\n return _this;\n }\n\n createClass(Creatable, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n var allowCreateWhileLoading = nextProps.allowCreateWhileLoading,\n createOptionPosition = nextProps.createOptionPosition,\n formatCreateLabel = nextProps.formatCreateLabel,\n getNewOptionData = nextProps.getNewOptionData,\n inputValue = nextProps.inputValue,\n isLoading = nextProps.isLoading,\n isValidNewOption = nextProps.isValidNewOption,\n value = nextProps.value;\n\n var options = nextProps.options || [];\n var newOption = this.state.newOption;\n\n if (isValidNewOption(inputValue, cleanValue(value), options)) {\n newOption = getNewOptionData(inputValue, formatCreateLabel(inputValue));\n } else {\n newOption = undefined;\n }\n this.setState({\n newOption: newOption,\n options: (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(toConsumableArray(options)) : [].concat(toConsumableArray(options), [newOption]) : options\n });\n }\n }, {\n key: 'focus',\n value: function focus() {\n this.select.focus();\n }\n }, {\n key: 'blur',\n value: function blur() {\n this.select.blur();\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var props = objectWithoutProperties(this.props, []);\n var options = this.state.options;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(SelectComponent, _extends({}, props, {\n ref: function ref(_ref) {\n _this2.select = _ref;\n },\n options: options,\n onChange: this.onChange\n }));\n }\n }]);\n return Creatable;\n }(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]), _class.defaultProps = defaultProps$2, _temp;\n};\nvar Creatable = manageState(makeCreatableSelect(Select));\n\nvar AsyncCreatable = makeAsyncSelect(manageState(makeCreatableSelect(Select)));\n\n// ==============================\n// Fade Transition\n// ==============================\n\nvar Fade = function Fade(_ref) {\n var Tag = _ref.component,\n _ref$duration = _ref.duration,\n duration = _ref$duration === undefined ? 1 : _ref$duration,\n inProp = _ref.in,\n onExited = _ref.onExited,\n props = objectWithoutProperties(_ref, ['component', 'duration', 'in', 'onExited']);\n\n var transition = {\n entering: { opacity: 0 },\n entered: { opacity: 1, transition: 'opacity ' + duration + 'ms' },\n exiting: { opacity: 0 },\n exited: { opacity: 0 }\n };\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n react_transition_group__WEBPACK_IMPORTED_MODULE_7__[\"Transition\"],\n { mountOnEnter: true, unmountOnExit: true, 'in': inProp, timeout: duration },\n function (state) {\n var innerProps = {\n style: _extends({}, transition[state])\n };\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Tag, _extends({ innerProps: innerProps }, props));\n }\n );\n};\nvar collapseDuration = 260;\n\n// wrap each MultiValue with a collapse transition; decreases width until\n// finally removing from DOM\nvar Collapse = function (_Component) {\n inherits(Collapse, _Component);\n\n function Collapse() {\n var _ref2;\n\n var _temp, _this, _ret;\n\n classCallCheck(this, Collapse);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref2 = Collapse.__proto__ || Object.getPrototypeOf(Collapse)).call.apply(_ref2, [this].concat(args))), _this), _this.duration = collapseDuration, _this.state = { width: 'auto' }, _this.transition = {\n exiting: { width: 0, transition: 'width ' + _this.duration + 'ms ease-out' },\n exited: { width: 0 }\n }, _this.getWidth = function (ref) {\n if (ref && isNaN(_this.state.width)) {\n // cannot use `offsetWidth` because it is rounded\n var _ref$getBoundingClien = ref.getBoundingClientRect(),\n _width = _ref$getBoundingClien.width;\n\n _this.setState({ width: _width });\n }\n }, _this.getStyle = function (width) {\n return {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n width: width\n };\n }, _this.getTransition = function (state) {\n return _this.transition[state];\n }, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n // width must be calculated; cannot transition from `undefined` to `number`\n\n\n // get base styles\n\n\n // get transition styles\n\n\n createClass(Collapse, [{\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _props = this.props,\n children = _props.children,\n inProp = _props.in;\n var width = this.state.width;\n\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n react_transition_group__WEBPACK_IMPORTED_MODULE_7__[\"Transition\"],\n {\n enter: false,\n mountOnEnter: true,\n unmountOnExit: true,\n 'in': inProp,\n timeout: this.duration\n },\n function (state) {\n var style = _extends({}, _this2.getStyle(width), _this2.getTransition(state));\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n 'div',\n { ref: _this2.getWidth, style: style },\n children\n );\n }\n );\n }\n }]);\n return Collapse;\n}(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\n\n// strip transition props off before spreading onto select component\n// note we need to be explicit about innerRef for flow\nvar AnimatedInput = function AnimatedInput(WrappedComponent) {\n return function (_ref) {\n var inProp = _ref.in,\n onExited = _ref.onExited,\n appear = _ref.appear,\n enter = _ref.enter,\n exit = _ref.exit,\n innerRef = _ref.innerRef,\n props = objectWithoutProperties(_ref, ['in', 'onExited', 'appear', 'enter', 'exit', 'innerRef']);\n return (\n // $FlowFixMe\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(WrappedComponent, _extends({ innerRef: innerRef }, props))\n );\n };\n};\n\n// strip transition props off before spreading onto actual component\n\n\nvar AnimatedMultiValue = function AnimatedMultiValue(WrappedComponent) {\n return function (_ref) {\n var inProp = _ref.in,\n onExited = _ref.onExited,\n props = objectWithoutProperties(_ref, ['in', 'onExited']);\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\n Collapse,\n { 'in': inProp, onExited: onExited },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(WrappedComponent, _extends({ cropWithEllipsis: inProp }, props))\n );\n };\n};\n\n// fade in when last multi-value removed, otherwise instant\nvar AnimatedPlaceholder = function AnimatedPlaceholder(WrappedComponent) {\n return function (props) {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Fade, _extends({\n component: WrappedComponent,\n duration: props.isMulti ? collapseDuration : 1\n }, props));\n };\n};\n\n// instant fade; all transition-group children must be transitions\n\nvar AnimatedSingleValue = function AnimatedSingleValue(WrappedComponent) {\n return function (props) {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Fade, _extends({ component: WrappedComponent }, props));\n };\n};\n\n// make ValueContainer a transition group\nvar AnimatedValueContainer = function AnimatedValueContainer(WrappedComponent) {\n return function (props) {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_7__[\"TransitionGroup\"], _extends({ component: WrappedComponent }, props));\n };\n};\n\nvar makeAnimated = function makeAnimated(externalComponents) {\n var components$$1 = defaultComponents({ components: externalComponents });\n var Input = components$$1.Input,\n MultiValue = components$$1.MultiValue,\n Placeholder = components$$1.Placeholder,\n SingleValue = components$$1.SingleValue,\n ValueContainer = components$$1.ValueContainer,\n rest = objectWithoutProperties(components$$1, ['Input', 'MultiValue', 'Placeholder', 'SingleValue', 'ValueContainer']);\n\n return _extends({\n Input: AnimatedInput(Input),\n MultiValue: AnimatedMultiValue(MultiValue),\n Placeholder: AnimatedPlaceholder(Placeholder),\n SingleValue: AnimatedSingleValue(SingleValue),\n ValueContainer: AnimatedValueContainer(ValueContainer)\n }, rest);\n};\n\nvar AnimatedComponents = makeAnimated();\n\nvar Input$1 = AnimatedComponents.Input;\nvar MultiValue$1 = AnimatedComponents.MultiValue;\nvar Placeholder$1 = AnimatedComponents.Placeholder;\nvar SingleValue$1 = AnimatedComponents.SingleValue;\nvar ValueContainer$1 = AnimatedComponents.ValueContainer;\n\nvar index = Object(memoize_one__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(makeAnimated, exportedEqual);\n\nvar index$1 = manageState(Select);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (index$1);\n\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-select/dist/react-select.esm.js?"); + +/***/ }), + +/***/ "./node_modules/react-transition-group/CSSTransition.js": +/*!**************************************************************!*\ + !*** ./node_modules/react-transition-group/CSSTransition.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar PropTypes = _interopRequireWildcard(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _addClass = _interopRequireDefault(__webpack_require__(/*! dom-helpers/class/addClass */ \"./node_modules/dom-helpers/class/addClass.js\"));\n\nvar _removeClass = _interopRequireDefault(__webpack_require__(/*! dom-helpers/class/removeClass */ \"./node_modules/dom-helpers/class/removeClass.js\"));\n\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"react\"));\n\nvar _Transition = _interopRequireDefault(__webpack_require__(/*! ./Transition */ \"./node_modules/react-transition-group/Transition.js\"));\n\nvar _PropTypes = __webpack_require__(/*! ./utils/PropTypes */ \"./node_modules/react-transition-group/utils/PropTypes.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nvar addClass = function addClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return (0, _addClass.default)(node, c);\n });\n};\n\nvar removeClass = function removeClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return (0, _removeClass.default)(node, c);\n });\n};\n\nvar propTypes = true ? _extends({}, _Transition.default.propTypes, {\n /**\n * The animation classNames applied to the component as it enters, exits or has finished the transition.\n * A single name can be provided and it will be suffixed for each stage: e.g.\n *\n * `classNames=\"fade\"` applies `fade-enter`, `fade-enter-active`, `fade-enter-done`,\n * `fade-exit`, `fade-exit-active`, `fade-exit-done`, `fade-appear`, and `fade-appear-active`.\n * Each individual classNames can also be specified independently like:\n *\n * ```js\n * classNames={{\n * appear: 'my-appear',\n * appearActive: 'my-active-appear',\n * enter: 'my-enter',\n * enterActive: 'my-active-enter',\n * enterDone: 'my-done-enter',\n * exit: 'my-exit',\n * exitActive: 'my-active-exit',\n * exitDone: 'my-done-exit',\n * }}\n * ```\n *\n * If you want to set these classes using CSS Modules:\n *\n * ```js\n * import styles from './styles.css';\n * ```\n *\n * you might want to use camelCase in your CSS file, that way could simply spread\n * them instead of listing them one by one:\n *\n * ```js\n * classNames={{ ...styles }}\n * ```\n *\n * @type {string | {\n * appear?: string,\n * appearActive?: string,\n * enter?: string,\n * enterActive?: string,\n * enterDone?: string,\n * exit?: string,\n * exitActive?: string,\n * exitDone?: string,\n * }}\n */\n classNames: _PropTypes.classNamesShape,\n\n /**\n * A `` callback fired immediately after the 'enter' or 'appear' class is\n * applied.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEnter: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'enter-active' or\n * 'appear-active' class is applied.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'enter' or\n * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntered: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit' class is\n * applied.\n *\n * @type Function(node: HtmlElement)\n */\n onExit: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit-active' is applied.\n *\n * @type Function(node: HtmlElement\n */\n onExiting: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit' classes\n * are **removed** and the `exit-done` class is added to the DOM node.\n *\n * @type Function(node: HtmlElement)\n */\n onExited: PropTypes.func\n}) : undefined;;\n/**\n * A `Transition` component using CSS transitions and animations.\n * It's inspired by the excellent [ng-animate](http://www.nganimate.org/) library.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` stages of the transition. The first class is applied and then a\n * second \"active\" class in order to activate the css animation. After the animation,\n * matching `done` class names are applied to persist the animation state.\n *\n * When the `in` prop is toggled to `true` the Component will get\n * the `example-enter` CSS class and the `example-enter-active` CSS class\n * added in the next tick. This is a convention based on the `classNames` prop.\n */\n\nvar CSSTransition =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(CSSTransition, _React$Component);\n\n function CSSTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.onEnter = function (node, appearing) {\n var _this$getClassNames = _this.getClassNames(appearing ? 'appear' : 'enter'),\n className = _this$getClassNames.className;\n\n _this.removeClasses(node, 'exit');\n\n addClass(node, className);\n\n if (_this.props.onEnter) {\n _this.props.onEnter(node);\n }\n };\n\n _this.onEntering = function (node, appearing) {\n var _this$getClassNames2 = _this.getClassNames(appearing ? 'appear' : 'enter'),\n activeClassName = _this$getClassNames2.activeClassName;\n\n _this.reflowAndAddClass(node, activeClassName);\n\n if (_this.props.onEntering) {\n _this.props.onEntering(node);\n }\n };\n\n _this.onEntered = function (node, appearing) {\n var _this$getClassNames3 = _this.getClassNames('enter'),\n doneClassName = _this$getClassNames3.doneClassName;\n\n _this.removeClasses(node, appearing ? 'appear' : 'enter');\n\n addClass(node, doneClassName);\n\n if (_this.props.onEntered) {\n _this.props.onEntered(node);\n }\n };\n\n _this.onExit = function (node) {\n var _this$getClassNames4 = _this.getClassNames('exit'),\n className = _this$getClassNames4.className;\n\n _this.removeClasses(node, 'appear');\n\n _this.removeClasses(node, 'enter');\n\n addClass(node, className);\n\n if (_this.props.onExit) {\n _this.props.onExit(node);\n }\n };\n\n _this.onExiting = function (node) {\n var _this$getClassNames5 = _this.getClassNames('exit'),\n activeClassName = _this$getClassNames5.activeClassName;\n\n _this.reflowAndAddClass(node, activeClassName);\n\n if (_this.props.onExiting) {\n _this.props.onExiting(node);\n }\n };\n\n _this.onExited = function (node) {\n var _this$getClassNames6 = _this.getClassNames('exit'),\n doneClassName = _this$getClassNames6.doneClassName;\n\n _this.removeClasses(node, 'exit');\n\n addClass(node, doneClassName);\n\n if (_this.props.onExited) {\n _this.props.onExited(node);\n }\n };\n\n _this.getClassNames = function (type) {\n var classNames = _this.props.classNames;\n var className = typeof classNames !== 'string' ? classNames[type] : classNames + '-' + type;\n var activeClassName = typeof classNames !== 'string' ? classNames[type + 'Active'] : className + '-active';\n var doneClassName = typeof classNames !== 'string' ? classNames[type + 'Done'] : className + '-done';\n return {\n className: className,\n activeClassName: activeClassName,\n doneClassName: doneClassName\n };\n };\n\n return _this;\n }\n\n var _proto = CSSTransition.prototype;\n\n _proto.removeClasses = function removeClasses(node, type) {\n var _this$getClassNames7 = this.getClassNames(type),\n className = _this$getClassNames7.className,\n activeClassName = _this$getClassNames7.activeClassName,\n doneClassName = _this$getClassNames7.doneClassName;\n\n className && removeClass(node, className);\n activeClassName && removeClass(node, activeClassName);\n doneClassName && removeClass(node, doneClassName);\n };\n\n _proto.reflowAndAddClass = function reflowAndAddClass(node, className) {\n // This is for to force a repaint,\n // which is necessary in order to transition styles when adding a class name.\n if (className) {\n /* eslint-disable no-unused-expressions */\n node && node.scrollTop;\n /* eslint-enable no-unused-expressions */\n\n addClass(node, className);\n }\n };\n\n _proto.render = function render() {\n var props = _extends({}, this.props);\n\n delete props.classNames;\n return _react.default.createElement(_Transition.default, _extends({}, props, {\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onEntering: this.onEntering,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }));\n };\n\n return CSSTransition;\n}(_react.default.Component);\n\nCSSTransition.propTypes = true ? propTypes : undefined;\nvar _default = CSSTransition;\nexports.default = _default;\nmodule.exports = exports[\"default\"];\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-transition-group/CSSTransition.js?"); + +/***/ }), + +/***/ "./node_modules/react-transition-group/ReplaceTransition.js": +/*!******************************************************************!*\ + !*** ./node_modules/react-transition-group/ReplaceTransition.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"react\"));\n\nvar _reactDom = __webpack_require__(/*! react-dom */ \"react-dom\");\n\nvar _TransitionGroup = _interopRequireDefault(__webpack_require__(/*! ./TransitionGroup */ \"./node_modules/react-transition-group/TransitionGroup.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar propTypes = true ? {\n in: _propTypes.default.bool.isRequired,\n children: function children(props, propName) {\n if (_react.default.Children.count(props[propName]) !== 2) return new Error(\"\\\"\" + propName + \"\\\" must be exactly two transition components.\");\n return null;\n }\n} : undefined;;\n/**\n * The `` component is a specialized `Transition` component\n * that animates between two children.\n *\n * ```jsx\n * \n *
I appear first
\n *
I replace the above
\n *
\n * ```\n */\n\nvar ReplaceTransition =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ReplaceTransition, _React$Component);\n\n function ReplaceTransition() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n\n _this.handleEnter = function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _this.handleLifecycle('onEnter', 0, args);\n };\n\n _this.handleEntering = function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return _this.handleLifecycle('onEntering', 0, args);\n };\n\n _this.handleEntered = function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return _this.handleLifecycle('onEntered', 0, args);\n };\n\n _this.handleExit = function () {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n\n return _this.handleLifecycle('onExit', 1, args);\n };\n\n _this.handleExiting = function () {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n return _this.handleLifecycle('onExiting', 1, args);\n };\n\n _this.handleExited = function () {\n for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n args[_key7] = arguments[_key7];\n }\n\n return _this.handleLifecycle('onExited', 1, args);\n };\n\n return _this;\n }\n\n var _proto = ReplaceTransition.prototype;\n\n _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {\n var _child$props;\n\n var children = this.props.children;\n\n var child = _react.default.Children.toArray(children)[idx];\n\n if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);\n if (this.props[handler]) this.props[handler]((0, _reactDom.findDOMNode)(this));\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n children = _this$props.children,\n inProp = _this$props.in,\n props = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\"]);\n\n var _React$Children$toArr = _react.default.Children.toArray(children),\n first = _React$Children$toArr[0],\n second = _React$Children$toArr[1];\n\n delete props.onEnter;\n delete props.onEntering;\n delete props.onEntered;\n delete props.onExit;\n delete props.onExiting;\n delete props.onExited;\n return _react.default.createElement(_TransitionGroup.default, props, inProp ? _react.default.cloneElement(first, {\n key: 'first',\n onEnter: this.handleEnter,\n onEntering: this.handleEntering,\n onEntered: this.handleEntered\n }) : _react.default.cloneElement(second, {\n key: 'second',\n onEnter: this.handleExit,\n onEntering: this.handleExiting,\n onEntered: this.handleExited\n }));\n };\n\n return ReplaceTransition;\n}(_react.default.Component);\n\nReplaceTransition.propTypes = true ? propTypes : undefined;\nvar _default = ReplaceTransition;\nexports.default = _default;\nmodule.exports = exports[\"default\"];\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-transition-group/ReplaceTransition.js?"); + +/***/ }), + +/***/ "./node_modules/react-transition-group/Transition.js": +/*!***********************************************************!*\ + !*** ./node_modules/react-transition-group/Transition.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nexports.__esModule = true;\nexports.default = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0;\n\nvar PropTypes = _interopRequireWildcard(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"react\"));\n\nvar _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ \"react-dom\"));\n\nvar _reactLifecyclesCompat = __webpack_require__(/*! react-lifecycles-compat */ \"./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\n\nvar _PropTypes = __webpack_require__(/*! ./utils/PropTypes */ \"./node_modules/react-transition-group/utils/PropTypes.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar UNMOUNTED = 'unmounted';\nexports.UNMOUNTED = UNMOUNTED;\nvar EXITED = 'exited';\nexports.EXITED = EXITED;\nvar ENTERING = 'entering';\nexports.ENTERING = ENTERING;\nvar ENTERED = 'entered';\nexports.ENTERED = ENTERED;\nvar EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the components.\n * It's up to you to give meaning and effect to those states. For example we can\n * add styles to a component when it enters or exits:\n *\n * ```jsx\n * import Transition from 'react-transition-group/Transition';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 0 },\n * entered: { opacity: 1 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {(state) => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n *
\n * );\n * ```\n *\n * As noted the `Transition` component doesn't _do_ anything by itself to its child component.\n * What it does do is track transition states over time so you can update the\n * component (such as by adding styles or classes) when it changes states.\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component begins the\n * \"Enter\" stage. During this stage, the component will shift from its current transition state,\n * to `'entering'` for the duration of the transition and then to the `'entered'` stage once\n * it's complete. Let's take the following example:\n *\n * ```jsx\n * state = { in: false };\n *\n * toggleEnterState = () => {\n * this.setState({ in: true });\n * }\n *\n * render() {\n * return (\n *
\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state and\n * stay there for 500ms (the value of `timeout`) before it finally switches to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from `'exiting'` to `'exited'`.\n *\n * ## Timing\n *\n * Timing is often the trickiest part of animation, mistakes can result in slight delays\n * that are hard to pin down. A common example is when you want to add an exit transition,\n * you should set the desired final styles when the state is `'exiting'`. That's when the\n * transition to those styles will start and, if you matched the `timeout` prop with the\n * CSS Transition duration, it will end exactly when the state changes to `'exited'`.\n *\n * > **Note**: For simpler transitions the `Transition` component might be enough, but\n * > take into account that it's platform-agnostic, while the `CSSTransition` component\n * > [forces reflows](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * > in order to make more complex transitions more predictable. For example, even though\n * > classes `example-enter` and `example-enter-active` are applied immediately one after\n * > another, you can still transition from one to the other because of the forced reflow\n * > (read [this issue](https://github.com/reactjs/react-transition-group/issues/159#issuecomment-322761171)\n * > for more info). Take this into account when choosing between `Transition` and\n * > `CSSTransition`.\n */\n\nexports.EXITING = EXITING;\n\nvar Transition =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n var _proto = Transition.prototype;\n\n _proto.getChildContext = function getChildContext() {\n return {\n transitionGroup: null // allows for nested Transitions\n\n };\n };\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n }; // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter;\n appear = timeout.appear;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n var node = _reactDom.default.findDOMNode(this);\n\n if (nextStatus === ENTERING) {\n this.performEnter(node, mounting);\n } else {\n this.performExit(node);\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(node, mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;\n var timeouts = this.getTimeouts(); // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(node);\n });\n return;\n }\n\n this.props.onEnter(node, appearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(node, appearing); // FIXME: appear timeout?\n\n\n _this2.onTransitionEnd(node, timeouts.enter, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(node, appearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit(node) {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED\n\n if (!exit) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(node);\n });\n return;\n }\n\n this.props.onExit(node);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(node);\n\n _this3.onTransitionEnd(node, timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(node);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {\n this.setNextCallback(handler);\n\n if (node) {\n if (this.props.addEndListener) {\n this.props.addEndListener(node, this.nextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n } else {\n setTimeout(this.nextCallback, 0);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\"]); // filter props for Transtition\n\n\n delete childProps.in;\n delete childProps.mountOnEnter;\n delete childProps.unmountOnExit;\n delete childProps.appear;\n delete childProps.enter;\n delete childProps.exit;\n delete childProps.timeout;\n delete childProps.addEndListener;\n delete childProps.onEnter;\n delete childProps.onEntering;\n delete childProps.onEntered;\n delete childProps.onExit;\n delete childProps.onExiting;\n delete childProps.onExited;\n\n if (typeof children === 'function') {\n return children(status, childProps);\n }\n\n var child = _react.default.Children.only(children);\n\n return _react.default.cloneElement(child, childProps);\n };\n\n return Transition;\n}(_react.default.Component);\n\nTransition.contextTypes = {\n transitionGroup: PropTypes.object\n};\nTransition.childContextTypes = {\n transitionGroup: function transitionGroup() {}\n};\nTransition.propTypes = true ? {\n /**\n * A `function` child can be used instead of a React element.\n * This function is called with the current transition status\n * ('entering', 'entered', 'exiting', 'exited', 'unmounted'), which can be used\n * to apply context specific props to a component.\n *\n * ```jsx\n * \n * {(status) => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * Normally a component is not transitioned if it is shown when the `` component mounts.\n * If you want to transition on the first mount set `appear` to `true`, and the\n * component will transition in as soon as the `` mounts.\n *\n * > Note: there are no specific \"appear\" states. `appear` only adds an additional `enter` transition.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided\n *\n * You may specify a single timeout for all transitions like: `timeout={500}`,\n * or individually like:\n *\n * ```jsx\n * timeout={{\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * @type {number | { enter?: number, exit?: number }}\n */\n timeout: function timeout(props) {\n var pt = true ? _PropTypes.timeoutsShape : undefined;;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. **Note:** Timeouts are still used as a fallback if provided.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func // Name the function so it is clearer in the documentation\n\n} : undefined;\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = 0;\nTransition.EXITED = 1;\nTransition.ENTERING = 2;\nTransition.ENTERED = 3;\nTransition.EXITING = 4;\n\nvar _default = (0, _reactLifecyclesCompat.polyfill)(Transition);\n\nexports.default = _default;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-transition-group/Transition.js?"); + +/***/ }), + +/***/ "./node_modules/react-transition-group/TransitionGroup.js": +/*!****************************************************************!*\ + !*** ./node_modules/react-transition-group/TransitionGroup.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"react\"));\n\nvar _reactLifecyclesCompat = __webpack_require__(/*! react-lifecycles-compat */ \"./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\n\nvar _ChildMapping = __webpack_require__(/*! ./utils/ChildMapping */ \"./node_modules/react-transition-group/utils/ChildMapping.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar propTypes = true ? {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: _propTypes.default.any,\n\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n */\n children: _propTypes.default.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: _propTypes.default.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: _propTypes.default.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: _propTypes.default.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: _propTypes.default.func\n} : undefined;;\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n /**\n * The `` component manages a set of transition components\n * (`` and ``) in a list. Like with the transition\n * components, `` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the ``.\n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\n};\n\nvar TransitionGroup =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this))); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.getChildContext = function getChildContext() {\n return {\n transitionGroup: {\n isMounting: !this.appeared\n }\n };\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this.appeared = true;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? (0, _ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, _ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n };\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = (0, _ChildMapping.getChildMapping)(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return children;\n }\n\n return _react.default.createElement(Component, props, children);\n };\n\n return TransitionGroup;\n}(_react.default.Component);\n\nTransitionGroup.childContextTypes = {\n transitionGroup: _propTypes.default.object.isRequired\n};\nTransitionGroup.propTypes = true ? propTypes : undefined;\nTransitionGroup.defaultProps = defaultProps;\n\nvar _default = (0, _reactLifecyclesCompat.polyfill)(TransitionGroup);\n\nexports.default = _default;\nmodule.exports = exports[\"default\"];\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-transition-group/TransitionGroup.js?"); + +/***/ }), + +/***/ "./node_modules/react-transition-group/index.js": +/*!******************************************************!*\ + !*** ./node_modules/react-transition-group/index.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar _CSSTransition = _interopRequireDefault(__webpack_require__(/*! ./CSSTransition */ \"./node_modules/react-transition-group/CSSTransition.js\"));\n\nvar _ReplaceTransition = _interopRequireDefault(__webpack_require__(/*! ./ReplaceTransition */ \"./node_modules/react-transition-group/ReplaceTransition.js\"));\n\nvar _TransitionGroup = _interopRequireDefault(__webpack_require__(/*! ./TransitionGroup */ \"./node_modules/react-transition-group/TransitionGroup.js\"));\n\nvar _Transition = _interopRequireDefault(__webpack_require__(/*! ./Transition */ \"./node_modules/react-transition-group/Transition.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = {\n Transition: _Transition.default,\n TransitionGroup: _TransitionGroup.default,\n ReplaceTransition: _ReplaceTransition.default,\n CSSTransition: _CSSTransition.default\n};\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-transition-group/index.js?"); + +/***/ }), + +/***/ "./node_modules/react-transition-group/utils/ChildMapping.js": +/*!*******************************************************************!*\ + !*** ./node_modules/react-transition-group/utils/ChildMapping.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nexports.__esModule = true;\nexports.getChildMapping = getChildMapping;\nexports.mergeChildMappings = mergeChildMappings;\nexports.getInitialChildMapping = getInitialChildMapping;\nexports.getNextChildMapping = getNextChildMapping;\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\nfunction getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && (0, _react.isValidElement)(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) _react.Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\n\nfunction mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nfunction getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return (0, _react.cloneElement)(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\n\nfunction getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!(0, _react.isValidElement)(child)) return;\n var hasPrev = key in prevChildMapping;\n var hasNext = key in nextChildMapping;\n var prevChild = prevChildMapping[key];\n var isLeaving = (0, _react.isValidElement)(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = (0, _react.cloneElement)(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = (0, _react.cloneElement)(child, {\n in: false\n });\n } else if (hasNext && hasPrev && (0, _react.isValidElement)(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = (0, _react.cloneElement)(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-transition-group/utils/ChildMapping.js?"); + +/***/ }), + +/***/ "./node_modules/react-transition-group/utils/PropTypes.js": +/*!****************************************************************!*\ + !*** ./node_modules/react-transition-group/utils/PropTypes.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nexports.__esModule = true;\nexports.transitionTimeout = transitionTimeout;\nexports.classNamesShape = exports.timeoutsShape = void 0;\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction transitionTimeout(transitionType) {\n var timeoutPropName = 'transition' + transitionType + 'Timeout';\n var enabledPropName = 'transition' + transitionType;\n return function (props) {\n // If the transition is enabled\n if (props[enabledPropName]) {\n // If no timeout duration is provided\n if (props[timeoutPropName] == null) {\n return new Error(timeoutPropName + ' wasn\\'t supplied to CSSTransitionGroup: ' + 'this can cause unreliable animations and won\\'t be supported in ' + 'a future version of React. See ' + 'https://fb.me/react-animation-transition-group-timeout for more ' + 'information.'); // If the duration isn't a number\n } else if (typeof props[timeoutPropName] !== 'number') {\n return new Error(timeoutPropName + ' must be a number (in milliseconds)');\n }\n }\n\n return null;\n };\n}\n\nvar timeoutsShape = _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({\n enter: _propTypes.default.number,\n exit: _propTypes.default.number\n}).isRequired]);\n\nexports.timeoutsShape = timeoutsShape;\n\nvar classNamesShape = _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({\n enter: _propTypes.default.string,\n exit: _propTypes.default.string,\n active: _propTypes.default.string\n}), _propTypes.default.shape({\n enter: _propTypes.default.string,\n enterDone: _propTypes.default.string,\n enterActive: _propTypes.default.string,\n exit: _propTypes.default.string,\n exitDone: _propTypes.default.string,\n exitActive: _propTypes.default.string\n})]);\n\nexports.classNamesShape = classNamesShape;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/react-transition-group/utils/PropTypes.js?"); + +/***/ }), + +/***/ "./node_modules/reactcss/lib/autoprefix.js": +/*!*************************************************!*\ + !*** ./node_modules/reactcss/lib/autoprefix.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.autoprefix = undefined;\n\nvar _forOwn2 = __webpack_require__(/*! lodash/forOwn */ \"./node_modules/lodash/forOwn.js\");\n\nvar _forOwn3 = _interopRequireDefault(_forOwn2);\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar transforms = {\n borderRadius: function borderRadius(value) {\n return {\n msBorderRadius: value,\n MozBorderRadius: value,\n OBorderRadius: value,\n WebkitBorderRadius: value,\n borderRadius: value\n };\n },\n boxShadow: function boxShadow(value) {\n return {\n msBoxShadow: value,\n MozBoxShadow: value,\n OBoxShadow: value,\n WebkitBoxShadow: value,\n boxShadow: value\n };\n },\n userSelect: function userSelect(value) {\n return {\n WebkitTouchCallout: value,\n KhtmlUserSelect: value,\n MozUserSelect: value,\n msUserSelect: value,\n WebkitUserSelect: value,\n userSelect: value\n };\n },\n\n flex: function flex(value) {\n return {\n WebkitBoxFlex: value,\n MozBoxFlex: value,\n WebkitFlex: value,\n msFlex: value,\n flex: value\n };\n },\n flexBasis: function flexBasis(value) {\n return {\n WebkitFlexBasis: value,\n flexBasis: value\n };\n },\n justifyContent: function justifyContent(value) {\n return {\n WebkitJustifyContent: value,\n justifyContent: value\n };\n },\n\n transition: function transition(value) {\n return {\n msTransition: value,\n MozTransition: value,\n OTransition: value,\n WebkitTransition: value,\n transition: value\n };\n },\n\n transform: function transform(value) {\n return {\n msTransform: value,\n MozTransform: value,\n OTransform: value,\n WebkitTransform: value,\n transform: value\n };\n },\n absolute: function absolute(value) {\n var direction = value && value.split(' ');\n return {\n position: 'absolute',\n top: direction && direction[0],\n right: direction && direction[1],\n bottom: direction && direction[2],\n left: direction && direction[3]\n };\n },\n extend: function extend(name, otherElementStyles) {\n var otherStyle = otherElementStyles[name];\n if (otherStyle) {\n return otherStyle;\n }\n return {\n 'extend': name\n };\n }\n};\n\nvar autoprefix = exports.autoprefix = function autoprefix(elements) {\n var prefixed = {};\n (0, _forOwn3.default)(elements, function (styles, element) {\n var expanded = {};\n (0, _forOwn3.default)(styles, function (value, key) {\n var transform = transforms[key];\n if (transform) {\n expanded = _extends({}, expanded, transform(value));\n } else {\n expanded[key] = value;\n }\n });\n prefixed[element] = expanded;\n });\n return prefixed;\n};\n\nexports.default = autoprefix;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/reactcss/lib/autoprefix.js?"); + +/***/ }), + +/***/ "./node_modules/reactcss/lib/components/active.js": +/*!********************************************************!*\ + !*** ./node_modules/reactcss/lib/components/active.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.active = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar active = exports.active = function active(Component) {\n var Span = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'span';\n\n return function (_React$Component) {\n _inherits(Active, _React$Component);\n\n function Active() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Active);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Active.__proto__ || Object.getPrototypeOf(Active)).call.apply(_ref, [this].concat(args))), _this), _this.state = { active: false }, _this.handleMouseDown = function () {\n return _this.setState({ active: true });\n }, _this.handleMouseUp = function () {\n return _this.setState({ active: false });\n }, _this.render = function () {\n return _react2.default.createElement(\n Span,\n { onMouseDown: _this.handleMouseDown, onMouseUp: _this.handleMouseUp },\n _react2.default.createElement(Component, _extends({}, _this.props, _this.state))\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return Active;\n }(_react2.default.Component);\n};\n\nexports.default = active;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/reactcss/lib/components/active.js?"); + +/***/ }), + +/***/ "./node_modules/reactcss/lib/components/hover.js": +/*!*******************************************************!*\ + !*** ./node_modules/reactcss/lib/components/hover.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hover = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar hover = exports.hover = function hover(Component) {\n var Span = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'span';\n\n return function (_React$Component) {\n _inherits(Hover, _React$Component);\n\n function Hover() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Hover);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Hover.__proto__ || Object.getPrototypeOf(Hover)).call.apply(_ref, [this].concat(args))), _this), _this.state = { hover: false }, _this.handleMouseOver = function () {\n return _this.setState({ hover: true });\n }, _this.handleMouseOut = function () {\n return _this.setState({ hover: false });\n }, _this.render = function () {\n return _react2.default.createElement(\n Span,\n { onMouseOver: _this.handleMouseOver, onMouseOut: _this.handleMouseOut },\n _react2.default.createElement(Component, _extends({}, _this.props, _this.state))\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return Hover;\n }(_react2.default.Component);\n};\n\nexports.default = hover;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/reactcss/lib/components/hover.js?"); + +/***/ }), + +/***/ "./node_modules/reactcss/lib/flattenNames.js": +/*!***************************************************!*\ + !*** ./node_modules/reactcss/lib/flattenNames.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.flattenNames = undefined;\n\nvar _isString2 = __webpack_require__(/*! lodash/isString */ \"./node_modules/lodash/isString.js\");\n\nvar _isString3 = _interopRequireDefault(_isString2);\n\nvar _forOwn2 = __webpack_require__(/*! lodash/forOwn */ \"./node_modules/lodash/forOwn.js\");\n\nvar _forOwn3 = _interopRequireDefault(_forOwn2);\n\nvar _isPlainObject2 = __webpack_require__(/*! lodash/isPlainObject */ \"./node_modules/lodash/isPlainObject.js\");\n\nvar _isPlainObject3 = _interopRequireDefault(_isPlainObject2);\n\nvar _map2 = __webpack_require__(/*! lodash/map */ \"./node_modules/lodash/map.js\");\n\nvar _map3 = _interopRequireDefault(_map2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar flattenNames = exports.flattenNames = function flattenNames() {\n var things = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n var names = [];\n\n (0, _map3.default)(things, function (thing) {\n if (Array.isArray(thing)) {\n flattenNames(thing).map(function (name) {\n return names.push(name);\n });\n } else if ((0, _isPlainObject3.default)(thing)) {\n (0, _forOwn3.default)(thing, function (value, key) {\n value === true && names.push(key);\n names.push(key + '-' + value);\n });\n } else if ((0, _isString3.default)(thing)) {\n names.push(thing);\n }\n });\n\n return names;\n};\n\nexports.default = flattenNames;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/reactcss/lib/flattenNames.js?"); + +/***/ }), + +/***/ "./node_modules/reactcss/lib/index.js": +/*!********************************************!*\ + !*** ./node_modules/reactcss/lib/index.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ReactCSS = exports.loop = exports.handleActive = exports.handleHover = exports.hover = undefined;\n\nvar _flattenNames = __webpack_require__(/*! ./flattenNames */ \"./node_modules/reactcss/lib/flattenNames.js\");\n\nvar _flattenNames2 = _interopRequireDefault(_flattenNames);\n\nvar _mergeClasses = __webpack_require__(/*! ./mergeClasses */ \"./node_modules/reactcss/lib/mergeClasses.js\");\n\nvar _mergeClasses2 = _interopRequireDefault(_mergeClasses);\n\nvar _autoprefix = __webpack_require__(/*! ./autoprefix */ \"./node_modules/reactcss/lib/autoprefix.js\");\n\nvar _autoprefix2 = _interopRequireDefault(_autoprefix);\n\nvar _hover2 = __webpack_require__(/*! ./components/hover */ \"./node_modules/reactcss/lib/components/hover.js\");\n\nvar _hover3 = _interopRequireDefault(_hover2);\n\nvar _active = __webpack_require__(/*! ./components/active */ \"./node_modules/reactcss/lib/components/active.js\");\n\nvar _active2 = _interopRequireDefault(_active);\n\nvar _loop2 = __webpack_require__(/*! ./loop */ \"./node_modules/reactcss/lib/loop.js\");\n\nvar _loop3 = _interopRequireDefault(_loop2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.hover = _hover3.default;\nexports.handleHover = _hover3.default;\nexports.handleActive = _active2.default;\nexports.loop = _loop3.default;\nvar ReactCSS = exports.ReactCSS = function ReactCSS(classes) {\n for (var _len = arguments.length, activations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n activations[_key - 1] = arguments[_key];\n }\n\n var activeNames = (0, _flattenNames2.default)(activations);\n var merged = (0, _mergeClasses2.default)(classes, activeNames);\n return (0, _autoprefix2.default)(merged);\n};\n\nexports.default = ReactCSS;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/reactcss/lib/index.js?"); + +/***/ }), + +/***/ "./node_modules/reactcss/lib/loop.js": +/*!*******************************************!*\ + !*** ./node_modules/reactcss/lib/loop.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar loopable = function loopable(i, length) {\n var props = {};\n var setProp = function setProp(name) {\n var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n props[name] = value;\n };\n\n i === 0 && setProp('first-child');\n i === length - 1 && setProp('last-child');\n (i === 0 || i % 2 === 0) && setProp('even');\n Math.abs(i % 2) === 1 && setProp('odd');\n setProp('nth-child', i);\n\n return props;\n};\n\nexports.default = loopable;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/reactcss/lib/loop.js?"); + +/***/ }), + +/***/ "./node_modules/reactcss/lib/mergeClasses.js": +/*!***************************************************!*\ + !*** ./node_modules/reactcss/lib/mergeClasses.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.mergeClasses = undefined;\n\nvar _forOwn2 = __webpack_require__(/*! lodash/forOwn */ \"./node_modules/lodash/forOwn.js\");\n\nvar _forOwn3 = _interopRequireDefault(_forOwn2);\n\nvar _cloneDeep2 = __webpack_require__(/*! lodash/cloneDeep */ \"./node_modules/lodash/cloneDeep.js\");\n\nvar _cloneDeep3 = _interopRequireDefault(_cloneDeep2);\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mergeClasses = exports.mergeClasses = function mergeClasses(classes) {\n var activeNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n var styles = classes.default && (0, _cloneDeep3.default)(classes.default) || {};\n activeNames.map(function (name) {\n var toMerge = classes[name];\n if (toMerge) {\n (0, _forOwn3.default)(toMerge, function (value, key) {\n if (!styles[key]) {\n styles[key] = {};\n }\n\n styles[key] = _extends({}, styles[key], toMerge[key]);\n });\n }\n\n return name;\n });\n return styles;\n};\n\nexports.default = mergeClasses;\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/reactcss/lib/mergeClasses.js?"); + +/***/ }), + +/***/ "./node_modules/stylis-rule-sheet/index.js": +/*!*************************************************!*\ + !*** ./node_modules/stylis-rule-sheet/index.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("(function (factory) {\n\t true ? (module['exports'] = factory()) :\n\t\tundefined\n}(function () {\n\n\t'use strict'\n\n\treturn function (insertRule) {\n\t\tvar delimiter = '/*|*/'\n\t\tvar needle = delimiter+'}'\n\n\t\tfunction toSheet (block) {\n\t\t\tif (block)\n\t\t\t\ttry {\n\t\t\t\t\tinsertRule(block + '}')\n\t\t\t\t} catch (e) {}\n\t\t}\n\n\t\treturn function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {\n\t\t\tswitch (context) {\n\t\t\t\t// property\n\t\t\t\tcase 1:\n\t\t\t\t\t// @import\n\t\t\t\t\tif (depth === 0 && content.charCodeAt(0) === 64)\n\t\t\t\t\t\treturn insertRule(content+';'), ''\n\t\t\t\t\tbreak\n\t\t\t\t// selector\n\t\t\t\tcase 2:\n\t\t\t\t\tif (ns === 0)\n\t\t\t\t\t\treturn content + delimiter\n\t\t\t\t\tbreak\n\t\t\t\t// at-rule\n\t\t\t\tcase 3:\n\t\t\t\t\tswitch (ns) {\n\t\t\t\t\t\t// @font-face, @page\n\t\t\t\t\t\tcase 102:\n\t\t\t\t\t\tcase 112:\n\t\t\t\t\t\t\treturn insertRule(selectors[0]+content), ''\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn content + (at === 0 ? delimiter : '')\n\t\t\t\t\t}\n\t\t\t\tcase -2:\n\t\t\t\t\tcontent.split(needle).forEach(toSheet)\n\t\t\t}\n\t\t}\n\t}\n}))\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/stylis-rule-sheet/index.js?"); + +/***/ }), + +/***/ "./node_modules/tinycolor2/tinycolor.js": +/*!**********************************************!*\ + !*** ./node_modules/tinycolor2/tinycolor.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.1\n// https://github.com/bgrins/TinyColor\n// Brian Grinstead, MIT License\n\n(function(Math) {\n\nvar trimLeft = /^\\s+/,\n trimRight = /\\s+$/,\n tinyCounter = 0,\n mathRound = Math.round,\n mathMin = Math.min,\n mathMax = Math.max,\n mathRandom = Math.random;\n\nfunction tinycolor (color, opts) {\n\n color = (color) ? color : '';\n opts = opts || { };\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n\n var rgb = inputToRGB(color);\n this._originalInput = color,\n this._r = rgb.r,\n this._g = rgb.g,\n this._b = rgb.b,\n this._a = rgb.a,\n this._roundA = mathRound(100*this._a) / 100,\n this._format = opts.format || rgb.format;\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) { this._r = mathRound(this._r); }\n if (this._g < 1) { this._g = mathRound(this._g); }\n if (this._b < 1) { this._b = mathRound(this._b); }\n\n this._ok = rgb.ok;\n this._tc_id = tinyCounter++;\n}\n\ntinycolor.prototype = {\n isDark: function() {\n return this.getBrightness() < 128;\n },\n isLight: function() {\n return !this.isDark();\n },\n isValid: function() {\n return this._ok;\n },\n getOriginalInput: function() {\n return this._originalInput;\n },\n getFormat: function() {\n return this._format;\n },\n getAlpha: function() {\n return this._a;\n },\n getBrightness: function() {\n //http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n getLuminance: function() {\n //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var RsRGB, GsRGB, BsRGB, R, G, B;\n RsRGB = rgb.r/255;\n GsRGB = rgb.g/255;\n BsRGB = rgb.b/255;\n\n if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}\n if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}\n if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}\n return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);\n },\n setAlpha: function(value) {\n this._a = boundAlpha(value);\n this._roundA = mathRound(100*this._a) / 100;\n return this;\n },\n toHsv: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };\n },\n toHsvString: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);\n return (this._a == 1) ?\n \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\" :\n \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \"+ this._roundA + \")\";\n },\n toHsl: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };\n },\n toHslString: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);\n return (this._a == 1) ?\n \"hsl(\" + h + \", \" + s + \"%, \" + l + \"%)\" :\n \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \"+ this._roundA + \")\";\n },\n toHex: function(allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function(allow3Char) {\n return '#' + this.toHex(allow3Char);\n },\n toHex8: function(allow4Char) {\n return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);\n },\n toHex8String: function(allow4Char) {\n return '#' + this.toHex8(allow4Char);\n },\n toRgb: function() {\n return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };\n },\n toRgbString: function() {\n return (this._a == 1) ?\n \"rgb(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \")\" :\n \"rgba(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \", \" + this._roundA + \")\";\n },\n toPercentageRgb: function() {\n return { r: mathRound(bound01(this._r, 255) * 100) + \"%\", g: mathRound(bound01(this._g, 255) * 100) + \"%\", b: mathRound(bound01(this._b, 255) * 100) + \"%\", a: this._a };\n },\n toPercentageRgbString: function() {\n return (this._a == 1) ?\n \"rgb(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%)\" :\n \"rgba(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%, \" + this._roundA + \")\";\n },\n toName: function() {\n if (this._a === 0) {\n return \"transparent\";\n }\n\n if (this._a < 1) {\n return false;\n }\n\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function(secondColor) {\n var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? \"GradientType = 1, \" : \"\";\n\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);\n }\n\n return \"progid:DXImageTransform.Microsoft.gradient(\"+gradientType+\"startColorstr=\"+hex8String+\",endColorstr=\"+secondHex8String+\")\";\n },\n toString: function(format) {\n var formatSet = !!format;\n format = format || this._format;\n\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format === \"hex\" || format === \"hex6\" || format === \"hex3\" || format === \"hex4\" || format === \"hex8\" || format === \"name\");\n\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === \"name\" && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === \"rgb\") {\n formattedString = this.toRgbString();\n }\n if (format === \"prgb\") {\n formattedString = this.toPercentageRgbString();\n }\n if (format === \"hex\" || format === \"hex6\") {\n formattedString = this.toHexString();\n }\n if (format === \"hex3\") {\n formattedString = this.toHexString(true);\n }\n if (format === \"hex4\") {\n formattedString = this.toHex8String(true);\n }\n if (format === \"hex8\") {\n formattedString = this.toHex8String();\n }\n if (format === \"name\") {\n formattedString = this.toName();\n }\n if (format === \"hsl\") {\n formattedString = this.toHslString();\n }\n if (format === \"hsv\") {\n formattedString = this.toHsvString();\n }\n\n return formattedString || this.toHexString();\n },\n clone: function() {\n return tinycolor(this.toString());\n },\n\n _applyModification: function(fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function() {\n return this._applyModification(lighten, arguments);\n },\n brighten: function() {\n return this._applyModification(brighten, arguments);\n },\n darken: function() {\n return this._applyModification(darken, arguments);\n },\n desaturate: function() {\n return this._applyModification(desaturate, arguments);\n },\n saturate: function() {\n return this._applyModification(saturate, arguments);\n },\n greyscale: function() {\n return this._applyModification(greyscale, arguments);\n },\n spin: function() {\n return this._applyModification(spin, arguments);\n },\n\n _applyCombination: function(fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function() {\n return this._applyCombination(analogous, arguments);\n },\n complement: function() {\n return this._applyCombination(complement, arguments);\n },\n monochromatic: function() {\n return this._applyCombination(monochromatic, arguments);\n },\n splitcomplement: function() {\n return this._applyCombination(splitcomplement, arguments);\n },\n triad: function() {\n return this._applyCombination(triad, arguments);\n },\n tetrad: function() {\n return this._applyCombination(tetrad, arguments);\n }\n};\n\n// If input is an object, force 1 into \"1.0\" to handle ratios properly\n// String input requires \"1.0\" as input, so 1 will be treated as 1\ntinycolor.fromRatio = function(color, opts) {\n if (typeof color == \"object\") {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === \"a\") {\n newColor[i] = color[i];\n }\n else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n\n return tinycolor(color, opts);\n};\n\n// Given a string or object, convert that input to RGB\n// Possible string inputs:\n//\n// \"red\"\n// \"#f00\" or \"f00\"\n// \"#ff0000\" or \"ff0000\"\n// \"#ff000000\" or \"ff000000\"\n// \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n// \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n// \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n// \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n// \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n// \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n// \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n//\nfunction inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = \"hsv\";\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n}\n\n\n// Conversion Functions\n// --------------------\n\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// \n\n// `rgbToRgb`\n// Handle bounds / percentage checking to conform to CSS color spec\n// \n// *Assumes:* r, g, b in [0, 255] or [0, 1]\n// *Returns:* { r, g, b } in [0, 255]\nfunction rgbToRgb(r, g, b){\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255\n };\n}\n\n// `rgbToHsl`\n// Converts an RGB color value to HSL.\n// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n// *Returns:* { h, s, l } in [0,1]\nfunction rgbToHsl(r, g, b) {\n\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b), min = mathMin(r, g, b);\n var h, s, l = (max + min) / 2;\n\n if(max == min) {\n h = s = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch(max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n\n h /= 6;\n }\n\n return { h: h, s: s, l: l };\n}\n\n// `hslToRgb`\n// Converts an HSL color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nfunction hslToRgb(h, s, l) {\n var r, g, b;\n\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n\n function hue2rgb(p, q, t) {\n if(t < 0) t += 1;\n if(t > 1) t -= 1;\n if(t < 1/6) return p + (q - p) * 6 * t;\n if(t < 1/2) return q;\n if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n return p;\n }\n\n if(s === 0) {\n r = g = b = l; // achromatic\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHsv`\n// Converts an RGB color value to HSV\n// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n// *Returns:* { h, s, v } in [0,1]\nfunction rgbToHsv(r, g, b) {\n\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b), min = mathMin(r, g, b);\n var h, s, v = max;\n\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n\n if(max == min) {\n h = 0; // achromatic\n }\n else {\n switch(max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n\n// `hsvToRgb`\n// Converts an HSV color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\n function hsvToRgb(h, s, v) {\n\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n\n var i = Math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHex`\n// Converts an RGB color to hex\n// Assumes r, g, and b are contained in the set [0, 255]\n// Returns a 3 or 6 character hex\nfunction rgbToHex(r, g, b, allow3Char) {\n\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n // Return a 3 character hex if possible\n if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join(\"\");\n}\n\n// `rgbaToHex`\n// Converts an RGBA color plus alpha transparency to hex\n// Assumes r, g, b are contained in the set [0, 255] and\n// a in [0, 1]. Returns a 4 or 8 character rgba hex\nfunction rgbaToHex(r, g, b, a, allow4Char) {\n\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16)),\n pad2(convertDecimalToHex(a))\n ];\n\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join(\"\");\n}\n\n// `rgbaToArgbHex`\n// Converts an RGBA color to an ARGB Hex8 string\n// Rarely used, but required for \"toFilter()\"\nfunction rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}\n\n// `equals`\n// Can be called with any tinycolor input\ntinycolor.equals = function (color1, color2) {\n if (!color1 || !color2) { return false; }\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n};\n\ntinycolor.random = function() {\n return tinycolor.fromRatio({\n r: mathRandom(),\n g: mathRandom(),\n b: mathRandom()\n });\n};\n\n\n// Modification Functions\n// ----------------------\n// Thanks to less.js for some of the basics here\n// \n\nfunction desaturate(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\n\nfunction saturate(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\n\nfunction greyscale(color) {\n return tinycolor(color).desaturate(100);\n}\n\nfunction lighten (color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\nfunction brighten(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var rgb = tinycolor(color).toRgb();\n rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));\n rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));\n rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));\n return tinycolor(rgb);\n}\n\nfunction darken (color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\n// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n// Values outside of this range will be wrapped into this range.\nfunction spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}\n\n// Combination Functions\n// ---------------------\n// Thanks to jQuery xColor for some of the ideas behind these\n// \n\nfunction complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n}\n\nfunction triad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })\n ];\n}\n\nfunction tetrad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })\n ];\n}\n\nfunction splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),\n tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})\n ];\n}\n\nfunction analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n\n for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n}\n\nfunction monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h, s = hsv.s, v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n\n while (results--) {\n ret.push(tinycolor({ h: h, s: s, v: v}));\n v = (v + modification) % 1;\n }\n\n return ret;\n}\n\n// Utility Functions\n// ---------------------\n\ntinycolor.mix = function(color1, color2, amount) {\n amount = (amount === 0) ? 0 : (amount || 50);\n\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n\n var p = amount / 100;\n\n var rgba = {\n r: ((rgb2.r - rgb1.r) * p) + rgb1.r,\n g: ((rgb2.g - rgb1.g) * p) + rgb1.g,\n b: ((rgb2.b - rgb1.b) * p) + rgb1.b,\n a: ((rgb2.a - rgb1.a) * p) + rgb1.a\n };\n\n return tinycolor(rgba);\n};\n\n\n// Readability Functions\n// ---------------------\n// false\n// tinycolor.isReadable(\"#000\", \"#111\",{level:\"AA\",size:\"large\"}) => false\ntinycolor.isReadable = function(color1, color2, wcag2) {\n var readability = tinycolor.readability(color1, color2);\n var wcag2Parms, out;\n\n out = false;\n\n wcag2Parms = validateWCAG2Parms(wcag2);\n switch (wcag2Parms.level + wcag2Parms.size) {\n case \"AAsmall\":\n case \"AAAlarge\":\n out = readability >= 4.5;\n break;\n case \"AAlarge\":\n out = readability >= 3;\n break;\n case \"AAAsmall\":\n out = readability >= 7;\n break;\n }\n return out;\n\n};\n\n// `mostReadable`\n// Given a base color and a list of possible foreground or background\n// colors for that base, returns the most readable color.\n// Optionally returns Black or White if the most readable color is unreadable.\n// *Example*\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString(); // \"#ffffff\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString(); // \"#faf3f3\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString(); // \"#ffffff\"\ntinycolor.mostReadable = function(baseColor, colorList, args) {\n var bestColor = null;\n var bestScore = 0;\n var readability;\n var includeFallbackColors, level, size ;\n args = args || {};\n includeFallbackColors = args.includeFallbackColors ;\n level = args.level;\n size = args.size;\n\n for (var i= 0; i < colorList.length ; i++) {\n readability = tinycolor.readability(baseColor, colorList[i]);\n if (readability > bestScore) {\n bestScore = readability;\n bestColor = tinycolor(colorList[i]);\n }\n }\n\n if (tinycolor.isReadable(baseColor, bestColor, {\"level\":level,\"size\":size}) || !includeFallbackColors) {\n return bestColor;\n }\n else {\n args.includeFallbackColors=false;\n return tinycolor.mostReadable(baseColor,[\"#fff\", \"#000\"],args);\n }\n};\n\n\n// Big List of Colors\n// ------------------\n// \nvar names = tinycolor.names = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"0ff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000\",\n blanchedalmond: \"ffebcd\",\n blue: \"00f\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n burntsienna: \"ea7e5d\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"0ff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkgrey: \"a9a9a9\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkslategrey: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dimgrey: \"696969\",\n dodgerblue: \"1e90ff\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"f0f\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n grey: \"808080\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgray: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightgrey: \"d3d3d3\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslategray: \"789\",\n lightslategrey: \"789\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"0f0\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"f0f\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370db\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"db7093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n rebeccapurple: \"663399\",\n red: \"f00\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n slategrey: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n wheat: \"f5deb3\",\n white: \"fff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ff0\",\n yellowgreen: \"9acd32\"\n};\n\n// Make it easy to access colors via `hexNames[hex]`\nvar hexNames = tinycolor.hexNames = flip(names);\n\n\n// Utilities\n// ---------\n\n// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\nfunction flip(o) {\n var flipped = { };\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n}\n\n// Return a valid alpha value [0,1] with all invalid values being set to 1\nfunction boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n}\n\n// Take input from [0, n] and return it as [0, 1]\nfunction bound01(n, max) {\n if (isOnePointZero(n)) { n = \"100%\"; }\n\n var processPercent = isPercentage(n);\n n = mathMin(max, mathMax(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if ((Math.abs(n - max) < 0.000001)) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return (n % max) / parseFloat(max);\n}\n\n// Force a number between 0 and 1\nfunction clamp01(val) {\n return mathMin(1, mathMax(0, val));\n}\n\n// Parse a base-16 hex value into a base-10 integer\nfunction parseIntFromHex(val) {\n return parseInt(val, 16);\n}\n\n// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n// \nfunction isOnePointZero(n) {\n return typeof n == \"string\" && n.indexOf('.') != -1 && parseFloat(n) === 1;\n}\n\n// Check to see if string passed in is a percentage\nfunction isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n}\n\n// Force a hex value to have 2 characters\nfunction pad2(c) {\n return c.length == 1 ? '0' + c : '' + c;\n}\n\n// Replace a decimal with it's percentage value\nfunction convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}\n\n// Converts a decimal to a hex value\nfunction convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n// Converts a hex value to a decimal\nfunction convertHexToDecimal(h) {\n return (parseIntFromHex(h) / 255);\n}\n\nvar matchers = (function() {\n\n // \n var CSS_INTEGER = \"[-\\\\+]?\\\\d+%?\";\n\n // \n var CSS_NUMBER = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\";\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = \"(?:\" + CSS_NUMBER + \")|(?:\" + CSS_INTEGER + \")\";\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n var PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n\n return {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp(\"rgb\" + PERMISSIVE_MATCH3),\n rgba: new RegExp(\"rgba\" + PERMISSIVE_MATCH4),\n hsl: new RegExp(\"hsl\" + PERMISSIVE_MATCH3),\n hsla: new RegExp(\"hsla\" + PERMISSIVE_MATCH4),\n hsv: new RegExp(\"hsv\" + PERMISSIVE_MATCH3),\n hsva: new RegExp(\"hsva\" + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n})();\n\n// `isValidCSSUnit`\n// Take in a single string / number and check to see if it looks like a CSS unit\n// (see `matchers` above for definition).\nfunction isValidCSSUnit(color) {\n return !!matchers.CSS_UNIT.exec(color);\n}\n\n// `stringInputToObject`\n// Permissive string parsing. Take in a number of formats, and output an object\n// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\nfunction stringInputToObject(color) {\n\n color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color == 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: \"name\" };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if ((match = matchers.rgb.exec(color))) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n if ((match = matchers.rgba.exec(color))) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n if ((match = matchers.hsl.exec(color))) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n if ((match = matchers.hsla.exec(color))) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n if ((match = matchers.hsv.exec(color))) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n if ((match = matchers.hsva.exec(color))) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n if ((match = matchers.hex8.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if ((match = matchers.hex6.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n if ((match = matchers.hex4.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n a: convertHexToDecimal(match[4] + '' + match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if ((match = matchers.hex3.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n\n return false;\n}\n\nfunction validateWCAG2Parms(parms) {\n // return valid WCAG2 parms for isReadable.\n // If input parms are invalid, return {\"level\":\"AA\", \"size\":\"small\"}\n var level, size;\n parms = parms || {\"level\":\"AA\", \"size\":\"small\"};\n level = (parms.level || \"AA\").toUpperCase();\n size = (parms.size || \"small\").toLowerCase();\n if (level !== \"AA\" && level !== \"AAA\") {\n level = \"AA\";\n }\n if (size !== \"small\" && size !== \"large\") {\n size = \"small\";\n }\n return {\"level\":level, \"size\":size};\n}\n\n// Node: Export function\nif ( true && module.exports) {\n module.exports = tinycolor;\n}\n// AMD/requirejs: Define the module\nelse if (true) {\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return tinycolor;}).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n}\n// Browser: Expose to window\nelse {}\n\n})(Math);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/tinycolor2/tinycolor.js?"); + +/***/ }), + +/***/ "./node_modules/util/support/isBufferBrowser.js": +/*!******************************************************!*\ + !*** ./node_modules/util/support/isBufferBrowser.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/util/support/isBufferBrowser.js?"); + +/***/ }), + +/***/ "./node_modules/util/util.js": +/*!***********************************!*\ + !*** ./node_modules/util/util.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = __webpack_require__(/*! ./support/isBuffer */ \"./node_modules/util/support/isBufferBrowser.js\");\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/util/util.js?"); + +/***/ }), + +/***/ "./node_modules/webpack/buildin/global.js": +/*!***********************************!*\ + !*** (webpack)/buildin/global.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/(webpack)/buildin/global.js?"); + +/***/ }), + +/***/ "./node_modules/webpack/buildin/module.js": +/*!***********************************!*\ + !*** (webpack)/buildin/module.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/(webpack)/buildin/module.js?"); + +/***/ }), + +/***/ "./packages/core/components/disabled/context.js": +/*!******************************************************!*\ + !*** ./packages/core/components/disabled/context.js ***! + \******************************************************/ +/*! exports provided: Provider, Consumer */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Provider\", function() { return Provider; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Consumer\", function() { return Consumer; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n\nvar _createContext = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"])(false),\n Provider = _createContext.Provider,\n Consumer = _createContext.Consumer;\n\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/disabled/context.js?"); + +/***/ }), + +/***/ "./packages/core/components/disabled/index.js": +/*!****************************************************!*\ + !*** ./packages/core/components/disabled/index.js ***! + \****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./context */ \"./packages/core/components/disabled/context.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Names of control nodes which qualify for disabled behavior.\n *\n * See WHATWG HTML Standard: 4.10.18.5: \"Enabling and disabling form controls: the disabled attribute\".\n *\n * @link https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute\n *\n * @type {string[]}\n */\n\nvar DISABLED_ELIGIBLE_NODE_NAMES = ['BUTTON', 'FIELDSET', 'INPUT', 'OPTGROUP', 'OPTION', 'SELECT', 'TEXTAREA'];\n/**\n * Disables descendant tabbable elements and prevents pointer interaction.\n *\n * @borrows https://github.com/WordPress/gutenberg/blob/master/packages/components/src/disabled/index.js\n */\n\nvar Disabled =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(Disabled, _Component);\n\n function Disabled() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Disabled);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(Disabled)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"node\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"disable\", Object(lodash__WEBPACK_IMPORTED_MODULE_8__[\"debounce\"])(function () {\n _this.node.current.querySelectorAll(\"\\n\\t\\t\\t[tabindex],\\n\\t\\t\\tbutton:not([disabled]),\\n\\t\\t\\tinput:not([type=\\\"hidden\\\"]):not([disabled]),\\n\\t\\t\\tselect:not([disabled]),\\n\\t\\t\\ttextarea:not([disabled]),\\n\\t\\t\\tiframe,\\n\\t\\t\\tobject,\\n\\t\\t\\tembed,\\n\\t\\t\\t[contenteditable]:not([contenteditable=false])\\n\\t\\t\").forEach(function (node) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_8__[\"includes\"])(DISABLED_ELIGIBLE_NODE_NAMES, node.nodeName)) {\n node.setAttribute('disabled', '');\n }\n\n if (node.hasAttribute('tabindex')) {\n node.removeAttribute('tabindex');\n }\n\n if (node.hasAttribute('contenteditable')) {\n node.setAttribute('contenteditable', 'false');\n }\n });\n }, {\n leading: true\n }));\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Disabled, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n this.disable();\n this.observer = new window.MutationObserver(this.disable);\n this.observer.observe(this.node.current, {\n childList: true,\n attributes: true,\n subtree: true\n });\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.observer.disconnect();\n this.disable.cancel();\n }\n /**\n * Disables all elements.\n *\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Objec}\n */\n value: function render() {\n var _this$props = this.props,\n className = _this$props.className,\n children = _this$props.children;\n return __webpack_provided_wp_dot_element.createElement(_context__WEBPACK_IMPORTED_MODULE_9__[\"Provider\"], {\n value: true\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n ref: this.node,\n className: className\n }, children));\n }\n }]);\n\n return Disabled;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"]);\n\nDisabled.Consumer = _context__WEBPACK_IMPORTED_MODULE_9__[\"Consumer\"];\n/* harmony default export */ __webpack_exports__[\"default\"] = (Disabled);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/disabled/index.js?"); + +/***/ }), + +/***/ "./packages/core/components/field/index.js": +/*!*************************************************!*\ + !*** ./packages/core/components/field/index.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/components/field/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _components_disabled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/disabled */ \"./packages/core/components/disabled/index.js\");\n/* harmony import */ var _hocs_with_filters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../hocs/with-filters */ \"./packages/core/hocs/with-filters/index.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Renders the base wrapper of the field.\n *\n * @param {Object} props\n * @param {string} props.id\n * @param {Object} props.field\n * @param {?string} props.error\n * @param {boolean} props.hidden\n * @param {string} props.className\n * @param {mixed} props.children\n * @return {Object}\n */\n\nfunction Field(_ref) {\n var id = _ref.id,\n field = _ref.field,\n error = _ref.error,\n hidden = _ref.hidden,\n className = _ref.className,\n children = _ref.children;\n var styles = !!field.width ? {\n flexBasis: \"\".concat(field.width, \"%\")\n } : null;\n var classes = ['cf-field', \"cf-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"kebabCase\"])(field.type)), {\n 'cf-field--has-width': !!field.width,\n 'cf-field--invalid': !!error\n }, className].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(field.classes));\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_1___default()(classes),\n style: styles,\n hidden: hidden\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-field__head\"\n }, field.label && __webpack_provided_wp_dot_element.createElement(\"label\", {\n className: \"cf-field__label\",\n htmlFor: id\n }, field.label, field.required && __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-field__asterisk\"\n }, \"*\"))), !hidden && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-field__body\"\n }, children), hidden && __webpack_provided_wp_dot_element.createElement(_components_disabled__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n className: \"cf-field__body\"\n }, children), field.help_text && __webpack_provided_wp_dot_element.createElement(\"em\", {\n className: \"cf-field__help\",\n dangerouslySetInnerHTML: {\n __html: field.help_text\n }\n }), error && __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-field__error\"\n }, error));\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__[\"compose\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__[\"withSelect\"])(function (select, props) {\n var _select = select('carbon-fields/core'),\n getValidationError = _select.getValidationError,\n isFieldVisible = _select.isFieldVisible;\n\n return {\n error: getValidationError(props.id),\n hidden: !isFieldVisible(props.id)\n };\n}), Object(_hocs_with_filters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])('carbon-fields.field-wrapper'))(Field));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/field/index.js?"); + +/***/ }), + +/***/ "./packages/core/components/field/style.scss": +/*!***************************************************!*\ + !*** ./packages/core/components/field/style.scss ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/field/style.scss?"); + +/***/ }), + +/***/ "./packages/core/components/media-library/index.js": +/*!*********************************************************!*\ + !*** ./packages/core/components/media-library/index.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\nvar MediaLibrary =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_8___default()(MediaLibrary, _Component);\n\n function MediaLibrary() {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4___default()(this, MediaLibrary);\n\n return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(MediaLibrary).apply(this, arguments));\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5___default()(MediaLibrary, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props = this.props,\n onSelect = _this$props.onSelect,\n typeFilter = _this$props.typeFilter;\n this.props.initMediaBrowser({\n onSelect: onSelect,\n typeFilter: typeFilter\n });\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.destroyMediaBrowser();\n }\n /**\n * Render the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var openMediaBrowser = this.props.openMediaBrowser;\n return this.props.children({\n openMediaBrowser: openMediaBrowser\n });\n }\n }]);\n\n return MediaLibrary;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var actions = [{\n event: 'initMediaBrowserEvent',\n prop: 'initMediaBrowser',\n type: 'INIT_MEDIA_BROWSER'\n }, {\n event: 'openMediaBrowserEvent',\n prop: 'openMediaBrowser',\n type: 'OPEN_MEDIA_BROWSER'\n }, {\n event: 'destroyMediaBrowserEvent',\n prop: 'destroyMediaBrowser',\n type: 'DESTROY_MEDIA_BROWSER'\n }].map(function (actionData) {\n var _component$useEvent = component.useEvent(actionData.event),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3___default()(_component$useEvent, 2),\n actionChannel$ = _component$useEvent2[0],\n action = _component$useEvent2[1];\n\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default()({}, actionData, {\n action: action,\n channel$: actionChannel$\n });\n });\n var combined$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"combine\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(actions.map(function (_ref) {\n var action = _ref.action,\n prop = _ref.prop;\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_13__[\"default\"])({\n action: action,\n prop: prop\n });\n }))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"map\"])(function (combinedActions) {\n return Object(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"toProps\"])(combinedActions.reduce(function (acc, curr) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default()({}, acc, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, curr.prop, curr.action));\n }, {}));\n }));\n return callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"merge\"].apply(void 0, [combined$].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(actions.map(function (_ref2) {\n var channel$ = _ref2.channel$,\n type = _ref2.type;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"pipe\"])(channel$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"map\"])(function (payload) {\n return {\n type: type,\n payload: payload\n };\n }));\n }))));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n var mediaBrowser = null;\n return function (effect) {\n switch (effect.type) {\n case 'INIT_MEDIA_BROWSER':\n var _effect$payload = effect.payload,\n onSelect = _effect$payload.onSelect,\n typeFilter = _effect$payload.typeFilter;\n\n if (!onSelect) {\n return;\n }\n\n mediaBrowser = wp.media({\n title: props.title,\n library: {\n type: typeFilter\n },\n button: {\n text: props.buttonLabel\n },\n multiple: props.multiple\n });\n mediaBrowser.on('select', function () {\n var file = mediaBrowser.state().get('selection').toJSON();\n onSelect(file);\n });\n break;\n\n case 'OPEN_MEDIA_BROWSER':\n if (mediaBrowser) {\n mediaBrowser.open();\n }\n\n break;\n\n case 'DESTROY_MEDIA_BROWSER':\n mediaBrowser = null;\n break;\n }\n };\n}\n\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"withEffects\"])(aperture, {\n handler: handler\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[\"compose\"])(applyWithEffects)(MediaLibrary));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/media-library/index.js?"); + +/***/ }), + +/***/ "./packages/core/components/no-options/index.js": +/*!******************************************************!*\ + !*** ./packages/core/components/no-options/index.js ***! + \******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * The external dependencies.\n */\n\n/**\n * Render a notice to inform the user that the field doesn't have\n * any options.\n *\n * @return {React.Element}\n */\n\nvar NoOptions = function NoOptions() {\n return __webpack_provided_wp_dot_element.createElement(\"em\", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('No options.', 'carbon-fields-ui'));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (NoOptions);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/no-options/index.js?"); + +/***/ }), + +/***/ "./packages/core/components/search-input/index.js": +/*!********************************************************!*\ + !*** ./packages/core/components/search-input/index.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/components/search-input/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_13__);\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * The keycode used to represent the \"Enter\" key.\n *\n * @type {number}\n */\n\nvar KEY_ENTER = 13;\n\nvar SearchInput =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(SearchInput, _Component);\n\n function SearchInput() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, SearchInput);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(SearchInput)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleChange\", function (e) {\n _this.props.onChange(e.target.value);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleKeyDown\", function (e) {\n if (e.keyCode === KEY_ENTER) {\n e.preventDefault();\n\n _this.props.onChange(e.target.value);\n }\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(SearchInput, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props = this.props,\n value = _this$props.value,\n className = _this$props.className,\n props = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(_this$props, [\"value\", \"className\"]);\n\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_9___default()('cf-search-input dashicons-before dashicons-search', className)\n }, __webpack_provided_wp_dot_element.createElement(\"input\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n type: \"text\",\n autoComplete: \"off\",\n className: \"cf-search-input__inner\",\n defaultValue: value,\n onChange: this.handleChange,\n onKeyDown: this.handleKeyDown\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"omit\"])(props, ['onChange']))));\n }\n }]);\n\n return SearchInput;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Component\"]);\n\n_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(SearchInput, \"defaultProps\", {\n placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Search...', 'carbon-fields-ui')\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SearchInput);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/search-input/index.js?"); + +/***/ }), + +/***/ "./packages/core/components/search-input/style.scss": +/*!**********************************************************!*\ + !*** ./packages/core/components/search-input/style.scss ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/search-input/style.scss?"); + +/***/ }), + +/***/ "./packages/core/components/sortable/index.js": +/*!****************************************************!*\ + !*** ./packages/core/components/sortable/index.js ***! + \****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\nvar Sortable =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(Sortable, _Component);\n\n function Sortable() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, Sortable);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Sortable)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleStart\", function (e, ui) {\n ui.item.data('index', ui.item.index());\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleUpdate\", function (e, ui) {\n var _this$props = _this.props,\n items = _this$props.items,\n forwardedRef = _this$props.forwardedRef,\n onUpdate = _this$props.onUpdate;\n var oldIndex = ui.item.data('index');\n var newIndex = ui.item.index();\n ui.item.removeData('index');\n window.jQuery(forwardedRef.current).sortable('cancel');\n onUpdate(immer__WEBPACK_IMPORTED_MODULE_9___default()(items, function (draft) {\n draft.splice.apply(draft, [newIndex, 0].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(draft.splice(oldIndex, 1))));\n }));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(Sortable, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props2 = this.props,\n options = _this$props2.options,\n forwardedRef = _this$props2.forwardedRef;\n window.jQuery(forwardedRef.current).sortable(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, options, {\n start: this.handleStart,\n update: this.handleUpdate\n }));\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var forwardedRef = this.props.forwardedRef;\n var $element = window.jQuery(forwardedRef.current);\n var instance = $element.sortable('instance');\n\n if (instance) {\n $element.sortable('destroy');\n }\n }\n /**\n * Handles the `start` event.\n *\n * @param {Object} e\n * @param {Object} ui\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n return _wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Children\"].only(this.props.children);\n }\n }]);\n\n return Sortable;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Sortable);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/sortable/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/association/index.js": +/*!***************************************************!*\ + !*** ./packages/core/fields/association/index.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/association/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\nvar AssociationField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(AssociationField, _Component);\n\n function AssociationField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, AssociationField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(AssociationField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"selectedList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSearchChange\", function (queryTerm) {\n var _this$props = _this.props,\n fetchOptions = _this$props.fetchOptions,\n setState = _this$props.setState;\n setState({\n queryTerm: queryTerm\n });\n fetchOptions({\n queryTerm: queryTerm\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddItem\", function (option) {\n var _this$props2 = _this.props,\n field = _this$props2.field,\n id = _this$props2.id,\n value = _this$props2.value,\n onChange = _this$props2.onChange,\n setState = _this$props2.setState,\n selectedOptions = _this$props2.selectedOptions; // Don't do anything if the duplicates aren't allowed and\n // the item is already selected.\n\n if (!field.duplicates_allowed && option.disabled) {\n return;\n } // Don't do anything, because the maximum is reached.\n\n\n if (field.max > 0 && value.length >= field.max) {\n // alert( carbonFieldsL10n.field.maxNumItemsReached.replace( '%s', field.max ) );\n return;\n }\n\n onChange(id, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(value).concat([Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"pick\"])(option, 'id', 'type', 'subtype')]));\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat([option])\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveItem\", function (option) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n id = _this$props3.id,\n onChange = _this$props3.onChange,\n setState = _this$props3.setState,\n selectedOptions = _this$props3.selectedOptions;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(value, option));\n setState({\n selectedOptions: Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(selectedOptions, option)\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSort\", function (items) {\n var _this$props4 = _this.props,\n id = _this$props4.id,\n onChange = _this$props4.onChange;\n onChange(id, items);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(AssociationField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props5 = this.props,\n fetchSelectedOptions = _this$props5.fetchSelectedOptions,\n field = _this$props5.field,\n value = _this$props5.value,\n setState = _this$props5.setState;\n setState({\n options: field.options.options,\n totalOptionsCount: field.options.total_options\n });\n\n if (value) {\n fetchSelectedOptions();\n }\n }\n /**\n * Handles the change of search.\n *\n * @param {string} queryTerm\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props6 = this.props,\n name = _this$props6.name,\n value = _this$props6.value,\n field = _this$props6.field,\n totalOptionsCount = _this$props6.totalOptionsCount,\n selectedOptions = _this$props6.selectedOptions,\n queryTerm = _this$props6.queryTerm;\n var options = this.props.options;\n\n if (!field.duplicates_allowed) {\n options = immer__WEBPACK_IMPORTED_MODULE_10___default()(options, function (draft) {\n draft.map(function (option) {\n option.disabled = !!Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"find\"])(value, function (selectedOption) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isMatch\"])(selectedOption, {\n id: option.id,\n type: option.type,\n subtype: option.subtype\n });\n });\n return option;\n });\n });\n } // eslint-disable-next-line\n\n\n var sortableOptions = {\n axis: 'y',\n items: 'li',\n forceHelperSize: true,\n forcePlaceholderSize: true,\n scroll: true,\n handle: '.mobile-handle'\n };\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Fragment\"], null, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__bar\"\n }, __webpack_provided_wp_dot_element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n value: queryTerm,\n onChange: this.handleSearchChange\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__counter\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Showing %1$d of %2$d results', 'carbon-fields-ui'), Number(options.length), Number(totalOptionsCount)))), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__cols\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__col\"\n }, options.map(function (option, index) {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_16___default()('cf-association__option', {\n 'cf-association__option--selected': option.disabled\n }),\n key: index\n }, option.thumbnail && __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: option.thumbnail\n }), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, option.title), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, option.type)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, __webpack_provided_wp_dot_element.createElement(\"a\", {\n className: \"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit\",\n href: option.edit_link\n }), !option.disabled && (field.max < 0 || value.length < field.max) && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-plus-alt\",\n onClick: function onClick() {\n return _this2.handleAddItem(option);\n }\n })));\n })), __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n forwardedRef: this.selectedList,\n items: value,\n options: {\n axis: 'y',\n forceHelperSize: true,\n forcePlaceholderSize: true,\n scroll: true\n },\n onUpdate: this.handleSort\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__col\",\n ref: this.selectedList\n }, !!selectedOptions.length && value.map(function (option, index) {\n var optionData = selectedOptions.find(function (selectedOption) {\n return selectedOption.id === option.id && selectedOption.type === option.type && selectedOption.subtype === option.subtype;\n });\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option\",\n key: index\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-sort dashicons dashicons-menu\"\n }), optionData.thumbnail && __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: optionData.thumbnail\n }), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, optionData.title), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, optionData.type)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-dismiss\",\n onClick: function onClick() {\n return _this2.handleRemoveItem(option);\n }\n })), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[\").concat(index, \"]\"),\n value: \"\".concat(optionData.type, \":\").concat(optionData.subtype, \":\").concat(optionData.id),\n readOnly: true\n }));\n })))));\n }\n }]);\n\n return AssociationField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Component\"]);\n\nvar fetchData = function fetchData(field, data) {\n return Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/association/\"), 'get', _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({\n container_id: field.container_id,\n field_id: field.base_name\n }, data));\n};\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var actions = [{\n event: 'fetchOptionsEvent',\n prop: 'fetchOptions',\n type: 'FETCH_OPTIONS'\n }, {\n event: 'fetchSelectedOptionsEvent',\n prop: 'fetchSelectedOptions',\n type: 'FETCH_SELECTED_OPTIONS'\n }].map(function (actionData) {\n var _component$useEvent = component.useEvent(actionData.event),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n actionChannel$ = _component$useEvent2[0],\n action = _component$useEvent2[1];\n\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, actionData, {\n action: action,\n channel$: actionChannel$\n });\n });\n var combined$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"combine\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref) {\n var action = _ref.action,\n prop = _ref.prop;\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_19__[\"default\"])({\n action: action,\n prop: prop\n });\n }))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (combinedActions) {\n return Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"toProps\"])(combinedActions.reduce(function (acc, curr) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, acc, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()({}, curr.prop, curr.action));\n }, {}));\n }));\n return callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"merge\"].apply(void 0, [combined$].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref2) {\n var channel$ = _ref2.channel$,\n type = _ref2.type;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(channel$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (payload) {\n return {\n type: type,\n payload: payload\n };\n }));\n }))));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var field = props.field,\n setState = props.setState,\n selectedOptions = props.selectedOptions;\n\n switch (type) {\n case 'FETCH_OPTIONS':\n // eslint-disable-next-line\n var request = window.jQuery.get(window.ajaxurl, {\n action: 'carbon_fields_fetch_association_options',\n term: payload.queryTerm,\n container_id: field.container_id,\n field_name: field.base_name\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('An error occurred while trying to fetch association options.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n setState({\n options: response.data.options,\n totalOptionsCount: response.data.total_options\n });\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n break;\n\n case 'FETCH_SELECTED_OPTIONS':\n fetchData(field, {\n options: props.value\n }).then(function (response) {\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(response))\n });\n });\n break;\n }\n };\n}\n\nvar applyWithState = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"withState\"])({\n options: [],\n selectedOptions: [],\n totalOptionsCount: 0,\n queryTerm: ''\n});\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"withEffects\"])(aperture, {\n handler: handler\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__[\"addFilter\"])('carbon-fields.association.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Minimum number of items not reached (%s items)', 'carbon-fields-ui'), [field.min]);\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"compose\"])(applyWithState, applyWithEffects)(AssociationField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/association/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/association/style.scss": +/*!*****************************************************!*\ + !*** ./packages/core/fields/association/style.scss ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/association/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/checkbox/index.js": +/*!************************************************!*\ + !*** ./packages/core/fields/checkbox/index.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/checkbox/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_9__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar CheckboxField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(CheckboxField, _Component);\n\n function CheckboxField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, CheckboxField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(CheckboxField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n field = _this$props.field,\n value = _this$props.value,\n onChange = _this$props.onChange;\n onChange(id, value === field.option_value ? '' : field.option_value);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(CheckboxField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Fragment\"], null, __webpack_provided_wp_dot_element.createElement(\"input\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n type: \"checkbox\",\n id: id,\n name: name,\n checked: value,\n value: field.option_value,\n className: \"cf-checkbox__input\",\n onChange: this.handleChange\n }, field.attributes)), __webpack_provided_wp_dot_element.createElement(\"label\", {\n className: \"cf-checkbox__label\",\n htmlFor: id\n }, field.option_label));\n }\n }]);\n\n return CheckboxField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (CheckboxField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/checkbox/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/checkbox/style.scss": +/*!**************************************************!*\ + !*** ./packages/core/fields/checkbox/style.scss ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/checkbox/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/color/index.js": +/*!*********************************************!*\ + !*** ./packages/core/fields/color/index.js ***! + \*********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/color/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _picker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./picker */ \"./packages/core/fields/color/picker.js\");\n/* harmony import */ var _utils_hex_to_rgba__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../utils/hex-to-rgba */ \"./packages/core/utils/hex-to-rgba.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar ColorField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ColorField, _Component);\n\n function ColorField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ColorField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ColorField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n showPicker: false\n /**\n * Returns the RGBA format of the currently set color\n *\n * @return {void}\n */\n\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"getBackgrounColor\", function () {\n var _this$props = _this.props,\n field = _this$props.field,\n value = _this$props.value;\n var colorHex = value ? value : '#FFFFFFFF';\n\n var _hexToRgba = Object(_utils_hex_to_rgba__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(colorHex),\n _hexToRgba2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_hexToRgba, 4),\n r = _hexToRgba2[0],\n g = _hexToRgba2[1],\n b = _hexToRgba2[2],\n a = _hexToRgba2[3];\n\n var rgbaColor = {\n r: r,\n g: g,\n b: b,\n a: field.alphaEnabled ? a : 1\n };\n return \"rgba(\".concat(Object.values(rgbaColor).join(', '), \")\");\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (color) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n onChange = _this$props2.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"get\"])(color, 'hex', ''));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"togglePicker\", function () {\n return _this.setState({\n showPicker: !_this.state.showPicker\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ColorField, [{\n key: \"render\",\n\n /**\n * Render a color input field.\n *\n * @return {React.Element}\n */\n value: function render() {\n var _this2 = this;\n\n var showPicker = this.state.showPicker;\n var _this$props3 = this.props,\n id = _this$props3.id,\n name = _this$props3.name,\n value = _this$props3.value,\n field = _this$props3.field;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-color__inner\"\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n id: id,\n name: name,\n value: value\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-color__toggle\",\n onClick: this.togglePicker\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-color__preview\",\n style: {\n backgroundColor: this.getBackgrounColor()\n }\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-color__toggle-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__[\"__\"])('Select a color', 'carbon-fields-ui'))), showPicker && __webpack_provided_wp_dot_element.createElement(_picker__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n color: value,\n onChange: this.handleChange,\n disableAlpha: !field.alphaEnabled,\n presetColors: field.palette,\n onClose: function onClose() {\n return showPicker ? _this2.togglePicker() : null;\n }\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button-link cf-color__reset\",\n onClick: function onClick() {\n return _this2.handleChange();\n }\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"dashicons dashicons-no\"\n })));\n }\n }]);\n\n return ColorField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ColorField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/color/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/color/picker.js": +/*!**********************************************!*\ + !*** ./packages/core/fields/color/picker.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var react_color_lib_Sketch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-color/lib/Sketch */ \"./node_modules/react-color/lib/Sketch.js\");\n/* harmony import */ var react_color_lib_Sketch__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react_color_lib_Sketch__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var react_onclickoutside__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react-onclickoutside */ \"./node_modules/react-onclickoutside/dist/react-onclickoutside.es.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\nvar Picker =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(Picker, _Component);\n\n function Picker() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Picker);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(Picker)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleClickOutside\", function () {\n return _this.props.onClose();\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Picker, [{\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props = this.props,\n color = _this$props.color,\n onChange = _this$props.onChange,\n disableAlpha = _this$props.disableAlpha,\n presetColors = _this$props.presetColors;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n id: \"carbon-color-picker-wrapper\",\n className: \"cf-color__picker\"\n }, __webpack_provided_wp_dot_element.createElement(react_color_lib_Sketch__WEBPACK_IMPORTED_MODULE_8___default.a, {\n color: color,\n onChange: onChange,\n disableAlpha: disableAlpha,\n presetColors: presetColors\n }));\n }\n }]);\n\n return Picker;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(react_onclickoutside__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(Picker));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/color/picker.js?"); + +/***/ }), + +/***/ "./packages/core/fields/color/style.scss": +/*!***********************************************!*\ + !*** ./packages/core/fields/color/style.scss ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/color/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/complex/group.js": +/*!***********************************************!*\ + !*** ./packages/core/fields/complex/group.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../registry/fields */ \"./packages/core/registry/fields.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar ComplexGroup =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexGroup, _Component);\n\n function ComplexGroup() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexGroup);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexGroup)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleClick\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onToggle = _this$props.onToggle;\n onToggle(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneClick\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n onClone = _this$props2.onClone;\n onClone(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveClick\", function () {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n onRemove = _this$props3.onRemove;\n onRemove(id);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexGroup, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n index = _this$props4.index,\n label = _this$props4.label,\n name = _this$props4.name,\n prefix = _this$props4.prefix,\n tabbed = _this$props4.tabbed,\n hidden = _this$props4.hidden,\n collapsed = _this$props4.collapsed,\n allowClone = _this$props4.allowClone,\n fields = _this$props4.fields,\n context = _this$props4.context,\n onFieldSetup = _this$props4.onFieldSetup;\n var groupClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group', {\n 'cf-complex__group--collapsed': collapsed\n });\n var toggleClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('dashicons-before', 'cf-complex__group-action-icon', {\n 'dashicons-arrow-up': !collapsed,\n 'dashicons-arrow-down': collapsed\n });\n var actionsClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group-actions', {\n 'cf-complex__group-actions--tabbed': tabbed\n });\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: groupClasses,\n hidden: hidden\n }, name && __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(prefix, \"[value]\"),\n value: name\n }), !tabbed && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__group-head\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-index\"\n }, index + 1), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-title\"\n }, label)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__group-body\",\n hidden: collapsed\n }, fields.map(function (field) {\n var FieldEdit = Object(_registry_fields__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, context);\n\n if (!FieldEdit) {\n return null;\n }\n\n var _onFieldSetup = onFieldSetup(field, {}, _this2.props),\n _onFieldSetup2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_onFieldSetup, 2),\n Field = _onFieldSetup2[0],\n props = _onFieldSetup2[1];\n\n return (// The `key` will be assigned via `onFieldSetup`.\n // eslint-disable-next-line react/jsx-key\n __webpack_provided_wp_dot_element.createElement(Field, props, __webpack_provided_wp_dot_element.createElement(FieldEdit, props))\n );\n })), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: actionsClasses\n }, allowClone && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleCloneClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"dashicons-before dashicons-admin-page cf-complex__group-action-icon\"\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Duplicate', 'carbon-fields-ui'))), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleRemoveClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"dashicons-before dashicons-trash cf-complex__group-action-icon\"\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Remove', 'carbon-fields-ui'))), !tabbed && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleToggleClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: toggleClasses\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Collapse', 'carbon-fields-ui')))));\n }\n }]);\n\n return ComplexGroup;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexGroup);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/group.js?"); + +/***/ }), + +/***/ "./packages/core/fields/complex/index.js": +/*!***********************************************!*\ + !*** ./packages/core/fields/complex/index.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./tabs */ \"./packages/core/fields/complex/tabs.js\");\n/* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./inserter */ \"./packages/core/fields/complex/inserter.js\");\n/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./group */ \"./packages/core/fields/complex/group.js\");\n/* harmony import */ var _placeholder__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./placeholder */ \"./packages/core/fields/complex/placeholder.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"groupsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"tabsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"state\", {\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(_this.props.value, \"0.\".concat(_this.props.groupIdKey), null)\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddGroup\", function (selection) {\n var _this$props = _this.props,\n groupIdKey = _this$props.groupIdKey,\n onAddGroup = _this$props.onAddGroup;\n onAddGroup(selection, function (group) {\n if (_this.isTabbed) {\n _this.handleTabsChange(group[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleCloneGroup\", function (groupId) {\n var _this$props2 = _this.props,\n groupIdKey = _this$props2.groupIdKey,\n onCloneGroup = _this$props2.onCloneGroup;\n\n var group = _this.findGroup(groupId);\n\n onCloneGroup(group, function (clonedGroup) {\n if (_this.isTabbed) {\n _this.handleTabsChange(clonedGroup[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveGroup\", function (groupId) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n groupIdKey = _this$props3.groupIdKey,\n onRemoveGroup = _this$props3.onRemoveGroup;\n\n var group = _this.findGroup(groupId);\n\n if (_this.isTabbed) {\n var currentIndex = value.indexOf(group);\n var nextIndex = currentIndex > 0 ? currentIndex - 1 : 1;\n\n _this.setState({\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(value, \"\".concat(nextIndex, \".\").concat(groupIdKey), null)\n });\n }\n\n onRemoveGroup(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleToggleAllClick\", function () {\n var _this$props4 = _this.props,\n allGroupsAreCollapsed = _this$props4.allGroupsAreCollapsed,\n onToggleAllGroups = _this$props4.onToggleAllGroups;\n onToggleAllGroups(!allGroupsAreCollapsed);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSortGroups\", function (groups) {\n var _this$props5 = _this.props,\n id = _this$props5.id,\n onChange = _this$props5.onChange;\n onChange(id, groups);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleTabsChange\", function (groupId) {\n _this.setState({\n currentTab: groupId\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, [{\n key: \"findGroup\",\n\n /**\n * Finds a group.\n *\n * @param {string} groupId\n * @return {?Object}\n */\n value: function findGroup(groupId) {\n var _this$props6 = this.props,\n value = _this$props6.value,\n groupIdKey = _this$props6.groupIdKey;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(value, [groupIdKey, groupId]);\n }\n /**\n * Returns a list of groups that can be added if the field\n * doesn't allow duplicating of groups.\n *\n * @param {string} key\n * @return {Object[]}\n */\n\n }, {\n key: \"getAvailableGroups\",\n value: function getAvailableGroups(key) {\n var _this$props7 = this.props,\n field = _this$props7.field,\n value = _this$props7.value;\n\n if (field.duplicate_groups_allowed) {\n return field.groups;\n }\n\n var existingGroupNames = value.map(function (group) {\n return group[key];\n });\n return field.groups.filter(function (_ref) {\n var name = _ref.name;\n return existingGroupNames.indexOf(name) === -1;\n });\n }\n /**\n * Returns a list of labels of existing groups.\n *\n * @return {string[]}\n */\n\n }, {\n key: \"getGroupLabels\",\n value: function getGroupLabels() {\n var _this$props8 = this.props,\n field = _this$props8.field,\n groupValues = _this$props8.groupValues;\n return groupValues.map(function (_ref2, index) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_ref2, 2),\n name = _ref3[0],\n values = _ref3[1];\n\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(field.groups, ['name', name]);\n\n if (!group) {\n return 'N/A';\n }\n\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isString\"])(group.label_template)) {\n return group.label;\n }\n\n try {\n var label = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"template\"])(group.label_template)(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({\n $_index: index\n }, values));\n return label || group.label;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Couldn't create the label of group - \".concat(e.message));\n return 'N/A';\n }\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} selection\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var _this$props9 = this.props,\n value = _this$props9.value,\n field = _this$props9.field,\n groupIdKey = _this$props9.groupIdKey,\n groupFilterKey = _this$props9.groupFilterKey,\n allGroupsAreCollapsed = _this$props9.allGroupsAreCollapsed,\n onGroupSetup = _this$props9.onGroupSetup,\n onGroupFieldSetup = _this$props9.onGroupFieldSetup,\n onToggleGroup = _this$props9.onToggleGroup;\n var availableGroups = this.getAvailableGroups(groupFilterKey);\n var groupLabels = this.getGroupLabels(); // TODO: Move this to a memoized function.\n\n var tabs = value.map(function (group, index) {\n var id = group[groupIdKey];\n var label = groupLabels[index];\n return {\n id: id,\n label: label\n };\n });\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Fragment\"], null, this.isTabbed && !!value.length && __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n forwardedRef: this.tabsList,\n options: {\n axis: field.layout === 'tabbed-vertical' ? 'y' : 'x',\n forcePlaceholderSize: true\n },\n onUpdate: this.handleSortGroups\n }, __webpack_provided_wp_dot_element.createElement(_tabs__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n ref: this.tabsList,\n items: tabs,\n current: currentTab,\n onChange: this.handleTabsChange\n }, !!availableGroups.length && !this.isMaximumReached && __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: \"+\",\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }))), !value.length && __webpack_provided_wp_dot_element.createElement(_placeholder__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n label: \"There are no entries yet.\"\n }, __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n })), !!value.length && __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n options: {\n handle: '.cf-complex__group-head'\n },\n forwardedRef: this.groupsList,\n onUpdate: this.handleSortGroups\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__groups\",\n ref: this.groupsList\n }, value.map(function (group, index) {\n return (// The `key` will be assigned via `onGroupSetup`.\n // eslint-disable-next-line react/jsx-key\n __webpack_provided_wp_dot_element.createElement(_group__WEBPACK_IMPORTED_MODULE_18__[\"default\"], onGroupSetup(group, {\n index: index,\n label: groupLabels[index],\n tabbed: _this2.isTabbed,\n hidden: _this2.isTabbed && group[groupIdKey] !== currentTab,\n allowClone: field.duplicate_groups_allowed && !_this2.isMaximumReached,\n onFieldSetup: onGroupFieldSetup,\n onClone: _this2.handleCloneGroup,\n onRemove: _this2.handleRemoveGroup,\n onToggle: onToggleGroup\n }))\n );\n }))), !this.isTabbed && !!value.length && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__actions\"\n }, !!availableGroups.length && !this.isMaximumReached && __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-complex__toggler\",\n onClick: this.handleToggleAllClick\n }, allGroupsAreCollapsed ? 'Expand All' : 'Collapse All')));\n }\n }, {\n key: \"isTabbed\",\n\n /**\n * Returns true if the field is using tabs for the layout.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.props.field.layout.indexOf('tabbed') > -1;\n }\n /**\n * Returns true if the maximum number of entries is reached.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isMaximumReached\",\n get: function get() {\n var _this$props10 = this.props,\n field = _this$props10.field,\n value = _this$props10.value;\n return field.max > 0 && value.length >= field.max;\n }\n /**\n * Returns the text used in \"Add Entry\" button.\n *\n * @return {string}\n */\n\n }, {\n key: \"inserterButtonText\",\n get: function get() {\n var field = this.props.field;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Add %s', 'carbon-fields-ui'), field.labels.singular_name);\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.field-wrapper', 'carbon-fields/core', function (OriginalField) {\n return function (props) {\n var field = props.field;\n\n if (field.type !== 'complex') {\n return __webpack_provided_wp_dot_element.createElement(OriginalField, props);\n }\n\n return __webpack_provided_wp_dot_element.createElement(OriginalField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n className: \"cf-complex--\".concat(field.layout)\n }, props));\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n labels = field.labels,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n var label = min === 1 ? labels.singular_name : labels.plural_name;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Minimum number of rows not reached (%1$d %2$s)', 'carbon-fields-ui'), Number(min), label.toLowerCase());\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/complex/inserter.js": +/*!**************************************************!*\ + !*** ./packages/core/fields/complex/inserter.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var react_onclickoutside__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-onclickoutside */ \"./node_modules/react-onclickoutside/dist/react-onclickoutside.es.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\nvar ComplexInserter =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComplexInserter, _Component);\n\n function ComplexInserter() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ComplexInserter);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(ComplexInserter)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"state\", {\n menuVisible: false\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleClickOutside\", function () {\n _this.setState({\n menuVisible: false\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleAddClick\", function () {\n var _this$props = _this.props,\n groups = _this$props.groups,\n onSelect = _this$props.onSelect;\n\n if (groups.length > 1) {\n _this.setState(function (_ref) {\n var menuVisible = _ref.menuVisible;\n return {\n menuVisible: !menuVisible\n };\n });\n } else {\n onSelect(groups[0]);\n }\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleItemClick\", function (group) {\n _this.setState({\n menuVisible: false\n });\n\n _this.props.onSelect(group);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ComplexInserter, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n buttonText = _this$props2.buttonText,\n groups = _this$props2.groups;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__inserter\"\n }, __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-complex__inserter-button\",\n onClick: this.handleAddClick\n }, buttonText), groups.length > 1 && __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-complex__inserter-menu\",\n hidden: !this.state.menuVisible\n }, groups.map(function (group, index) {\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n className: \"cf-complex__inserter-item\",\n key: index,\n onClick: function onClick() {\n return _this2.handleItemClick(group);\n }\n }, group.label);\n })));\n }\n }]);\n\n return ComplexInserter;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(react_onclickoutside__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(ComplexInserter));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/inserter.js?"); + +/***/ }), + +/***/ "./packages/core/fields/complex/placeholder.js": +/*!*****************************************************!*\ + !*** ./packages/core/fields/complex/placeholder.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/**\n * Renders the empty state of the field.\n *\n * @param {Object} props\n * @param {string} props.label\n * @param {Object} props.children\n * @return {Object}\n */\nfunction ComplexPlaceholder(_ref) {\n var label = _ref.label,\n children = _ref.children;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__placeholder\"\n }, __webpack_provided_wp_dot_element.createElement(\"p\", {\n className: \"cf-complex__placeholder-label\"\n }, label), children);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexPlaceholder);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/placeholder.js?"); + +/***/ }), + +/***/ "./packages/core/fields/complex/style.scss": +/*!*************************************************!*\ + !*** ./packages/core/fields/complex/style.scss ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/complex/tabs.js": +/*!**********************************************!*\ + !*** ./packages/core/fields/complex/tabs.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Renders the tabs navigation.\n *\n * @param {Object} props\n * @param {Object[]} props.items\n * @param {string} props.current\n * @param {mixed} props.children\n * @param {Function} props.onChange\n * @param {Object} ref\n * @return {void}\n */\n\nfunction ComplexTabs(_ref, ref) {\n var items = _ref.items,\n current = _ref.current,\n children = _ref.children,\n onChange = _ref.onChange;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__tabs\"\n }, __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-complex__tabs-list\",\n ref: ref\n }, items.map(function (item, index) {\n var classes = classnames__WEBPACK_IMPORTED_MODULE_0___default()('cf-complex__tabs-item', {\n 'cf-complex__tabs-item--current': item.id === current\n });\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n key: item.id,\n className: classes,\n onClick: function onClick() {\n return onChange(item.id);\n }\n }, item.label ? __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__tabs-title\",\n dangerouslySetInnerHTML: {\n __html: item.label\n }\n }) : null, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__tabs-index\"\n }, index + 1));\n })), children);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"])(ComplexTabs));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/tabs.js?"); + +/***/ }), + +/***/ "./packages/core/fields/datetime/index.js": +/*!************************************************!*\ + !*** ./packages/core/fields/datetime/index.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var react_flatpickr__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react-flatpickr */ \"./node_modules/react-flatpickr/build/index.js\");\n/* harmony import */ var react_flatpickr__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react_flatpickr__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/datetime/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar DateTimeField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(DateTimeField, _Component);\n\n function DateTimeField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, DateTimeField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(DateTimeField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"picker\", null);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleReady\", function (selectedDates, selectedDateStr, instance) {\n _this.picker = instance;\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleChange\", function (selectedDates, selectedDateStr) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange,\n value = _this$props.value;\n\n if (selectedDateStr !== value) {\n onChange(id, selectedDateStr);\n }\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleManualInput\", function (e) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n onChange = _this$props2.onChange,\n value = _this$props2.value;\n\n if (e.target.value !== value) {\n onChange(id, e.target.value);\n }\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"formatManualInput\", function (e) {\n _this.picker.setDate(e.target.value, true);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(DateTimeField, [{\n key: \"componentWillUnmount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentWillUnmount() {\n this.picker = null;\n }\n /**\n * Handles the intialization of the flatpickr component.\n *\n * @param {Date[]} selectedDates\n * @param {string} selectedDateStr\n * @param {Object} instance\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props3 = this.props,\n id = _this$props3.id,\n name = _this$props3.name,\n value = _this$props3.value,\n field = _this$props3.field,\n icon = _this$props3.icon,\n buttonText = _this$props3.buttonText;\n return __webpack_provided_wp_dot_element.createElement(react_flatpickr__WEBPACK_IMPORTED_MODULE_10___default.a, {\n options: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, field.picker_options, {\n wrap: true\n }),\n value: value,\n onReady: this.handleReady,\n onChange: this.handleChange,\n className: \"cf-datetime__inner dashicons-before dashicons-\".concat(icon || 'calendar')\n }, __webpack_provided_wp_dot_element.createElement(\"input\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n type: \"text\",\n id: id,\n name: name,\n value: value,\n onChange: this.handleManualInput,\n onBlur: this.formatManualInput,\n className: \"cf-datetime__input\",\n \"data-input\": true\n }, field.attributes)), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-datetime__button\",\n \"data-toggle\": true\n }, buttonText));\n }\n }]);\n\n return DateTimeField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (DateTimeField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/datetime/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/datetime/style.scss": +/*!**************************************************!*\ + !*** ./packages/core/fields/datetime/style.scss ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/datetime/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/file/index.js": +/*!********************************************!*\ + !*** ./packages/core/fields/file/index.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/file/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _components_media_library__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/media-library */ \"./packages/core/components/media-library/index.js\");\n/* harmony import */ var _utils_fetch_attachments_data__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/fetch-attachments-data */ \"./packages/core/utils/fetch-attachments-data.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar FileField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(FileField, _Component);\n\n function FileField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, FileField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(FileField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n data: {}\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFileDataChange\", function (data) {\n _this.setState({\n data: data\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleClear\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, '');\n\n _this.handleFileDataChange({});\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSelect\", function (files) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field,\n onChange = _this$props2.onChange;\n\n var _files = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(files, 1),\n file = _files[0];\n\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"get\"])(file, field.value_type, file.id));\n\n _this.handleFileDataChange(file);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(FileField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle Hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this2 = this;\n\n var _this$props3 = this.props,\n value = _this$props3.value,\n field = _this$props3.field;\n\n if (value) {\n Object(_utils_fetch_attachments_data__WEBPACK_IMPORTED_MODULE_12__[\"default\"])([field.value_meta.id]).then(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 1),\n _ref2$ = _ref2[0],\n data = _ref2$ === void 0 ? {} : _ref2$;\n\n _this2.handleFileDataChange(data);\n });\n }\n }\n /**\n * Returns an URL to the attachment's thumbnail.\n *\n * @return {string}\n */\n\n }, {\n key: \"getThumb\",\n value: function getThumb() {\n var data = this.state.data;\n\n if (data.sizes) {\n var size = data.sizes.thumbnail || data.sizes.full;\n\n if (size) {\n return size.url;\n }\n }\n\n return data.icon;\n }\n /**\n * Handles the file meta set.\n *\n * @param {Object} data\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this3 = this;\n\n var data = this.state.data;\n var _this$props4 = this.props,\n value = _this$props4.value,\n name = _this$props4.name,\n field = _this$props4.field,\n buttonLabel = _this$props4.buttonLabel,\n mediaLibraryButtonLabel = _this$props4.mediaLibraryButtonLabel,\n mediaLibraryTitle = _this$props4.mediaLibraryTitle;\n return __webpack_provided_wp_dot_element.createElement(_components_media_library__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n onSelect: this.handleSelect,\n multiple: false,\n title: mediaLibraryTitle,\n buttonLabel: mediaLibraryButtonLabel,\n typeFilter: field.type_filter\n }, function (_ref3) {\n var openMediaBrowser = _ref3.openMediaBrowser;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__inner\"\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: name,\n value: value,\n readOnly: true\n }), value && data.id && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__content\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__preview\"\n }, __webpack_provided_wp_dot_element.createElement(\"img\", {\n src: _this3.getThumb(),\n className: \"cf-file__image\"\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-file__remove dashicons-before dashicons-no-alt\",\n onClick: _this3.handleClear\n })), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-file__name\",\n title: data.filename\n }, data.filename)), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-file__browse\",\n onClick: openMediaBrowser\n }, buttonLabel));\n });\n }\n }]);\n\n return FileField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FileField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/file/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/file/style.scss": +/*!**********************************************!*\ + !*** ./packages/core/fields/file/style.scss ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/file/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/hidden/index.js": +/*!**********************************************!*\ + !*** ./packages/core/fields/hidden/index.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\nvar HiddenField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(HiddenField, _Component);\n\n function HiddenField() {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, HiddenField);\n\n return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(HiddenField).apply(this, arguments));\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(HiddenField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props = this.props,\n name = _this$props.name,\n value = _this$props.value,\n field = _this$props.field;\n return __webpack_provided_wp_dot_element.createElement(\"input\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n type: \"hidden\",\n name: name,\n value: value,\n className: \"hidden-text\"\n }, field.attributes));\n }\n }]);\n\n return HiddenField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (HiddenField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/hidden/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/html/index.js": +/*!********************************************!*\ + !*** ./packages/core/fields/html/index.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Renders the field.\n *\n * @param {Object} props\n * @param {Object} props.field\n * @return {Object}\n */\n\nfunction HtmlField(_ref) {\n var field = _ref.field;\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"RawHTML\"], {\n className: \"cf-html__content\"\n }, field.html);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (HtmlField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/html/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/index.js": +/*!***************************************!*\ + !*** ./packages/core/fields/index.js ***! + \***************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hocs/with-filters */ \"./packages/core/hocs/with-filters/index.js\");\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../registry/fields */ \"./packages/core/registry/fields.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./association */ \"./packages/core/fields/association/index.js\");\n/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./checkbox */ \"./packages/core/fields/checkbox/index.js\");\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./color */ \"./packages/core/fields/color/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./complex */ \"./packages/core/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./datetime */ \"./packages/core/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./file */ \"./packages/core/fields/file/index.js\");\n/* harmony import */ var _hidden__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hidden */ \"./packages/core/fields/hidden/index.js\");\n/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./html */ \"./packages/core/fields/html/index.js\");\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./map */ \"./packages/core/fields/map/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./media-gallery */ \"./packages/core/fields/media-gallery/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./multiselect */ \"./packages/core/fields/multiselect/index.js\");\n/* harmony import */ var _oembed__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./oembed */ \"./packages/core/fields/oembed/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./radio */ \"./packages/core/fields/radio/index.js\");\n/* harmony import */ var _radio_image__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./radio-image */ \"./packages/core/fields/radio-image/index.js\");\n/* harmony import */ var _rich_text__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./rich-text */ \"./packages/core/fields/rich-text/index.js\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./select */ \"./packages/core/fields/select/index.js\");\n/* harmony import */ var _separator__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./separator */ \"./packages/core/fields/separator/index.js\");\n/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./set */ \"./packages/core/fields/set/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sidebar */ \"./packages/core/fields/sidebar/index.js\");\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./text */ \"./packages/core/fields/text/index.js\");\n/* harmony import */ var _textarea__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./textarea */ \"./packages/core/fields/textarea/index.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Extends the fields with necessary hooks.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.register-field-type', 'carbon-fields/core', function (type, context, component) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"compose\"])(Object(_hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\"carbon-fields.field-edit.\".concat(context)), Object(_hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\"carbon-fields.\".concat(type, \".\").concat(context)))(component);\n});\n/**\n * Registers the fields.\n */\n\n[['association', _association__WEBPACK_IMPORTED_MODULE_5__[\"default\"]], ['checkbox', _checkbox__WEBPACK_IMPORTED_MODULE_6__[\"default\"]], ['color', _color__WEBPACK_IMPORTED_MODULE_7__[\"default\"]], ['complex', _complex__WEBPACK_IMPORTED_MODULE_8__[\"default\"]], ['date', _datetime__WEBPACK_IMPORTED_MODULE_9__[\"default\"]], ['date_time', _datetime__WEBPACK_IMPORTED_MODULE_9__[\"default\"]], ['file', _file__WEBPACK_IMPORTED_MODULE_10__[\"default\"]], ['footer_scripts', _textarea__WEBPACK_IMPORTED_MODULE_25__[\"default\"]], ['gravity_form', _select__WEBPACK_IMPORTED_MODULE_20__[\"default\"]], ['header_scripts', _textarea__WEBPACK_IMPORTED_MODULE_25__[\"default\"]], ['hidden', _hidden__WEBPACK_IMPORTED_MODULE_11__[\"default\"]], ['html', _html__WEBPACK_IMPORTED_MODULE_12__[\"default\"]], ['image', _file__WEBPACK_IMPORTED_MODULE_10__[\"default\"]], ['map', _map__WEBPACK_IMPORTED_MODULE_13__[\"default\"]], ['multiselect', _multiselect__WEBPACK_IMPORTED_MODULE_15__[\"default\"]], ['media_gallery', _media_gallery__WEBPACK_IMPORTED_MODULE_14__[\"default\"]], ['oembed', _oembed__WEBPACK_IMPORTED_MODULE_16__[\"default\"]], ['radio', _radio__WEBPACK_IMPORTED_MODULE_17__[\"default\"]], ['radio_image', _radio_image__WEBPACK_IMPORTED_MODULE_18__[\"default\"]], ['rich_text', _rich_text__WEBPACK_IMPORTED_MODULE_19__[\"default\"]], ['select', _select__WEBPACK_IMPORTED_MODULE_20__[\"default\"]], ['separator', _separator__WEBPACK_IMPORTED_MODULE_21__[\"default\"]], ['set', _set__WEBPACK_IMPORTED_MODULE_22__[\"default\"]], ['sidebar', _sidebar__WEBPACK_IMPORTED_MODULE_23__[\"default\"]], ['text', _text__WEBPACK_IMPORTED_MODULE_24__[\"default\"]], ['textarea', _textarea__WEBPACK_IMPORTED_MODULE_25__[\"default\"]], ['time', _datetime__WEBPACK_IMPORTED_MODULE_9__[\"default\"]]].forEach(function (field) {\n return _registry_fields__WEBPACK_IMPORTED_MODULE_4__[\"registerFieldType\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(field));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/map/google-map.js": +/*!************************************************!*\ + !*** ./packages/core/fields/map/google-map.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var observe_resize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! observe-resize */ \"./node_modules/observe-resize/index.js\");\n/* harmony import */ var observe_resize__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(observe_resize__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\nvar GoogleMap =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(GoogleMap, _Component);\n\n function GoogleMap() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, GoogleMap);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(GoogleMap)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"node\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"createRef\"])());\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(GoogleMap, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this2 = this;\n\n // Google Maps SDK isn't loaded at this moment.\n // TODO: Delay initialization of metaboxes & blocks.\n var interval = setInterval(function () {\n if (window.google) {\n clearInterval(interval);\n\n _this2.setupMap();\n\n _this2.setupMapEvents();\n\n _this2.updateMap(_this2.props);\n\n _this2.cancelResizeObserver = observe_resize__WEBPACK_IMPORTED_MODULE_7___default()(_this2.node.current, function () {\n _this2.updateMap(_this2.props);\n });\n }\n }, 100);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var _this$props = this.props,\n lat = _this$props.lat,\n lng = _this$props.lng,\n zoom = _this$props.zoom;\n\n if (this.marker) {\n var markerLat = this.marker.getPosition().lat();\n var markerLng = this.marker.getPosition().lng();\n var mapZoom = this.map.getZoom();\n\n if (lat !== markerLat || lng !== markerLng) {\n var location = new window.google.maps.LatLng(lat, lng);\n this.marker.setPosition(location);\n this.map.setCenter(location);\n }\n\n if (zoom !== mapZoom) {\n this.map.setZoom(zoom);\n }\n }\n\n this.updateMap(this.props);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelResizeObserver();\n window.google.maps.event.clearInstanceListeners(this.map);\n }\n /**\n * Initializes the map into placeholder element.\n *\n * @return {void}\n */\n\n }, {\n key: \"setupMap\",\n value: function setupMap() {\n var _this$props2 = this.props,\n lat = _this$props2.lat,\n lng = _this$props2.lng,\n zoom = _this$props2.zoom;\n var position = new window.google.maps.LatLng(lat, lng);\n this.map = new window.google.maps.Map(this.node.current, {\n zoom: zoom,\n center: position,\n mapTypeId: window.google.maps.MapTypeId.ROADMAP,\n scrollwheel: false\n });\n this.marker = new window.google.maps.Marker({\n position: position,\n map: this.map,\n draggable: true\n });\n }\n /**\n * Adds the listeners for the map's events.\n *\n * @return {void}\n */\n\n }, {\n key: \"setupMapEvents\",\n value: function setupMapEvents() {\n var _this3 = this;\n\n var enableScrollZoom = function enableScrollZoom() {\n _this3.map.setOptions({\n scrollwheel: true\n });\n };\n\n window.google.maps.event.addListenerOnce(this.map, 'click', enableScrollZoom);\n window.google.maps.event.addListenerOnce(this.map, 'dragend', enableScrollZoom); // Update the zoom when the map is changed.\n\n window.google.maps.event.addListener(this.map, 'zoom_changed', function () {\n _this3.props.onChange({\n zoom: _this3.map.getZoom()\n });\n }); // Update the position when the marker is moved.\n\n window.google.maps.event.addListener(this.marker, 'dragend', function () {\n _this3.props.onChange({\n lat: _this3.marker.getPosition().lat(),\n lng: _this3.marker.getPosition().lng()\n });\n });\n }\n /**\n * Re-draws the map.\n *\n * @param {Object} props\n * @return {void}\n */\n\n }, {\n key: \"updateMap\",\n value: function updateMap(props) {\n var _this4 = this;\n\n var lat = props.lat,\n lng = props.lng;\n var location = new window.google.maps.LatLng(lat, lng);\n setTimeout(function () {\n window.google.maps.event.trigger(_this4.map, 'resize');\n\n _this4.map.setCenter(location);\n }, 10);\n }\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n ref: this.node,\n className: this.props.className\n });\n }\n }]);\n\n return GoogleMap;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (GoogleMap);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/map/google-map.js?"); + +/***/ }), + +/***/ "./packages/core/fields/map/index.js": +/*!*******************************************!*\ + !*** ./packages/core/fields/map/index.js ***! + \*******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/map/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _google_map__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./google-map */ \"./packages/core/fields/map/google-map.js\");\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\nvar MapField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(MapField, _Component);\n\n function MapField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, MapField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(MapField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleSearchChange\", Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"debounce\"])(function (address) {\n if (address) {\n _this.props.onGeocodeAddress({\n address: address\n });\n }\n }, 250));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleMapChange\", function (location) {\n var _this$props = _this.props,\n id = _this$props.id,\n value = _this$props.value,\n onChange = _this$props.onChange;\n onChange(id, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, value, location));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(MapField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value;\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Fragment\"], null, __webpack_provided_wp_dot_element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n id: id,\n className: \"cf-map__search\",\n name: \"\".concat(name, \"[address]\"),\n value: value.address,\n onChange: this.handleSearchChange\n }), __webpack_provided_wp_dot_element.createElement(_google_map__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n className: \"cf-map__canvas\",\n lat: value.lat,\n lng: value.lng,\n zoom: value.zoom,\n onChange: this.handleMapChange\n }), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[lat]\"),\n value: value.lat\n }), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[lng]\"),\n value: value.lng,\n readOnly: true\n }), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[zoom]\"),\n value: value.zoom,\n readOnly: true\n }));\n }\n }]);\n\n return MapField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var _component$useEvent = component.useEvent('geocodeAddress'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n geocodeAddress$ = _component$useEvent2[0],\n geocodeAddress = _component$useEvent2[1];\n\n var geocodeAddressProps$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({\n onGeocodeAddress: geocodeAddress\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_12__[\"toProps\"]));\n var geocodeAddressEffect$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"pipe\"])(geocodeAddress$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(function (payload) {\n return {\n type: 'GEOCODE_ADDRESS',\n payload: payload\n };\n }));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"merge\"])(geocodeAddressProps$, geocodeAddressEffect$);\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var id = props.id,\n value = props.value,\n onChange = props.onChange;\n\n switch (type) {\n case 'GEOCODE_ADDRESS':\n var geocode = function geocode(address) {\n return new Promise(function (resolve, reject) {\n var geocoder = new window.google.maps.Geocoder();\n geocoder.geocode({\n address: address\n }, function (results, status) {\n if (status === window.google.maps.GeocoderStatus.OK) {\n var location = results[0].geometry.location;\n resolve({\n lat: location.lat(),\n lng: location.lng()\n });\n } else if (status === 'ZERO_RESULTS') {\n reject(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('The address could not be found. ', 'carbon-fields-ui'));\n } else {\n reject(\"\".concat(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Geocode was not successful for the following reason: ', 'carbon-fields-ui'), \" \").concat(status));\n }\n });\n });\n };\n\n geocode(payload.address).then(function (_ref) {\n var lat = _ref.lat,\n lng = _ref.lng;\n onChange(id, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, value, {\n address: payload.address,\n value: \"\".concat(lat, \",\").concat(lng),\n lat: lat,\n lng: lng\n }));\n }).catch(function (alert) {\n // eslint-disable-next-line\n console.log('Error alert'); // eslint-disable-next-line\n\n console.log(alert);\n });\n break;\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_12__[\"withEffects\"])(aperture, {\n handler: handler\n})(MapField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/map/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/map/style.scss": +/*!*********************************************!*\ + !*** ./packages/core/fields/map/style.scss ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/map/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/media-gallery/index.js": +/*!*****************************************************!*\ + !*** ./packages/core/fields/media-gallery/index.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/media-gallery/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _components_media_library__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/media-library */ \"./packages/core/components/media-library/index.js\");\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _utils_fetch_attachments_data__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/fetch-attachments-data */ \"./packages/core/utils/fetch-attachments-data.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\nvar MediaGalleryField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(MediaGalleryField, _Component);\n\n function MediaGalleryField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, MediaGalleryField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(MediaGalleryField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"attachmentsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSelect\", function (attachments) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange,\n setState = _this$props.setState,\n value = _this$props.value;\n onChange(id, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(value).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(attachments.map(function (attachment) {\n return attachment.id;\n }))));\n setState({\n attachmentsData: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(_this.props.attachmentsData).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(attachments))\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleAttachmentRemove\", function (index) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n onChange = _this$props2.onChange;\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n draft.splice(index, 1);\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleAttachmentSelect\", function (itemId) {\n var setState = _this.props.setState;\n setState(function (_ref) {\n var selectedItem = _ref.selectedItem;\n return {\n selectedItem: selectedItem !== itemId ? itemId : null\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSort\", function (attachments) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n onChange = _this$props3.onChange;\n onChange(id, attachments);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(MediaGalleryField, [{\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n name = _this$props4.name,\n value = _this$props4.value,\n field = _this$props4.field,\n buttonLabel = _this$props4.buttonLabel,\n mediaLibraryButtonLabel = _this$props4.mediaLibraryButtonLabel,\n mediaLibraryTitle = _this$props4.mediaLibraryTitle,\n attachmentsData = _this$props4.attachmentsData,\n selectedItem = _this$props4.selectedItem;\n return __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n forwardedRef: this.attachmentsList,\n options: {\n handle: '.cf-media-gallery__item-name',\n forcePlaceholderSize: true\n },\n onUpdate: this.handleSort\n }, __webpack_provided_wp_dot_element.createElement(_components_media_library__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n onSelect: this.handleSelect,\n multiple: true,\n title: mediaLibraryTitle,\n buttonLabel: mediaLibraryButtonLabel,\n typeFilter: field.type_filter\n }, function (_ref2) {\n var openMediaBrowser = _ref2.openMediaBrowser;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-media-gallery__inner\"\n }, __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-media-gallery__list\",\n ref: _this2.attachmentsList\n }, value.map(function (id, index) {\n // eslint-disable-line no-shadow\n var attachment = attachmentsData.find(function (attachmentData) {\n return attachmentData.id === id;\n });\n var className = ['cf-media-gallery__item'];\n\n if (attachment) {\n className.push(\"cf-media-gallery__item--\".concat(attachment.type));\n }\n\n if (selectedItem === index) {\n className.push('cf-media-gallery__item--selected');\n }\n\n if (!attachment) {\n return null;\n }\n\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n className: className.join(' '),\n key: index,\n onClick: function onClick() {\n return _this2.handleAttachmentSelect(index);\n }\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-media-gallery__item-inner\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-media-gallery__item-preview\"\n }, attachment.type === 'image' ? __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-media-gallery__item-thumb\",\n src: attachment.sizes.thumbnail.url\n }) : __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-media-gallery__item-icon\",\n src: attachment.icon\n })), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-media-gallery__item-name\"\n }, attachment.filename), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-media-gallery__item-remove dashicons-before dashicons-no-alt\",\n onClick: function onClick() {\n return _this2.handleAttachmentRemove(index);\n }\n })), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[\").concat(index, \"]\"),\n value: id,\n readOnly: true\n }));\n })), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-media-gallery__actions\"\n }, __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-media-gallery__browse\",\n onClick: openMediaBrowser\n }, buttonLabel)));\n }));\n }\n }]);\n\n return MediaGalleryField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Component\"]);\n\nfunction aperture(component) {\n var mount$ = component.mount;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_10__[\"pipe\"])(mount$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(function () {\n return {\n type: 'COMPONENT_MOUNTED'\n };\n }));\n}\n\nfunction handler(props) {\n return function (effect) {\n switch (effect.type) {\n case 'COMPONENT_MOUNTED':\n var value = props.value,\n setState = props.setState;\n Object(_utils_fetch_attachments_data__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(value).then(function (attachmentsData) {\n setState({\n attachmentsData: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(props.attachmentsData).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(attachmentsData))\n });\n });\n break;\n }\n };\n}\n\nvar applyWithState = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__[\"withState\"])({\n attachmentsData: [],\n selectedItem: null\n});\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_9__[\"withEffects\"])(aperture, {\n handler: handler\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__[\"compose\"])(applyWithState, applyWithEffects)(MediaGalleryField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/media-gallery/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/media-gallery/style.scss": +/*!*******************************************************!*\ + !*** ./packages/core/fields/media-gallery/style.scss ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/media-gallery/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/multiselect/index.js": +/*!***************************************************!*\ + !*** ./packages/core/fields/multiselect/index.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var react_select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-select */ \"./node_modules/react-select/dist/react-select.esm.js\");\n/* harmony import */ var _components_no_options__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/no-options */ \"./packages/core/components/no-options/index.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * The internal dependencies.\n */\n\n\n\nvar MultiselectField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(MultiselectField, _Component);\n\n function MultiselectField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, MultiselectField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(MultiselectField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleChange\", function (selected) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, selected.map(function (item) {\n return item.value;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"filterValues\", function (values) {\n var field = _this.props.field;\n return field.options.filter(function (option) {\n return values.indexOf(option.value) > -1;\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(MultiselectField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return field.options.length > 0 ? __webpack_provided_wp_dot_element.createElement(react_select__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n id: id,\n name: name,\n value: this.filterValues(value),\n options: field.options,\n delimiter: field.valueDelimiter,\n onChange: this.handleChange,\n className: \"cf-multiselect__select\",\n classNamePrefix: \"cf-multiselect\",\n isMulti: true\n }) : __webpack_provided_wp_dot_element.createElement(_components_no_options__WEBPACK_IMPORTED_MODULE_9__[\"default\"], null);\n }\n }]);\n\n return MultiselectField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (MultiselectField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/multiselect/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/oembed/index.js": +/*!**********************************************!*\ + !*** ./packages/core/fields/oembed/index.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/oembed/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _preview__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./preview */ \"./packages/core/fields/oembed/preview.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\nvar OembedField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(OembedField, _Component);\n\n function OembedField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, OembedField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(OembedField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"node\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSearch\", Object(lodash__WEBPACK_IMPORTED_MODULE_14__[\"debounce\"])(function (value) {\n var _this$props = _this.props,\n isLoading = _this$props.isLoading,\n setState = _this$props.setState,\n onFetchEmbedCode = _this$props.onFetchEmbedCode;\n\n if (isLoading) {\n return;\n }\n\n setState({\n embedCode: '',\n error: ''\n });\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_14__[\"isEmpty\"])(value)) {\n return;\n }\n\n setState({\n isLoading: true\n });\n onFetchEmbedCode(value);\n }, 200));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (value) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n onChange = _this$props2.onChange;\n onChange(id, value);\n\n _this.handleSearch(value);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(OembedField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this2 = this;\n\n var value = this.props.value;\n var i = setInterval(function () {\n if (_this2.node.current.getBoundingClientRect().width > 0) {\n clearInterval(i);\n\n _this2.handleSearch(value);\n }\n }, 100);\n }\n /**\n * Handles the load of the oembed preview.\n *\n * @param {String} value\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props3 = this.props,\n id = _this$props3.id,\n name = _this$props3.name,\n value = _this$props3.value,\n embedCode = _this$props3.embedCode,\n embedType = _this$props3.embedType,\n provider = _this$props3.provider;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n ref: this.node\n }, __webpack_provided_wp_dot_element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n id: id,\n value: value,\n onChange: this.handleChange\n }), embedCode ? __webpack_provided_wp_dot_element.createElement(_preview__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n html: embedCode,\n type: embedType,\n provider: provider\n }) : null, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: name,\n value: value,\n readOnly: true\n }));\n }\n }]);\n\n return OembedField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var _component$useEvent = component.useEvent('fetchEmbedCode'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n fetchEmbedCode$ = _component$useEvent2[0],\n fetchEmbedCode = _component$useEvent2[1];\n\n var fetchEmbedCodeProps$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_13__[\"default\"])({\n onFetchEmbedCode: fetchEmbedCode\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"toProps\"]));\n var fetchEmbedCodeEffect$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"pipe\"])(fetchEmbedCode$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"map\"])(function (payload) {\n return {\n type: 'FETCH_EMBED_CODE',\n payload: payload\n };\n }));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"merge\"])(fetchEmbedCodeProps$, fetchEmbedCodeEffect$);\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n\n switch (type) {\n case 'FETCH_EMBED_CODE':\n // eslint-disable-next-line\n var request = $.get(window.wpApiSettings.root + 'oembed/1.0/proxy', {\n url: payload,\n _wpnonce: window.wpApiSettings.nonce\n });\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('An error occurred while trying to fetch oembed preview.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n props.setState({\n embedCode: response.html,\n embedType: response.type,\n provider: response.provider_name,\n isLoading: false\n });\n });\n request.fail(function () {\n errorHandler();\n props.setState({\n error: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Not Found', 'carbon-fields-ui'),\n isLoading: false\n });\n });\n break;\n }\n };\n}\n\nvar applyWithState = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__[\"withState\"])({\n embedCode: '',\n embedType: '',\n provider: '',\n error: '',\n isLoading: false\n});\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"withEffects\"])(aperture, {\n handler: handler\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__[\"compose\"])(applyWithState, applyWithEffects)(OembedField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/oembed/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/oembed/preview.js": +/*!************************************************!*\ + !*** ./packages/core/fields/oembed/preview.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\nvar OembedPreview =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(OembedPreview, _Component);\n\n function OembedPreview() {\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, OembedPreview);\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(OembedPreview).apply(this, arguments));\n _this.state = {\n width: 0,\n height: 0\n };\n _this.renderIframe = _this.renderIframe.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)));\n _this.checkMessageForResize = _this.checkMessageForResize.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)));\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(OembedPreview, [{\n key: \"isFrameAccessible\",\n value: function isFrameAccessible() {\n try {\n return !!this.iframe.contentDocument.body;\n } catch (e) {\n return false;\n }\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n window.addEventListener('message', this.checkMessageForResize, false);\n this.renderIframe();\n }\n /**\n * Lifecycle Hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.renderIframe();\n }\n }, {\n key: \"checkMessageForResize\",\n value: function checkMessageForResize(event) {\n var iframe = this.iframe; // Attempt to parse the message data as JSON if passed as string\n\n var data = event.data || {};\n\n if ('string' === typeof data) {\n try {\n data = JSON.parse(data);\n } catch (e) {} // eslint-disable-line no-empty\n\n } // Verify that the mounted element is the source of the message\n\n\n if (!iframe || iframe.contentWindow !== event.source) {\n return;\n } // Update the state only if the message is formatted as we expect, i.e.\n // as an object with a 'resize' action, width, and height\n\n\n var _data = data,\n action = _data.action,\n width = _data.width,\n height = _data.height;\n var _this$state = this.state,\n oldWidth = _this$state.width,\n oldHeight = _this$state.height;\n\n if ('resize' === action && (oldWidth !== width || oldHeight !== height)) {\n this.setState({\n width: width,\n height: height\n });\n }\n }\n /**\n * Render Method.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-oembed__preview\"\n }, __webpack_provided_wp_dot_element.createElement(\"iframe\", {\n ref: function ref(node) {\n return _this2.iframe = node;\n },\n scrolling: \"no\",\n className: \"cf-oembed__frame\",\n onLoad: this.renderIframe,\n width: Math.ceil(this.state.width),\n height: Math.ceil(this.state.height)\n }));\n }\n }, {\n key: \"renderIframe\",\n value: function renderIframe() {\n if (!this.isFrameAccessible()) {\n return;\n }\n\n var body = this.iframe.contentDocument.body;\n\n if (null !== body.getAttribute('data-resizable-iframe-connected')) {\n return;\n }\n\n var heightCalculation = 'video' === this.props.type ? 'clientBoundingRect.width / 16 * 9' : 'clientBoundingRect.height';\n var observeAndResizeJS = \"\\n\\t\\t\\t( function() {\\n\\t\\t\\t\\tvar observer;\\n\\n\\t\\t\\t\\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\\n\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tfunction sendResize() {\\n\\t\\t\\t\\t\\tvar clientBoundingRect = document.body.getBoundingClientRect();\\n\\n\\t\\t\\t\\t\\twindow.parent.postMessage( {\\n\\t\\t\\t\\t\\t\\taction: 'resize',\\n\\t\\t\\t\\t\\t\\twidth: clientBoundingRect.width,\\n\\t\\t\\t\\t\\t\\theight: \".concat(heightCalculation, \"\\n\\t\\t\\t\\t\\t}, '*' );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tobserver = new MutationObserver( sendResize );\\n\\t\\t\\t\\tobserver.observe( document.body, {\\n\\t\\t\\t\\t\\tattributes: true,\\n\\t\\t\\t\\t\\tattributeOldValue: false,\\n\\t\\t\\t\\t\\tcharacterData: true,\\n\\t\\t\\t\\t\\tcharacterDataOldValue: false,\\n\\t\\t\\t\\t\\tchildList: true,\\n\\t\\t\\t\\t\\tsubtree: true\\n\\t\\t\\t\\t} );\\n\\n\\t\\t\\t\\twindow.addEventListener( 'load', sendResize, true );\\n\\n\\t\\t\\t\\t// Hack: Remove viewport unit styles, as these are relative\\n\\t\\t\\t\\t// the iframe root and interfere with our mechanism for\\n\\t\\t\\t\\t// determining the unconstrained page bounds.\\n\\n\\t\\t\\t\\tfunction removeViewportStyles( ruleOrNode ) {\\n\\t\\t\\t\\t\\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\\n\\t\\t\\t\\t\\t\\tif ( /^\\\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\\n\\t\\t\\t\\t\\t\\t\\truleOrNode.style[ style ] = '';\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t} );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\\n\\t\\t\\t\\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\\n\\t\\t\\t\\t\\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\\n\\t\\t\\t\\t} );\\n\\t\\t\\t\\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\\n\\t\\t\\t\\tsendResize();\\n\\t\\t} )();\");\n var style = \"\\n\\t\\t\\tbody { margin: 0; }\\n\\n\\t\\t\\tbody > div { max-width: 600px; }\\n\\n\\t\\t\\tbody.Kickstarter > div,\\n\\t\\t\\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\\n\\t\\t\\tbody.Kickstarter > div > iframe,\\n\\t\\t\\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\\n\\n\\t\\t\\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\\n\\n\\t\\t\\tbody.Flickr > div > a { display: block; }\\n\\t\\t\\tbody.Flickr > div > a > img { width: 100%; height: auto; }\\n\\t\\t\";\n var htmlDoc = __webpack_provided_wp_dot_element.createElement(\"html\", {\n lang: document.documentElement.lang\n }, __webpack_provided_wp_dot_element.createElement(\"head\", null, __webpack_provided_wp_dot_element.createElement(\"style\", {\n dangerouslySetInnerHTML: {\n __html: style\n }\n })), __webpack_provided_wp_dot_element.createElement(\"body\", {\n \"data-resizable-iframe-connected\": \"data-resizable-iframe-connected\",\n className: this.props.type + ' ' + this.props.provider\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n dangerouslySetInnerHTML: {\n __html: this.props.html\n }\n }), __webpack_provided_wp_dot_element.createElement(\"script\", {\n type: \"text/javascript\",\n dangerouslySetInnerHTML: {\n __html: observeAndResizeJS\n }\n })));\n this.iframe.contentWindow.document.open();\n this.iframe.contentWindow.document.write('' + Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__[\"renderToString\"])(htmlDoc));\n this.iframe.contentWindow.document.close();\n }\n }]);\n\n return OembedPreview;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (OembedPreview);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/oembed/preview.js?"); + +/***/ }), + +/***/ "./packages/core/fields/oembed/style.scss": +/*!************************************************!*\ + !*** ./packages/core/fields/oembed/style.scss ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/oembed/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/radio-image/index.js": +/*!***************************************************!*\ + !*** ./packages/core/fields/radio-image/index.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _hocs_with_props__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../hocs/with-props */ \"./packages/core/hocs/with-props/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../radio */ \"./packages/core/fields/radio/index.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/radio-image/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_hocs_with_props__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (props) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n field: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, props.field, {\n options: props.field.options.map(function (option) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, option, {\n label: __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-radio-image__image\",\n src: option.label\n })\n });\n })\n })\n });\n})(_radio__WEBPACK_IMPORTED_MODULE_2__[\"default\"]));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/radio-image/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/radio-image/style.scss": +/*!*****************************************************!*\ + !*** ./packages/core/fields/radio-image/style.scss ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/radio-image/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/radio/index.js": +/*!*********************************************!*\ + !*** ./packages/core/fields/radio/index.js ***! + \*********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/radio/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _components_no_options__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/no-options */ \"./packages/core/components/no-options/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n/**\n * The internal dependencies.\n */\n\n\n\n\nvar RadioField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(RadioField, _Component);\n\n function RadioField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, RadioField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(RadioField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (e) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, e.target.value);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(RadioField, [{\n key: \"renderOptions\",\n\n /**\n * Renders the radio options\n *\n * @return {Object}\n */\n value: function renderOptions() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n id = _this$props2.id,\n field = _this$props2.field,\n value = _this$props2.value,\n name = _this$props2.name;\n return __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-radio__list\"\n }, field.options.map(function (option, index) {\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n className: \"cf-radio__list-item\",\n key: index\n }, __webpack_provided_wp_dot_element.createElement(\"input\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n type: \"radio\",\n id: \"\".concat(id, \"-\").concat(option.value),\n name: name,\n value: option.value,\n checked: value === option.value,\n className: \"cf-radio__input\",\n onChange: _this2.handleChange\n }, field.attributes)), __webpack_provided_wp_dot_element.createElement(\"label\", {\n className: \"cf-radio__label\",\n htmlFor: \"\".concat(id, \"-\").concat(option.value)\n }, option.label));\n }));\n }\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var field = this.props.field;\n return field.options.length > 0 ? this.renderOptions() : __webpack_provided_wp_dot_element.createElement(_components_no_options__WEBPACK_IMPORTED_MODULE_10__[\"default\"], null);\n }\n }]);\n\n return RadioField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RadioField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/radio/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/radio/style.scss": +/*!***********************************************!*\ + !*** ./packages/core/fields/radio/style.scss ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/radio/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/rich-text/index.js": +/*!*************************************************!*\ + !*** ./packages/core/fields/rich-text/index.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_12__);\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\nvar RichTextField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(RichTextField, _Component);\n\n /**\n * Define the project base properties\n *\n * @return {void}\n */\n function RichTextField() {\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, RichTextField);\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(RichTextField).call(this));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleChange\", function (eventOrValue) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"isString\"])(eventOrValue) ? eventOrValue : eventOrValue.target.value);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"initEditor\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field;\n\n if (field.rich_editing) {\n var editorSetup = function editorSetup(editor) {\n _this.editor = editor;\n editor.on('blur Change', function () {\n editor.save();\n\n _this.handleChange(editor.getContent());\n });\n };\n\n var editorOptions = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, window.tinyMCEPreInit.mceInit.carbon_settings, {\n selector: \"#\".concat(id),\n setup: editorSetup\n });\n\n window.tinymce.init(editorOptions);\n }\n\n var quickTagsOptions = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, window.tinyMCEPreInit, {\n id: id\n });\n\n window.quicktags(quickTagsOptions); // Force the initialization of the quick tags.\n\n window.QTags._buttonsInit();\n });\n\n _this.node = null;\n _this.editor = null;\n _this.cancelResizeObserver = null;\n return _this;\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(RichTextField, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // Required for adequate initialization\n setTimeout(this.initEditor, 100);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.destroyEditor();\n }\n /**\n * Handles the change of the input.\n *\n * @param {Object|string} eventOrValue\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props3 = this.props,\n id = _this$props3.id,\n name = _this$props3.name,\n value = _this$props3.value,\n field = _this$props3.field;\n var classes = ['carbon-wysiwyg', 'wp-editor-wrap', {\n 'tmce-active': field.rich_editing\n }, {\n 'html-active': !field.rich_editing\n }];\n var mediaButtonsHTML = field.media_buttons ? Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"template\"])(field.media_buttons)({\n id: id\n }) : null;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-wrap\"),\n className: classnames__WEBPACK_IMPORTED_MODULE_12___default()(classes),\n ref: function ref(node) {\n return _this2.editorNode = node;\n }\n }, field.media_buttons && __webpack_provided_wp_dot_element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-media-buttons\"),\n className: \"hide-if-no-js wp-media-buttons\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: mediaButtonsHTML\n }\n })), field.rich_editing && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"wp-editor-tabs\"\n }, __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n id: \"\".concat(id, \"-tmce\"),\n className: \"wp-switch-editor switch-tmce\",\n \"data-wp-editor-id\": id\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Visual', 'carbon-fields-ui')), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n id: \"\".concat(id, \"-html\"),\n className: \"wp-switch-editor switch-html\",\n \"data-wp-editor-id\": id\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Text', 'carbon-fields-ui'))), __webpack_provided_wp_dot_element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-editor-container\"),\n className: \"wp-editor-container\"\n }, __webpack_provided_wp_dot_element.createElement(\"textarea\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n style: {\n width: '100%'\n },\n className: \"regular-text\",\n id: id,\n name: name,\n value: value,\n onChange: this.handleChange\n }, field.attributes))));\n }\n /**\n * Initialize the WYSIWYG editor.\n *\n * @return {void}\n */\n\n }, {\n key: \"destroyEditor\",\n\n /**\n * Destroy the instance of the WYSIWYG editor.\n *\n * @return {void}\n */\n value: function destroyEditor() {\n if (this.editor) {\n this.editor.remove();\n this.node = null;\n this.editor = null;\n }\n\n delete window.QTags.instances[this.props.id];\n }\n }]);\n\n return RichTextField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RichTextField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/rich-text/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/select/index.js": +/*!**********************************************!*\ + !*** ./packages/core/fields/select/index.js ***! + \**********************************************/ +/*! exports provided: SelectField, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SelectField\", function() { return SelectField; });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/select/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _components_no_options__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/no-options */ \"./packages/core/components/no-options/index.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * The internal dependencies.\n */\n\n\n\nvar SelectField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(SelectField, _Component);\n\n function SelectField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, SelectField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(SelectField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleChange\", function (e) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, e.target.value);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(SelectField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return field.options.length > 0 ? __webpack_provided_wp_dot_element.createElement(\"select\", {\n id: id,\n name: name,\n value: value ? value : Object(lodash__WEBPACK_IMPORTED_MODULE_8__[\"get\"])(field.options, '[0].value', ''),\n className: \"cf-select__input\",\n onChange: this.handleChange\n }, field.options.map(function (option) {\n return __webpack_provided_wp_dot_element.createElement(\"option\", {\n key: option.value,\n value: option.value\n }, option.label);\n })) : __webpack_provided_wp_dot_element.createElement(_components_no_options__WEBPACK_IMPORTED_MODULE_10__[\"default\"], null);\n }\n }]);\n\n return SelectField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (SelectField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/select/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/select/style.scss": +/*!************************************************!*\ + !*** ./packages/core/fields/select/style.scss ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/select/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/separator/index.js": +/*!*************************************************!*\ + !*** ./packages/core/fields/separator/index.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/separator/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar SeparatorField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(SeparatorField, _Component);\n\n function SeparatorField() {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, SeparatorField);\n\n return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(SeparatorField).apply(this, arguments));\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(SeparatorField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n return __webpack_provided_wp_dot_element.createElement(\"h3\", null, this.props.field.label);\n }\n }]);\n\n return SeparatorField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SeparatorField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/separator/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/separator/style.scss": +/*!***************************************************!*\ + !*** ./packages/core/fields/separator/style.scss ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/separator/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/set/index.js": +/*!*******************************************!*\ + !*** ./packages/core/fields/set/index.js ***! + \*******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/set/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _components_no_options__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/no-options */ \"./packages/core/components/no-options/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar SetField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(SetField, _Component);\n\n function SetField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, SetField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(SetField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (e) {\n var _this$props = _this.props,\n id = _this$props.id,\n value = _this$props.value,\n onChange = _this$props.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"xor\"])(value, [e.target.value]));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"isChecked\", function (values, option) {\n return values.indexOf(option.value) > -1;\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(SetField, [{\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return field.options.length > 0 ? __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-set__list\"\n }, field.options.map(function (option, index) {\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n className: \"cf-set__list-item\",\n key: index\n }, __webpack_provided_wp_dot_element.createElement(\"input\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n type: \"checkbox\",\n id: \"\".concat(id, \"-\").concat(option.value),\n name: \"\".concat(name, \"[]\"),\n checked: _this2.isChecked(value, option),\n value: option.value,\n className: \"cf-set__input\",\n onChange: _this2.handleChange\n }, field.attributes)), __webpack_provided_wp_dot_element.createElement(\"label\", {\n className: \"cf-set__label\",\n htmlFor: \"\".concat(id, \"-\").concat(option.value)\n }, option.label));\n })) : __webpack_provided_wp_dot_element.createElement(_components_no_options__WEBPACK_IMPORTED_MODULE_11__[\"default\"], null);\n }\n }]);\n\n return SetField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SetField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/set/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/set/style.scss": +/*!*********************************************!*\ + !*** ./packages/core/fields/set/style.scss ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/set/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/sidebar/index.js": +/*!***********************************************!*\ + !*** ./packages/core/fields/sidebar/index.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_13__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\nvar SidebarField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(SidebarField, _Component);\n\n function SidebarField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, SidebarField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(SidebarField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (e) {\n var _this$props = _this.props,\n id = _this$props.id,\n onAdd = _this$props.onAdd,\n onChange = _this$props.onChange;\n var value = e.target.value;\n\n if (value !== '__add_new') {\n onChange(id, value);\n } else {\n onAdd(id);\n }\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(SidebarField, [{\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return __webpack_provided_wp_dot_element.createElement(\"select\", {\n id: id,\n name: name,\n value: value,\n onChange: this.handleChange\n }, __webpack_provided_wp_dot_element.createElement(\"option\", {\n value: \"0\",\n disabled: true\n }, \"Please choose\"), field.options.map(function (option) {\n return __webpack_provided_wp_dot_element.createElement(\"option\", {\n key: option.value,\n value: option.value\n }, option.label);\n }));\n }\n }]);\n\n return SidebarField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var _component$useEvent = component.useEvent('addSidebar'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n addSidebar$ = _component$useEvent2[0],\n addSidebar = _component$useEvent2[1];\n\n var addSidebarProps$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({\n onAdd: addSidebar\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"toProps\"]));\n var addSidebarEffect$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"pipe\"])(addSidebar$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"map\"])(function (fieldKey) {\n return {\n type: 'ADD_SIDEBAR',\n payload: {\n fieldKey: fieldKey\n }\n };\n }));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"merge\"])(addSidebarProps$, addSidebarEffect$);\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n switch (effect.type) {\n case 'ADD_SIDEBAR':\n /* eslint-disable-next-line no-alert */\n var name = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"trim\"])(window.prompt(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Please enter the name of the new sidebar:', 'carbon-fields-ui')));\n\n if (!name) {\n return;\n }\n\n var isExisting = props.field.options.some(function (option) {\n return option.label === name;\n });\n\n if (isExisting) {\n return;\n }\n\n var request = window.jQuery.post(window.ajaxurl, {\n action: 'carbon_fields_add_sidebar',\n name: name\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('An error occurred while trying to create the sidebar.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n var onAdded = props.onAdded,\n onChange = props.onChange;\n var sidebar = {\n value: response.data.id,\n label: response.data.name\n };\n onAdded(sidebar);\n onChange(effect.payload.fieldKey, sidebar.value);\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n break;\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"withEffects\"])(aperture, {\n handler: handler\n})(SidebarField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/sidebar/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/text/index.js": +/*!********************************************!*\ + !*** ./packages/core/fields/text/index.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/text/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_9__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar TextField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(TextField, _Component);\n\n function TextField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, TextField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(TextField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (e) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, e.target.value);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(TextField, [{\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return __webpack_provided_wp_dot_element.createElement(\"input\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n type: \"text\",\n id: id,\n name: name,\n value: value,\n className: \"cf-text__input\",\n onChange: this.handleChange\n }, field.attributes));\n }\n }]);\n\n return TextField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (TextField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/text/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/text/style.scss": +/*!**********************************************!*\ + !*** ./packages/core/fields/text/style.scss ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/text/style.scss?"); + +/***/ }), + +/***/ "./packages/core/fields/textarea/index.js": +/*!************************************************!*\ + !*** ./packages/core/fields/textarea/index.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/textarea/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_9__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n/**\n * The internal dependencies.\n */\n\n\n\nvar TextareaField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(TextareaField, _Component);\n\n function TextareaField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, TextareaField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(TextareaField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (e) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, e.target.value);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(TextareaField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return __webpack_provided_wp_dot_element.createElement(\"textarea\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n id: id,\n name: name,\n value: value,\n rows: field.rows,\n className: \"cf-textarea__input\",\n onChange: this.handleChange\n }, field.attributes));\n }\n }]);\n\n return TextareaField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (TextareaField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/textarea/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/textarea/style.scss": +/*!**************************************************!*\ + !*** ./packages/core/fields/textarea/style.scss ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/textarea/style.scss?"); + +/***/ }), + +/***/ "./packages/core/hocs/with-conditional-logic/compare.js": +/*!**************************************************************!*\ + !*** ./packages/core/hocs/with-conditional-logic/compare.js ***! + \**************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return compare; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* eslint eqeqeq: \"off\" */\n\n/**\n * External dependencies.\n */\n\n/**\n * Performs comparison of the values.\n *\n * @param {mixed} left\n * @param {string} operator\n * @param {mixed} right\n * @return {boolean}\n */\n\nfunction compare(left, operator, right) {\n switch (operator) {\n case '=':\n return left == right;\n\n case '!=':\n return left != right;\n\n case '>':\n return left > right;\n\n case '<':\n return left < right;\n\n case '>=':\n return left >= right;\n\n case '<=':\n return left <= right;\n\n case 'IN':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"some\"])(right, function (value) {\n return value == left;\n });\n\n case 'NOT IN':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"every\"])(right, function (value) {\n return value != left;\n });\n\n case 'INCLUDES':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"every\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"castArray\"])(right), function (value) {\n return left.indexOf(value) > -1;\n });\n\n case 'EXCLUDES':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"every\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"castArray\"])(right), function (value) {\n return left.indexOf(value) === -1;\n });\n }\n\n return false;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-conditional-logic/compare.js?"); + +/***/ }), + +/***/ "./packages/core/hocs/with-conditional-logic/index.js": +/*!************************************************************!*\ + !*** ./packages/core/hocs/with-conditional-logic/index.js ***! + \************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return withConditionalLogic; });\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _compare__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./compare */ \"./packages/core/hocs/with-conditional-logic/compare.js\");\n/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Creates a high-order components which adds ability to evalute\n * the conditional logic of fields.\n *\n * @param {Function} input\n * @param {Function} output\n * @return {Function}\n */\n\nfunction withConditionalLogic(input, output) {\n /**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @param {Object} props\n * @return {Object}\n */\n function aperture(component, props) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"isEmpty\"])(props.field.conditional_logic)) {\n return;\n }\n\n return input(props, component);\n }\n /**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\n function handler(props) {\n return function (effect) {\n var _props$field$conditio = props.field.conditional_logic,\n relation = _props$field$conditio.relation,\n rules = _props$field$conditio.rules;\n var data = output(props, effect);\n var results = rules.reduce(function (accumulator, rule) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"has\"])(data, rule.field)) {\n // eslint-disable-next-line\n console.error(\"An unknown field is used in condition - \\\"\".concat(rule.field, \"\\\".\"));\n return accumulator.concat(false);\n } // TODO: Handle the conditional logic for chained fields. Probably we'll need the id of each sibling.\n // See https://github.com/htmlburger/carbon-fields/commit/3628a86c8840c8323f45c829a96c512a9985ad10#diff-b1aea524a4b1ab510e28e01a54c25fcd\n\n\n var result = Object(_compare__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(data[rule.field], rule.compare, rule.value);\n return accumulator.concat(result);\n }, []);\n var isVisible = false;\n\n switch (relation) {\n case 'AND':\n isVisible = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"every\"])(results);\n break;\n\n case 'OR':\n isVisible = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"some\"])(results);\n break;\n }\n\n if (isVisible) {\n props.showField(props.id);\n } else {\n props.hideField(props.id);\n }\n };\n }\n\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"createHigherOrderComponent\"])(function (OriginalComponent) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/core'),\n showField = _dispatch.showField,\n hideField = _dispatch.hideField;\n\n return {\n showField: showField,\n hideField: hideField\n };\n }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withSelect\"])(function (select, props) {\n return {\n visible: select('carbon-fields/core').isFieldVisible(props.id)\n };\n }), Object(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"withEffects\"])(aperture, {\n handler: handler\n }))(OriginalComponent);\n }, 'withConditionalLogic');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-conditional-logic/index.js?"); + +/***/ }), + +/***/ "./packages/core/hocs/with-filters/index.js": +/*!**************************************************!*\ + !*** ./packages/core/hocs/with-filters/index.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return withFilters; });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__);\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\nvar ANIMATION_FRAME_PERIOD = 16;\n/**\n * Creates a higher-order component which adds filtering capability to the\n * wrapped component. Filters get applied when the original component is about\n * to be mounted. When a filter is added or removed that matches the hook name,\n * the wrapped component re-renders.\n *\n * @borrows https://github.com/WordPress/gutenberg/blob/master/packages/components/src/higher-order/with-filters/index.js\n * @param {string} hookName Hook name exposed to be used by filters.\n * @return {Function} Higher-order component factory.\n */\n\nfunction withFilters(hookName) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_8__[\"createHigherOrderComponent\"])(function (OriginalComponent) {\n return (\n /*#__PURE__*/\n function (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(FilteredComponent, _Component);\n\n /** @inheritdoc */\n function FilteredComponent(props) {\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, FilteredComponent);\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(FilteredComponent).call(this, props));\n _this.onHooksUpdated = _this.onHooksUpdated.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)));\n _this.Component = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"applyFilters\"])(hookName, OriginalComponent);\n _this.namespace = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"uniqueId\"])('core/with-filters/component-');\n _this.throttledForceUpdate = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"debounce\"])(function () {\n _this.Component = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"applyFilters\"])(hookName, OriginalComponent);\n\n _this.forceUpdate();\n }, ANIMATION_FRAME_PERIOD);\n Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"addAction\"])('hookRemoved', _this.namespace, _this.onHooksUpdated);\n Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"addAction\"])('hookAdded', _this.namespace, _this.onHooksUpdated);\n return _this;\n }\n /** @inheritdoc */\n\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(FilteredComponent, [{\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.throttledForceUpdate.cancel();\n Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"removeAction\"])('hookRemoved', this.namespace);\n Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"removeAction\"])('hookAdded', this.namespace);\n }\n /**\n * When a filter is added or removed for the matching hook name, the wrapped component should re-render.\n *\n * @param {string} updatedHookName Name of the hook that was updated.\n * @return {void}\n */\n\n }, {\n key: \"onHooksUpdated\",\n value: function onHooksUpdated(updatedHookName) {\n if (updatedHookName === hookName) {\n this.throttledForceUpdate();\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"render\",\n value: function render() {\n return __webpack_provided_wp_dot_element.createElement(this.Component, this.props);\n }\n }]);\n\n return FilteredComponent;\n }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"])\n );\n }, 'withFilters');\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-filters/index.js?"); + +/***/ }), + +/***/ "./packages/core/hocs/with-props/index.js": +/*!************************************************!*\ + !*** ./packages/core/hocs/with-props/index.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return withProps; });\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__);\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\nfunction withProps(input) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__[\"createHigherOrderComponent\"])(function (OriginalComponent) {\n return (\n /*#__PURE__*/\n function (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(WithPropsComponent, _Component);\n\n function WithPropsComponent() {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, WithPropsComponent);\n\n return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(WithPropsComponent).apply(this, arguments));\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(WithPropsComponent, [{\n key: \"render\",\n value: function render() {\n return __webpack_provided_wp_dot_element.createElement(OriginalComponent, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, this.props, input(this.props)));\n }\n }]);\n\n return WithPropsComponent;\n }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__[\"Component\"])\n );\n }, 'withProps');\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-props/index.js?"); + +/***/ }), + +/***/ "./packages/core/hocs/with-validation/index.js": +/*!*****************************************************!*\ + !*** ./packages/core/hocs/with-validation/index.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_drop_until__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-drop-until */ \"./node_modules/callbag-drop-until/dist/callbag-drop-until.es.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var callbag_debounce__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! callbag-debounce */ \"./node_modules/callbag-debounce/es/debounce.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _required__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./required */ \"./packages/core/hocs/with-validation/required.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @param {Object} props\n * @return {Object}\n */\n\nfunction aperture(component, props) {\n if (!props.field.required) {\n return;\n }\n\n var mount$ = component.mount;\n var unmount$ = component.unmount;\n var value$ = component.observe('value');\n var visible$ = component.observe('visible');\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_8__[\"merge\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_8__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_8__[\"combine\"])(value$, visible$, mount$), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_8__[\"filter\"])(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n visible = _ref2[1];\n\n return visible;\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_8__[\"take\"])(1), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_8__[\"map\"])(function (_ref3) {\n var _ref4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref3, 1),\n value = _ref4[0];\n\n return {\n type: 'VALIDATE',\n payload: {\n value: value,\n transient: true\n }\n };\n })), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_8__[\"pipe\"])(value$, Object(callbag_drop_until__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mount$), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(callbag_debounce__WEBPACK_IMPORTED_MODULE_7__[\"debounce\"])(250), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_8__[\"map\"])(function (value) {\n return {\n type: 'VALIDATE',\n payload: {\n value: value,\n transient: false\n }\n };\n })), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_8__[\"pipe\"])(unmount$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_8__[\"map\"])(function () {\n return {\n type: 'RESET'\n };\n })));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var id = props.id,\n field = props.field,\n markAsInvalid = props.markAsInvalid,\n markAsValid = props.markAsValid,\n lockSaving = props.lockSaving,\n unlockSaving = props.unlockSaving;\n\n switch (effect.type) {\n case 'VALIDATE':\n var _effect$payload = effect.payload,\n value = _effect$payload.value,\n transient = _effect$payload.transient;\n var hook = \"carbon-fields.\".concat(field.type, \".validate\");\n var error = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__[\"hasFilter\"])(hook) ? Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__[\"applyFilters\"])(hook, field, value) : Object(_required__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(value);\n\n if (error) {\n if (!transient) {\n markAsInvalid(id, error);\n }\n\n lockSaving(id);\n } else {\n if (!transient) {\n markAsValid(id);\n }\n\n unlockSaving(id);\n }\n\n break;\n\n case 'RESET':\n markAsValid(id);\n unlockSaving(id);\n break;\n }\n };\n}\n\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_6__[\"withEffects\"])(aperture, {\n handler: handler\n});\nvar applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/core'),\n markAsValid = _dispatch.markAsValid,\n markAsInvalid = _dispatch.markAsInvalid;\n\n return {\n markAsValid: markAsValid,\n markAsInvalid: markAsInvalid\n };\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__[\"compose\"])(applyWithDispatch, applyWithEffects));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-validation/index.js?"); + +/***/ }), + +/***/ "./packages/core/hocs/with-validation/required.js": +/*!********************************************************!*\ + !*** ./packages/core/hocs/with-validation/required.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return required; });\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Validates the given value.\n *\n * @param {mixed} value\n * @return {?string}\n */\n\nfunction required(value) {\n var isObjectValue = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isObject\"])(value);\n\n if (isObjectValue && !Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(value) || !isObjectValue && !!value) {\n return null;\n }\n\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-validation/required.js?"); + +/***/ }), + +/***/ "./packages/core/index.js": +/*!********************************!*\ + !*** ./packages/core/index.js ***! + \********************************/ +/*! exports provided: createRegistry, getFieldType, registerFieldType, Field, withFilters, withProps, withValidation, withConditionalLogic, uniqueId, fromSelector */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./store */ \"./packages/core/store/index.js\");\n/* harmony import */ var _fields__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fields */ \"./packages/core/fields/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./registry */ \"./packages/core/registry/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createRegistry\", function() { return _registry__WEBPACK_IMPORTED_MODULE_3__[\"createRegistry\"]; });\n\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./registry/fields */ \"./packages/core/registry/fields.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getFieldType\", function() { return _registry_fields__WEBPACK_IMPORTED_MODULE_4__[\"getFieldType\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"registerFieldType\", function() { return _registry_fields__WEBPACK_IMPORTED_MODULE_4__[\"registerFieldType\"]; });\n\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/field */ \"./packages/core/components/field/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Field\", function() { return _components_field__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_filters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hocs/with-filters */ \"./packages/core/hocs/with-filters/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withFilters\", function() { return _hocs_with_filters__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_props__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./hocs/with-props */ \"./packages/core/hocs/with-props/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withProps\", function() { return _hocs_with_props__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_validation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./hocs/with-validation */ \"./packages/core/hocs/with-validation/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withValidation\", function() { return _hocs_with_validation__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./hocs/with-conditional-logic */ \"./packages/core/hocs/with-conditional-logic/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withConditionalLogic\", function() { return _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _utils_unique_id__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/unique-id */ \"./packages/core/utils/unique-id.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uniqueId\", function() { return _utils_unique_id__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _utils_from_selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/from-selector */ \"./packages/core/utils/from-selector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fromSelector\", function() { return _utils_from_selector__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * Sets the locale data for the package type\n */\n\nObject(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"setLocaleData\"])(window.cf.config.locale, 'carbon-fields-ui');\n/**\n * Public API.\n */\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/index.js?"); + +/***/ }), + +/***/ "./packages/core/registry/fields.js": +/*!******************************************!*\ + !*** ./packages/core/registry/fields.js ***! + \******************************************/ +/*! exports provided: registerFieldType, getFieldType */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerFieldType\", function() { return registerFieldType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldType\", function() { return getFieldType; });\n/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ */ \"./packages/core/registry/index.js\");\n/**\n * Internal dependencies.\n */\n\n\nvar _createRegistry = Object(___WEBPACK_IMPORTED_MODULE_0__[\"createRegistry\"])('field', ['metabox', 'block']),\n registerFieldType = _createRegistry.registerFieldType,\n getFieldType = _createRegistry.getFieldType;\n\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/registry/fields.js?"); + +/***/ }), + +/***/ "./packages/core/registry/index.js": +/*!*****************************************!*\ + !*** ./packages/core/registry/index.js ***! + \*****************************************/ +/*! exports provided: createRegistry */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createRegistry\", function() { return createRegistry; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Creates a new registry.\n *\n * @param {string} domain\n * @param {string[]} supportedContexts\n * @return {boolean}\n */\n\nfunction createRegistry(domain, supportedContexts) {\n var _ref;\n\n var domainStartCased = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"startCase\"])(domain);\n /**\n * Keeps track of registered types.\n *\n * @type {Object}\n */\n\n var types = {};\n /**\n * Registers a new type.\n *\n * @param {string} type\n * @param {Function} component\n * @return {boolean}\n */\n\n function registerType(type, component) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isString\"])(type)) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('%1$s type must be a string.', 'carbon-fields-ui'), domainStartCased));\n return false;\n }\n\n if (types[type]) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('%1$s %2$s is already registered.', 'carbon-fields-ui'), domainStartCased, type));\n return false;\n }\n\n if (!component || !Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isFunction\"])(component)) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('The \"component\" param must be a function.', 'carbon-fields-ui'));\n return false;\n }\n\n types[type] = supportedContexts.reduce(function (accumulator, context) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, accumulator, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, context, Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"applyFilters\"])(\"carbon-fields.register-\".concat(domain, \"-type\"), type, context, component)));\n }, {});\n return true;\n }\n /**\n * Returns a registered type.\n *\n * @param {string} type\n * @param {string} context\n * @return {?Object}\n */\n\n\n function getType(type, context) {\n if (!supportedContexts.includes(context)) {\n console.error(\"The provided context isn't a valid one. Must be one of - \".concat(supportedContexts.join(', '), \" .\"));\n return;\n }\n\n if (!types[type]) {\n console.error(\"\".concat(domainStartCased, \" \").concat(type, \" isn't registered.\"));\n return;\n }\n\n return types[type][context];\n }\n\n return _ref = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_ref, \"register\".concat(domainStartCased, \"Type\"), registerType), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_ref, \"get\".concat(domainStartCased, \"Type\"), getType), _ref;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/registry/index.js?"); + +/***/ }), + +/***/ "./packages/core/store/actions.js": +/*!****************************************!*\ + !*** ./packages/core/store/actions.js ***! + \****************************************/ +/*! exports provided: markAsValid, markAsInvalid, showField, hideField */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"markAsValid\", function() { return markAsValid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"markAsInvalid\", function() { return markAsInvalid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"showField\", function() { return showField; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hideField\", function() { return hideField; });\n/**\n * Returns an action object used to mark the field as valid.\n *\n * @param {string} fieldId\n * @return {Object}\n */\nfunction markAsValid(fieldId) {\n return {\n type: 'MARK_AS_VALID',\n payload: {\n fieldId: fieldId\n }\n };\n}\n/**\n * Returns an action object used to mark the field as invalid.\n *\n * @param {string} fieldId\n * @param {string} error\n * @return {Object}\n */\n\nfunction markAsInvalid(fieldId, error) {\n return {\n type: 'MARK_AS_INVALID',\n payload: {\n fieldId: fieldId,\n error: error\n }\n };\n}\n/**\n * Returns an action object used to show the field.\n *\n * @param {string} fieldId\n * @return {Object}\n */\n\nfunction showField(fieldId) {\n return {\n type: 'SHOW_FIELD',\n payload: {\n fieldId: fieldId\n }\n };\n}\n/**\n * Returns an action object used to hide the field.\n *\n * @param {string} fieldId\n * @return {Object}\n */\n\nfunction hideField(fieldId) {\n return {\n type: 'HIDE_FIELD',\n payload: {\n fieldId: fieldId\n }\n };\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/store/actions.js?"); + +/***/ }), + +/***/ "./packages/core/store/index.js": +/*!**************************************!*\ + !*** ./packages/core/store/index.js ***! + \**************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _reducer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reducer */ \"./packages/core/store/reducer.js\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./actions */ \"./packages/core/store/actions.js\");\n/* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectors */ \"./packages/core/store/selectors.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Registers the store.\n */\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"registerStore\"])('carbon-fields/core', {\n reducer: _reducer__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n actions: _actions__WEBPACK_IMPORTED_MODULE_2__,\n selectors: _selectors__WEBPACK_IMPORTED_MODULE_3__\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/store/index.js?"); + +/***/ }), + +/***/ "./packages/core/store/reducer.js": +/*!****************************************!*\ + !*** ./packages/core/store/reducer.js ***! + \****************************************/ +/*! exports provided: validation, hiddenFields, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"validation\", function() { return validation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hiddenFields\", function() { return hiddenFields; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * The reducer that keeps track of the field's validation status.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction validation() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'MARK_AS_VALID':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"omit\"])(state, [action.payload.fieldId]);\n\n case 'MARK_AS_INVALID':\n var _action$payload = action.payload,\n fieldId = _action$payload.fieldId,\n error = _action$payload.error;\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, state, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, fieldId, error));\n\n default:\n return state;\n }\n}\n/**\n * The reducer that keeps track of the fields that are hidden\n * by conditional logic.\n *\n * @param {string[]} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction hiddenFields() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SHOW_FIELD':\n if (state.indexOf(action.payload.fieldId) === -1) {\n return state;\n }\n\n return Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"without\"])(state, action.payload.fieldId);\n\n case 'HIDE_FIELD':\n if (state.indexOf(action.payload.fieldId) > -1) {\n return state;\n }\n\n return state.concat(action.payload.fieldId);\n\n default:\n return state;\n }\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"combineReducers\"])({\n validation: validation,\n hiddenFields: hiddenFields\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/store/reducer.js?"); + +/***/ }), + +/***/ "./packages/core/store/selectors.js": +/*!******************************************!*\ + !*** ./packages/core/store/selectors.js ***! + \******************************************/ +/*! exports provided: getValidationError, isFieldVisible */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getValidationError\", function() { return getValidationError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isFieldVisible\", function() { return isFieldVisible; });\n/**\n * Returns the validation error for the specified field.\n *\n * @param {Object} state\n * @param {string} fieldId\n * @return {mixed}\n */\nfunction getValidationError(state, fieldId) {\n return state.validation[fieldId] || null;\n}\n/**\n * Returns whether the field is visible.\n *\n * @param {Object} state\n * @param {string} fieldId\n * @return {boolean}\n */\n\nfunction isFieldVisible(state, fieldId) {\n return state.hiddenFields.indexOf(fieldId) === -1;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/store/selectors.js?"); + +/***/ }), + +/***/ "./packages/core/utils/api-fetch.js": +/*!******************************************!*\ + !*** ./packages/core/utils/api-fetch.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (url, method) {\n var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n return new Promise(function (resolve, reject) {\n var request = window.jQuery.ajax({\n url: url,\n type: method,\n data: data\n });\n request.done(function (response) {\n resolve(response);\n });\n request.fail(function () {\n reject(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('An error occured.', 'carbon-fields-ui'));\n });\n });\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/utils/api-fetch.js?"); + +/***/ }), + +/***/ "./packages/core/utils/fetch-attachments-data.js": +/*!*******************************************************!*\ + !*** ./packages/core/utils/fetch-attachments-data.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * The external dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (attachments) {\n return new Promise(function (resolve, reject) {\n // eslint-disable-next-line\n var result = wp.media.ajax({\n data: {\n action: 'query-attachments',\n query: {\n post__in: attachments\n }\n }\n });\n result.done(function (response) {\n resolve(response);\n });\n result.fail(function () {\n reject(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('An error occurred while trying to fetch files data.', 'carbon-fields-ui'));\n });\n });\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/utils/fetch-attachments-data.js?"); + +/***/ }), + +/***/ "./packages/core/utils/from-selector.js": +/*!**********************************************!*\ + !*** ./packages/core/utils/from-selector.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return fromSelector; });\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Creates a callbag listenable source from a store's selector.\n *\n * @param {Function} selector\n * @param {...mixed} args\n * @return {Function}\n */\n\nfunction fromSelector(selector) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return function (start, sink) {\n if (start !== 0) {\n return;\n }\n\n var unsubscribe = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"subscribe\"])(function () {\n return sink(1, selector.apply(void 0, args));\n });\n sink(0, function (type) {\n if (type === 2) {\n unsubscribe();\n }\n });\n };\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/utils/from-selector.js?"); + +/***/ }), + +/***/ "./packages/core/utils/hex-to-rgba.js": +/*!********************************************!*\ + !*** ./packages/core/utils/hex-to-rgba.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * The external dependencies.\n */\n\n/**\n * Converts the given hex color to RGBA\n *\n * @param {string} hex\n * @return {Array}\n */\n\nvar hexToRgba = function hexToRgba(hex) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"flow\"])([removeHash, splitHex, parseToDec])(hex);\n};\n/**\n * Removes the '#' symbol if existing in the given hex\n *\n * @param {string} hex\n * @return {string}\n */\n\n\nvar removeHash = function removeHash(hex) {\n return hex.replace('#', '');\n};\n/**\n * Splits the hex string in to-be-decimal groups\n *\n * @param {string} hex\n * @return {Array}\n */\n\n\nvar splitHex = function splitHex(hex) {\n var match = new RegExp(\"\\\\w{\".concat(hex.length <= 4 ? 1 : 2, \"}\"), 'g');\n var parts = hex.match(match);\n\n if (parts.length === 3) {\n parts.push('ff');\n }\n\n return parts;\n};\n/**\n * Converts the given hex parts to decimal values\n * @param {Array} hexParts\n * @return {Array}\n */\n\n\nvar parseToDec = function parseToDec(hexParts) {\n return hexParts.map(function (part, index) {\n var decimal = parseInt(part, 16);\n return index !== hexParts.length - 1 ? decimal : (decimal / 255).toFixed(2);\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hexToRgba);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/utils/hex-to-rgba.js?"); + +/***/ }), + +/***/ "./packages/core/utils/unique-id.js": +/*!******************************************!*\ + !*** ./packages/core/utils/unique-id.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return uniqueId; });\n/* harmony import */ var nanoid_generate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! nanoid/generate */ \"./node_modules/nanoid/generate.js\");\n/* harmony import */ var nanoid_generate__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nanoid_generate__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Alphabet that doesn't contain `-`.\n *\n * @borrows https://github.com/ai/nanoid/blob/master/index.browser.js#L16\n */\n\nvar ALPHABET = 'Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz';\n/**\n * Generates an unique identifier.\n *\n * @return {string}\n */\n\nfunction uniqueId() {\n return \"cf-\".concat(nanoid_generate__WEBPACK_IMPORTED_MODULE_0___default()(ALPHABET, 21));\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/utils/unique-id.js?"); + +/***/ }), + +/***/ "@wordpress/compose": +/*!*****************************************************!*\ + !*** external ["cf","vendor","@wordpress/compose"] ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"@wordpress/compose\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22@wordpress/compose%22%5D?"); + +/***/ }), + +/***/ "@wordpress/data": +/*!**************************************************!*\ + !*** external ["cf","vendor","@wordpress/data"] ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"@wordpress/data\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22@wordpress/data%22%5D?"); + +/***/ }), + +/***/ "@wordpress/element": +/*!*****************************************************!*\ + !*** external ["cf","vendor","@wordpress/element"] ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"@wordpress/element\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22@wordpress/element%22%5D?"); + +/***/ }), + +/***/ "@wordpress/hooks": +/*!***************************************************!*\ + !*** external ["cf","vendor","@wordpress/hooks"] ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"@wordpress/hooks\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22@wordpress/hooks%22%5D?"); + +/***/ }), + +/***/ "@wordpress/i18n": +/*!**************************************************!*\ + !*** external ["cf","vendor","@wordpress/i18n"] ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"@wordpress/i18n\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22@wordpress/i18n%22%5D?"); + +/***/ }), + +/***/ "callbag-basics": +/*!*************************************************!*\ + !*** external ["cf","vendor","callbag-basics"] ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"callbag-basics\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22callbag-basics%22%5D?"); + +/***/ }), + +/***/ "classnames": +/*!*********************************************!*\ + !*** external ["cf","vendor","classnames"] ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"classnames\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22classnames%22%5D?"); + +/***/ }), + +/***/ "immer": +/*!****************************************!*\ + !*** external ["cf","vendor","immer"] ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"immer\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22immer%22%5D?"); + +/***/ }), + +/***/ "lodash": +/*!*****************************************!*\ + !*** external ["cf","vendor","lodash"] ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"lodash\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22lodash%22%5D?"); + +/***/ }), + +/***/ "react": +/*!****************************************!*\ + !*** external ["cf","vendor","react"] ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"react\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22react%22%5D?"); + +/***/ }), + +/***/ "react-dom": +/*!********************************************!*\ + !*** external ["cf","vendor","react-dom"] ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"react-dom\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22react-dom%22%5D?"); + +/***/ }), + +/***/ "refract-callbag": +/*!**************************************************!*\ + !*** external ["cf","vendor","refract-callbag"] ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"refract-callbag\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22refract-callbag%22%5D?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/build/classic/core.min.css b/build/classic/core.min.css new file mode 100644 index 000000000..fcd076334 --- /dev/null +++ b/build/classic/core.min.css @@ -0,0 +1 @@ +.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{position:relative;z-index:0}.cf-complex--tabbed-vertical .cf-complex__groups{flex:0 0 80%}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px}.cf-complex__group-body[hidden]{display:none}.cf-complex--grid .cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex--grid .cf-complex__group-actions{position:absolute;top:12px;right:12px}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex--tabbed-horizontal .cf-complex__tabs{display:inline-flex;margin-bottom:-5px}.cf-complex--tabbed-vertical .cf-complex__tabs{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex--tabbed-horizontal .cf-complex__tabs-item{margin:0 4px 4px 0}.cf-complex--tabbed-vertical .cf-complex__tabs-item~.cf-complex__tabs-item{border-top-width:0}.cf-complex__tabs-item--current,.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex--tabbed-horizontal .cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex--tabbed-vertical .cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label{margin:8px 0 12px}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-text__input{display:block;width:100%;margin:0}.cf-textarea__input{display:block;width:100%;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file diff --git a/build/classic/core.min.js b/build/classic/core.min.js new file mode 100644 index 000000000..16a3427da --- /dev/null +++ b/build/classic/core.min.js @@ -0,0 +1,10 @@ +this.cf=this.cf||{},this.cf.core=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=322)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.cf.vendor.react}()},function(e,t){!function(){e.exports=this.cf.vendor["@wordpress/element"]}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.cf.vendor.lodash}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n1?t-1:0),i=1;i=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},h}(r.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},i}},function(e,t,n){"use strict";var r=n(3),o=n.n(r),a=n(15),i=n.n(a),u=n(13),s=n.n(u),c=n(17),l=n.n(c),f=n(5),p=n.n(f),d=n(6),h=n.n(d),m=n(7),g=n.n(m),v=n(8),b=n.n(v),y=n(9),E=n.n(y),w=n(2),x=n(14),O=n(18),C=n(11),_=n(26),k=function(e){function t(){return p()(this,t),g()(this,b()(t).apply(this,arguments))}return E()(t,e),h()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.onSelect,n=e.typeFilter;this.props.initMediaBrowser({onSelect:t,typeFilter:n})}},{key:"componentWillUnmount",value:function(){this.props.destroyMediaBrowser()}},{key:"render",value:function(){var e=this.props.openMediaBrowser;return this.props.children({openMediaBrowser:e})}}]),t}(w.Component),S=Object(O.withEffects)(function(e){var t=[{event:"initMediaBrowserEvent",prop:"initMediaBrowser",type:"INIT_MEDIA_BROWSER"},{event:"openMediaBrowserEvent",prop:"openMediaBrowser",type:"OPEN_MEDIA_BROWSER"},{event:"destroyMediaBrowserEvent",prop:"destroyMediaBrowser",type:"DESTROY_MEDIA_BROWSER"}].map(function(t){var n=e.useEvent(t.event),r=l()(n,2),o=r[0],a=r[1];return s()({},t,{action:a,channel$:o})}),n=Object(C.pipe)(C.combine.apply(void 0,i()(t.map(function(e){var t=e.action,n=e.prop;return Object(_.a)({action:t,prop:n})}))),Object(C.map)(function(e){return Object(O.toProps)(e.reduce(function(e,t){return s()({},e,o()({},t.prop,t.action))},{}))}));return C.merge.apply(void 0,[n].concat(i()(t.map(function(e){var t=e.channel$,n=e.type;return Object(C.pipe)(t,Object(C.map)(function(e){return{type:n,payload:e}}))}))))},{handler:function(e){var t=null;return function(n){switch(n.type){case"INIT_MEDIA_BROWSER":var r=n.payload,o=r.onSelect,a=r.typeFilter;if(!o)return;(t=wp.media({title:e.title,library:{type:a},button:{text:e.buttonLabel},multiple:e.multiple})).on("select",function(){var e=t.state().get("selection").toJSON();o(e)});break;case"OPEN_MEDIA_BROWSER":t&&t.open();break;case"DESTROY_MEDIA_BROWSER":t=null}}}});t.a=Object(x.compose)(S)(k)},function(e,t,n){"use strict";var r=n(10);t.a=function(e){return new Promise(function(t,n){var o=wp.media.ajax({data:{action:"query-attachments",query:{post__in:e}}});o.done(function(e){t(e)}),o.fail(function(){n(Object(r.__)("An error occurred while trying to fetch files data.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(312),n(30)),w=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():e.createElement(E.a,null)}}]),n}(y.Component);t.a=w}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(0),h=n.n(d),m=n(3),g=n.n(m),v=n(53),b=function(t){function n(){var e,t;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i1?t.setState(function(e){return{menuVisible:!e.menuVisible}}):r(n[0])}),g()(h()(h()(t)),"handleItemClick",function(e){t.setState({menuVisible:!1}),t.props.onSelect(e)}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.buttonText,o=n.groups;return e.createElement("div",{className:"cf-complex__inserter"},e.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},r),o.length>1&&e.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},o.map(function(n,r){return e.createElement("li",{className:"cf-complex__inserter-item",key:r,onClick:function(){return t.handleItemClick(n)}},n.label)})))}}]),n}(n(2).Component);t.a=Object(v.a)(b)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(13),i=n.n(a),u=n(5),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(129),O=n.n(x),C=(n(293),function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(79),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(63)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(85)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(42),o=n(190),a=n(191),i=n(192),u=n(193),s=n(194);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(32)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(199),o=n(206),a=n(208),i=n(209),u=n(210);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0?e.createElement("select",{id:n,name:r,value:o||Object(b.get)(a.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},a.options.map(function(t){return e.createElement("option",{key:t.value,value:t.value},t.label)})):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return i});var r=n(2),o=Object(r.createContext)(!1),a=o.Provider,i=o.Consumer},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(36))},function(e,t,n){var r=n(172),o=n(40);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(174),o=n(82),a=n(23),i=n(62),u=n(83),s=n(84),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,h=d?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||h.push(g);return h}},function(e,t,n){var r=n(175),o=n(27),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&el))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=l}function E(){var e=o();if(y(e))return w(e);p=setTimeout(E,function(e){var n=t-(e-d);return g?u(n,l-(e-h)):n}(e))}function w(e){return p=void 0,v&&s?b(e):(s=c=void 0,f)}function x(){var e=o(),n=y(e);if(s=arguments,c=this,d=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(E,t),m?b(e):f}(d);if(g)return p=setTimeout(E,t),b(d)}return void 0===p&&(p=setTimeout(E,t)),f}return t=a(t)||0,r(n)&&(m=!!n.leading,l=(g="maxWait"in n)?i(a(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,s=d=c=p=void 0},x.flush=function(){return void 0===p?f:w(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(284)),o=a(n(286));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,i.polyfill)(p);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(113),i=n(310);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(20),i=n.n(a),u=n(14),s=n(22),c=n(4),l=(n(319),n(148)),f=n(34);t.a=Object(u.compose)(Object(s.withSelect)(function(e,t){var n=e("carbon-fields/core"),r=n.getValidationError,o=n.isFieldVisible;return{error:r(t.id),hidden:!o(t.id)}}),Object(f.a)("carbon-fields.field-wrapper"))(function(t){var n=t.id,r=t.field,a=t.error,u=t.hidden,s=t.className,f=t.children,p=r.width?{flexBasis:"".concat(r.width,"%")}:null,d=["cf-field","cf-".concat(Object(c.kebabCase)(r.type)),{"cf-field--has-width":!!r.width,"cf-field--invalid":!!a},s].concat(o()(r.classes));return e.createElement("div",{className:i()(d),style:p,hidden:u},e.createElement("div",{className:"cf-field__head"},r.label&&e.createElement("label",{className:"cf-field__label",htmlFor:n},r.label,r.required&&e.createElement("span",{className:"cf-field__asterisk"},"*"))),!u&&e.createElement("div",{className:"cf-field__body"},f),u&&e.createElement(l.a,{className:"cf-field__body"},f),r.help_text&&e.createElement("em",{className:"cf-field__help",dangerouslySetInnerHTML:{__html:r.help_text}}),a&&e.createElement("span",{className:"cf-field__error"},a))})}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(13),i=n.n(a),u=n(15),s=n.n(u),c=n(5),l=n.n(c),f=n(6),p=n.n(f),d=n(7),h=n.n(d),m=n(8),g=n.n(m),v=n(9),b=n.n(v),y=n(0),E=n.n(y),w=n(3),x=n.n(w),O=n(37),C=n.n(O),_=n(10),k=n(2),S=n(14),j=n(19),D=n(18),A=n(20),M=n.n(A),F=n(4),T=n(11),P=n(26),N=(n(160),n(38)),I=n(35),R=n(119),L=function(t){function n(){var e,t;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&a.length>=r.max||(i(o,s()(a).concat([Object(F.pick)(e,"id","type","subtype")])),u({selectedOptions:s()(c).concat([e])}))}),x()(E()(E()(t)),"handleRemoveItem",function(e){var n=t.props,r=n.value,o=n.id,a=n.onChange,i=n.setState,u=n.selectedOptions;a(o,Object(F.without)(r,e)),i({selectedOptions:Object(F.without)(u,e)})}),x()(E()(E()(t)),"handleSort",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),t}return b()(n,t),p()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var t=this,n=this.props,r=n.name,o=n.value,a=n.field,i=n.totalOptionsCount,u=n.selectedOptions,s=n.queryTerm,c=this.props.options;return a.duplicates_allowed||(c=C()(c,function(e){e.map(function(e){return e.disabled=!!Object(F.find)(o,function(t){return Object(F.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),e.createElement(k.Fragment,null,e.createElement("div",{className:"cf-association__bar"},e.createElement(N.a,{value:s,onChange:this.handleSearchChange}),e.createElement("span",{className:"cf-association__counter"},Object(_.sprintf)(Object(_.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(c.length),Number(i)))),e.createElement("div",{className:"cf-association__cols"},e.createElement("div",{className:"cf-association__col"},c.map(function(n,r){return e.createElement("div",{className:M()("cf-association__option",{"cf-association__option--selected":n.disabled}),key:r},n.thumbnail&&e.createElement("img",{className:"cf-association__option-thumb",src:n.thumbnail}),e.createElement("div",{className:"cf-association__option-content"},e.createElement("span",{className:"cf-association__option-title"},n.title),e.createElement("span",{className:"cf-association__option-type"},n.type)),e.createElement("div",{className:"cf-association__option-actions"},e.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:n.edit_link}),!n.disabled&&(a.max<0||o.length0&&t.length=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";var r=n(10);t.a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(o,a){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){o(e)}),i.fail(function(){a(Object(r.__)("An error occured.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(163),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;t.setState({currentTab:Object(k.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),x()(E()(E()(t)),"handleToggleAllClick",function(){var e=t.props,n=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!n)}),x()(E()(E()(t)),"handleSortGroups",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),x()(E()(E()(t)),"handleTabsChange",function(e){t.setState({currentTab:e})}),t}return b()(n,t),p()(n,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(k.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=s()(e,2),o=r[0],a=r[1],u=Object(k.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(k.isString)(u.label_template))return u.label;try{return Object(k.template)(u.label_template)(i()({$_index:n},a))||u.label}catch(e){return console.error("Couldn't create the label of group - ".concat(e.message)),"N/A"}})}},{key:"render",value:function(){var t=this,n=this.state.currentTab,r=this.props,o=r.value,a=r.field,i=r.groupIdKey,u=r.groupFilterKey,s=r.allGroupsAreCollapsed,c=r.onGroupSetup,l=r.onGroupFieldSetup,f=r.onToggleGroup,p=this.getAvailableGroups(u),d=this.getGroupLabels(),h=o.map(function(e,t){return{id:e[i],label:d[t]}});return e.createElement(C.Fragment,null,this.isTabbed&&!!o.length&&e.createElement(S.a,{items:o,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===a.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleSortGroups},e.createElement(j.a,{ref:this.tabsList,items:h,current:n,onChange:this.handleTabsChange},!!p.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:"+",groups:p,onSelect:this.handleAddGroup}))),!o.length&&e.createElement(M.a,{label:"There are no entries yet."},e.createElement(D.a,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup})),!!o.length&&e.createElement(S.a,{items:o,options:{handle:".cf-complex__group-head"},forwardedRef:this.groupsList,onUpdate:this.handleSortGroups},e.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},o.map(function(r,o){return e.createElement(A.a,c(r,{index:o,label:d[o],tabbed:t.isTabbed,hidden:t.isTabbed&&r[i]!==n,allowClone:a.duplicate_groups_allowed&&!t.isMaximumReached,onFieldSetup:l,onClone:t.handleCloneGroup,onRemove:t.handleRemoveGroup,onToggle:f}))}))),!this.isTabbed&&!!o.length&&e.createElement("div",{className:"cf-complex__actions"},!!p.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup}),e.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},s?"Expand All":"Collapse All")))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(_.sprintf)(Object(_.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),n}(C.Component);Object(O.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(t){return function(n){var r=n.field;return"complex"!==r.type?e.createElement(t,n):e.createElement(t,o()({className:"cf-complex--".concat(r.layout)},n))}}),Object(O.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(k.isEmpty)(t))return Object(_.__)("This field is required. ","carbon-fields-ui");if(n>0&&t.length=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===l.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);l.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return l.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();f.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},f.defaultProps={options:{}},t.default=f},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=function(t){function n(){return i()(this,n),l()(this,p()(n).apply(this,arguments))}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.value,a=t.field;return e.createElement("input",o()({type:"hidden",name:n,value:r,className:"hidden-text"},a.attributes))}}]),n}(n(2).Component);t.a=m}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(2);t.a=function(t){var n=t.field;return e.createElement(r.RawHTML,{className:"cf-html__content"},n.html)}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(13),i=n.n(a),u=n(5),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(26),x=n(2),O=n(10),C=n(18),_=n(4),k=n(11),S=(n(295),n(38)),j=n(133),D=function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1})}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?e.createElement(b.a,{id:n,name:r,value:this.filterValues(o),options:a.options,delimiter:a.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){(function(t){for(var r=n(303),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],c=0;!u&&c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(14),w=n(10),x=n(18),O=n(11),C=n(26),_=n(4),k=(n(311),n(38)),S=n(141),j=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.embedCode,i=t.embedType,u=t.provider;return e.createElement("div",{ref:this.node},e.createElement(k.a,{id:n,value:o,onChange:this.handleChange}),a?e.createElement(S.a,{html:a,type:i,provider:u}):null,e.createElement("input",{type:"hidden",name:r,value:o,readOnly:!0}))}}]),n}(y.Component),D=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),A=Object(x.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=o()(t,2),r=n[0],a=n[1],i=Object(O.pipe)(Object(C.a)({onFetchEmbedCode:a}),Object(O.map)(x.toProps)),u=Object(O.pipe)(r,Object(O.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(O.merge)(i,u)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(w.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(w.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}});t.a=Object(E.compose)(D,A)(j)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(0),h=n.n(d),m=n(2),g=function(t){function n(){var e;return o()(this,n),(e=s()(this,l()(n).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(h()(h()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(h()(h()(e))),e}return p()(n,t),i()(n,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,c=u.height;"resize"!==o||s===a&&c===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var t=this;return e.createElement("div",{className:"cf-oembed__preview"},e.createElement("iframe",{ref:function(e){return t.iframe=e},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var t="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",n="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(t,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),r=e.createElement("html",{lang:document.documentElement.lang},e.createElement("head",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),e.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},e.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),e.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:n}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(m.renderToString)(r)),this.iframe.contentWindow.document.close()}}}]),n}(m.Component);t.a=g}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(52),i=n(56);n(313),t.a=Object(a.a)(function(t){return o()({},t,{field:o()({},t.field,{options:t.field.options.map(function(t){return o()({},t,{label:e.createElement("img",{className:"cf-radio-image__image",src:t.label})})})})})})(i.a)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(13),i=n.n(a),u=n(5),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(10),O=n(4),C=n(20),_=n.n(C),k=function(t){function n(){var e;return s()(this,n),e=p()(this,h()(n).call(this)),E()(b()(b()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(O.isString)(t)?t:t.target.value)}),E()(b()(b()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=i()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=i()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return g()(n,t),l()(n,[{key:"componentDidMount",value:function(){setTimeout(this.initEditor,100)}},{key:"componentWillUnmount",value:function(){this.destroyEditor()}},{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field,s=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":u.rich_editing},{"html-active":!u.rich_editing}],c=u.media_buttons?Object(O.template)(u.media_buttons)({id:r}):null;return e.createElement("div",{id:"wp-".concat(r,"-wrap"),className:_()(s),ref:function(e){return t.editorNode=e}},u.media_buttons&&e.createElement("div",{id:"wp-".concat(r,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},e.createElement("span",{dangerouslySetInnerHTML:{__html:c}})),u.rich_editing&&e.createElement("div",{className:"wp-editor-tabs"},e.createElement("button",{type:"button",id:"".concat(r,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":r},Object(x.__)("Visual","carbon-fields-ui")),e.createElement("button",{type:"button",id:"".concat(r,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":r},Object(x.__)("Text","carbon-fields-ui"))),e.createElement("div",{id:"wp-".concat(r,"-editor-container"),className:"wp-editor-container"},e.createElement("textarea",o()({style:{width:"100%"},className:"regular-text",id:r,name:a,value:i,onChange:this.handleChange},u.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),n}(w.Component);t.a=k}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(2),h=(n(315),function(t){function n(){return o()(this,n),s()(this,l()(n).apply(this,arguments))}return p()(n,t),i()(n,[{key:"render",value:function(){return e.createElement("h3",null,this.props.field.label)}}]),n}(d.Component));t.a=h}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(4),w=(n(316),n(30)),x=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1}),t}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field;return u.options.length>0?e.createElement("ul",{className:"cf-set__list"},u.options.map(function(n,s){return e.createElement("li",{className:"cf-set__list-item",key:s},e.createElement("input",o()({type:"checkbox",id:"".concat(r,"-").concat(n.value),name:"".concat(a,"[]"),checked:t.isChecked(i,n),value:n.value,className:"cf-set__input",onChange:t.handleChange},u.attributes)),e.createElement("label",{className:"cf-set__label",htmlFor:"".concat(r,"-").concat(n.value)},n.label))})):e.createElement(w.a,null)}}]),n}(y.Component);t.a=x}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(26),E=n(2),w=n(10),x=n(18),O=n(4),C=n(11),_=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;ar&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===f.inserted[v]&&(n="",h(e,t),f.inserted[v]=n)}var O=function(){var e=w.apply(this,arguments),t=a+"-"+v;return void 0===f.registered[t]&&(f.registered[t]=b),x("."+t,e),t};function C(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):n+=t+" "}),n}function _(e,t){var n=[],r=C(n,e);return n.length<2?e:r+O(n,t)}function k(e){f.inserted[e]=!0}if(l){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){l&&(d.flush(),d.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},C=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},_=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function A(e){return D(e)?window.pageYOffset:e.scrollTop}function M(e,t){D(e)?window.scrollTo(0,t):e.scrollTop=t}function F(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k,a=A(e),i=t-a,u=0;!function t(){var s,c=i*((s=(s=u+=10)/n-1)*s*s+1)+a;M(e,c),u=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&F(s,C,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&w>=r)return a&&F(s,C,160),{placement:"bottom",maxHeight:i?w-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&E>=r)&&(k=i?E-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return M(s,C),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&F(s,_,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&E>=r){var S=t;return(!i&&x>=r||i&&E>=r)&&(S=i?E-y:x-y),a&&F(s,_,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!l,isFixedPosition:l,theme:s});c&&c(f),r.setState(f)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||P(e);return E({},r.props,{placement:t,maxHeight:r.state.maxHeight})},O(r,n)}return w(t,e),b(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(a.Component);N.contextTypes={getPortalPlacement:l.a.func};var I=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},R=I,L=I,H=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};H.defaultProps={children:"No options"};var B=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};B.defaultProps={children:"Loading..."};var V=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=l-f-c,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),p.scrollTop=l,m=!0,r.isBottom=!0):!d&&-t>c&&(i&&!r.isTop&&i(e),p.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},O(r,n)}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return i.a.createElement(Z,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(a.Component),le=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=x(e,["isEnabled"]);return t?i.a.createElement(ce,n):this.props.children}}]),t}(a.Component);le.defaultProps={isEnabled:!0};var fe=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,s=e.hasValue;return i.a.createElement("div",{className:r(Object(u.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s},n)},t)}}]),t}(a.Component),pe=function(e){var t=e.size,n=x(e,["size"]);return i.a.createElement("svg",E({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(u.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},de=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},he=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},me=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},ge=me,ve=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};ve.defaultProps={children:i.a.createElement(he,null)};var be=me,ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};ye.defaultProps={children:i.a.createElement(de,null)};var Ee=function(e){var t=e.color,n=e.delay,r=e.offset;return i.a.createElement("span",{className:Object(u.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(u.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var we=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,s=e.isRtl,c=e.theme.colors,l=a?c.neutral80:c.neutral20;return i.a.createElement("div",E({},o,{className:n(Object(u.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),i.a.createElement(Ee,{color:l,delay:0,offset:s}),i.a.createElement(Ee,{color:l,delay:160,offset:!0}),i.a.createElement(Ee,{color:l,delay:320,offset:!s}))};we.defaultProps={size:4};var xe=function(e){var t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)},Oe=xe,Ce=xe,_e=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)}}]),t}(a.Component);_e.defaultProps={children:i.a.createElement(de,{size:14})};var ke=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,s=e.getStyles,c=e.innerProps,l=e.isDisabled,f=e.removeProps,p=e.selectProps,d=r.Container,h=r.Label,m=r.Remove,g=E({className:o(Object(u.a)(s("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":l},n)},c),v={className:o(Object(u.a)(s("multiValueLabel",this.props)),{"multi-value__label":!0},n)},b=E({className:o(Object(u.a)(s("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},f);return i.a.createElement(d,{data:a,innerProps:g,selectProps:p},i.a.createElement(h,{data:a,innerProps:v,selectProps:p},t),i.a.createElement(m,{data:a,innerProps:b,selectProps:p}))}}]),t}(a.Component);ke.defaultProps={cropWithEllipsis:!0};var Se={ClearIndicator:ye,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,c=e.innerRef,l=e.innerProps;return i.a.createElement("div",E({ref:c,className:n(Object(u.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":s},o)},l),t)},DropdownIndicator:ve,DownChevron:he,CrossIcon:de,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,c=e.label,l=e.theme;return i.a.createElement("div",{className:r(Object(u.a)(o("group",e)),{group:!0},n)},i.a.createElement(a,E({},s,{theme:l,getStyles:o,cx:r}),c),i.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=x(e,["className","cx","getStyles","theme"]);return i.a.createElement("div",E({className:n(Object(u.a)(r("groupHeading",E({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return i.a.createElement("div",{className:r(Object(u.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return i.a.createElement("span",E({},o,{className:n(Object(u.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,s=e.isDisabled,c=e.theme,l=x(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return i.a.createElement("div",{className:Object(u.a)(r("input",E({theme:c},l)))},i.a.createElement(p.a,E({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:s},l)))},LoadingIndicator:we,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps,c=r(Object(u.a)(o("menu",e)),{menu:!0},n);return i.a.createElement("div",E({className:c},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef;return i.a.createElement("div",{className:r(Object(u.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:s},t)},MenuPortal:V,LoadingMessage:B,NoOptionsMessage:H,MultiValue:ke,MultiValueContainer:Oe,MultiValueLabel:Ce,MultiValueRemove:_e,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,c=e.isSelected,l=e.innerRef,f=e.innerProps;return i.a.createElement("div",E({ref:l,className:r(Object(u.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":c},n)},f),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,c=e.isRtl;return i.a.createElement("div",E({className:r(Object(u.a)(o("container",e)),{"--is-disabled":s,"--is-rtl":c},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:fe},je=function(e){return E({},Se,e.components)},De={clearIndicator:be,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:ge,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:L,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return y(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),y(t,"backgroundColor",i.neutral0),y(t,"borderRadius",o),y(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),y(t,"marginBottom",a.menuGutter),y(t,"marginTop",a.menuGutter),y(t,"position","absolute"),y(t,"width","100%"),y(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:R,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ae={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Me={backspaceRemovesValue:!0,blurInputOnSelect:T(),captureMenuScroll:!T(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=E({ignoreCase:!0,ignoreAccents:!0,stringify:K,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?$(t):t,c=i?$(a(e)):a(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=q(s),c=q(c)),"start"===u?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Fe=1,Te=function(e){function t(e){v(this,t);var n=O(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pe.call(n);var r=e.value;n.cacheComponents=h(n.cacheComponents,Y).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Fe);var o=j(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=j(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!u&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?M(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,c=-1;if(a.length){switch(e){case"previous":c=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ae):E({},Ae,this.props.theme):Ae}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,c=this.state.selectValue,l=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+S(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:l,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var c=a?void 0:function(){return n.onOptionHover(e)},l=a?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:l,onMouseMove:c,onMouseOver:c,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:f,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,c=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,c=r||this.getElementId("input");if(!n)return i.a.createElement(J,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:k,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,d=f.theme;return i.a.createElement(u,E({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,f=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,h=l.inputValue,m=l.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue;if(!this.hasValue()||!f)return h?null:i.a.createElement(s,E({},c,{key:"placeholder",isDisabled:p}),m);if(d)return v.map(function(t){var u=t===b;return i.a.createElement(n,E({},c,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var y=v[0];return i.a.createElement(u,E({},c,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:u,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?i.a.createElement(e,E({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.a.createElement(n,E({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,O=m.maxMenuHeight,C=m.menuIsOpen,_=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,j=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,A=m.noOptionsMessage,M=m.onMenuScrollToTop,F=m.onMenuScrollToBottom;if(!C)return null;var T=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,i.a.createElement(l,E({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},P=void 0;if(this.hasOptions())P=h.render.map(function(t){if("group"===t.type){t.type;var o=x(t,["type"]),a=t.key+"-heading";return i.a.createElement(n,E({},f,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return T(e)}))}if("option"===t.type)return T(t)});else if(b){var I=y({inputValue:v});if(null===I)return null;P=i.a.createElement(s,f,I)}else{var R=A({inputValue:v});if(null===R)return null;P=i.a.createElement(c,f,R)}var L={minMenuHeight:w,maxMenuHeight:O,menuPlacement:_,menuPosition:k,menuShouldScrollIntoView:D},H=i.a.createElement(N,E({},f,L),function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return i.a.createElement(o,E({},f,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),i.a.createElement(le,{isEnabled:g,onTopArrive:M,onBottomArrive:F},i.a.createElement(se,{isEnabled:j},i.a.createElement(a,E({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),P))))});return S||"fixed"===k?i.a.createElement(u,E({},f,{appendTo:S,controlElement:this.controlRef,menuPlacement:_,menuPosition:k}),H):H}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(o){if(n){var s=u.map(function(t){return e.getOptionValue(t)}).join(n);return i.a.createElement("input",{name:a,type:"hidden",value:s})}var c=u.length>0?u.map(function(t,n){return i.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):i.a.createElement("input",{name:a,type:"hidden"});return i.a.createElement("div",null,c)}var l=u[0]?this.getOptionValue(u[0]):"";return i.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?i.a.createElement(X,{"aria-live":"assertive"},i.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),i.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,u=a.className,s=a.id,c=a.isDisabled,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.a.createElement(r,E({},f,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:l}),this.renderLiveRegion(),i.a.createElement(t,E({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:l}),i.a.createElement(o,E({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),i.a.createElement(n,E({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(a.Component);Te.defaultProps=Me;var Pe=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=je({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(_(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=De[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,E({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=C(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=C(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof l&&(l(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!c||!f||!m||p&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(c){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":c?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!c){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":c?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":c?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!c)return;e.focusOption("pageup");break;case"PageDown":if(!c)return;e.focusOption("pagedown");break;case"Home":if(!c)return;e.focusOption("first");break;case"End":if(!c)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Ne=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;v(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=c(n(1)),o=c(n(21)),a=c(n(25)),i=n(50),u=c(n(289)),s=c(n(290));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,c=e.hsv,l=e.hsl,f=e.onChange,p=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:l,hsv:c,onChange:f})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:l,onChange:f})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:l,renderers:m,onChange:f}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:l,hex:o,onChange:f,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:f,onSwatchHover:p}))};l.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},l.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(l)},function(e,t,n){"use strict";var r=n(167);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(169)),o=u(n(61)),a=u(n(180)),i=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(31),o=n(23),a=n(27);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(39),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(173)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(43);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(42);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(42),o=n(71),a=n(72);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(86),o=n(196),a=n(28),i=n(90),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t,n){var r,o=n(197),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(200),o=n(42),a=n(71);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(201),o=n(202),a=n(203),i=n(204),u=n(205);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(244);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(69),o=n(103),a=n(104),i=n(246),u=n(247),s=n(250),c=n(251),l=n(252),f=n(253),p=n(94),d=n(254),h=n(46),m=n(255),g=n(256),v=n(261),b=n(23),y=n(62),E=n(263),w=n(28),x=n(265),O=n(40),C="[object Arguments]",_="[object Function]",k="[object Object]",S={};S[C]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[_]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var F,T=1&n,P=2&n,N=4&n;if(j&&(F=A?j(t,D,A,M):j(t)),void 0!==F)return F;if(!w(t))return t;var I=b(t);if(I){if(F=m(t),!T)return c(t,F)}else{var R=h(t),L=R==_||"[object GeneratorFunction]"==R;if(y(t))return s(t,T);if(R==k||R==C||L&&!A){if(F=P||L?{}:v(t),!T)return P?f(t,u(F,t)):l(t,i(F,t))}else{if(!S[R])return A?t:{};F=g(t,R,T)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,F),x(t))return t.forEach(function(r){F.add(e(r,n,j,r,t,M))}),F;if(E(t))return t.forEach(function(r,o){F.set(o,e(r,n,j,o,t,M))}),F;var B=N?P?d:p:P?keysIn:O,V=I?void 0:B(t);return o(V||t,function(r,o){V&&(r=t[o=r]),a(F,o,e(r,n,j,o,t,M))}),F}},function(e,t,n){var r=n(32),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(49),o=n(40);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(49),o=n(106);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(28),o=n(67),a=n(249),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(63)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*c/a)/100,n.hsl.a!==l)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:l,source:"rgb"}}else{var f;if(f=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==f)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*c/a+100)/100,n.hsl.h!==l)return{h:l,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==f)return{h:f,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?c=a:l<0?l=0:l>i&&(l=i);var f=100*c/a,p=-100*l/i+100;return{h:n.hsl.h,s:f,v:p,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=T(e,360),t=T(t,100),n=T(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,f,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=F(s),{ok:h,format:e.format||m,r:c(255,l(u.r,0)),g:c(255,l(u.g,0)),b:c(255,l(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r,o,a=l(e,t,n),i=c(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(p(r));return a}function D(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(p({h:r,s:o,v:a})),a=(a+u)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(L(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*T(this._r,255))+"%",g:s(100*T(this._g,255))+"%",b:s(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%)":"rgba("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:R(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),a=n/100;return p({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,a=p.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},p.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;cs&&(s=r,u=p(t[c]));return p.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var A=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,l(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function L(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var B,V,U,z=(V="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",U="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+V),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+V),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+V),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:l.fields,className:"flexbox-fix"},r.default.createElement("div",{style:l.double},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"hex",value:s.replace("#",""),onChange:f})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.alpha},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:f,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},c={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},l=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},f=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r,a){if(0===e||e){var s,c=a||o,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var f=t||(n||g).dateFormat,p=String(e).trim();if("today"===p)s=new Date,r=!0;else if(/Z$/.test(p)||/GMT$/.test(p))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,f);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function E(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(l=o===s.hourElement?l-i-t(!s.amPM):a,p&&N(void 0,1,s.hourElement)),s.amPM&&f&&(1===u?l+c===23:Math.abs(l-c)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(l)}}(n);var r=s._input.value;_(),ge(),s._input.value!==r&&s._debouncedChange()}}function _(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var c=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,c.getHours()))===c.getHours()&&(o=Math.max(o,c.getMinutes())),o===c.getMinutes()&&(a=Math.max(a,c.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function F(){fe("onChange")}function T(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function R(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===p(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===p(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===p(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&p(e,s.selectedDates[0])>=0&&p(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),fe("onDayCreate",a),a}function L(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var c=o.children[u];if(-1===c.className.indexOf("hidden")&&J(c.dateObj))return c}}function B(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,c=i.children.length,l=u;l>=0&&l0?c:-1);l+=o){var f=i.children[l];if(-1===f.className.indexOf("hidden")&&J(f.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return L(f)}s.changeMonth(o),B(H(o),0)}(r,t):L(r)}function V(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",c=i?"nextMonthDay hidden":"nextMonthDay",l=r+1-n,f=0;l<=r;l++,f++)a.appendChild(R(u,new Date(e,t-1,l),l,f));for(l=1;l<=o;l++,f++)a.appendChild(R("",new Date(e,t,l),l,f));for(var p=o+1;p<=42-n&&(1===s.config.showMonths||f%7!=0);p++,f++)a.appendChild(R(c,new Date(e,t+1,p%o),p,f));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,fe("onYearChange")),U(),fe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),fe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&p(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&p(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),B(H(1),0)):B(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),B(H(1),0)):a||B(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var c=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),l=c.indexOf(e.target);if(-1!==l){var f=c[l+(e.shiftKey?-1:1)];void 0!==f?(e.preventDefault(),f.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],_(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],_(),ge()}fe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,c=0,l=r;lr&&lu)?u=l:l>n&&(!c||l0&&l0&&l>c;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=l||(nt&&l===n&&a.classList.add("endRange"),l>=u&&(0===c||l<=c)&&d(l,n,t)&&a.classList.add("inRange")))))},v=0,b=p.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===C.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},C.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?C.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=l(s),s.parseDate=f({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){fe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),c=window.innerHeight-u.bottom,l="above"===a||"below"!==a&&cn,f=window.pageYOffset+u.top+(l?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!l),v(s.calendarContainer,"arrowBottom",l),!s.config.inline){var p=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=p+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=f+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=p+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==p(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(_(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&fe("onYearChange"),fe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():L(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,c="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||c)&&ie()}F()}}s.parseDate=f({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&fe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),fe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&fe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=T,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void fe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),fe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),T(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);ce(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),T(),k(),ge(t),t&&fe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function ce(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function le(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function fe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&fe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=le(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=le(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):C.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):C.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var c=0;c-1?s.config[p]=r(f[p]).map(g).concat(s.config[p]):void 0===t[p]&&(s.config[p]=f[p])}fe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&ce(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),fe("onChange"),fe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(F,w),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),F()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),fe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o + * @license MIT + */ +function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(e[s=l[c]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&E(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!E(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=g,f.ok=v,f.equal=function(e,t,n){e!=t&&g(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(36))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var c,E="",C=!1,_=["{","}"];return d(n)&&(C=!0,_=["[","]"]),O(n)&&(E=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(E=" "+RegExp.prototype.toString.call(n)),w(n)&&(E=" "+Date.prototype.toUTCString.call(n)),x(n)&&(E=" "+f(n)),0!==i.length||C&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=C?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,_)):_[0]+E+_[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return E(e)&&"[object RegExp]"===C(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===C(e)}function x(e){return E(e)&&("[object Error]"===C(e)||e instanceof Error)}function O(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=E,t.isDate=w,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(299);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[_((e=new Date).getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(300),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(36),n(111))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(111))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(305)),o=u(n(308)),a=u(n(1)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var c=o in t,l=o in u,f=t[o],p=(0,r.isValidElement)(f)&&!f.props.in;!l||c&&!p?l||!c||p?l&&c&&(0,r.isValidElement)(f)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:f.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(f.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return l()({},e,s()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(f.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function d(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function h(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function m(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function g(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function v(e,t){return e.validation[t]||null}function b(e,t){return-1===e.hiddenFields.indexOf(t)}Object(i.registerStore)("carbon-fields/core",{reducer:p,actions:r,selectors:o});var y=n(15),E=n.n(y),w=n(14),x=n(19),O=n(34),C=n(33),_=n(117),k=n(120),S=n(121),j=n(125),D=n(58),A=n(76),M=n(130),F=n(131),T=n(132),P=n(135),N=n(136),I=n(140),R=n(56),L=n(142),H=n(143),B=n(77),V=n(144),U=n(145),z=n(146),W=n(147),Y=n(60);Object(x.addFilter)("carbon-fields.register-field-type","carbon-fields/core",function(e,t,n){return Object(w.compose)(Object(O.a)("carbon-fields.field-edit.".concat(t)),Object(O.a)("carbon-fields.".concat(e,".").concat(t)))(n)}),[["association",_.a],["checkbox",k.a],["color",S.a],["complex",j.a],["date",D.a],["date_time",D.a],["file",A.a],["footer_scripts",Y.a],["gravity_form",B.a],["header_scripts",Y.a],["hidden",M.a],["html",F.a],["image",A.a],["map",T.a],["multiselect",N.a],["media_gallery",P.a],["oembed",I.a],["radio",R.a],["radio_image",L.a],["rich_text",H.a],["select",B.a],["separator",V.a],["set",U.a],["sidebar",z.a],["text",W.a],["textarea",Y.a],["time",D.a]].forEach(function(e){return C.b.apply(void 0,E()(e))});var G=n(51),q=n(116),$=n(52),K=n(17),X=n.n(K),J=function(e,t){return e===t},Z=n(18),Q=n(11),ee=Object(Z.withEffects)(function(e,t){if(t.field.required){var n=e.mount,r=e.unmount,o=e.observe("value"),a=e.observe("visible");return Object(Q.merge)(Object(Q.pipe)(Object(Q.combine)(o,a,n),Object(Q.filter)(function(e){return X()(e,2)[1]}),Object(Q.take)(1),Object(Q.map)(function(e){return{type:"VALIDATE",payload:{value:X()(e,1)[0],transient:!0}}})),Object(Q.pipe)(o,function(e){return function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(o=n,e(0,function(e,t){0===e?(a=t)(1):1===e&&(i=!0,a(2))})),1===t?i?r(1,n):o(1):r(t,n)})}}}}(n),function(e){return void 0===e&&(e=J),function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(a=n),1===t?i&&e(o,n)?a(1):(i=!0,o=n,r(1,n)):r(t,n)})}}}}(),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(Q.map)(function(e){return{type:"VALIDATE",payload:{value:e,transient:!1}}})),Object(Q.pipe)(r,Object(Q.map)(function(){return{type:"RESET"}})))}},{handler:function(e){return function(t){var n=e.id,r=e.field,o=e.markAsInvalid,i=e.markAsValid,u=e.lockSaving,s=e.unlockSaving;switch(t.type){case"VALIDATE":var c=t.payload,l=c.value,p=c.transient,d="carbon-fields.".concat(r.type,".validate"),h=Object(x.hasFilter)(d)?Object(x.applyFilters)(d,r,l):function(e){var t=Object(f.isObject)(e);return t&&!Object(f.isEmpty)(e)||!t&&e?null:Object(a.__)("This field is required. ","carbon-fields-ui")}(l);h?(p||o(n,h),u(n)):(p||i(n),s(n));break;case"RESET":i(n),s(n)}}}}),te=Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{markAsValid:t.markAsValid,markAsInvalid:t.markAsInvalid}}),ne=Object(w.compose)(te,ee);function re(e,t){function n(t,n){if(!Object(f.isEmpty)(n.field.conditional_logic))return e(n,t)}function r(e){return function(n){var r=e.field.conditional_logic,o=r.relation,a=r.rules,i=t(e,n),u=a.reduce(function(e,t){if(!Object(f.has)(i,t.field))return console.error('An unknown field is used in condition - "'.concat(t.field,'".')),e.concat(!1);var n=function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;case">":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(f.some)(n,function(t){return t==e});case"NOT IN":return Object(f.every)(n,function(t){return t!=e});case"INCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(i[t.field],t.compare,t.value);return e.concat(n)},[]),s=!1;switch(o){case"AND":s=Object(f.every)(u);break;case"OR":s=Object(f.some)(u)}s?e.showField(e.id):e.hideField(e.id)}}return Object(w.createHigherOrderComponent)(function(e){return Object(w.compose)(Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(i.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(Z.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var oe=n(149),ae=n.n(oe),ie="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function ue(){return"cf-".concat(ae()(ie,21))}function se(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r (start, sink) => {\n if (start !== 0) return;\n if (typeof prod !== 'function') {\n sink(0, () => {});\n sink(2);\n return;\n }\n let end;\n let unsub;\n const maybeDispose = t => {\n end = end || t === 2;\n if (end && typeof unsub === 'function') unsub();\n };\n sink(0, maybeDispose);\n unsub = prod((t, d) => {\n if (end || t === 0) return;\n sink(t, d);\n maybeDispose(t);\n });\n};\n\nmodule.exports = create;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-create/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-debounce/es/debounce.js": +/*!******************************************************!*\ + !*** ./node_modules/callbag-debounce/es/debounce.js ***! + \******************************************************/ +/*! exports provided: debounce */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"debounce\", function() { return debounce; });\n/**\n * Debounces the given listenable source\n *\n * @param {number} wait - The number of ms to wait before letting a value pass\n * @returns {Function}\n */\nfunction debounce(wait) {\n return function (source) { return function (start, sink) {\n if (start !== 0)\n return;\n var timeout;\n source(0, function (t, d) {\n if (t === 1 || (t === 2 && d === undefined)) {\n // t === 1 means the source is emitting a value\n // t === 2 and d === undefined means the source emits a completion\n if (!timeout && t === 2) {\n return sink(t, d);\n }\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(function () {\n sink(t, d);\n timeout = undefined;\n }, wait);\n }\n else\n sink(t, d);\n });\n }; };\n}\n//# sourceMappingURL=debounce.js.map\n\n//# sourceURL=webpack:///./node_modules/callbag-debounce/es/debounce.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js": +/*!***********************************************************************************************!*\ + !*** ./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js ***! + \***********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nvar is = function is(previous, current) {\n return previous === current;\n};\n\nfunction distinctUntilChanged(compare) {\n if (compare === void 0) {\n compare = is;\n }\n\n return function (source) {\n return function (start, sink) {\n if (start !== 0) return;\n var inited = false;\n var prev;\n var talkback;\n source(0, function (type, data) {\n if (type === 0) {\n talkback = data;\n }\n\n if (type !== 1) {\n sink(type, data);\n return;\n }\n\n if (inited && compare(prev, data)) {\n talkback(1);\n return;\n }\n\n inited = true;\n prev = data;\n sink(1, data);\n });\n };\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (distinctUntilChanged);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-filter/readme.js": +/*!***********************************************!*\ + !*** ./node_modules/callbag-filter/readme.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-filter\n * --------------\n *\n * Callbag operator that conditionally lets data pass through. Works on either\n * pullable or listenable sources.\n *\n * `npm install callbag-filter`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const filter = require('callbag-filter');\n *\n * const source = filter(x => x % 2)(fromIter([1,2,3,4,5]));\n *\n * iterate(x => console.log(x))(source); // 1\n * // 3\n * // 5\n */\n\nconst filter = condition => source => (start, sink) => {\n if (start !== 0) return;\n let talkback;\n source(0, (t, d) => {\n if (t === 0) {\n talkback = d;\n sink(t, d);\n } else if (t === 1) {\n if (condition(d)) sink(t, d);\n else talkback(1);\n }\n else sink(t, d);\n });\n};\n\nmodule.exports = filter;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-filter/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-from-delegated-event/index.js": +/*!************************************************************!*\ + !*** ./node_modules/callbag-from-delegated-event/index.js ***! + \************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_from_event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-from-event */ \"./node_modules/callbag-from-delegated-event/node_modules/callbag-from-event/index.js\");\n/* harmony import */ var callbag_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-filter */ \"./node_modules/callbag-filter/readme.js\");\n/* harmony import */ var callbag_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(callbag_filter__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nconst fromDelegatedEvent = (root, sel, evt) => callbag_filter__WEBPACK_IMPORTED_MODULE_1___default()(e => {\n let at = e.target;\n while(at !== root){\n if (at.matches(sel)) {\n return true;\n }\n at = at.parentElement;\n }\n return false;\n})(Object(callbag_from_event__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(root, evt));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (fromDelegatedEvent);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-delegated-event/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-from-delegated-event/node_modules/callbag-from-event/index.js": +/*!********************************************************************************************!*\ + !*** ./node_modules/callbag-from-delegated-event/node_modules/callbag-from-event/index.js ***! + \********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nconst fromEvent = (node, name, options) => (start, sink) => {\n if (start !== 0) return;\n let disposed = false;\n const handler = ev => {\n sink(1, ev)\n };\n\n sink(0, t => {\n if (t !== 2) {\n return;\n }\n disposed = true;\n node.removeEventListener(name, handler, options);\n });\n\n if (disposed) {\n return;\n }\n\n node.addEventListener(name, handler, options);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (fromEvent);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-delegated-event/node_modules/callbag-from-event/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-of/dist/callbag-of.esm.js": +/*!********************************************************!*\ + !*** ./node_modules/callbag-of/dist/callbag-of.esm.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nfunction of() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return function (start, sink) {\n if (start !== 0) return;\n var disposed = false;\n sink(0, function (type) {\n if (type !== 2) return;\n disposed = true;\n values.length = 0;\n });\n\n while (values.length !== 0) {\n sink(1, values.shift());\n }\n\n if (disposed) return;\n sink(2);\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (of);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-of/dist/callbag-of.esm.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-start-with/index.js": +/*!**************************************************!*\ + !*** ./node_modules/callbag-start-with/index.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n\nconst startWith = (...xs) => inputSource => (start, outputSink) => {\n if (start !== 0) return;\n let disposed = false;\n let inputTalkback;\n let trackPull = false;\n let lastPull;\n\n outputSink(0, (ot, od) => {\n if (trackPull && ot === 1) {\n lastPull = [1, od];\n }\n\n if (ot === 2) {\n disposed = true;\n xs.length = 0;\n }\n\n if (!inputTalkback) return;\n inputTalkback(ot, od);\n });\n\n while (xs.length !== 0) {\n if (xs.length === 1) {\n trackPull = true;\n }\n outputSink(1, xs.shift());\n }\n\n if (disposed) return;\n\n inputSource(0, (it, id) => {\n if (it === 0) {\n inputTalkback = id;\n trackPull = false;\n\n if (lastPull) {\n inputTalkback(...lastPull);\n lastPull = null;\n }\n return;\n }\n outputSink(it, id);\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (startWith);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-start-with/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/components/container/index.js": +/*!**********************************************************!*\ + !*** ./packages/metaboxes/components/container/index.js ***! + \**********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/container/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../field */ \"./packages/metaboxes/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar Container =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(Container, _Component);\n\n function Container() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Container);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Container)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n currentTab: null\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleTabClick\", function (tab) {\n _this.setState({\n currentTab: tab\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Container, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var container = this.props.container;\n\n if (this.isTabbed(container)) {\n this.setState({\n currentTab: Object.keys(container.settings.tabs)[0]\n });\n }\n }\n /**\n * Returns whether the container uses tabs.\n *\n * @param {Object} container\n * @return {boolean}\n */\n\n }, {\n key: \"isTabbed\",\n value: function isTabbed(container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"isPlainObject\"])(container.settings.tabs);\n }\n /**\n * Renders the given field.\n *\n * @param {Object} field\n * @return {Object}\n */\n\n }, {\n key: \"renderField\",\n value: function renderField(field) {\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, 'metabox');\n\n if (!FieldEdit) {\n return null;\n }\n\n return __webpack_provided_wp_dot_element.createElement(_field__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n key: field.id,\n id: field.id\n }, __webpack_provided_wp_dot_element.createElement(FieldEdit, {\n id: field.id\n }));\n }\n /**\n * Handles click on the tabs.\n *\n * @param {string} tab\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var container = this.props.container;\n var hasTabs = this.isTabbed(container);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()(['cf-container', \"cf-container-\".concat(container.id), \"cf-container-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"kebabCase\"])(container.type))].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(container.classes), [{\n 'cf-container--plain': !hasTabs\n }]));\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: classes\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: container.nonce.name,\n value: container.nonce.value\n }), hasTabs && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__tabs\"\n }, __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-container__tabs-list\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n // eslint-disable-next-line no-shadow\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-container__tabs-item', {\n 'cf-container__tabs-item--current': tabName === currentTab\n });\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n key: tabName,\n className: classes,\n onClick: function onClick() {\n return _this2.handleTabClick(tabName);\n }\n }, tabName);\n }))), hasTabs && Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__fields\",\n key: tabName,\n hidden: tabName !== currentTab\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(fieldNames, function (fieldName) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"find\"])(container.fields, ['name', fieldName]);\n return _this2.renderField(field);\n }));\n }), !hasTabs && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__fields\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.fields, this.renderField)));\n }\n }]);\n\n return Container;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Container);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/components/container/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/components/container/style.scss": +/*!************************************************************!*\ + !*** ./packages/metaboxes/components/container/style.scss ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/components/container/style.scss?"); + +/***/ }), + +/***/ "./packages/metaboxes/components/field/index.js": +/*!******************************************************!*\ + !*** ./packages/metaboxes/components/field/index.js ***! + \******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/field/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"withFilters\"])('carbon-fields.field-wrapper.metabox'))(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"Field\"]));\n\n//# sourceURL=webpack:///./packages/metaboxes/components/field/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/components/field/style.scss": +/*!********************************************************!*\ + !*** ./packages/metaboxes/components/field/style.scss ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/components/field/style.scss?"); + +/***/ }), + +/***/ "./packages/metaboxes/containers/hooks.js": +/*!************************************************!*\ + !*** ./packages/metaboxes/containers/hooks.js ***! + \************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hocs/with-container */ \"./packages/metaboxes/hocs/with-container/index.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Extends the containers with necessary hooks.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.register-container-type', 'carbon-fields/metaboxes', function (type, context, component) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_container__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__[\"withFilters\"])(\"carbon-fields.\".concat(type, \".\").concat(context)))(component);\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/hooks.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/containers/index.js": +/*!************************************************!*\ + !*** ./packages/metaboxes/containers/index.js ***! + \************************************************/ +/*! exports provided: renderContainer, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderContainer\", function() { return renderContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeContainers; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks */ \"./packages/metaboxes/containers/hooks.js\");\n/* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./widget */ \"./packages/metaboxes/containers/widget/index.js\");\n/* harmony import */ var _term_meta__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./term-meta */ \"./packages/metaboxes/containers/term-meta/index.js\");\n/* harmony import */ var _theme_options__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-options */ \"./packages/metaboxes/containers/theme-options/index.js\");\n/* harmony import */ var _components_container__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../components/container */ \"./packages/metaboxes/components/container/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./registry */ \"./packages/metaboxes/containers/registry.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Registers the containers.\n */\n\n['post_meta', 'term_meta', 'user_meta', 'comment_meta', 'network', 'theme_options', 'nav_menu_item', 'widget'].forEach(function (type) {\n return Object(_registry__WEBPACK_IMPORTED_MODULE_9__[\"registerContainerType\"])(type, _components_container__WEBPACK_IMPORTED_MODULE_8__[\"default\"]);\n});\n/**\n * Renders the given container.\n *\n * @param {Object} container\n * @param {string} context\n * @return {void}\n */\n\nfunction renderContainer(container, context) {\n var node = document.querySelector(\".container-\".concat(container.id));\n var Component = Object(_registry__WEBPACK_IMPORTED_MODULE_9__[\"getContainerType\"])(container.type, context);\n\n if (node) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(__webpack_provided_wp_dot_element.createElement(Component, {\n id: container.id\n }), node);\n } else {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Could not find DOM element for container \"%1$s\".', 'carbon-fields-ui'), container.id));\n }\n}\n/**\n * Initializes the containers.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeContainers(context) {\n var containers = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getContainers();\n Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"forEach\"])(containers, function (container) {\n renderContainer(container, context);\n });\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/containers/registry.js": +/*!***************************************************!*\ + !*** ./packages/metaboxes/containers/registry.js ***! + \***************************************************/ +/*! exports provided: registerContainerType, getContainerType */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerContainerType\", function() { return registerContainerType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainerType\", function() { return getContainerType; });\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n\nvar _createRegistry = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__[\"createRegistry\"])('container', ['classic', 'gutenberg']),\n registerContainerType = _createRegistry.registerContainerType,\n getContainerType = _createRegistry.getContainerType;\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/registry.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/containers/term-meta/index.js": +/*!**********************************************************!*\ + !*** ./packages/metaboxes/containers/term-meta/index.js ***! + \**********************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_from_ajax_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/from-ajax-event */ \"./packages/metaboxes/utils/from-ajax-event.js\");\n/* harmony import */ var _store_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../store/helpers */ \"./packages/metaboxes/store/helpers.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/term-meta/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_ajax_event__WEBPACK_IMPORTED_MODULE_5__[\"default\"])('ajaxSuccess', 'add-tag'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var settings = _ref.settings,\n data = _ref.data;\n return settings.data.indexOf('carbon_fields_container') > -1 && !data.documentElement.querySelector('wp_error');\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function () {\n // Collects identifiers of current fields so we can remove them later.\n var oldFieldIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(props.container.fields, 'id'); // Get a fresh copy of the container and fields.\n\n\n var _normalizePreloadedSt = Object(_store_helpers__WEBPACK_IMPORTED_MODULE_6__[\"normalizePreloadedState\"])(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\n var container = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(containers, ['id', props.id]);\n\n var containerFields = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(fields, ['container_id', props.id]); // Replace the container and add the new fields.\n\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"dispatch\"])('carbon-fields/metaboxes'),\n updateState = _dispatch.updateState,\n removeFields = _dispatch.removeFields;\n\n updateState(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy([container], 'id'), lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy(containerFields, 'id'));\n removeFields(oldFieldIds);\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.term_meta.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/term-meta/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/containers/term-meta/style.scss": +/*!************************************************************!*\ + !*** ./packages/metaboxes/containers/term-meta/style.scss ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/term-meta/style.scss?"); + +/***/ }), + +/***/ "./packages/metaboxes/containers/theme-options/index.js": +/*!**************************************************************!*\ + !*** ./packages/metaboxes/containers/theme-options/index.js ***! + \**************************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/theme-options/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"fromEvent\"])(window, 'scroll'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(function () {\n return window.jQuery(window).scrollTop();\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (windowTopOffset) {\n var $container = window.jQuery('.carbon-box:first');\n var $panel = window.jQuery('#postbox-container-1');\n var $bar = window.jQuery('#wpadminbar');\n var offset = $bar.height() + 10;\n var threshold = $container.offset().top - offset; // In some situations the threshold is negative number because\n // the container element isn't rendered yet.\n\n if (threshold > 0) {\n $panel.toggleClass('fixed', windowTopOffset >= threshold).css('top', offset);\n }\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.theme_options.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_1__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/theme-options/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/containers/theme-options/style.scss": +/*!****************************************************************!*\ + !*** ./packages/metaboxes/containers/theme-options/style.scss ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/theme-options/style.scss?"); + +/***/ }), + +/***/ "./packages/metaboxes/containers/widget/index.js": +/*!*******************************************************!*\ + !*** ./packages/metaboxes/containers/widget/index.js ***! + \*******************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/widget/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\nfunction aperture(component) {\n var mount$ = component.mount;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"pipe\"])(mount$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(function () {\n return {\n type: 'COMPONENT_MOUNTED'\n };\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n switch (effect.type) {\n case 'COMPONENT_MOUNTED':\n var container = props.container;\n var $carbonContainer = window.jQuery(\".container-\".concat(container.id)); // trigger change immediately after save, since the container is expanded\n\n $carbonContainer.trigger('change'); // trigger change when the expand button is clicked\n\n $carbonContainer.closest('.widget').find('.widget-action').on('click', function () {\n setTimeout(function () {\n $carbonContainer.trigger('change');\n }, 500);\n });\n break;\n }\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.widget.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_1__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/widget/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/containers/widget/style.scss": +/*!*********************************************************!*\ + !*** ./packages/metaboxes/containers/widget/style.scss ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/widget/style.scss?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/complex/index.js": +/*!****************************************************!*\ + !*** ./packages/metaboxes/fields/complex/index.js ***! + \****************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/field */ \"./packages/metaboxes/components/field/index.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n field = _this$props.field,\n value = _this$props.value,\n addFields = _this$props.addFields,\n onChange = _this$props.onChange; // Create a copy of the group to prevent\n // incidentally modifications.\n\n group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group); // Get a flat list of all fields for this group.\n\n var fields = [];\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n group.container_id = field.container_id;\n group.fields = group.fields.map(function (groupField) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(groupField, field.container_id, fields);\n }); // Push the group to the field.\n\n addFields(fields);\n onChange(id, value.concat(group));\n callback(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n cloneFields = _this$props2.cloneFields,\n onChange = _this$props2.onChange;\n var originFieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n var cloneFieldIds = originFieldIds.map(function () {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n });\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group);\n clonedGroup.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n clonedGroup.fields.forEach(function (groupField, index) {\n groupField.id = cloneFieldIds[index];\n });\n cloneFields(originFieldIds, cloneFieldIds);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.splice(value.indexOf(group) + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n removeFields = _this$props3.removeFields,\n onChange = _this$props3.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"without\"])(value, group)); // Delay removal of fields because React will complain\n // about missing objects.\n // TODO: Investigate why this is necessary.\n\n setTimeout(function () {\n var fieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n removeFields(fieldIds);\n }, 1);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleGroup\", function (groupId) {\n var _this$props4 = _this.props,\n field = _this$props4.field,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"find\"])(draft, ['id', groupId]);\n group.collapsed = !group.collapsed;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleAllGroups\", function (collapsed) {\n var _this$props5 = _this.props,\n field = _this$props5.field,\n value = _this$props5.value,\n onChange = _this$props5.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.forEach(function (group) {\n group.collapsed = collapsed;\n });\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupSetup\", function (group, props) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n key: group.id,\n id: group.id,\n name: group.name,\n prefix: \"\".concat(_this.props.name, \"[\").concat(props.index, \"]\"),\n fields: group.fields,\n collapsed: group.collapsed,\n context: 'metabox'\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n return [_components_field__WEBPACK_IMPORTED_MODULE_15__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n key: field.id,\n id: field.id,\n name: \"\".concat(groupProps.prefix, \"[\").concat(field.name, \"]\")\n })];\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ComplexField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props6 = this.props,\n value = _this$props6.value,\n children = _this$props6.children;\n var allGroupsAreCollapsed = value.every(function (_ref) {\n var collapsed = _ref.collapsed;\n return collapsed;\n });\n return children({\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withSelect\"])(function (select, props) {\n var _select = select('carbon-fields/metaboxes'),\n getComplexGroupValues = _select.getComplexGroupValues;\n\n var groupValues = props.value.map(function (group) {\n var fieldIds = group.fields.map(function (field) {\n return field.id;\n });\n return [group.name, getComplexGroupValues(fieldIds)];\n });\n return {\n groupValues: groupValues\n };\n});\nvar applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n addFields = _dispatch.addFields,\n cloneFields = _dispatch.cloneFields,\n removeFields = _dispatch.removeFields;\n\n return {\n addFields: addFields,\n cloneFields: cloneFields,\n removeFields: removeFields\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"addFilter\"])('carbon-fields.complex.metabox', 'carbon-fields/metaboxes', function (OriginalComplexField) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[\"compose\"])(applyWithSelect, applyWithDispatch)(function (props) {\n var id = props.id,\n field = props.field,\n name = props.name,\n value = props.value,\n groupValues = props.groupValues;\n return __webpack_provided_wp_dot_element.createElement(ComplexField, props, function (_ref2) {\n var allGroupsAreCollapsed = _ref2.allGroupsAreCollapsed,\n handleGroupSetup = _ref2.handleGroupSetup,\n handleGroupFieldSetup = _ref2.handleGroupFieldSetup,\n handleAddGroup = _ref2.handleAddGroup,\n handleCloneGroup = _ref2.handleCloneGroup,\n handleRemoveGroup = _ref2.handleRemoveGroup,\n handleToggleGroup = _ref2.handleToggleGroup,\n handleToggleAllGroups = _ref2.handleToggleAllGroups;\n return __webpack_provided_wp_dot_element.createElement(OriginalComplexField, {\n groupIdKey: \"id\",\n groupFilterKey: \"name\",\n id: id,\n field: field,\n name: name,\n value: value,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n });\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/complex/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/complex/style.scss": +/*!******************************************************!*\ + !*** ./packages/metaboxes/fields/complex/style.scss ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/complex/style.scss?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/date/index.js": +/*!*************************************************!*\ + !*** ./packages/metaboxes/fields/date/index.js ***! + \*************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.date-field.metabox', 'carbon-fields/metaboxes', function (OriginalDatetimeField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalDatetimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Date', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/date/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/datetime/index.js": +/*!*****************************************************!*\ + !*** ./packages/metaboxes/fields/datetime/index.js ***! + \*****************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.date_time.metabox', 'carbon-fields/metaboxes', function (OriginalDatetimeField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalDatetimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Date', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/datetime/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/file/index.js": +/*!*************************************************!*\ + !*** ./packages/metaboxes/fields/file/index.js ***! + \*************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.file.metabox', 'carbon-fields/metaboxes', function (OriginalFileField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalFileField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select File', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use File', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select File', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/file/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/image/index.js": +/*!**************************************************!*\ + !*** ./packages/metaboxes/fields/image/index.js ***! + \**************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.image.metabox', 'carbon-fields/metaboxes', function (OriginalImageField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalImageField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Image', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use Image', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Image', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/image/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/index.js": +/*!********************************************!*\ + !*** ./packages/metaboxes/fields/index.js ***! + \********************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./date */ \"./packages/metaboxes/fields/date/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./time */ \"./packages/metaboxes/fields/time/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/media-gallery/index.js": +/*!**********************************************************!*\ + !*** ./packages/metaboxes/fields/media-gallery/index.js ***! + \**********************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/media-gallery/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * The internal dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.media_gallery.metabox', 'carbon-fields/metaboxes', function (OriginalMediaGalleryField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalMediaGalleryField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Attachments', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use Attachments', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Attachments', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/media-gallery/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/media-gallery/style.scss": +/*!************************************************************!*\ + !*** ./packages/metaboxes/fields/media-gallery/style.scss ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/media-gallery/style.scss?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/radio/index.js": +/*!**************************************************!*\ + !*** ./packages/metaboxes/fields/radio/index.js ***! + \**************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/radio/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * The internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/radio/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/radio/style.scss": +/*!****************************************************!*\ + !*** ./packages/metaboxes/fields/radio/style.scss ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/radio/style.scss?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/sidebar/index.js": +/*!****************************************************!*\ + !*** ./packages/metaboxes/fields/sidebar/index.js ***! + \****************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.sidebar.metabox', 'carbon-fields/metaboxes', Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n receiveSidebar = _dispatch.receiveSidebar;\n\n return {\n onAdded: receiveSidebar\n };\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/sidebar/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/time/index.js": +/*!*************************************************!*\ + !*** ./packages/metaboxes/fields/time/index.js ***! + \*************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.time.metabox', 'carbon-fields/metaboxes', function (OriginalDatetimeField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalDatetimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n icon: \"clock\",\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Time', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/time/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/hocs/with-conditional-logic/index.js": +/*!*****************************************************************!*\ + !*** ./packages/metaboxes/hocs/with-conditional-logic/index.js ***! + \*****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_debounce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-debounce */ \"./node_modules/callbag-debounce/es/debounce.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.field.container_id)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(getFieldsByContainerId, props.field.container_id)), Object(callbag_debounce__WEBPACK_IMPORTED_MODULE_3__[\"debounce\"])(250), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_6__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.field.container_id);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"find\"])(fields, function (field) {\n return field.container_id === props.field.container_id && Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-conditional-logic/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/hocs/with-container/index.js": +/*!*********************************************************!*\ + !*** ./packages/metaboxes/hocs/with-container/index.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Creates a high-order component which adds connection\n * to the store.\n *\n * @param {Function} Component\n * @return {Function}\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"createHigherOrderComponent\"])(function (Component) {\n var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select, _ref) {\n var id = _ref.id;\n var container = select('carbon-fields/metaboxes').getContainerById(id);\n return {\n container: container\n };\n });\n return applyWithSelect(Component);\n}, 'withContainer'));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-container/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/hocs/with-field/index.js": +/*!*****************************************************!*\ + !*** ./packages/metaboxes/hocs/with-field/index.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Creates a high-order component which adds connection\n * to the store.\n *\n * @param {Function} Component\n * @return {Function}\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"createHigherOrderComponent\"])(function (Component) {\n var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select, props) {\n var _window$cf$config = window.cf.config,\n compactInput = _window$cf$config.compactInput,\n compactInputKey = _window$cf$config.compactInputKey;\n var field = select('carbon-fields/metaboxes').getFieldById(props.id);\n var value = field.value;\n var name = props.name || field.name;\n /**\n * Wrap top-level field names in compact input key.\n *\n * The fields in widgets don't need this prefix because\n * their input is already compacted by the `widget` namespace.\n */\n\n if (compactInput && !props.name && name.indexOf('widget-carbon_fields') === -1) {\n name = \"\".concat(compactInputKey, \"[\").concat(name, \"]\");\n }\n\n return {\n field: field,\n name: name,\n value: value\n };\n });\n var applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n updateFieldValue = _dispatch.updateFieldValue;\n\n return {\n onChange: updateFieldValue\n };\n });\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"compose\"])(applyWithSelect, applyWithDispatch)(Component);\n}, 'withField'));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-field/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/index.js": +/*!*************************************!*\ + !*** ./packages/metaboxes/index.js ***! + \*************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./store */ \"./packages/metaboxes/store/index.js\");\n/* harmony import */ var _fields__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fields */ \"./packages/metaboxes/fields/index.js\");\n/* harmony import */ var _monitors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./monitors */ \"./packages/metaboxes/monitors/index.js\");\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n/**\n * Sets the locale data for the package type\n */\n\nObject(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"setLocaleData\"])(window.cf.config.locale, 'carbon-fields-ui');\n/**\n * Determines the rendering context.\n *\n * @type {string}\n */\n\nvar context = Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_5__[\"default\"])() ? 'gutenberg' : 'classic';\n/**\n * Abracadabra! Poof! Containers everywhere ...\n */\n\nObject(_containers__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(context);\nObject(_monitors__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(context);\n\n//# sourceURL=webpack:///./packages/metaboxes/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/lib/constants.js": +/*!*********************************************!*\ + !*** ./packages/metaboxes/lib/constants.js ***! + \*********************************************/ +/*! exports provided: PAGE_NOW_WIDGETS, PAGE_NOW_CUSTOMIZE, CARBON_FIELDS_CONTAINER_ID_PREFIX, CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PAGE_NOW_WIDGETS\", function() { return PAGE_NOW_WIDGETS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PAGE_NOW_CUSTOMIZE\", function() { return PAGE_NOW_CUSTOMIZE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CARBON_FIELDS_CONTAINER_ID_PREFIX\", function() { return CARBON_FIELDS_CONTAINER_ID_PREFIX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX\", function() { return CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX; });\nvar PAGE_NOW_WIDGETS = 'widgets.php';\nvar PAGE_NOW_CUSTOMIZE = 'customize.php';\nvar CARBON_FIELDS_CONTAINER_ID_PREFIX = 'carbon_fields_container_';\nvar CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX = 'carbon_fields_';\n\n//# sourceURL=webpack:///./packages/metaboxes/lib/constants.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/aperture/index.js": +/*!***************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/aperture/index.js ***! + \***************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return aperture; });\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _post_parent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./post-parent */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-parent.js\");\n/* harmony import */ var _post_format__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./post-format */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-format.js\");\n/* harmony import */ var _post_template__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./post-template */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-template.js\");\n/* harmony import */ var _post_term__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./post-term */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-term.js\");\n/* harmony import */ var _term_parent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./term-parent */ \"./packages/metaboxes/monitors/conditional-display/aperture/term-parent.js\");\n/* harmony import */ var _user_role__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./user-role */ \"./packages/metaboxes/monitors/conditional-display/aperture/user-role.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @param {Object} props\n * @param {string} props.context\n * @return {Object}\n */\n// eslint-disable-next-line no-unused-vars\n\nfunction aperture(component, _ref) {\n var context = _ref.context;\n var postParent$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-parent.\".concat(context));\n var postFormat$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-format.\".concat(context));\n var postTemplate$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-template.\".concat(context));\n var postTerm$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-term.\".concat(context));\n var termParent$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-term-parent.\".concat(context));\n var userRole$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-user-role.\".concat(context));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(postParent$, postFormat$, postTemplate$, postTerm$, termParent$, userRole$), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"scan\"])(function (previous, current) {\n return immer__WEBPACK_IMPORTED_MODULE_0___default()(previous, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"assign\"])(draft, current);\n });\n }));\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/aperture/post-format.js": +/*!*********************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/aperture/post-format.js ***! + \*********************************************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-from-delegated-event */ \"./node_modules/callbag-from-delegated-event/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_format: 'standard'\n};\n/**\n * Extracts `post_format` from the input.\n *\n * @param {Object} input\n * @return {Object}\n */\n\nfunction getPostFormatFromRadioInput(input) {\n var value = input.value; // Normalize the value of \"Standard\" input.\n\n if (value === '0') {\n value = 'standard';\n }\n\n return {\n post_format: value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-format.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('div#post-formats-select');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(node, 'input.post-format', 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getPostFormatFromRadioInput(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getPostFormatFromRadioInput(node.querySelector('input.post-format:checked'))));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-format.gutenberg', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'format'), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(Boolean), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (postFormat) {\n return {\n post_format: postFormat\n };\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/post-format.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/aperture/post-parent.js": +/*!*********************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/aperture/post-parent.js ***! + \*********************************************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/get-parent-id-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js\");\n/* harmony import */ var _utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/* harmony import */ var _utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/get-ancestors-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_ancestors: [],\n post_parent_id: 0,\n post_level: 1\n};\n/**\n * Extracts the `post_ancestors`, `post_parent_id` & `post_level` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getParentIdAncestorsAndLevelFromSelect(node) {\n var option = node.options[node.selectedIndex];\n var ancestors = Object(_utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(option);\n var parentId = Object(_utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(option);\n var level = Object(_utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(option) + 1;\n return {\n post_ancestors: ancestors,\n post_parent_id: parentId,\n post_level: level\n };\n}\n/**\n * Extracts `post_ancestors` from the list.\n *\n * @param {number} parentId\n * @param {Object[]} posts\n * @param {Array} ancestors\n * @return {number[]}\n */\n\n\nfunction getAncestorsFromPostsList(parentId, posts) {\n var ancestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var parent = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"find\"])(posts, ['id', parentId]);\n\n if (!parent) {\n return ancestors;\n }\n\n ancestors.unshift(parent.id);\n\n if (parent.parent) {\n return getAncestorsFromPostsList(parent.parent, posts, ancestors);\n }\n\n return ancestors;\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-parent.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#parent_id');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getParentIdAncestorsAndLevelFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(getParentIdAncestorsAndLevelFromSelect(node)));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-parent.gutenberg', 'carbon-fields/metaboxes', function () {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core'),\n getPostType = _select.getPostType,\n getEntityRecords = _select.getEntityRecords;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"combine\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getCurrentPostId), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'type'), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'parent')), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_6__[\"isEqual\"]), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"map\"])(function (_ref2) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref2, 3),\n postId = _ref3[0],\n postTypeSlug = _ref3[1],\n parentId = _ref3[2];\n\n parentId = parseInt(parentId, 10);\n\n if (isNaN(parentId)) {\n return INITIAL_STATE;\n }\n\n var postType = getPostType(postTypeSlug);\n var isHierarchical = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(postType, ['hierarchical'], false);\n\n if (!isHierarchical) {\n return INITIAL_STATE;\n } // Borrowed from https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/page-attributes/parent.js\n\n\n var items = getEntityRecords('postType', postTypeSlug, {\n per_page: -1,\n exclude: postId,\n parent_exclude: postId,\n orderby: 'menu_order',\n order: 'asc'\n }) || [];\n var ancestors = getAncestorsFromPostsList(parentId, items);\n var level = ancestors.length + 1;\n return {\n post_ancestors: ancestors,\n post_parent_id: parentId,\n post_level: level\n };\n }));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/post-parent.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/aperture/post-template.js": +/*!***********************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/aperture/post-template.js ***! + \***********************************************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_template: ''\n};\n/**\n * Extracts `post_template` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getPostTemplateFromSelect(node) {\n return {\n post_template: node.value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__[\"addFilter\"])('carbon-fields.conditional-display-post-template.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#page_template');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getPostTemplateFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getPostTemplateFromSelect(node)));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__[\"addFilter\"])('carbon-fields.conditional-display-post-template.gutenberg', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('core/editor').getEditedPostAttribute, 'template'), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isString\"]), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (postTemplate) {\n return {\n post_template: postTemplate\n };\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/post-template.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/aperture/post-term.js": +/*!*******************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/aperture/post-term.js ***! + \*******************************************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! callbag-from-delegated-event */ \"./node_modules/callbag-from-delegated-event/index.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Applies a monkey patch to the specified method of `window.tagBox` API\n * so we can detect changes of the non-hierarchical taxonomies.\n *\n * @param {Object} tagBox\n * @param {string} method\n * @return {void}\n */\n\nfunction patchWordPressTagBoxAPI(tagBox, method) {\n tagBox[\"original_\".concat(method)] = tagBox[method];\n\n tagBox[method] = function () {\n var event = new Event('change');\n var textarea = window.jQuery(arguments.length <= 0 ? undefined : arguments[0]).closest('.postbox').find('textarea.the-tags').get(0);\n var result = tagBox[\"original_\".concat(method)].apply(tagBox, arguments);\n textarea.dispatchEvent(event);\n return result;\n };\n}\n\nif (window.tagBox) {\n patchWordPressTagBoxAPI(window.tagBox, 'parseTags');\n patchWordPressTagBoxAPI(window.tagBox, 'flushTags');\n}\n/**\n * Extracts the terms of a hierarchical taxonomy.\n *\n * @param {string} taxonomy\n * @return {Object}\n */\n\n\nfunction getTermsFromChecklist(taxonomy) {\n var inputs = document.querySelectorAll(\"#\".concat(taxonomy, \"checklist input[type=\\\"checkbox\\\"]:checked\"));\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(inputs).reduce(function (memo, input) {\n var value = parseInt(input.value, 10);\n memo[taxonomy].push(value);\n return memo;\n }, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, []));\n}\n/**\n * Extracts the terms of a non-hierarchical taxonomy.\n *\n * @param {string} taxonomy\n * @return {Object}\n */\n\n\nfunction getTermsFromText(taxonomy) {\n var node = document.querySelector(\"#tagsdiv-\".concat(taxonomy, \" textarea.the-tags\"));\n var terms = node.value ? node.value.split(window.tagsSuggestL10n.tagDelimiter) : [];\n return _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, terms);\n}\n/**\n * Keeps track of the hierarchical taxonomies like `categories`.\n *\n * @return {Function}\n */\n\n\nfunction trackHierarchicalTaxonomies() {\n var nodes = document.querySelectorAll('div[id^=\"taxonomy-\"]');\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(nodes).map(function (node) {\n var taxonomy = node.id.replace('taxonomy-', '');\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(node.querySelector(\"#\".concat(taxonomy, \"checklist\")), 'input[type=\"checkbox\"]', 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"scan\"])(function (stack, _ref2) {\n var target = _ref2.target;\n return immer__WEBPACK_IMPORTED_MODULE_3___default()(stack, function (draft) {\n var value = parseInt(target.value, 10);\n\n if (target.checked) {\n draft[taxonomy].push(value);\n } else {\n Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"pull\"])(draft[taxonomy], value);\n }\n });\n }, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, [])), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(getTermsFromChecklist(taxonomy)));\n });\n}\n/**\n * Keeps track of the non-hierarchical taxonomies like `tags`.\n *\n * @return {Function}\n */\n\n\nfunction trackNonHierarchicalTaxonomies() {\n var nodes = document.querySelectorAll('div[id^=\"tagsdiv-\"]');\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(nodes).map(function (node) {\n var taxonomy = node.id.replace('tagsdiv-', '');\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"fromEvent\"])(node.querySelector('textarea.the-tags'), 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref3) {\n var target = _ref3.target;\n return _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, target.value ? target.value.split(window.tagsSuggestL10n.tagDelimiter) : []);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(getTermsFromText(taxonomy)));\n });\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__[\"addFilter\"])('carbon-fields.conditional-display-post-term.classic', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"merge\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(trackHierarchicalTaxonomies()).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(trackNonHierarchicalTaxonomies()))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"scan\"])(function (previous, current) {\n return {\n post_term: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, previous.post_term, current)\n };\n }, {\n post_term: {}\n }));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__[\"addFilter\"])('carbon-fields.conditional-display-post-term.gutenberg', 'carbon-fields/metaboxes', function () {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__[\"select\"])('core'),\n getTaxonomies = _select.getTaxonomies;\n\n var _select2 = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__[\"select\"])('core/editor'),\n getEditedPostAttribute = _select2.getEditedPostAttribute; // Borrowed from https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/post-taxonomies/index.js\n\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__[\"fromSelector\"])(getTaxonomies, {\n per_page: -1\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(Boolean), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (taxonomies) {\n var pairs = taxonomies.map(function (taxonomy) {\n return [taxonomy.slug, getEditedPostAttribute(taxonomy.rest_base) || []];\n });\n return {\n post_term: Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"fromPairs\"])(pairs)\n };\n }));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/post-term.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/aperture/term-parent.js": +/*!*********************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/aperture/term-parent.js ***! + \*********************************************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/get-parent-id-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js\");\n/* harmony import */ var _utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/* harmony import */ var _utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/get-ancestors-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n term_ancestors: [],\n term_parent: 0,\n term_level: 1\n};\n/**\n * Extracts the `term_ancestors`, `term_parent` & `term_level` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getParentIdAncestorsAndLevelFromSelect(node) {\n var option = node.options[node.selectedIndex];\n var ancestors = Object(_utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(option);\n var parentId = Object(_utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(option);\n var level = Object(_utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(option) + 1;\n return {\n term_ancestors: ancestors,\n term_parent: parentId,\n term_level: level\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.conditional-display-term-parent.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#parent');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getParentIdAncestorsAndLevelFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getParentIdAncestorsAndLevelFromSelect(node)));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/term-parent.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/aperture/user-role.js": +/*!*******************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/aperture/user-role.js ***! + \*******************************************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n user_role: ''\n};\n/**\n * Extracts `user_role` from a select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getRoleFromSelect(node) {\n return {\n user_role: node.value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.conditional-display-user-role.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#role');\n\n if (!node) {\n var fieldset = document.querySelector('fieldset[data-profile-role]'); // The selectbox doesn't exist on the \"Profile\" page.\n // So we need to read the role from the container in DOM.\n\n if (fieldset) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n user_role: fieldset.dataset.profileRole\n });\n }\n\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getRoleFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getRoleFromSelect(node)));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/user-role.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js": +/*!**********************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js ***! + \**********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['IN', 'NOT IN'],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case 'IN':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"intersection\"])(a, b).length > 0;\n\n case 'NOT IN':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"intersection\"])(a, b).length === 0;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js": +/*!***********************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js ***! + \***********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['=', '!='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '=':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"includes\"])(a, b);\n\n case '!=':\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"includes\"])(a, b);\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/comparers/base.js": +/*!***************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/comparers/base.js ***! + \***************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n /**\n * The supported operators.\n *\n * @type {string[]}\n */\n operators: [],\n\n /**\n * Checks if the operator is supported.\n *\n * @param {string} operator\n * @return {boolean}\n */\n isOperatorSupported: function isOperatorSupported(operator) {\n return this.operators.indexOf(operator) > -1;\n },\n\n /**\n * Performs the comparison.\n *\n * @param {mixed} a\n * @param {string} operator\n * @param {mixed} b\n * @return {boolean}\n */\n evaluate: function evaluate() {\n return false;\n }\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/base.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/comparers/contain.js": +/*!******************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/comparers/contain.js ***! + \******************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['IN', 'NOT IN'],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case 'IN':\n return b.indexOf(a) > -1;\n\n case 'NOT IN':\n return b.indexOf(a) === -1;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/contain.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/comparers/equality.js": +/*!*******************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/comparers/equality.js ***! + \*******************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/* eslint eqeqeq: \"off\" */\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['=', '!='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '=':\n return a == b;\n\n case '!=':\n return a != b;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/equality.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/comparers/scalar.js": +/*!*****************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/comparers/scalar.js ***! + \*****************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['>', '>=', '<', '<='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '>':\n return a > b;\n\n case '>=':\n return a >= b;\n\n case '<':\n return a < b;\n\n case '<=':\n return a <= b;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/scalar.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/conditions/base.js": +/*!****************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/conditions/base.js ***! + \****************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/equality.js\");\n/* harmony import */ var _comparers_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/contain.js\");\n/* harmony import */ var _comparers_scalar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../comparers/scalar */ \"./packages/metaboxes/monitors/conditional-display/comparers/scalar.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n /**\n * The supported comparers.\n *\n * @type {Function[]}\n */\n comparers: [_comparers_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _comparers_scalar__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n\n /**\n * Checks if the condition is fulfiled.\n *\n * @param {Object} definition\n * @param {Object} values\n * @return {boolean}\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare,\n value = definition.value;\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * Checks if any comparer is correct for `a` and `b`.\n *\n * @param {mixed} a\n * @param {string} operator\n * @param {mixed} b\n * @return {boolean}\n */\n firstComparerIsCorrect: function firstComparerIsCorrect(a, operator, b) {\n var comparer = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"find\"])(this.comparers, function (item) {\n return item.isOperatorSupported(operator);\n });\n\n if (!comparer) {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('Unsupported container condition comparison operator used - \"%1$s\".', 'carbon-fields-ui'), operator));\n return false;\n }\n\n return comparer.evaluate(a, operator, b);\n },\n\n /**\n * Returns the value from the environment.\n *\n * @param {Object} definition\n * @param {Object} values\n * @return {Object}\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return values[definition.type];\n }\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/base.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/conditions/boolean.js": +/*!*******************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/conditions/boolean.js ***! + \*******************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue() {\n return true;\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/boolean.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/conditions/post-ancestor-id.js": +/*!****************************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/conditions/post-ancestor-id.js ***! + \****************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/any-contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, 'post_ancestors', []);\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/post-ancestor-id.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/conditions/post-term.js": +/*!*********************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/conditions/post-term.js ***! + \*********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var _this = this;\n\n var compare = definition.compare,\n value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n var method;\n\n switch (compare) {\n case 'IN':\n compare = '=';\n method = 'some';\n break;\n\n case 'NOT IN':\n compare = '!=';\n method = 'every';\n break;\n\n default:\n return false;\n }\n\n var results = value.map(function (descriptor) {\n return _this.isFulfiled(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, definition, {\n compare: compare,\n value: descriptor\n }), values);\n });\n return results[method](Boolean);\n } // TODO: Improve value resolution in context of Gutenberg\n\n\n value = value.taxonomy_object.hierarchical ? value.term_object.term_id : value.term_object.name;\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, \"post_term.\".concat(definition.value.taxonomy), []);\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/post-term.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/conditions/term-ancestor-id.js": +/*!****************************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/conditions/term-ancestor-id.js ***! + \****************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/any-contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare;\n var value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n value = value.map(function (item) {\n return item.term_object.term_id;\n });\n } else if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isPlainObject\"])(value)) {\n value = value.term_object.term_id;\n }\n\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, 'term_ancestors', []);\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/term-ancestor-id.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/conditions/term-parent-id.js": +/*!**************************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/conditions/term-parent-id.js ***! + \**************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare;\n var value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n value = value.map(function (item) {\n return item.term_object.term_id;\n });\n } else if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isPlainObject\"])(value)) {\n value = value.term_object.term_id;\n }\n\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/term-parent-id.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/handler/index.js": +/*!**************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/handler/index.js ***! + \**************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return handler; });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _conditions_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../conditions/base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n/* harmony import */ var _conditions_boolean__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../conditions/boolean */ \"./packages/metaboxes/monitors/conditional-display/conditions/boolean.js\");\n/* harmony import */ var _conditions_post_term__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../conditions/post-term */ \"./packages/metaboxes/monitors/conditional-display/conditions/post-term.js\");\n/* harmony import */ var _conditions_post_ancestor_id__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../conditions/post-ancestor-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/post-ancestor-id.js\");\n/* harmony import */ var _conditions_term_parent_id__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../conditions/term-parent-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/term-parent-id.js\");\n/* harmony import */ var _conditions_term_ancestor_id__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../conditions/term-ancestor-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/term-ancestor-id.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n/**\n * Keeps track of supported conditions.\n *\n * @type {Object}\n */\n\nvar conditions = {\n boolean: _conditions_boolean__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n post_term: _conditions_post_term__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n post_ancestor_id: _conditions_post_ancestor_id__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n post_parent_id: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n post_level: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n post_format: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n post_template: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n term_level: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n term_parent: _conditions_term_parent_id__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n term_ancestor: _conditions_term_ancestor_id__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n user_role: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n};\n/**\n * Walks through the definitions and evaluates the conditions.\n *\n * @param {Object[]} definitions\n * @param {Object} values\n * @param {string} relation\n * @return {boolean}\n */\n\nfunction evaluate(definitions, values, relation) {\n var results = definitions.map(function (definition) {\n if (!definition.relation) {\n var condition = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"get\"])(conditions, definition.type);\n\n if (condition) {\n return condition.isFulfiled(definition, values);\n } else {\n // eslint-disable-line no-else-return\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Unsupported container condition - \"%1$s\".', 'carbon-fields-ui'), definition.type));\n return false;\n }\n } else {\n // eslint-disable-line no-else-return\n return evaluate(definition.conditions, values, definition.relation);\n }\n });\n\n switch (relation) {\n case 'AND':\n return results.every(Boolean);\n\n case 'OR':\n return results.some(Boolean);\n\n default:\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Unsupported container condition relation used - \"%1$s\".', 'carbon-fields-ui'), relation));\n return false;\n }\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @param {Object} props.containers\n * @param {string} props.context\n * @return {Function}\n */\n\n\nfunction handler(_ref) {\n var containers = _ref.containers,\n context = _ref.context;\n return function (effect) {\n var results = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(containers, function (container, id) {\n return [id, evaluate(container.conditions.conditions, effect, container.conditions.relation)];\n });\n results.forEach(function (_ref2) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref2, 2),\n id = _ref3[0],\n result = _ref3[1];\n\n var postboxNode = document.getElementById(id);\n var containerNode = document.querySelector(\".container-\".concat(id));\n\n if (postboxNode) {\n postboxNode.hidden = !result;\n }\n\n if (containerNode) {\n if (result && !containerNode.dataset.mounted) {\n containerNode.dataset.mounted = true;\n Object(_containers__WEBPACK_IMPORTED_MODULE_4__[\"renderContainer\"])(containers[id], context);\n }\n\n if (!result && containerNode.dataset.mounted) {\n delete containerNode.dataset.mounted;\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"])(containerNode);\n }\n }\n });\n };\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/handler/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/index.js": +/*!******************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/index.js ***! + \******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _aperture__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./aperture */ \"./packages/metaboxes/monitors/conditional-display/aperture/index.js\");\n/* harmony import */ var _handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./handler */ \"./packages/metaboxes/monitors/conditional-display/handler/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * Performs the evaluation of conditions.\n *\n * @return {null}\n */\n\nfunction ConditionalDisplay() {\n return null;\n}\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withSelect\"])(function (select) {\n var containers = select('carbon-fields/metaboxes').getContainers();\n return {\n containers: containers\n };\n});\nvar applyWitEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"withEffects\"])(_aperture__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n handler: _handler__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(applyWithSelect, applyWitEffects)(ConditionalDisplay));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js": +/*!********************************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js ***! + \********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getAncestorsFromOption; });\n/* harmony import */ var _get_level_from_option__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/**\n * Internal dependencies.\n */\n\n/**\n * Extracts the ancestors of the post/term from an option.\n *\n * @param {Object} option\n * @return {number[]}\n */\n\nfunction getAncestorsFromOption(option) {\n var ancestors = [];\n var previousOption = option;\n var level = Object(_get_level_from_option__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(option);\n\n while (level > 0 && previousOption) {\n if (Object(_get_level_from_option__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(previousOption) !== level) {\n previousOption = previousOption.previousSibling; // Skip this iteration because the option isn't an ancestor.\n\n continue;\n }\n\n var id = parseInt(previousOption.value, 10);\n\n if (id > 0) {\n ancestors.unshift(id);\n }\n\n previousOption = previousOption.previousSibling;\n level--;\n }\n\n return ancestors;\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js": +/*!****************************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js ***! + \****************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getLevelFromOption; });\n/**\n * Extracts the level from an option.\n *\n * @param {Object} option\n * @return {number}\n */\nfunction getLevelFromOption(option) {\n var level = 0;\n\n if (option.className) {\n var matches = option.className.match(/^level-(\\d+)/);\n\n if (matches) {\n level = parseInt(matches[1], 10) + 1;\n }\n }\n\n return level;\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js": +/*!********************************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js ***! + \********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getParentIdFromOption; });\n/**\n * Extracts the id of the post/term parent from an option.\n *\n * @param {Object} option\n * @return {number}\n */\nfunction getParentIdFromOption(option) {\n var value = parseInt(option.value, 10);\n return !isNaN(value) && value >= 0 ? value : 0;\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/index.js": +/*!**********************************************!*\ + !*** ./packages/metaboxes/monitors/index.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeMonitors; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _save_lock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./save-lock */ \"./packages/metaboxes/monitors/save-lock/index.js\");\n/* harmony import */ var _conditional_display__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conditional-display */ \"./packages/metaboxes/monitors/conditional-display/index.js\");\n/* harmony import */ var _widget_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./widget-handler */ \"./packages/metaboxes/monitors/widget-handler/index.js\");\n/* harmony import */ var _revisions_flag__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./revisions-flag */ \"./packages/metaboxes/monitors/revisions-flag/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _lib_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../lib/constants */ \"./packages/metaboxes/lib/constants.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Initializes the monitors.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeMonitors(context) {\n var pagenow = window.cf.config.pagenow;\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(__webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, !Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_5__[\"default\"])() && __webpack_provided_wp_dot_element.createElement(_save_lock__WEBPACK_IMPORTED_MODULE_1__[\"default\"], null), (pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_6__[\"PAGE_NOW_WIDGETS\"] || pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_6__[\"PAGE_NOW_CUSTOMIZE\"]) && __webpack_provided_wp_dot_element.createElement(_widget_handler__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null), __webpack_provided_wp_dot_element.createElement(_conditional_display__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n context: context\n })), document.createElement('div'));\n var postStuffNode = document.querySelector('#poststuff');\n\n if (postStuffNode) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(__webpack_provided_wp_dot_element.createElement(_revisions_flag__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null), postStuffNode.appendChild(document.createElement('div')));\n }\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/revisions-flag/index.js": +/*!*************************************************************!*\ + !*** ./packages/metaboxes/monitors/revisions-flag/index.js ***! + \*************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Renders the input used to notify the backend about the changes.\n *\n * @param {Object} props\n * @param {boolean} props.isDirty\n * @return {mixed}\n */\n\nfunction RevisionsFlag(props) {\n return __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: window.cf.config.revisionsInputKey,\n disabled: !props.isDirty,\n value: \"1\"\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select) {\n return {\n isDirty: select('carbon-fields/metaboxes').isDirty()\n };\n})(RevisionsFlag));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/revisions-flag/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/save-lock/index.js": +/*!********************************************************!*\ + !*** ./packages/metaboxes/monitors/save-lock/index.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Toggles the ability to save the page.\n *\n * @return {null}\n */\n\nfunction SaveLock() {\n return null;\n}\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\n\nfunction aperture() {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').isSavingLocked);\n}\n/**\n * The function that causes the side effects.\n *\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (isLocked) {\n var nodes = document.querySelectorAll(\"\\n\\t\\t\\t#publishing-action input#publish,\\n\\t\\t\\t#publishing-action input#save,\\n\\t\\t\\t#addtag input#submit,\\n\\t\\t\\t#edittag input[type=\\\"submit\\\"],\\n\\t\\t\\t#your-profile input#submit\\n\\t\\t\");\n nodes.forEach(function (node) {\n node.disabled = isLocked;\n });\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_0__[\"withEffects\"])(aperture, {\n handler: handler\n})(SaveLock));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/save-lock/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/widget-handler/index.js": +/*!*************************************************************!*\ + !*** ./packages/metaboxes/monitors/widget-handler/index.js ***! + \*************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_urldecode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/urldecode */ \"./packages/metaboxes/utils/urldecode.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n/* harmony import */ var _utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/from-event-pattern */ \"./packages/metaboxes/utils/from-event-pattern.js\");\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _lib_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../lib/constants */ \"./packages/metaboxes/lib/constants.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n/**\n * Performs the re-initialization of widgets.\n *\n * @return {null}\n */\n\nfunction WidgetHandler() {\n return null;\n}\n/**\n * Returns whether the widget is created by Carbon Fields.\n *\n * @param {string} identifier\n * @return {boolean}\n */\n\n\nfunction isCarbonFieldsWidget(identifier) {\n return identifier.indexOf(_lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX\"]) > -1;\n}\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function (handler) {\n return window.jQuery(document).on('widget-added widget-updated', handler);\n }, function (handler) {\n return window.jQuery(document).off('widget-added widget-updated', handler);\n }, function (event, $widget) {\n return {\n event: event,\n $widget: $widget\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var $widget = _ref.$widget;\n return isCarbonFieldsWidget($widget[0].id);\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"map\"])(function (payload) {\n return {\n type: 'WIDGET_CREATED_OR_UPDATED',\n payload: payload\n };\n })), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function (handler) {\n return window.jQuery(document).on('ajaxSuccess', handler);\n }, function (handler) {\n return window.jQuery(document).off('ajaxSuccess', handler);\n }, function (event, xhr, options, data) {\n return {\n event: event,\n xhr: xhr,\n options: options,\n data: data\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref2) {\n var data = _ref2.data;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"startsWith\"])(data, 'deleted:') && isCarbonFieldsWidget(data);\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"map\"])(function (payload) {\n return {\n type: 'WIDGET_DELETED',\n payload: payload\n };\n })));\n}\n/**\n * The function that causes the side effects.\n *\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (effect) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('carbon-fields/metaboxes'),\n getContainerById = _select.getContainerById;\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])('carbon-fields/metaboxes'),\n addContainer = _dispatch.addContainer,\n removeContainer = _dispatch.removeContainer,\n addFields = _dispatch.addFields,\n removeFields = _dispatch.removeFields;\n\n switch (effect.type) {\n case 'WIDGET_CREATED_OR_UPDATED':\n {\n var _effect$payload = effect.payload,\n event = _effect$payload.event,\n $widget = _effect$payload.$widget;\n var container = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"flow\"])(_utils_urldecode__WEBPACK_IMPORTED_MODULE_5__[\"default\"], JSON.parse)($widget.find('[data-json]').data('json'));\n var fields = [];\n var oldFieldIds;\n\n if (event.type === 'widget-updated') {\n oldFieldIds = getContainerById(container.id).fields.map(function (_ref3) {\n var id = _ref3.id;\n return id;\n });\n }\n\n container.fields = container.fields.map(function (field) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(field, container, fields);\n });\n addFields(fields);\n addContainer(container);\n\n if (event.type === 'widget-updated') {\n removeFields(oldFieldIds);\n }\n\n Object(_containers__WEBPACK_IMPORTED_MODULE_8__[\"renderContainer\"])(container, 'classic'); // WARNING: This piece of code manipulates the core behavior of WordPress Widgets.\n // Some day this code will stop to work and we'll need to find another workaround.\n //\n // * Disable the submit { handler } since it breaks our validation logic.\n // * Disable live preview mode because we can't detect when the widget is updated/synced.\n // * Show the \"Apply\" button because it's hidden by the live mode.\n\n if (window.cf.config.pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"PAGE_NOW_CUSTOMIZE\"] && event.type === 'widget-added') {\n var widgetId = $widget.find('[name=\"widget-id\"]').val();\n $widget.find('[name=\"savewidget\"]').show().end().find('.widget-content:first').off('keydown', 'input').off('change input propertychange', ':input');\n var instance = wp.customize.Widgets.getWidgetFormControlForWidget(widgetId); // Change the flag for 'live mode' so we can receive proper `widget-updated` events.\n\n instance.liveUpdateMode = false;\n }\n\n break;\n }\n\n case 'WIDGET_DELETED':\n {\n var _widgetId = effect.payload.data.replace('deleted:', '');\n\n var containerId = \"\".concat(_lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"CARBON_FIELDS_CONTAINER_ID_PREFIX\"]).concat(_widgetId); // Get the container from the store.\n\n var _container = getContainerById(containerId); // Remove the current instance from DOM.\n\n\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"])(document.querySelector(\".container-\".concat(containerId))); // Get the fields that belongs to the container.\n\n var fieldsIds = _.map(_container.fields, 'id'); // Remove everything from the store.\n\n\n removeContainer(containerId);\n removeFields(fieldsIds);\n break;\n }\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n})(WidgetHandler));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/widget-handler/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/store/actions.js": +/*!*********************************************!*\ + !*** ./packages/metaboxes/store/actions.js ***! + \*********************************************/ +/*! exports provided: setupState, updateState, updateFieldValue, addFields, cloneFields, removeFields, addContainer, removeContainer, receiveSidebar, lockSaving, unlockSaving */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setupState\", function() { return setupState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateState\", function() { return updateState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateFieldValue\", function() { return updateFieldValue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addFields\", function() { return addFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cloneFields\", function() { return cloneFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeFields\", function() { return removeFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addContainer\", function() { return addContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeContainer\", function() { return removeContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"receiveSidebar\", function() { return receiveSidebar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lockSaving\", function() { return lockSaving; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unlockSaving\", function() { return unlockSaving; });\n/**\n * Returns an action object used to setup the state when first opening an editor.\n *\n * @param {Object[]} containers\n * @param {Object} fields\n * @return {Object}\n */\nfunction setupState(containers, fields) {\n return {\n type: 'SETUP_STATE',\n payload: {\n containers: containers,\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to update the state.\n *\n * @param {Object[]} containers\n * @param {Object} fields\n * @return {Object}\n */\n\nfunction updateState(containers, fields) {\n return {\n type: 'UPDATE_STATE',\n payload: {\n containers: containers,\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to update the field's value.\n *\n * @param {string} fieldId\n * @param {mixed} value\n * @return {Object}\n */\n\nfunction updateFieldValue(fieldId, value) {\n return {\n type: 'UPDATE_FIELD_VALUE',\n payload: {\n fieldId: fieldId,\n value: value\n }\n };\n}\n/**\n * Returns an action object used to add the fields.\n *\n * @param {Object[]} fields\n * @return {Object}\n */\n\nfunction addFields(fields) {\n return {\n type: 'ADD_FIELDS',\n payload: {\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to clone the fields.\n *\n * @param {string[]} originFieldIds\n * @param {string[]} cloneFieldIds\n * @return {Object}\n */\n\nfunction cloneFields(originFieldIds, cloneFieldIds) {\n return {\n type: 'CLONE_FIELDS',\n payload: {\n originFieldIds: originFieldIds,\n cloneFieldIds: cloneFieldIds\n }\n };\n}\n/**\n * Returns an action object used to remove the fields.\n *\n * @param {string[]} fieldIds\n * @return {Object}\n */\n\nfunction removeFields(fieldIds) {\n return {\n type: 'REMOVE_FIELDS',\n payload: {\n fieldIds: fieldIds\n }\n };\n}\n/**\n * Returns an action object used to add a container to all containers.\n *\n * @param {Object} container\n * @return {Object}\n */\n\nfunction addContainer(container) {\n return {\n type: 'ADD_CONTAINER',\n payload: container\n };\n}\n/**\n * Returns an action object used to remove a container from all containers.\n *\n * @param {Object} container\n * @return {Object}\n */\n\nfunction removeContainer(container) {\n return {\n type: 'REMOVE_CONTAINER',\n payload: container\n };\n}\n/**\n * Returns an action object used to add the created sidebar to all fields.\n *\n * @param {Object} sidebar\n * @return {Object}\n */\n\nfunction receiveSidebar(sidebar) {\n return {\n type: 'RECEIVE_SIDEBAR',\n payload: sidebar\n };\n}\n/**\n * Returns an action object used to signal that saving is locked.\n *\n * @param {string} lockName\n * @return {Object}\n */\n\nfunction lockSaving(lockName) {\n return {\n type: 'LOCK_SAVING',\n payload: {\n lockName: lockName\n }\n };\n}\n/**\n * Returns an action object used to signal that saving is unlocked.\n *\n * @param {string} lockName\n * @return {Object}\n */\n\nfunction unlockSaving(lockName) {\n return {\n type: 'UNLOCK_SAVING',\n payload: {\n lockName: lockName\n }\n };\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/store/actions.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/store/helpers.js": +/*!*********************************************!*\ + !*** ./packages/metaboxes/store/helpers.js ***! + \*********************************************/ +/*! exports provided: normalizePreloadedState */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"normalizePreloadedState\", function() { return normalizePreloadedState; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Transform the shape of the given state to be more Redux friendly.\n *\n * @param {Object} state\n * @return {Object}\n */\n\nfunction normalizePreloadedState(state) {\n var fields = [];\n var containers = state.filter(function (_ref) {\n var id = _ref.id;\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"endsWith\"])(id, '__i__');\n }).map(function (container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"assign\"])({}, container, {\n fields: container.fields.map(function (field) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(field, container.id, fields);\n })\n });\n });\n return {\n containers: containers,\n fields: fields\n };\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/store/helpers.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/store/index.js": +/*!*******************************************!*\ + !*** ./packages/metaboxes/store/index.js ***! + \*******************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _reducer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reducer */ \"./packages/metaboxes/store/reducer.js\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions */ \"./packages/metaboxes/store/actions.js\");\n/* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./selectors */ \"./packages/metaboxes/store/selectors.js\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers */ \"./packages/metaboxes/store/helpers.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n/**\n * Register the store.\n */\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"registerStore\"])('carbon-fields/metaboxes', {\n reducer: _reducer__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n actions: _actions__WEBPACK_IMPORTED_MODULE_3__,\n selectors: _selectors__WEBPACK_IMPORTED_MODULE_4__\n});\n/**\n * Hydrate the store's state.\n */\n\nvar _normalizePreloadedSt = Object(_helpers__WEBPACK_IMPORTED_MODULE_5__[\"normalizePreloadedState\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])('carbon-fields/metaboxes').setupState(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"keyBy\"])(containers, 'id'), Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"keyBy\"])(fields, 'id'));\n\n//# sourceURL=webpack:///./packages/metaboxes/store/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/store/reducer.js": +/*!*********************************************!*\ + !*** ./packages/metaboxes/store/reducer.js ***! + \*********************************************/ +/*! exports provided: containers, fields, savingLock, isDirty, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"containers\", function() { return containers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fields\", function() { return fields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"savingLock\", function() { return savingLock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDirty\", function() { return isDirty; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The reducer that keeps track of the containers.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction containers() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_STATE':\n return action.payload.containers;\n\n case 'UPDATE_STATE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(action.payload.containers).forEach(function (container) {\n draft[container.id] = container;\n });\n });\n\n case 'ADD_CONTAINER':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n draft[action.payload.id] = action.payload;\n });\n\n case 'REMOVE_CONTAINER':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, action.payload);\n\n default:\n return state;\n }\n}\n/**\n * Clones a field.\n *\n * @param {string} originId\n * @param {string} cloneId\n * @param {Object} fields\n * @param {Object[]} accumulator\n * @return {Object[]}\n */\n\nfunction cloneField(originId, cloneId, fields, accumulator) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"cloneDeep\"])(fields[originId]);\n field.id = cloneId;\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__[\"uniqueId\"])();\n accumulator = group.fields.reduce(function (groupAccumulator, groupField) {\n var originGroupFieldId = groupField.id;\n var cloneGroupFieldId = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__[\"uniqueId\"])();\n groupField.id = cloneGroupFieldId;\n return cloneField(originGroupFieldId, cloneGroupFieldId, fields, groupAccumulator);\n }, accumulator);\n });\n }\n\n return accumulator.concat(field);\n}\n/**\n * Returns a list of field ids by a given root id.\n *\n * @param {string} fieldId\n * @param {Object} fields\n * @param {string[]} accumulator\n * @return {string[]}\n */\n\n\nfunction getFieldIdsByRootId(fieldId, fields, accumulator) {\n var field = fields[fieldId];\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n accumulator = group.fields.reduce(function (groupAccumulator, groupField) {\n return getFieldIdsByRootId(groupField.id, fields, groupAccumulator);\n }, accumulator);\n });\n }\n\n return accumulator.concat(fieldId);\n}\n/**\n * The reducer that keeps track of the fields.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\n\nfunction fields() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_STATE':\n return action.payload.fields;\n\n case 'UPDATE_STATE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(action.payload.fields).forEach(function (field) {\n draft[field.id] = field;\n });\n });\n\n case 'UPDATE_FIELD_VALUE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n var _action$payload = action.payload,\n fieldId = _action$payload.fieldId,\n value = _action$payload.value;\n draft[fieldId].value = value;\n });\n\n case 'ADD_FIELDS':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n action.payload.fields.forEach(function (field) {\n draft[field.id] = field;\n });\n });\n\n case 'CLONE_FIELDS':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n var _action$payload2 = action.payload,\n originFieldIds = _action$payload2.originFieldIds,\n cloneFieldIds = _action$payload2.cloneFieldIds;\n var clonedFields = originFieldIds.reduce(function (accumulator, originFieldId, index) {\n return cloneField(originFieldId, cloneFieldIds[index], draft, accumulator);\n }, []);\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"assign\"])(draft, Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"keyBy\"])(clonedFields, 'id'));\n });\n\n case 'REMOVE_FIELDS':\n var fieldIds = action.payload.fieldIds.reduce(function (accumulator, fieldId) {\n return getFieldIdsByRootId(fieldId, state, accumulator);\n }, []);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, fieldIds);\n\n case 'RECEIVE_SIDEBAR':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"forEach\"])(draft, function (field) {\n if (field.type === 'sidebar') {\n field.options.unshift(action.payload);\n }\n });\n });\n\n default:\n return state;\n }\n}\n/**\n * The reducer that keeps track of the save locks.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction savingLock() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'LOCK_SAVING':\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, state, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, action.payload.lockName, true));\n\n case 'UNLOCK_SAVING':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, [action.payload.lockName]);\n\n default:\n return state;\n }\n}\n/**\n * The reducer that keeps track if there is dirty fields.\n *\n * @param {boolean} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction isDirty() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'UPDATE_FIELD_VALUE':\n return true;\n\n default:\n return state;\n }\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__[\"combineReducers\"])({\n containers: containers,\n fields: fields,\n savingLock: savingLock,\n isDirty: isDirty\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/store/reducer.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/store/selectors.js": +/*!***********************************************!*\ + !*** ./packages/metaboxes/store/selectors.js ***! + \***********************************************/ +/*! exports provided: getContainers, getContainerById, getFields, getFieldsByContainerId, getFieldById, isSavingLocked, isDirty, getComplexGroupValues */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainers\", function() { return getContainers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainerById\", function() { return getContainerById; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFields\", function() { return getFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldsByContainerId\", function() { return getFieldsByContainerId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldById\", function() { return getFieldById; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isSavingLocked\", function() { return isSavingLocked; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDirty\", function() { return isDirty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getComplexGroupValues\", function() { return getComplexGroupValues; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Returns the containers.\n *\n * @param {Object} state\n * @return {Object[]}\n */\n\nfunction getContainers(state) {\n return state.containers;\n}\n/**\n * Returns a container by an id.\n *\n * @param {Object} state\n * @param {string} containerId\n * @return {?Object}\n */\n\nfunction getContainerById(state, containerId) {\n return state.containers[containerId];\n}\n/**\n * Returns the fields.\n *\n * @param {Object} state\n * @return {Object}\n */\n\nfunction getFields(state) {\n return state.fields;\n}\n/**\n * Returns the fields that belong to the specified container.\n *\n * @param {Object} state\n * @param {string} containerId\n * @return {Object[]}\n */\n\nfunction getFieldsByContainerId(state, containerId) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"filter\"])(state.fields, ['container_id', containerId]);\n}\n/**\n * Returns a field by an id.\n *\n * @param {Object} state\n * @param {string} fieldId\n * @return {?Object}\n */\n\nfunction getFieldById(state, fieldId) {\n return state.fields[fieldId];\n}\n/**\n * Returns whether saving is locked.\n *\n * @param {Object} state\n * @return {boolean}\n */\n\nfunction isSavingLocked(state) {\n return Object.keys(state.savingLock).length > 0;\n}\n/**\n * Returns whether the metaboxes fields contain unsaved changed.\n *\n * @param {Object} state\n * @return {boolean}\n */\n\nfunction isDirty(state) {\n return state.isDirty;\n}\n/**\n * Returns a map of field values for a given group.\n *\n * @param {Object} state\n * @param {string[]} fieldIds\n * @return {Object}\n */\n\nfunction getComplexGroupValues(state, fieldIds) {\n var fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"pick\"])(getFields(state), fieldIds);\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"mapKeys\"])(fields, function (field) {\n return field.base_name.replace(/\\-/g, '_');\n });\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"mapValues\"])(fields, function (field) {\n return field.value;\n });\n return fields;\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/store/selectors.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/utils/flatten-field.js": +/*!***************************************************!*\ + !*** ./packages/metaboxes/utils/flatten-field.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return flattenField; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Flattens a field.\n *\n * @param {Object} field\n * @param {string} containerId\n * @param {Object[]} accumulator\n * @return {Object}\n */\n\nfunction flattenField(field, containerId, accumulator) {\n field = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"cloneDeep\"])(field); // Replace the id of the field.\n\n field.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"uniqueId\"])(); // Keep reference to the container.\n\n field.container_id = containerId; // The complex fields represent a nested structure of fields.\n // So we need to flat them as well.\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"uniqueId\"])();\n group.container_id = containerId;\n group.fields = group.fields.map(function (groupField) {\n return flattenField(groupField, containerId, accumulator);\n });\n });\n }\n\n accumulator.push(field);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"pick\"])(field, ['id', 'type', 'name', 'base_name']);\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/flatten-field.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/utils/from-ajax-event.js": +/*!*****************************************************!*\ + !*** ./packages/metaboxes/utils/from-ajax-event.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return fromAjaxEvent; });\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-create */ \"./node_modules/callbag-create/index.js\");\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(callbag_create__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\nfunction fromAjaxEvent(eventName, action) {\n return callbag_create__WEBPACK_IMPORTED_MODULE_0___default()(function (sink) {\n // Emit the AJAX event through the channel.\n var _ref = function _ref(event, xhr, settings, data) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isString\"])(settings.data) && settings.data.indexOf(action) > -1) {\n sink(1, {\n event: event,\n xhr: xhr,\n settings: settings,\n data: data\n });\n }\n },\n handler = _ref.handler; // Cancel the subscription.\n\n\n var unsubscribe = function unsubscribe() {\n window.jQuery(document).off(eventName, {\n handler: handler\n });\n }; // Setup the subscription.\n\n\n window.jQuery(document).on(eventName, {\n handler: handler\n });\n return unsubscribe;\n });\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/from-ajax-event.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/utils/from-event-pattern.js": +/*!********************************************************!*\ + !*** ./packages/metaboxes/utils/from-event-pattern.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return fromEventPattern; });\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-create */ \"./node_modules/callbag-create/index.js\");\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(callbag_create__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Callbag source factory from `addHandler` and `removeHandler` pair.\n *\n * @see https://github.com/Andarist/callbag-from-event-pattern\n * @param {Function} addHandler\n * @param {Function} removeHandler\n * @param {Function} argsTransformer\n * @return {Function}\n */\n\nfunction fromEventPattern(addHandler, removeHandler) {\n var argsTransformer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return args;\n };\n return callbag_create__WEBPACK_IMPORTED_MODULE_0___default()(function (sink) {\n var handler = function handler() {\n return sink(1, argsTransformer.apply(void 0, arguments));\n };\n\n addHandler(handler);\n return function () {\n return removeHandler(handler);\n };\n });\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/from-event-pattern.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/utils/is-gutenberg.js": +/*!**************************************************!*\ + !*** ./packages/metaboxes/utils/is-gutenberg.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return isGutenberg; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Returns true if Gutenberg is presented.\n *\n * For some reason the Gutenberg package uses `_wpLoadGutenbergEditor`\n * while WordPress@5 uses `_wpLoadBlockEditor`.\n *\n * @return {boolean}\n */\n\nfunction isGutenberg() {\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isUndefined\"])(window._wpLoadGutenbergEditor) || !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isUndefined\"])(window._wpLoadBlockEditor);\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/is-gutenberg.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/utils/urldecode.js": +/*!***********************************************!*\ + !*** ./packages/metaboxes/utils/urldecode.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return urldecode; });\n/**\n * Source: https://github.com/kvz/locutus/blob/master/src/php/url/urldecode.js\n *\n * @param {string} str\n * @return {string}\n */\nfunction urldecode(str) {\n return decodeURIComponent((str + '').replace(/%(?![\\da-f]{2})/gi, function () {\n // PHP tolerates poorly formed escape sequences\n return '%25';\n }).replace(/\\+/g, '%20'));\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/urldecode.js?"); + +/***/ }), + +/***/ "@carbon-fields/core": +/*!******************************!*\ + !*** external ["cf","core"] ***! + \******************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = cf[\"core\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22core%22%5D?"); + +/***/ }), + +/***/ "@wordpress/compose": +/*!*****************************************************!*\ + !*** external ["cf","vendor","@wordpress/compose"] ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = cf[\"vendor\"][\"@wordpress/compose\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22@wordpress/compose%22%5D?"); + +/***/ }), + +/***/ "@wordpress/data": +/*!**************************************************!*\ + !*** external ["cf","vendor","@wordpress/data"] ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = cf[\"vendor\"][\"@wordpress/data\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22@wordpress/data%22%5D?"); + +/***/ }), + +/***/ "@wordpress/element": +/*!*****************************************************!*\ + !*** external ["cf","vendor","@wordpress/element"] ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = cf[\"vendor\"][\"@wordpress/element\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22@wordpress/element%22%5D?"); + +/***/ }), + +/***/ "@wordpress/hooks": +/*!***************************************************!*\ + !*** external ["cf","vendor","@wordpress/hooks"] ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = cf[\"vendor\"][\"@wordpress/hooks\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22@wordpress/hooks%22%5D?"); + +/***/ }), + +/***/ "@wordpress/i18n": +/*!**************************************************!*\ + !*** external ["cf","vendor","@wordpress/i18n"] ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = cf[\"vendor\"][\"@wordpress/i18n\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22@wordpress/i18n%22%5D?"); + +/***/ }), + +/***/ "callbag-basics": +/*!*************************************************!*\ + !*** external ["cf","vendor","callbag-basics"] ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = cf[\"vendor\"][\"callbag-basics\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22callbag-basics%22%5D?"); + +/***/ }), + +/***/ "classnames": +/*!*********************************************!*\ + !*** external ["cf","vendor","classnames"] ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = cf[\"vendor\"][\"classnames\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22classnames%22%5D?"); + +/***/ }), + +/***/ "immer": +/*!****************************************!*\ + !*** external ["cf","vendor","immer"] ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = cf[\"vendor\"][\"immer\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22immer%22%5D?"); + +/***/ }), + +/***/ "lodash": +/*!*****************************************!*\ + !*** external ["cf","vendor","lodash"] ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = cf[\"vendor\"][\"lodash\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22lodash%22%5D?"); + +/***/ }), + +/***/ "refract-callbag": +/*!**************************************************!*\ + !*** external ["cf","vendor","refract-callbag"] ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = cf[\"vendor\"][\"refract-callbag\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22refract-callbag%22%5D?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/build/classic/metaboxes.min.css b/build/classic/metaboxes.min.css new file mode 100644 index 000000000..15a9607cc --- /dev/null +++ b/build/classic/metaboxes.min.css @@ -0,0 +1 @@ +.postbox .cf-complex__inserter-menu{margin:0;border-radius:3px;background-color:#191e23}.postbox .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-color:transparent #191e23;border-style:solid;border-width:5px 5px 5px 0;margin-top:-5px;content:""}.postbox .cf-complex__inserter-item{font-weight:600;color:#fff;transition:color .1s linear}.postbox .cf-complex__inserter-item:hover{color:#00a0d2}.postbox .cf-complex__tabs-item,.postbox .cf-complex__tabs .cf-complex__inserter-button{font-weight:600;color:#23282d}.postbox .cf-field{flex:1 1 100%;padding:12px;border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.postbox .cf-field__label{padding-bottom:5px;font-weight:600;color:#23282d}.cf-field__help{display:inline-block;color:#666;margin-top:10px}.postbox .cf-media-gallery__inner{border:1px solid #e2e4e7}.postbox .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__actions{padding-left:0}.cf-container-term-meta .cf-media-gallery__list{margin:0 -8px;max-height:285px}.cf-container-term-meta .cf-media-gallery__item{flex-basis:20%}.cf-container-term-meta .cf-media-gallery__item-inner,.postbox .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__item-preview,.postbox .cf-media-gallery__item-preview{background-color:#f3f4f5}.cf-container-term-meta .cf-media-gallery__item-name,.postbox .cf-media-gallery__item-name{border-top:1px solid #e2e4e7;background-color:#f3f4f5}.inside .cf-radio-image .cf-radio__input:focus~.cf-radio__label{box-shadow:0 0 2px rgba(0,160,210,.8)}.inside .cf-radio-image__image{border:1px solid #b5bcc2}.inside .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.inside .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-container-widget .cf-field{margin:1em 0 .2em}.cf-container-term-meta{margin-bottom:13px}.carbon-table-row .cf-container-term-meta{margin-bottom:0}.cf-container-term-meta .cf-field{margin-top:13px}.cf-container-term-meta .cf-field:first-child{margin-top:0}.carbon-table-row .cf-field__head{position:absolute;left:0;font-weight:600}.carbon-table-row .cf-field__body{width:95%}.carbon-network #post-body.columns-2 #postbox-container-1.fixed,.carbon-theme-options #post-body.columns-2 #postbox-container-1.fixed{position:fixed;right:0;margin-right:20px}.carbon-box.hide-if-js:not([hidden]){display:block}#poststuff .carbon-box .inside,.carbon-box .inside{padding:0;margin:0}.cf-container__fields{display:flex;flex-wrap:wrap;margin:-1px -1px 0 0}.cf-container__fields[hidden]{display:none}.block-editor .cf-container__fields{border-left:1px solid #e2e4e7}.cf-container__tabs{position:relative;z-index:1;padding:12px 12px 0;border-bottom:1px solid #e2e4e7;background-color:#fbfbfc}.cf-container__tabs-list{display:flex;flex-wrap:wrap;margin:0 0 -1px}.cf-container__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0 8px 0 0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-container__tabs-item:hover{background-color:#fff}.cf-container__tabs-item--current{background-color:#fff;border-bottom-color:#fff} \ No newline at end of file diff --git a/build/classic/metaboxes.min.js b/build/classic/metaboxes.min.js new file mode 100644 index 000000000..e82a817b3 --- /dev/null +++ b/build/classic/metaboxes.min.js @@ -0,0 +1 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=65)}([function(e,t){e.exports=cf.vendor.lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=cf.vendor["@wordpress/hooks"]},function(e,t){e.exports=cf.vendor["@wordpress/data"]},function(e,t){e.exports=cf.core},function(e,t){e.exports=cf.vendor["@wordpress/i18n"]},function(e,t){e.exports=cf.vendor["@wordpress/element"]},function(e,t,n){var r=n(9);e.exports=function(e){for(var t=1;t(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=cf.vendor.classnames},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return c});var r=n(4),o=Object(r.createRegistry)("container",["classic","gutenberg"]),i=o.registerContainerType,c=o.getContainerType},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return s});var r=n(6),o=n(34),i=n(38),c=n(39),a=n(37),u=n(20),l=n(17);function s(t){var n=window.cf.config.pagenow;Object(r.render)(e.createElement(r.Fragment,null,!Object(u.a)()&&e.createElement(o.a,null),(n===l.d||n===l.c)&&e.createElement(c.a,null),e.createElement(i.a,{context:t})),document.createElement("div"));var s=document.querySelector("#poststuff");s&&Object(r.render)(e.createElement(a.a,null),s.appendChild(document.createElement("div")))}}).call(this,n(6))},function(e,t,n){"use strict";var r=n(14),o=n(3),i=n(4);t.a=Object(r.withEffects)(function(){return Object(i.fromSelector)(Object(o.select)("carbon-fields/metaboxes").isSavingLocked)},{handler:function(){return function(e){document.querySelectorAll('\n\t\t\t#publishing-action input#publish,\n\t\t\t#publishing-action input#save,\n\t\t\t#addtag input#submit,\n\t\t\t#edittag input[type="submit"],\n\t\t\t#your-profile input#submit\n\t\t').forEach(function(t){t.disabled=e})}}})(function(){return null})},function(e,t){e.exports=(e=>t=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),i=n(24),c=n.n(i),a=n(25),u=n.n(a),l=n(26),s=n.n(l),d=n(27),f=n.n(d),p=n(28),b=n.n(p),m=n(8),v=n.n(m),O=n(9),j=n.n(O),g=n(31),y=n.n(g),h=n(6),_=n(0),w=n(4),E=(n(64),n(29)),x=function(t){function n(){var e,t;c()(this,n);for(var r=arguments.length,o=new Array(r),i=0;it=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})},m=n(15),v=n(4);function O(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function j(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function g(e){for(var t=[],n=e,r=j(e);r>0&&n;)if(j(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var y={post_ancestors:[],post_parent_id:0,post_level:1};function h(e){var t=e.options[e.selectedIndex];return{post_ancestors:g(t),post_parent_id:O(t),post_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(s.pipe)(Object(s.fromEvent)(e,"change"),Object(s.map)(function(e){return h(e.target)}),b(h(e))):Object(p.a)(y)}),Object(u.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(s.pipe)(Object(s.combine)(Object(v.fromSelector)(Object(o.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"parent")),Object(m.a)(l.isEqual),Object(s.map)(function(e){var r=f()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return y;var a=t(i);if(!Object(l.get)(a,["hierarchical"],!1))return y;var u=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(l.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:u,post_parent_id:c,post_level:u.length+1}}))});var _=n(35),w=n.n(_),E=(e,t,n)=>w()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),x={post_format:"standard"};function S(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(u.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(s.pipe)(E(e,"input.post-format","change"),Object(s.map)(function(e){return S(e.target)}),b(S(e.querySelector("input.post-format:checked")))):Object(p.a)(x)}),Object(u.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(s.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"format"),Object(m.a)(),Object(s.filter)(Boolean),Object(s.map)(function(e){return{post_format:e}}),b(x))});var F={post_template:""};function T(e){return{post_template:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(s.pipe)(Object(s.fromEvent)(e,"change"),Object(s.map)(function(e){return T(e.target)}),b(T(e))):Object(p.a)(F)}),Object(u.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(s.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"template"),Object(m.a)(),Object(s.filter)(l.isString),Object(s.map)(function(e){return{post_template:e}}),b(F))});var I=n(7),C=n.n(I),A=n(9),D=n.n(A),k=n(16),N=n.n(k);function G(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(G(window.tagBox,"parseTags"),G(window.tagBox,"flushTags")),Object(u.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(s.pipe)(s.merge.apply(void 0,N()((e=document.querySelectorAll('div[id^="taxonomy-"]'),N()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(s.pipe)(E(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(s.scan)(function(e,n){var r=n.target;return a()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(l.pull)(e[t],n)})},D()({},t,[])),b(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return N()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},D()({},e,[]))}(t)))}))).concat(N()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return N()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(s.pipe)(Object(s.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(s.map)(function(e){var n=e.target;return D()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),b(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return D()({},e,n)}(t)))})}()))),Object(s.scan)(function(e,t){return{post_term:C()({},e.post_term,t)}},{post_term:{}}));var e}),Object(u.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core").getTaxonomies,t=Object(o.select)("core/editor").getEditedPostAttribute;return Object(s.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(s.filter)(Boolean),Object(s.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(l.fromPairs)(n)}}))});var L={term_ancestors:[],term_parent:0,term_level:1};function P(e){var t=e.options[e.selectedIndex];return{term_ancestors:g(t),term_parent:O(t),term_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(s.pipe)(Object(s.fromEvent)(e,"change"),Object(s.map)(function(e){return P(e.target)}),b(P(e))):Object(p.a)(L)});var V={user_role:""};function B(e){return{user_role:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return t?Object(p.a)({user_role:t.dataset.profileRole}):Object(p.a)(V)}return Object(s.pipe)(Object(s.fromEvent)(e,"change"),Object(s.map)(function(e){return B(e.target)}),b(B(e)))});var R=n(6),q=n(5),U=n(21),M={operators:[],isOperatorSupported:function(e){return this.operators.indexOf(e)>-1},evaluate:function(){return!1}},Q={comparers:[C()({},M,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),C()({},M,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),C()({},M,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(l.intersection)(e,n).length;default:return!1}}}),H={boolean:K,post_term:$,post_ancestor_id:C()({},Q,{comparers:[W,z],getEnvironmentValue:function(e,t){return Object(l.get)(t,"post_ancestors",[])}}),post_parent_id:Q,post_level:Q,post_format:Q,post_template:Q,term_level:Q,term_parent:C()({},Q,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(l.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(l.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:C()({},Q,{comparers:[W,z],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(l.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(l.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(l.get)(t,"term_ancestors",[])}}),user_role:Q},J=Object(o.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),X=Object(i.withEffects)(function(e,t){var n=t.context,r=Object(u.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(u.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(u.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),c=Object(u.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),d=Object(u.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),f=Object(u.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(s.pipe)(Object(s.merge)(r,o,i,c,d,f),Object(s.scan)(function(e,t){return a()(e,function(e){Object(l.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(l.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(l.get)(H,t.type);return r?r.isFulfiled(t,n):(console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=f()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o));c&&(c.hidden=!i),a&&(i&&!a.dataset.mounted&&(a.dataset.mounted=!0,Object(U.b)(t[o],n)),!i&&a.dataset.mounted&&(delete a.dataset.mounted,Object(R.unmountComponentAtNode)(a)))})}}});t.a=Object(r.compose)(J,X)(function(){return null})},function(e,t,n){"use strict";var r=n(3),o=n(6),i=n(0),c=n(14),a=n(1);function u(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var l=n(18),s=n(30),d=n.n(s);function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n-1}t.a=Object(c.withEffects)(function(){return Object(a.merge)(Object(a.pipe)(f(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(a.filter)(function(e){return m(e.$widget[0].id)}),Object(a.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(a.pipe)(f(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(a.filter)(function(e){var t=e.data;return Object(i.startsWith)(t,"deleted:")&&m(t)}),Object(a.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(r.select)("carbon-fields/metaboxes").getContainerById,n=Object(r.dispatch)("carbon-fields/metaboxes"),c=n.addContainer,a=n.removeContainer,s=n.addFields,d=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var f,m=e.payload,v=m.event,O=m.$widget,j=Object(i.flow)(u,JSON.parse)(O.find("[data-json]").data("json")),g=[];if("widget-updated"===v.type&&(f=t(j.id).fields.map(function(e){return e.id})),j.fields=j.fields.map(function(e){return Object(l.a)(e,j,g)}),s(g),c(j),"widget-updated"===v.type&&d(f),Object(p.b)(j,"classic"),window.cf.config.pagenow===b.c&&"widget-added"===v.type){var y=O.find('[name="widget-id"]').val();O.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(y).liveUpdateMode=!1}break;case"WIDGET_DELETED":var h=e.payload.data.replace("deleted:",""),w="".concat(b.a).concat(h),E=t(w);Object(o.unmountComponentAtNode)(document.querySelector(".container-".concat(w)));var x=_.map(E.fields,"id");a(w),d(x)}}}})(function(){return null})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";(function(e){var t=n(24),r=n.n(t),o=n(25),i=n.n(o),c=n(26),a=n.n(c),u=n(27),l=n.n(u),s=n(28),d=n.n(s),f=n(8),p=n.n(f),b=n(9),m=n.n(b),v=n(10),O=n.n(v),j=n(6),g=n(2),y=n(11),h=n(3),_=n(0),w=n(4),E=(n(46),n(29)),x=n(18),S=function(e){function t(){var e,n;r()(this,t);for(var o=arguments.length,i=new Array(o),c=0;c0&&n.toggleClass("fixed",e>=o).css("top",r)}}}))},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupState",function(){return v}),n.d(r,"updateState",function(){return O}),n.d(r,"updateFieldValue",function(){return j}),n.d(r,"addFields",function(){return g}),n.d(r,"cloneFields",function(){return y}),n.d(r,"removeFields",function(){return h}),n.d(r,"addContainer",function(){return _}),n.d(r,"removeContainer",function(){return w}),n.d(r,"receiveSidebar",function(){return E}),n.d(r,"lockSaving",function(){return x}),n.d(r,"unlockSaving",function(){return S});var o={};n.r(o),n.d(o,"getContainers",function(){return F}),n.d(o,"getContainerById",function(){return T}),n.d(o,"getFields",function(){return I}),n.d(o,"getFieldsByContainerId",function(){return C}),n.d(o,"getFieldById",function(){return A}),n.d(o,"isSavingLocked",function(){return D}),n.d(o,"isDirty",function(){return k}),n.d(o,"getComplexGroupValues",function(){return N});var i=n(5),c=n(3),a=n(0),u=n(9),l=n.n(u),s=n(7),d=n.n(s),f=n(10),p=n.n(f),b=n(4),m=Object(c.combineReducers)({containers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return p()(e,function(e){Object(a.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return p()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(a.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return p()(e,function(e){Object(a.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return p()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return p()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return p()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(a.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(b.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(b.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(a.assign)(e,Object(a.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(a.omit)(e,n);case"RECEIVE_SIDEBAR":return p()(e,function(e){Object(a.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return d()({},e,l()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(a.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function v(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function O(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function g(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function y(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function h(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function _(e){return{type:"ADD_CONTAINER",payload:e}}function w(e){return{type:"REMOVE_CONTAINER",payload:e}}function E(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function x(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function S(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function F(e){return e.containers}function T(e,t){return e.containers[t]}function I(e){return e.fields}function C(e,t){return Object(a.filter)(e.fields,["container_id",t])}function A(e,t){return e.fields[t]}function D(e){return Object.keys(e.savingLock).length>0}function k(e){return e.isDirty}function N(e,t){var n=Object(a.pick)(I(e),t);return n=Object(a.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(a.mapValues)(n,function(e){return e.value})}var G=n(22);Object(c.registerStore)("carbon-fields/metaboxes",{reducer:m,actions:r,selectors:o});var L=Object(G.a)(Object(a.get)(window.cf,"preloaded.containers",[])),P=L.containers,V=L.fields;Object(c.dispatch)("carbon-fields/metaboxes").setupState(Object(a.keyBy)(P,"id"),Object(a.keyBy)(V,"id"));var B=n(11),R=n(2),q=n(23),U=n(19),M=n.n(U),Q=n(12),K=n(15),W=n(1);function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Object(a.pick)(t,Object(a.difference)(Object(a.map)(e.fields,"id"),n))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(a.map)(e,function(e){return[e.id,"".concat(Object(a.repeat)("parent.",t)).concat(e.base_name)]})}var H=Object(b.withConditionalLogic)(function(e){var t=Object(c.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(W.pipe)(Object(W.merge)(Object(Q.a)(t(e.field.container_id)),Object(b.fromSelector)(t,e.field.container_id)),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(K.a)(a.isEqual))},function(e,t){t=Object(a.keyBy)(t,"id");var n=Object(c.select)("carbon-fields/metaboxes").getContainerById(e.field.container_id),r=[];if(Object(a.some)(n.fields,["id",e.id]))r=z(r=$(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(a.find)(t,function(t){return t.container_id===e.field.container_id&&Object(a.startsWith)(o,t.name)}),u=o.split(/\[|\]/g);u.shift(),(u=u.filter(function(e){return""!==e})).pop();var l=u.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=z(r=$(n,t,[i.id]),l+1);for(var s="".concat(i.id,".value");u.length>0;){var d=u.shift(),f=!isNaN(d),p=!f;if(f){s="".concat(s,"[").concat(d,"]");var b=$(Object(a.get)(t,s),t,[e.id]);r=r.concat(z(b,l)),s="".concat(s,".fields")}if(p){var m=Object(a.find)(Object(a.get)(t,s),["name",d]);s="".concat(m.id,".value"),l--}}}return r=r.map(function(e){var n=M()(e,2),r=n[0];return[n[1],Object(a.get)(t,"".concat(r,".value"))]}),Object(a.fromPairs)(r)}),J=n(20);n(43),n(48),n(49),n(50),n(51),n(52),n(54),Object(R.addFilter)("carbon-fields.sidebar.metabox","carbon-fields/metaboxes",Object(c.withDispatch)(function(e){return{onAdded:e("carbon-fields/metaboxes").receiveSidebar}})),n(55),Object(R.addFilter)("carbon-fields.field-edit.metabox","carbon-fields/metaboxes",Object(B.compose)(q.a,H,Object(c.withDispatch)(function(e){if(Object(J.a)()){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}var n=e("carbon-fields/metaboxes");return{lockSaving:n.lockSaving,unlockSaving:n.unlockSaving}}),b.withValidation));var X=n(33),Y=n(21);Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var Z=Object(J.a)()?"gutenberg":"classic";Object(Y.a)(Z),Object(X.a)(Z)},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(2),c=n(3),a=n(14),u=n(1),l=n(30),s=n.n(l),d=n(22);n(61),Object(i.addFilter)("carbon-fields.term_meta.classic","carbon-fields/metaboxes",Object(a.withEffects)(function(){return Object(u.pipe)((e="ajaxSuccess","add-tag",s()(function(t){var n=function(e,n,o,i){Object(r.isString)(o.data)&&o.data.indexOf("add-tag")>-1&&t(1,{event:e,xhr:n,settings:o,data:i})}.handler;return window.jQuery(document).on(e,{handler:n}),function(){window.jQuery(document).off(e,{handler:n})}})),Object(u.filter)(function(e){var t=e.settings,n=e.data;return t.data.indexOf("carbon_fields_container")>-1&&!n.documentElement.querySelector("wp_error")}));var e},{handler:function(e){return function(){var t=o.a.map(e.container.fields,"id"),n=Object(d.a)(o.a.get(window.cf,"preloaded.containers",[])),r=n.containers,i=n.fields,a=o.a.find(r,["id",e.id]),u=o.a.filter(i,["container_id",e.id]),l=Object(c.dispatch)("carbon-fields/metaboxes"),s=l.updateState,f=l.removeFields;s(o.a.keyBy([a],"id"),o.a.keyBy(u,"id")),f(t)}}}))},function(e,t,n){"use strict";var r=n(11),o=n(2),i=n(4),c=n(3),a=Object(r.createHigherOrderComponent)(function(e){return Object(c.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(o.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(r.compose)(a,Object(i.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)})}]); \ No newline at end of file diff --git a/build/classic/report.html b/build/classic/report.html new file mode 100644 index 000000000..cb41bc0f3 --- /dev/null +++ b/build/classic/report.html @@ -0,0 +1,65 @@ + + + + + + Webpack Bundle Analyzer + + + + + + + + + +
+ + + diff --git a/build/classic/vendor.js b/build/classic/vendor.js new file mode 100644 index 000000000..55101e8d5 --- /dev/null +++ b/build/classic/vendor.js @@ -0,0 +1,1985 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./packages/vendor/index.js"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js": +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js": +/*!**************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ \"./node_modules/@babel/runtime/helpers/arrayWithHoles.js\");\n\nvar iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ \"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js\");\n\nvar nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ \"./node_modules/@babel/runtime/helpers/nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/slicedToArray.js?"); + +/***/ }), + +/***/ "./node_modules/@tannin/compile/index.js": +/*!***********************************************!*\ + !*** ./node_modules/@tannin/compile/index.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return compile; });\n/* harmony import */ var _tannin_postfix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tannin/postfix */ \"./node_modules/@tannin/postfix/index.js\");\n/* harmony import */ var _tannin_evaluate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tannin/evaluate */ \"./node_modules/@tannin/evaluate/index.js\");\n\n\n\n/**\n * Given a C expression, returns a function which can be called to evaluate its\n * result.\n *\n * @example\n *\n * ```js\n * import compile from '@tannin/compile';\n *\n * const evaluate = compile( 'n > 1' );\n *\n * evaluate( { n: 2 } );\n * // ⇒ true\n * ```\n *\n * @param {string} expression C expression.\n *\n * @return {Function} Compiled evaluator.\n */\nfunction compile( expression ) {\n\tvar terms = Object(_tannin_postfix__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( expression );\n\n\treturn function( variables ) {\n\t\treturn Object(_tannin_evaluate__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( terms, variables );\n\t};\n}\n\n\n//# sourceURL=webpack:///./node_modules/@tannin/compile/index.js?"); + +/***/ }), + +/***/ "./node_modules/@tannin/evaluate/index.js": +/*!************************************************!*\ + !*** ./node_modules/@tannin/evaluate/index.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return evaluate; });\n/**\n * Operator callback functions.\n *\n * @type {Object}\n */\nvar OPERATORS = {\n\t'!': function( a ) {\n\t\treturn ! a;\n\t},\n\t'*': function( a, b ) {\n\t\treturn a * b;\n\t},\n\t'/': function( a, b ) {\n\t\treturn a / b;\n\t},\n\t'%': function( a, b ) {\n\t\treturn a % b;\n\t},\n\t'+': function( a, b ) {\n\t\treturn a + b;\n\t},\n\t'-': function( a, b ) {\n\t\treturn a - b;\n\t},\n\t'<': function( a, b ) {\n\t\treturn a < b;\n\t},\n\t'<=': function( a, b ) {\n\t\treturn a <= b;\n\t},\n\t'>': function( a, b ) {\n\t\treturn a > b;\n\t},\n\t'>=': function( a, b ) {\n\t\treturn a >= b;\n\t},\n\t'==': function( a, b ) {\n\t\treturn a === b;\n\t},\n\t'!=': function( a, b ) {\n\t\treturn a !== b;\n\t},\n\t'&&': function( a, b ) {\n\t\treturn a && b;\n\t},\n\t'||': function( a, b ) {\n\t\treturn a || b;\n\t},\n\t'?:': function( a, b, c ) {\n\t\tif ( a ) {\n\t\t\tthrow b;\n\t\t}\n\n\t\treturn c;\n\t},\n};\n\n/**\n * Given an array of postfix terms and operand variables, returns the result of\n * the postfix evaluation.\n *\n * @example\n *\n * ```js\n * import evaluate from '@tannin/evaluate';\n *\n * // 3 + 4 * 5 / 6 ⇒ '3 4 5 * 6 / +'\n * const terms = [ '3', '4', '5', '*', '6', '/', '+' ];\n *\n * evaluate( terms, {} );\n * // ⇒ 6.333333333333334\n * ```\n *\n * @param {string[]} postfix Postfix terms.\n * @param {Object} variables Operand variables.\n *\n * @return {*} Result of evaluation.\n */\nfunction evaluate( postfix, variables ) {\n\tvar stack = [],\n\t\ti, getOperatorResult, term, value;\n\n\tfor ( i = 0; i < postfix.length; i++ ) {\n\t\tterm = postfix[ i ];\n\n\t\tgetOperatorResult = OPERATORS[ term ];\n\t\tif ( getOperatorResult ) {\n\t\t\ttry {\n\t\t\t\t// Pop from stack by number of function arguments.\n\t\t\t\tvalue = getOperatorResult.apply(\n\t\t\t\t\tnull,\n\t\t\t\t\tstack.splice( -1 * getOperatorResult.length )\n\t\t\t\t);\n\t\t\t} catch ( earlyReturn ) {\n\t\t\t\treturn earlyReturn;\n\t\t\t}\n\t\t} else if ( variables.hasOwnProperty( term ) ) {\n\t\t\tvalue = variables[ term ];\n\t\t} else {\n\t\t\tvalue = +term;\n\t\t}\n\n\t\tstack.push( value );\n\t}\n\n\treturn stack[ 0 ];\n}\n\n\n//# sourceURL=webpack:///./node_modules/@tannin/evaluate/index.js?"); + +/***/ }), + +/***/ "./node_modules/@tannin/plural-forms/index.js": +/*!****************************************************!*\ + !*** ./node_modules/@tannin/plural-forms/index.js ***! + \****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return pluralForms; });\n/* harmony import */ var _tannin_compile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tannin/compile */ \"./node_modules/@tannin/compile/index.js\");\n\n\n/**\n * Given a C expression, returns a function which, when called with a value,\n * evaluates the result with the value assumed to be the \"n\" variable of the\n * expression. The result will be coerced to its numeric equivalent.\n *\n * @param {string} expression C expression.\n *\n * @return {Function} Evaluator function.\n */\nfunction pluralForms( expression ) {\n\tvar evaluate = Object(_tannin_compile__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( expression );\n\n\treturn function( n ) {\n\t\treturn +evaluate( { n: n } );\n\t};\n}\n\n\n//# sourceURL=webpack:///./node_modules/@tannin/plural-forms/index.js?"); + +/***/ }), + +/***/ "./node_modules/@tannin/postfix/index.js": +/*!***********************************************!*\ + !*** ./node_modules/@tannin/postfix/index.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return postfix; });\nvar PRECEDENCE, OPENERS, TERMINATORS, PATTERN;\n\n/**\n * Operator precedence mapping.\n *\n * @type {Object}\n */\nPRECEDENCE = {\n\t'(': 9,\n\t'!': 8,\n\t'*': 7,\n\t'/': 7,\n\t'%': 7,\n\t'+': 6,\n\t'-': 6,\n\t'<': 5,\n\t'<=': 5,\n\t'>': 5,\n\t'>=': 5,\n\t'==': 4,\n\t'!=': 4,\n\t'&&': 3,\n\t'||': 2,\n\t'?': 1,\n\t'?:': 1,\n};\n\n/**\n * Characters which signal pair opening, to be terminated by terminators.\n *\n * @type {string[]}\n */\nOPENERS = [ '(', '?' ];\n\n/**\n * Characters which signal pair termination, the value an array with the\n * opener as its first member. The second member is an optional operator\n * replacement to push to the stack.\n *\n * @type {string[]}\n */\nTERMINATORS = {\n\t')': [ '(' ],\n\t':': [ '?', '?:' ],\n};\n\n/**\n * Pattern matching operators and openers.\n *\n * @type {RegExp}\n */\nPATTERN = /<=|>=|==|!=|&&|\\|\\||\\?:|\\(|!|\\*|\\/|%|\\+|-|<|>|\\?|\\)|:/;\n\n/**\n * Given a C expression, returns the equivalent postfix (Reverse Polish)\n * notation terms as an array.\n *\n * If a postfix string is desired, simply `.join( ' ' )` the result.\n *\n * @example\n *\n * ```js\n * import postfix from '@tannin/postfix';\n *\n * postfix( 'n > 1' );\n * // ⇒ [ 'n', '1', '>' ]\n * ```\n *\n * @param {string} expression C expression.\n *\n * @return {string[]} Postfix terms.\n */\nfunction postfix( expression ) {\n\tvar terms = [],\n\t\tstack = [],\n\t\tmatch, operator, term, element;\n\n\twhile ( ( match = expression.match( PATTERN ) ) ) {\n\t\toperator = match[ 0 ];\n\n\t\t// Term is the string preceding the operator match. It may contain\n\t\t// whitespace, and may be empty (if operator is at beginning).\n\t\tterm = expression.substr( 0, match.index ).trim();\n\t\tif ( term ) {\n\t\t\tterms.push( term );\n\t\t}\n\n\t\twhile ( ( element = stack.pop() ) ) {\n\t\t\tif ( TERMINATORS[ operator ] ) {\n\t\t\t\tif ( TERMINATORS[ operator ][ 0 ] === element ) {\n\t\t\t\t\t// Substitution works here under assumption that because\n\t\t\t\t\t// the assigned operator will no longer be a terminator, it\n\t\t\t\t\t// will be pushed to the stack during the condition below.\n\t\t\t\t\toperator = TERMINATORS[ operator ][ 1 ] || operator;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if ( OPENERS.indexOf( element ) >= 0 || PRECEDENCE[ element ] < PRECEDENCE[ operator ] ) {\n\t\t\t\t// Push to stack if either an opener or when pop reveals an\n\t\t\t\t// element of lower precedence.\n\t\t\t\tstack.push( element );\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// For each popped from stack, push to terms.\n\t\t\tterms.push( element );\n\t\t}\n\n\t\tif ( ! TERMINATORS[ operator ] ) {\n\t\t\tstack.push( operator );\n\t\t}\n\n\t\t// Slice matched fragment from expression to continue match.\n\t\texpression = expression.substr( match.index + operator.length );\n\t}\n\n\t// Push remainder of operand, if exists, to terms.\n\texpression = expression.trim();\n\tif ( expression ) {\n\t\tterms.push( expression );\n\t}\n\n\t// Pop remaining items from stack into terms.\n\treturn terms.concat( stack.reverse() );\n}\n\n\n//# sourceURL=webpack:///./node_modules/@tannin/postfix/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js ***! + \*********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies\n */\n\n/**\n * Given a function mapping a component to an enhanced component and modifier\n * name, returns the enhanced component augmented with a generated displayName.\n *\n * @param {Function} mapComponentToEnhancedComponent Function mapping component\n * to enhanced component.\n * @param {string} modifierName Seed name from which to\n * generated display name.\n *\n * @return {WPComponent} Component class with generated display name assigned.\n */\n\nfunction createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName) {\n return function (OriginalComponent) {\n var EnhancedComponent = mapComponentToEnhancedComponent(OriginalComponent);\n var _OriginalComponent$di = OriginalComponent.displayName,\n displayName = _OriginalComponent$di === void 0 ? OriginalComponent.name || 'Component' : _OriginalComponent$di;\n EnhancedComponent.displayName = \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"upperFirst\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"camelCase\"])(modifierName)), \"(\").concat(displayName, \")\");\n return EnhancedComponent;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createHigherOrderComponent);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/build-module/if-condition/index.js": +/*!****************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/build-module/if-condition/index.js ***! + \****************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"./node_modules/@wordpress/element/build-module/index.js\");\n/* harmony import */ var _create_higher_order_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../create-higher-order-component */ \"./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js\");\n\n\n/**\n * Internal dependencies\n */\n\n/**\n * Higher-order component creator, creating a new component which renders if\n * the given condition is satisfied or with the given optional prop name.\n *\n * @param {Function} predicate Function to test condition.\n *\n * @return {Function} Higher-order component.\n */\n\nvar ifCondition = function ifCondition(predicate) {\n return Object(_create_higher_order_component__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (WrappedComponent) {\n return function (props) {\n if (!predicate(props)) {\n return null;\n }\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(WrappedComponent, props);\n };\n }, 'ifCondition');\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ifCondition);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/build-module/if-condition/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/build-module/index.js": +/*!***************************************************************!*\ + !*** ./node_modules/@wordpress/compose/build-module/index.js ***! + \***************************************************************/ +/*! exports provided: createHigherOrderComponent, ifCondition, pure, withGlobalEvents, withInstanceId, withSafeTimeout, withState, compose */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"compose\", function() { return lodash__WEBPACK_IMPORTED_MODULE_0__[\"flowRight\"]; });\n\n/* harmony import */ var _create_higher_order_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-higher-order-component */ \"./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createHigherOrderComponent\", function() { return _create_higher_order_component__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _if_condition__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./if-condition */ \"./node_modules/@wordpress/compose/build-module/if-condition/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ifCondition\", function() { return _if_condition__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _pure__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pure */ \"./node_modules/@wordpress/compose/build-module/pure/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pure\", function() { return _pure__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _with_global_events__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./with-global-events */ \"./node_modules/@wordpress/compose/build-module/with-global-events/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withGlobalEvents\", function() { return _with_global_events__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _with_instance_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./with-instance-id */ \"./node_modules/@wordpress/compose/build-module/with-instance-id/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withInstanceId\", function() { return _with_instance_id__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _with_safe_timeout__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./with-safe-timeout */ \"./node_modules/@wordpress/compose/build-module/with-safe-timeout/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withSafeTimeout\", function() { return _with_safe_timeout__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _with_state__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./with-state */ \"./node_modules/@wordpress/compose/build-module/with-state/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withState\", function() { return _with_state__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/**\n * External dependencies\n */\n\n\n\n\n\n\n\n\n/**\n * Composes multiple higher-order components into a single higher-order component. Performs right-to-left function\n * composition, where each successive invocation is supplied the return value of the previous.\n *\n * @param {...Function} hocs The HOC functions to invoke.\n *\n * @return {Function} Returns the new composite function.\n */\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/build-module/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/build-module/pure/index.js": +/*!********************************************************************!*\ + !*** ./node_modules/@wordpress/compose/build-module/pure/index.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/inherits.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ \"./node_modules/@wordpress/element/build-module/index.js\");\n/* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/is-shallow-equal */ \"./node_modules/@wordpress/is-shallow-equal/index.js\");\n/* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _create_higher_order_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../create-higher-order-component */ \"./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js\");\n\n\n\n\n\n\n\n/**\n * WordPress dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * Given a component returns the enhanced component augmented with a component\n * only rerendering when its props/state change\n *\n * @param {Function} mapComponentToEnhancedComponent Function mapping component\n * to enhanced component.\n * @param {string} modifierName Seed name from which to\n * generated display name.\n *\n * @return {WPComponent} Component class with generated display name assigned.\n */\n\nvar pure = Object(_create_higher_order_component__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function (Wrapped) {\n if (Wrapped.prototype instanceof _wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"Component\"]) {\n return (\n /*#__PURE__*/\n function (_Wrapped) {\n Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_class, _Wrapped);\n\n function _class() {\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, _class);\n\n return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_class).apply(this, arguments));\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_class, [{\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps, nextState) {\n return !_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_6___default()(nextProps, this.props) || !_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_6___default()(nextState, this.state);\n }\n }]);\n\n return _class;\n }(Wrapped)\n );\n }\n\n return (\n /*#__PURE__*/\n function (_Component) {\n Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_class2, _Component);\n\n function _class2() {\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, _class2);\n\n return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_class2).apply(this, arguments));\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_class2, [{\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps) {\n return !_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_6___default()(nextProps, this.props);\n }\n }, {\n key: \"render\",\n value: function render() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"])(Wrapped, this.props);\n }\n }]);\n\n return _class2;\n }(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"Component\"])\n );\n}, 'pure');\n/* harmony default export */ __webpack_exports__[\"default\"] = (pure);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/build-module/pure/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/build-module/with-global-events/index.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/build-module/with-global-events/index.js ***! + \**********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"./node_modules/@wordpress/element/build-module/index.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _create_higher_order_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../create-higher-order-component */ \"./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js\");\n/* harmony import */ var _listener__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./listener */ \"./node_modules/@wordpress/compose/build-module/with-global-events/listener.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n\n/**\n * Listener instance responsible for managing document event handling.\n *\n * @type {Listener}\n */\n\nvar listener = new _listener__WEBPACK_IMPORTED_MODULE_10__[\"default\"]();\n\nfunction withGlobalEvents(eventTypesToHandlers) {\n return Object(_create_higher_order_component__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(function (WrappedComponent) {\n var Wrapper =\n /*#__PURE__*/\n function (_Component) {\n Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(Wrapper, _Component);\n\n function Wrapper() {\n var _this;\n\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, Wrapper);\n\n _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(Wrapper).apply(this, arguments));\n _this.handleEvent = _this.handleEvent.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_this)));\n _this.handleRef = _this.handleRef.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_this)));\n return _this;\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Wrapper, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n Object(lodash__WEBPACK_IMPORTED_MODULE_8__[\"forEach\"])(eventTypesToHandlers, function (handler, eventType) {\n listener.add(eventType, _this2);\n });\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var _this3 = this;\n\n Object(lodash__WEBPACK_IMPORTED_MODULE_8__[\"forEach\"])(eventTypesToHandlers, function (handler, eventType) {\n listener.remove(eventType, _this3);\n });\n }\n }, {\n key: \"handleEvent\",\n value: function handleEvent(event) {\n var handler = eventTypesToHandlers[event.type];\n\n if (typeof this.wrappedRef[handler] === 'function') {\n this.wrappedRef[handler](event);\n }\n }\n }, {\n key: \"handleRef\",\n value: function handleRef(el) {\n this.wrappedRef = el; // Any component using `withGlobalEvents` that is not setting a `ref`\n // will cause `this.props.forwardedRef` to be `null`, so we need this\n // check.\n\n if (this.props.forwardedRef) {\n this.props.forwardedRef(el);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"])(WrappedComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, this.props.ownProps, {\n ref: this.handleRef\n }));\n }\n }]);\n\n return Wrapper;\n }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"]);\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"forwardRef\"])(function (props, ref) {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"])(Wrapper, {\n ownProps: props,\n forwardedRef: ref\n });\n });\n }, 'withGlobalEvents');\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (withGlobalEvents);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/build-module/with-global-events/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/build-module/with-global-events/listener.js": +/*!*************************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/build-module/with-global-events/listener.js ***! + \*************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n/**\n * External dependencies\n */\n\n/**\n * Class responsible for orchestrating event handling on the global window,\n * binding a single event to be shared across all handling instances, and\n * removing the handler when no instances are listening for the event.\n */\n\nvar Listener =\n/*#__PURE__*/\nfunction () {\n function Listener() {\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, Listener);\n\n this.listeners = {};\n this.handleEvent = this.handleEvent.bind(this);\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Listener, [{\n key: \"add\",\n value: function add(eventType, instance) {\n if (!this.listeners[eventType]) {\n // Adding first listener for this type, so bind event.\n window.addEventListener(eventType, this.handleEvent);\n this.listeners[eventType] = [];\n }\n\n this.listeners[eventType].push(instance);\n }\n }, {\n key: \"remove\",\n value: function remove(eventType, instance) {\n this.listeners[eventType] = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"without\"])(this.listeners[eventType], instance);\n\n if (!this.listeners[eventType].length) {\n // Removing last listener for this type, so unbind event.\n window.removeEventListener(eventType, this.handleEvent);\n delete this.listeners[eventType];\n }\n }\n }, {\n key: \"handleEvent\",\n value: function handleEvent(event) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"forEach\"])(this.listeners[event.type], function (instance) {\n instance.handleEvent(event);\n });\n }\n }]);\n\n return Listener;\n}();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Listener);\n//# sourceMappingURL=listener.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/build-module/with-global-events/listener.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/build-module/with-instance-id/index.js": +/*!********************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/build-module/with-instance-id/index.js ***! + \********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/inherits.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ \"./node_modules/@wordpress/element/build-module/index.js\");\n/* harmony import */ var _create_higher_order_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../create-higher-order-component */ \"./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js\");\n\n\n\n\n\n\n\n\n/**\n * WordPress dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * A Higher Order Component used to be provide a unique instance ID by\n * component.\n *\n * @param {WPElement} WrappedComponent The wrapped component.\n *\n * @return {Component} Component with an instanceId prop.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_create_higher_order_component__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function (WrappedComponent) {\n var instances = 0;\n return (\n /*#__PURE__*/\n function (_Component) {\n Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_class, _Component);\n\n function _class() {\n var _this;\n\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, _class);\n\n _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_class).apply(this, arguments));\n _this.instanceId = instances++;\n return _this;\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_class, [{\n key: \"render\",\n value: function render() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__[\"createElement\"])(WrappedComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, this.props, {\n instanceId: this.instanceId\n }));\n }\n }]);\n\n return _class;\n }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__[\"Component\"])\n );\n}, 'withInstanceId'));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/build-module/with-instance-id/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/build-module/with-safe-timeout/index.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/build-module/with-safe-timeout/index.js ***! + \*********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"./node_modules/@wordpress/element/build-module/index.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _create_higher_order_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../create-higher-order-component */ \"./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * A higher-order component used to provide and manage delayed function calls\n * that ought to be bound to a component's lifecycle.\n *\n * @param {Component} OriginalComponent Component requiring setTimeout\n *\n * @return {Component} Wrapped component.\n */\n\nvar withSafeTimeout = Object(_create_higher_order_component__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(function (OriginalComponent) {\n return (\n /*#__PURE__*/\n function (_Component) {\n Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(WrappedComponent, _Component);\n\n function WrappedComponent() {\n var _this;\n\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, WrappedComponent);\n\n _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(WrappedComponent).apply(this, arguments));\n _this.timeouts = [];\n _this.setTimeout = _this.setTimeout.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_this)));\n _this.clearTimeout = _this.clearTimeout.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_this)));\n return _this;\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(WrappedComponent, [{\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.timeouts.forEach(clearTimeout);\n }\n }, {\n key: \"setTimeout\",\n value: function (_setTimeout) {\n function setTimeout(_x, _x2) {\n return _setTimeout.apply(this, arguments);\n }\n\n setTimeout.toString = function () {\n return _setTimeout.toString();\n };\n\n return setTimeout;\n }(function (fn, delay) {\n var _this2 = this;\n\n var id = setTimeout(function () {\n fn();\n\n _this2.clearTimeout(id);\n }, delay);\n this.timeouts.push(id);\n return id;\n })\n }, {\n key: \"clearTimeout\",\n value: function (_clearTimeout) {\n function clearTimeout(_x3) {\n return _clearTimeout.apply(this, arguments);\n }\n\n clearTimeout.toString = function () {\n return _clearTimeout.toString();\n };\n\n return clearTimeout;\n }(function (id) {\n clearTimeout(id);\n this.timeouts = Object(lodash__WEBPACK_IMPORTED_MODULE_8__[\"without\"])(this.timeouts, id);\n })\n }, {\n key: \"render\",\n value: function render() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"])(OriginalComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, this.props, {\n setTimeout: this.setTimeout,\n clearTimeout: this.clearTimeout\n }));\n }\n }]);\n\n return WrappedComponent;\n }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"])\n );\n}, 'withSafeTimeout');\n/* harmony default export */ __webpack_exports__[\"default\"] = (withSafeTimeout);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/build-module/with-safe-timeout/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/build-module/with-state/index.js": +/*!**************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/build-module/with-state/index.js ***! + \**************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return withState; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"./node_modules/@wordpress/element/build-module/index.js\");\n/* harmony import */ var _create_higher_order_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../create-higher-order-component */ \"./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * WordPress dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * A Higher Order Component used to provide and manage internal component state\n * via props.\n *\n * @param {?Object} initialState Optional initial state of the component.\n *\n * @return {Component} Wrapped component.\n */\n\nfunction withState() {\n var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return Object(_create_higher_order_component__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function (OriginalComponent) {\n return (\n /*#__PURE__*/\n function (_Component) {\n Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(WrappedComponent, _Component);\n\n function WrappedComponent() {\n var _this;\n\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, WrappedComponent);\n\n _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(WrappedComponent).apply(this, arguments));\n _this.setState = _this.setState.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_this)));\n _this.state = initialState;\n return _this;\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(WrappedComponent, [{\n key: \"render\",\n value: function render() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"])(OriginalComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, this.props, this.state, {\n setState: this.setState\n }));\n }\n }]);\n\n return WrappedComponent;\n }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"])\n );\n }, 'withState');\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/build-module/with-state/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js": +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***! + \**********************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _assertThisInitialized; });\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/classCallCheck.js": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***! + \***************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _classCallCheck; });\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/classCallCheck.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/createClass.js": +/*!************************************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/createClass.js ***! + \************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _createClass; });\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/createClass.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/extends.js": +/*!********************************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/extends.js ***! + \********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _extends; });\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/extends.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***! + \***************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _getPrototypeOf; });\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/inherits.js": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/inherits.js ***! + \*********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _inherits; });\n/* harmony import */ var _setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object(_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(subClass, superClass);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/inherits.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js": +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***! + \**************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _possibleConstructorReturn; });\n/* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers/esm/typeof */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized */ \"./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(self);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***! + \***************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _setPrototypeOf; });\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/typeof.js": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/typeof.js ***! + \*******************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _typeof; });\nfunction _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/compose/node_modules/@babel/runtime/helpers/esm/typeof.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/components/registry-provider/index.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/components/registry-provider/index.js ***! + \*****************************************************************************************/ +/*! exports provided: RegistryConsumer, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RegistryConsumer\", function() { return RegistryConsumer; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"./node_modules/@wordpress/element/build-module/index.js\");\n/* harmony import */ var _default_registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../default-registry */ \"./node_modules/@wordpress/data/build-module/default-registry.js\");\n/**\n * WordPress dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n\nvar _createContext = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"])(_default_registry__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n Consumer = _createContext.Consumer,\n Provider = _createContext.Provider;\n\nvar RegistryConsumer = Consumer;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Provider);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/components/registry-provider/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/components/with-dispatch/index.js": +/*!*************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/components/with-dispatch/index.js ***! + \*************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/inherits.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ \"./node_modules/@wordpress/element/build-module/index.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/compose */ \"./node_modules/@wordpress/compose/build-module/index.js\");\n/* harmony import */ var _registry_provider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../registry-provider */ \"./node_modules/@wordpress/data/build-module/components/registry-provider/index.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * Higher-order component used to add dispatch props using registered action\n * creators.\n *\n * @param {Object} mapDispatchToProps Object of prop names where value is a\n * dispatch-bound action creator, or a\n * function to be called with with the\n * component's props and returning an\n * action creator.\n *\n * @return {Component} Enhanced component with merged dispatcher props.\n */\n\nvar withDispatch = function withDispatch(mapDispatchToProps) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_8__[\"createHigherOrderComponent\"])(function (WrappedComponent) {\n var ComponentWithDispatch =\n /*#__PURE__*/\n function (_Component) {\n Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(ComponentWithDispatch, _Component);\n\n function ComponentWithDispatch(props) {\n var _this;\n\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, ComponentWithDispatch);\n\n _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(ComponentWithDispatch).apply(this, arguments));\n _this.proxyProps = {};\n\n _this.setProxyProps(props);\n\n return _this;\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(ComponentWithDispatch, [{\n key: \"proxyDispatch\",\n value: function proxyDispatch(propName) {\n var _mapDispatchToProps;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n // Original dispatcher is a pre-bound (dispatching) action creator.\n (_mapDispatchToProps = mapDispatchToProps(this.props.registry.dispatch, this.props.ownProps))[propName].apply(_mapDispatchToProps, args);\n }\n }, {\n key: \"setProxyProps\",\n value: function setProxyProps(props) {\n var _this2 = this;\n\n // Assign as instance property so that in subsequent render\n // reconciliation, the prop values are referentially equal.\n // Importantly, note that while `mapDispatchToProps` is\n // called, it is done only to determine the keys for which\n // proxy functions should be created. The actual registry\n // dispatch does not occur until the function is called.\n var propsToDispatchers = mapDispatchToProps(this.props.registry.dispatch, props.ownProps);\n this.proxyProps = Object(lodash__WEBPACK_IMPORTED_MODULE_7__[\"mapValues\"])(propsToDispatchers, function (dispatcher, propName) {\n // Prebind with prop name so we have reference to the original\n // dispatcher to invoke. Track between re-renders to avoid\n // creating new function references every render.\n if (_this2.proxyProps.hasOwnProperty(propName)) {\n return _this2.proxyProps[propName];\n }\n\n return _this2.proxyDispatch.bind(_this2, propName);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__[\"createElement\"])(WrappedComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, this.props.ownProps, this.proxyProps));\n }\n }]);\n\n return ComponentWithDispatch;\n }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__[\"Component\"]);\n\n return function (ownProps) {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__[\"createElement\"])(_registry_provider__WEBPACK_IMPORTED_MODULE_9__[\"RegistryConsumer\"], null, function (registry) {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__[\"createElement\"])(ComponentWithDispatch, {\n ownProps: ownProps,\n registry: registry\n });\n });\n };\n }, 'withDispatch');\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (withDispatch);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/components/with-dispatch/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/components/with-select/index.js": +/*!***********************************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/components/with-select/index.js ***! + \***********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"./node_modules/@wordpress/element/build-module/index.js\");\n/* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/is-shallow-equal */ \"./node_modules/@wordpress/is-shallow-equal/index.js\");\n/* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/compose */ \"./node_modules/@wordpress/compose/build-module/index.js\");\n/* harmony import */ var _registry_provider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../registry-provider */ \"./node_modules/@wordpress/data/build-module/components/registry-provider/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * Higher-order component used to inject state-derived props using registered\n * selectors.\n *\n * @param {Function} mapSelectToProps Function called on every state change,\n * expected to return object of props to\n * merge with the component's own props.\n *\n * @return {Component} Enhanced component with merged state data props.\n */\n\nvar withSelect = function withSelect(mapSelectToProps) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__[\"createHigherOrderComponent\"])(function (WrappedComponent) {\n /**\n * Default merge props. A constant value is used as the fallback since it\n * can be more efficiently shallow compared in case component is repeatedly\n \t * rendered without its own merge props.\n *\n * @type {Object}\n */\n var DEFAULT_MERGE_PROPS = {};\n /**\n * Given a props object, returns the next merge props by mapSelectToProps.\n *\n * @param {Object} props Props to pass as argument to mapSelectToProps.\n *\n * @return {Object} Props to merge into rendered wrapped element.\n */\n\n function getNextMergeProps(props) {\n return mapSelectToProps(props.registry.select, props.ownProps) || DEFAULT_MERGE_PROPS;\n }\n\n var ComponentWithSelect =\n /*#__PURE__*/\n function (_Component) {\n Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(ComponentWithSelect, _Component);\n\n function ComponentWithSelect(props) {\n var _this;\n\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, ComponentWithSelect);\n\n _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(ComponentWithSelect).call(this, props));\n _this.onStoreChange = _this.onStoreChange.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_this)));\n\n _this.subscribe(props.registry);\n\n _this.mergeProps = getNextMergeProps(props);\n return _this;\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(ComponentWithSelect, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.canRunSelection = true; // A state change may have occurred between the constructor and\n // mount of the component (e.g. during the wrapped component's own\n // constructor), in which case selection should be rerun.\n\n if (this.hasQueuedSelection) {\n this.hasQueuedSelection = false;\n this.onStoreChange();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.canRunSelection = false;\n this.unsubscribe();\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps, nextState) {\n // Cycle subscription if registry changes.\n var hasRegistryChanged = nextProps.registry !== this.props.registry;\n\n if (hasRegistryChanged) {\n this.unsubscribe();\n this.subscribe(nextProps.registry);\n } // Treat a registry change as equivalent to `ownProps`, to reflect\n // `mergeProps` to rendered component if and only if updated.\n\n\n var hasPropsChanged = hasRegistryChanged || !_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_8___default()(this.props.ownProps, nextProps.ownProps); // Only render if props have changed or merge props have been updated\n // from the store subscriber.\n\n if (this.state === nextState && !hasPropsChanged) {\n return false;\n }\n\n if (hasPropsChanged) {\n var nextMergeProps = getNextMergeProps(nextProps);\n\n if (!_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_8___default()(this.mergeProps, nextMergeProps)) {\n // If merge props change as a result of the incoming props,\n // they should be reflected as such in the upcoming render.\n // While side effects are discouraged in lifecycle methods,\n // this component is used heavily, and prior efforts to use\n // `getDerivedStateFromProps` had demonstrated miserable\n // performance.\n this.mergeProps = nextMergeProps;\n } // Regardless whether merge props are changing, fall through to\n // incur the render since the component will need to receive\n // the changed `ownProps`.\n\n }\n\n return true;\n }\n }, {\n key: \"onStoreChange\",\n value: function onStoreChange() {\n if (!this.canRunSelection) {\n this.hasQueuedSelection = true;\n return;\n }\n\n var nextMergeProps = getNextMergeProps(this.props);\n\n if (_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_8___default()(this.mergeProps, nextMergeProps)) {\n return;\n }\n\n this.mergeProps = nextMergeProps; // Schedule an update. Merge props are not assigned to state since\n // derivation of merge props from incoming props occurs within\n // shouldComponentUpdate, where setState is not allowed. setState\n // is used here instead of forceUpdate because forceUpdate bypasses\n // shouldComponentUpdate altogether, which isn't desireable if both\n // state and props change within the same render. Unfortunately,\n // this requires that next merge props are generated twice.\n\n this.setState({});\n }\n }, {\n key: \"subscribe\",\n value: function subscribe(registry) {\n this.unsubscribe = registry.subscribe(this.onStoreChange);\n }\n }, {\n key: \"render\",\n value: function render() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"])(WrappedComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, this.props.ownProps, this.mergeProps));\n }\n }]);\n\n return ComponentWithSelect;\n }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"]);\n\n return function (ownProps) {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"])(_registry_provider__WEBPACK_IMPORTED_MODULE_10__[\"RegistryConsumer\"], null, function (registry) {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"])(ComponentWithSelect, {\n ownProps: ownProps,\n registry: registry\n });\n });\n };\n }, 'withSelect');\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (withSelect);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/components/with-select/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/default-registry.js": +/*!***********************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/default-registry.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./registry */ \"./node_modules/@wordpress/data/build-module/registry.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_registry__WEBPACK_IMPORTED_MODULE_0__[\"createRegistry\"])());\n//# sourceMappingURL=default-registry.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/default-registry.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/index.js": +/*!************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/index.js ***! + \************************************************************/ +/*! exports provided: withSelect, withDispatch, RegistryProvider, RegistryConsumer, createRegistry, plugins, combineReducers, select, dispatch, subscribe, registerGenericStore, registerStore, use */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"select\", function() { return select; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dispatch\", function() { return dispatch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"subscribe\", function() { return subscribe; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerGenericStore\", function() { return registerGenericStore; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerStore\", function() { return registerStore; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"use\", function() { return use; });\n/* harmony import */ var turbo_combine_reducers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! turbo-combine-reducers */ \"./node_modules/turbo-combine-reducers/index.js\");\n/* harmony import */ var turbo_combine_reducers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(turbo_combine_reducers__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, \"combineReducers\", function() { return turbo_combine_reducers__WEBPACK_IMPORTED_MODULE_0___default.a; });\n/* harmony import */ var _default_registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./default-registry */ \"./node_modules/@wordpress/data/build-module/default-registry.js\");\n/* harmony import */ var _plugins__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./plugins */ \"./node_modules/@wordpress/data/build-module/plugins/index.js\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"plugins\", function() { return _plugins__WEBPACK_IMPORTED_MODULE_2__; });\n/* harmony import */ var _components_with_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/with-select */ \"./node_modules/@wordpress/data/build-module/components/with-select/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withSelect\", function() { return _components_with_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _components_with_dispatch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/with-dispatch */ \"./node_modules/@wordpress/data/build-module/components/with-dispatch/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withDispatch\", function() { return _components_with_dispatch__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _components_registry_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/registry-provider */ \"./node_modules/@wordpress/data/build-module/components/registry-provider/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"RegistryProvider\", function() { return _components_registry_provider__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"RegistryConsumer\", function() { return _components_registry_provider__WEBPACK_IMPORTED_MODULE_5__[\"RegistryConsumer\"]; });\n\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./registry */ \"./node_modules/@wordpress/data/build-module/registry.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createRegistry\", function() { return _registry__WEBPACK_IMPORTED_MODULE_6__[\"createRegistry\"]; });\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\n\n\n/**\n * The combineReducers helper function turns an object whose values are different\n * reducing functions into a single reducing function you can pass to registerReducer.\n *\n * @param {Object} reducers An object whose values correspond to different reducing\n * functions that need to be combined into one.\n *\n * @return {Function} A reducer that invokes every reducer inside the reducers\n * object, and constructs a state object with the same shape.\n */\n\n\nvar select = _default_registry__WEBPACK_IMPORTED_MODULE_1__[\"default\"].select;\nvar dispatch = _default_registry__WEBPACK_IMPORTED_MODULE_1__[\"default\"].dispatch;\nvar subscribe = _default_registry__WEBPACK_IMPORTED_MODULE_1__[\"default\"].subscribe;\nvar registerGenericStore = _default_registry__WEBPACK_IMPORTED_MODULE_1__[\"default\"].registerGenericStore;\nvar registerStore = _default_registry__WEBPACK_IMPORTED_MODULE_1__[\"default\"].registerStore;\nvar use = _default_registry__WEBPACK_IMPORTED_MODULE_1__[\"default\"].use;\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/namespace-store.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/namespace-store.js ***! + \**********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createNamespace; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/asyncToGenerator */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! redux */ \"./node_modules/redux/es/redux.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _promise_middleware__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./promise-middleware */ \"./node_modules/@wordpress/data/build-module/promise-middleware.js\");\n/* harmony import */ var _resolvers_cache_middleware__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./resolvers-cache-middleware */ \"./node_modules/@wordpress/data/build-module/resolvers-cache-middleware.js\");\n\n\n\n/**\n * External dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n\n/**\n * Creates a namespace object with a store derived from the reducer given.\n *\n * @param {string} key Identifying string used for namespace and redex dev tools.\n * @param {Object} options Contains reducer, actions, selectors, and resolvers.\n * @param {Object} registry Temporary registry reference, required for namespace updates.\n *\n * @return {Object} Store Object.\n */\n\nfunction createNamespace(key, options, registry) {\n var reducer = options.reducer;\n var store = createReduxStore(reducer, key, registry);\n var selectors, actions, resolvers;\n\n if (options.actions) {\n actions = mapActions(options.actions, store);\n }\n\n if (options.selectors) {\n selectors = mapSelectors(options.selectors, store);\n }\n\n if (options.resolvers) {\n var fulfillment = getCoreDataFulfillment(registry, key);\n var result = mapResolvers(options.resolvers, selectors, fulfillment, store);\n resolvers = result.resolvers;\n selectors = result.selectors;\n }\n\n var getSelectors = function getSelectors() {\n return selectors;\n };\n\n var getActions = function getActions() {\n return actions;\n }; // Customize subscribe behavior to call listeners only on effective change,\n // not on every dispatch.\n\n\n var subscribe = store && function (listener) {\n var lastState = store.getState();\n store.subscribe(function () {\n var state = store.getState();\n var hasChanged = state !== lastState;\n lastState = state;\n\n if (hasChanged) {\n listener();\n }\n });\n }; // This can be simplified to just { subscribe, getSelectors, getActions }\n // Once we remove the use function.\n\n\n return {\n reducer: reducer,\n store: store,\n actions: actions,\n selectors: selectors,\n resolvers: resolvers,\n getSelectors: getSelectors,\n getActions: getActions,\n subscribe: subscribe\n };\n}\n/**\n * Creates a redux store for a namespace.\n *\n * @param {Function} reducer Root reducer for redux store.\n * @param {string} key Part of the state shape to register the\n * selectors for.\n * @param {Object} registry Registry reference, for resolver enhancer support.\n * @return {Object} Newly created redux store.\n */\n\nfunction createReduxStore(reducer, key, registry) {\n var enhancers = [Object(redux__WEBPACK_IMPORTED_MODULE_2__[\"applyMiddleware\"])(Object(_resolvers_cache_middleware__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(registry, key), _promise_middleware__WEBPACK_IMPORTED_MODULE_4__[\"default\"])];\n\n if (typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__) {\n enhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__({\n name: key,\n instanceId: key\n }));\n }\n\n return Object(redux__WEBPACK_IMPORTED_MODULE_2__[\"createStore\"])(reducer, Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"flowRight\"])(enhancers));\n}\n/**\n * Maps selectors to a redux store.\n *\n * @param {Object} selectors Selectors to register. Keys will be used as the\n * public facing API. Selectors will get passed the\n * state as first argument.\n * @param {Object} store The redux store to which the selectors should be mapped.\n * @return {Object} Selectors mapped to the redux store provided.\n */\n\n\nfunction mapSelectors(selectors, store) {\n var createStateSelector = function createStateSelector(selector) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return selector.apply(void 0, [store.getState()].concat(args));\n };\n };\n\n return Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"mapValues\"])(selectors, createStateSelector);\n}\n/**\n * Maps actions to dispatch from a given store.\n *\n * @param {Object} actions Actions to register.\n * @param {Object} store The redux store to which the actions should be mapped.\n * @return {Object} Actions mapped to the redux store provided.\n */\n\n\nfunction mapActions(actions, store) {\n var createBoundAction = function createBoundAction(action) {\n return function () {\n return store.dispatch(action.apply(void 0, arguments));\n };\n };\n\n return Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"mapValues\"])(actions, createBoundAction);\n}\n/**\n * Returns resolvers with matched selectors for a given namespace.\n * Resolvers are side effects invoked once per argument set of a given selector call,\n * used in ensuring that the data needs for the selector are satisfied.\n *\n * @param {Object} resolvers Resolvers to register.\n * @param {Object} selectors The current selectors to be modified.\n * @param {Object} fulfillment Fulfillment implementation functions.\n * @param {Object} store The redux store to which the resolvers should be mapped.\n * @return {Object} An object containing updated selectors and resolvers.\n */\n\n\nfunction mapResolvers(resolvers, selectors, fulfillment, store) {\n var mapSelector = function mapSelector(selector, selectorName) {\n var resolver = resolvers[selectorName];\n\n if (!resolver) {\n return selector;\n }\n\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n function fulfillSelector() {\n return _fulfillSelector.apply(this, arguments);\n }\n\n function _fulfillSelector() {\n _fulfillSelector = Object(_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\n /*#__PURE__*/\n regeneratorRuntime.mark(function _callee() {\n var state;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n state = store.getState();\n\n if (!(typeof resolver.isFulfilled === 'function' && resolver.isFulfilled.apply(resolver, [state].concat(args)))) {\n _context.next = 3;\n break;\n }\n\n return _context.abrupt(\"return\");\n\n case 3:\n if (!fulfillment.hasStarted(selectorName, args)) {\n _context.next = 5;\n break;\n }\n\n return _context.abrupt(\"return\");\n\n case 5:\n fulfillment.start(selectorName, args);\n _context.next = 8;\n return fulfillment.fulfill.apply(fulfillment, [selectorName].concat(args));\n\n case 8:\n fulfillment.finish(selectorName, args);\n\n case 9:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n return _fulfillSelector.apply(this, arguments);\n }\n\n fulfillSelector.apply(void 0, args);\n return selector.apply(void 0, args);\n };\n };\n\n var mappedResolvers = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"mapValues\"])(resolvers, function (resolver) {\n var _resolver$fulfill = resolver.fulfill,\n resolverFulfill = _resolver$fulfill === void 0 ? resolver : _resolver$fulfill;\n return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, resolver, {\n fulfill: resolverFulfill\n });\n });\n return {\n resolvers: mappedResolvers,\n selectors: Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"mapValues\"])(selectors, mapSelector)\n };\n}\n/**\n * Bundles up fulfillment functions for resolvers.\n * @param {Object} registry Registry reference, for fulfilling via resolvers\n * @param {string} key Part of the state shape to register the\n * selectors for.\n * @return {Object} An object providing fulfillment functions.\n */\n\n\nfunction getCoreDataFulfillment(registry, key) {\n var _registry$select = registry.select('core/data'),\n hasStartedResolution = _registry$select.hasStartedResolution;\n\n var _registry$dispatch = registry.dispatch('core/data'),\n startResolution = _registry$dispatch.startResolution,\n finishResolution = _registry$dispatch.finishResolution;\n\n return {\n hasStarted: function hasStarted() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return hasStartedResolution.apply(void 0, [key].concat(args));\n },\n start: function start() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return startResolution.apply(void 0, [key].concat(args));\n },\n finish: function finish() {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n\n return finishResolution.apply(void 0, [key].concat(args));\n },\n fulfill: function fulfill() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n return fulfillWithRegistry.apply(void 0, [registry, key].concat(args));\n }\n };\n}\n/**\n * Calls a resolver given arguments\n *\n * @param {Object} registry Registry reference, for fulfilling via resolvers\n * @param {string} key Part of the state shape to register the\n * selectors for.\n * @param {string} selectorName Selector name to fulfill.\n * @param {Array} args Selector Arguments.\n */\n\n\nfunction fulfillWithRegistry(_x, _x2, _x3) {\n return _fulfillWithRegistry.apply(this, arguments);\n}\n\nfunction _fulfillWithRegistry() {\n _fulfillWithRegistry = Object(_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\n /*#__PURE__*/\n regeneratorRuntime.mark(function _callee2(registry, key, selectorName) {\n var namespace,\n resolver,\n _len7,\n args,\n _key7,\n action,\n _args2 = arguments;\n\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n namespace = registry.stores[key];\n resolver = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"get\"])(namespace, ['resolvers', selectorName]);\n\n if (resolver) {\n _context2.next = 4;\n break;\n }\n\n return _context2.abrupt(\"return\");\n\n case 4:\n for (_len7 = _args2.length, args = new Array(_len7 > 3 ? _len7 - 3 : 0), _key7 = 3; _key7 < _len7; _key7++) {\n args[_key7 - 3] = _args2[_key7];\n }\n\n action = resolver.fulfill.apply(resolver, args);\n\n if (!action) {\n _context2.next = 9;\n break;\n }\n\n _context2.next = 9;\n return namespace.store.dispatch(action);\n\n case 9:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n return _fulfillWithRegistry.apply(this, arguments);\n}\n//# sourceMappingURL=namespace-store.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/namespace-store.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/plugins/controls/index.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/plugins/controls/index.js ***! + \*****************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ \"./node_modules/redux/es/redux.js\");\n/* harmony import */ var _wordpress_redux_routine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/redux-routine */ \"./node_modules/@wordpress/redux-routine/build-module/index.js\");\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (registry) {\n return {\n registerStore: function registerStore(reducerKey, options) {\n var store = registry.registerStore(reducerKey, options);\n\n if (options.controls) {\n var middleware = Object(_wordpress_redux_routine__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(options.controls);\n var enhancer = Object(redux__WEBPACK_IMPORTED_MODULE_0__[\"applyMiddleware\"])(middleware);\n\n var createStore = function createStore() {\n return store;\n };\n\n Object.assign(store, enhancer(createStore)(options.reducer));\n registry.namespaces[reducerKey].supportControls = true;\n }\n\n return store;\n }\n };\n});\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/plugins/controls/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/plugins/index.js": +/*!********************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/plugins/index.js ***! + \********************************************************************/ +/*! exports provided: controls, persistence */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _controls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./controls */ \"./node_modules/@wordpress/data/build-module/plugins/controls/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"controls\", function() { return _controls__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _persistence__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./persistence */ \"./node_modules/@wordpress/data/build-module/plugins/persistence/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"persistence\", function() { return _persistence__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/plugins/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/plugins/persistence/index.js": +/*!********************************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/plugins/persistence/index.js ***! + \********************************************************************************/ +/*! exports provided: withInitialState, createPersistenceInterface, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withInitialState\", function() { return withInitialState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createPersistenceInterface\", function() { return createPersistenceInterface; });\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/objectSpread.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _storage_default__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./storage/default */ \"./node_modules/@wordpress/data/build-module/plugins/persistence/storage/default.js\");\n\n\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * Persistence plugin options.\n *\n * @property {Storage} storage Persistent storage implementation. This must\n * at least implement `getItem` and `setItem` of\n * the Web Storage API.\n * @property {string} storageKey Key on which to set in persistent storage.\n *\n * @typedef {WPDataPersistencePluginOptions}\n */\n\n/**\n * Default plugin storage.\n *\n * @type {Storage}\n */\n\nvar DEFAULT_STORAGE = _storage_default__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n/**\n * Default plugin storage key.\n *\n * @type {string}\n */\n\nvar DEFAULT_STORAGE_KEY = 'WP_DATA';\n/**\n * Higher-order reducer to provides an initial value when state is undefined.\n *\n * @param {Function} reducer Original reducer.\n * @param {*} initialState Value to use as initial state.\n *\n * @return {Function} Enhanced reducer.\n */\n\nfunction withInitialState(reducer, initialState) {\n return function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments.length > 1 ? arguments[1] : undefined;\n return reducer(state, action);\n };\n}\n/**\n * Creates a persistence interface, exposing getter and setter methods (`get`\n * and `set` respectively).\n *\n * @param {WPDataPersistencePluginOptions} options Plugin options.\n *\n * @return {Object} Persistence interface.\n */\n\nfunction createPersistenceInterface(options) {\n var _options$storage = options.storage,\n storage = _options$storage === void 0 ? DEFAULT_STORAGE : _options$storage,\n _options$storageKey = options.storageKey,\n storageKey = _options$storageKey === void 0 ? DEFAULT_STORAGE_KEY : _options$storageKey;\n var data;\n /**\n * Returns the persisted data as an object, defaulting to an empty object.\n *\n * @return {Object} Persisted data.\n */\n\n function get() {\n if (data === undefined) {\n // If unset, getItem is expected to return null. Fall back to\n // empty object.\n var persisted = storage.getItem(storageKey);\n\n if (persisted === null) {\n data = {};\n } else {\n try {\n data = JSON.parse(persisted);\n } catch (error) {\n // Similarly, should any error be thrown during parse of\n // the string (malformed JSON), fall back to empty object.\n data = {};\n }\n }\n }\n\n return data;\n }\n /**\n * Merges an updated reducer state into the persisted data.\n *\n * @param {string} key Key to update.\n * @param {*} value Updated value.\n */\n\n\n function set(key, value) {\n data = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, data, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, key, value));\n storage.setItem(storageKey, JSON.stringify(data));\n }\n\n return {\n get: get,\n set: set\n };\n}\n/**\n * Data plugin to persist store state into a single storage key.\n *\n * @param {WPDataRegistry} registry Data registry.\n * @param {?WPDataPersistencePluginOptions} pluginOptions Plugin options.\n *\n * @return {WPDataPlugin} Data plugin.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (registry, pluginOptions) {\n var persistence = createPersistenceInterface(pluginOptions);\n /**\n * Creates an enhanced store dispatch function, triggering the state of the\n * given reducer key to be persisted when changed.\n *\n * @param {Function} getState Function which returns current state.\n * @param {string} reducerKey Reducer key.\n * @param {?Array} keys Optional subset of keys to save.\n *\n * @return {Function} Enhanced dispatch function.\n */\n\n function createPersistOnChange(getState, reducerKey, keys) {\n var lastState = getState();\n return function (result) {\n var state = getState();\n\n if (state !== lastState) {\n if (Array.isArray(keys)) {\n state = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"pick\"])(state, keys);\n }\n\n persistence.set(reducerKey, state);\n lastState = state;\n }\n\n return result;\n };\n }\n\n return {\n registerStore: function registerStore(reducerKey, options) {\n if (!options.persist) {\n return registry.registerStore(reducerKey, options);\n }\n\n var initialState = persistence.get()[reducerKey];\n options = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, options, {\n reducer: withInitialState(options.reducer, initialState)\n });\n var store = registry.registerStore(reducerKey, options);\n store.dispatch = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"flow\"])([store.dispatch, createPersistOnChange(store.getState, reducerKey, options.persist)]);\n return store;\n }\n };\n});\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/plugins/persistence/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/plugins/persistence/storage/default.js": +/*!******************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/plugins/persistence/storage/default.js ***! + \******************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./object */ \"./node_modules/@wordpress/data/build-module/plugins/persistence/storage/object.js\");\n/**\n * Internal dependencies\n */\n\nvar storage;\n\ntry {\n // Private Browsing in Safari 10 and earlier will throw an error when\n // attempting to set into localStorage. The test here is intentional in\n // causing a thrown error as condition for using fallback object storage.\n storage = window.localStorage;\n storage.setItem('__wpDataTestLocalStorage', '');\n storage.removeItem('__wpDataTestLocalStorage');\n} catch (error) {\n storage = _object__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (storage);\n//# sourceMappingURL=default.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/plugins/persistence/storage/default.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/plugins/persistence/storage/object.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/plugins/persistence/storage/object.js ***! + \*****************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nvar objectStorage;\nvar storage = {\n getItem: function getItem(key) {\n if (!objectStorage || !objectStorage[key]) {\n return null;\n }\n\n return objectStorage[key];\n },\n setItem: function setItem(key, value) {\n if (!objectStorage) {\n storage.clear();\n }\n\n objectStorage[key] = String(value);\n },\n clear: function clear() {\n objectStorage = Object.create(null);\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (storage);\n//# sourceMappingURL=object.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/plugins/persistence/storage/object.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/promise-middleware.js": +/*!*************************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/promise-middleware.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var is_promise__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-promise */ \"./node_modules/is-promise/index.js\");\n/* harmony import */ var is_promise__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(is_promise__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies\n */\n\n/**\n * Simplest possible promise redux middleware.\n *\n * @return {function} middleware.\n */\n\nvar promiseMiddleware = function promiseMiddleware() {\n return function (next) {\n return function (action) {\n if (is_promise__WEBPACK_IMPORTED_MODULE_0___default()(action)) {\n return action.then(function (resolvedAction) {\n if (resolvedAction) {\n return next(resolvedAction);\n }\n });\n }\n\n return next(action);\n };\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (promiseMiddleware);\n//# sourceMappingURL=promise-middleware.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/promise-middleware.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/registry.js": +/*!***************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/registry.js ***! + \***************************************************************/ +/*! exports provided: createRegistry */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createRegistry\", function() { return createRegistry; });\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/objectSpread.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _namespace_store_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./namespace-store.js */ \"./node_modules/@wordpress/data/build-module/namespace-store.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./store */ \"./node_modules/@wordpress/data/build-module/store/index.js\");\n\n\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n\n/**\n * An isolated orchestrator of store registrations.\n *\n * @typedef {WPDataRegistry}\n *\n * @property {Function} registerGenericStore\n * @property {Function} registerStore\n * @property {Function} subscribe\n * @property {Function} select\n * @property {Function} dispatch\n */\n\n/**\n * An object of registry function overrides.\n *\n * @typedef {WPDataPlugin}\n */\n\n/**\n * Creates a new store registry, given an optional object of initial store\n * configurations.\n *\n * @param {Object} storeConfigs Initial store configurations.\n *\n * @return {WPDataRegistry} Data registry.\n */\n\nfunction createRegistry() {\n var storeConfigs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var stores = {};\n var listeners = [];\n /**\n * Global listener called for each store's update.\n */\n\n function globalListener() {\n listeners.forEach(function (listener) {\n return listener();\n });\n }\n /**\n * Subscribe to changes to any data.\n *\n * @param {Function} listener Listener function.\n *\n * @return {Function} Unsubscribe function.\n */\n\n\n var subscribe = function subscribe(listener) {\n listeners.push(listener);\n return function () {\n listeners = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"without\"])(listeners, listener);\n };\n };\n /**\n * Calls a selector given the current state and extra arguments.\n *\n * @param {string} reducerKey Part of the state shape to register the\n * selectors for.\n *\n * @return {*} The selector's returned value.\n */\n\n\n function select(reducerKey) {\n var store = stores[reducerKey];\n return store && store.getSelectors();\n }\n /**\n * Returns the available actions for a part of the state.\n *\n * @param {string} reducerKey Part of the state shape to dispatch the\n * action for.\n *\n * @return {*} The action's returned value.\n */\n\n\n function dispatch(reducerKey) {\n var store = stores[reducerKey];\n return store && store.getActions();\n } //\n // Deprecated\n // TODO: Remove this after `use()` is removed.\n //\n\n\n function withPlugins(attributes) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"mapValues\"])(attributes, function (attribute, key) {\n if (typeof attribute !== 'function') {\n return attribute;\n }\n\n return function () {\n return registry[key].apply(null, arguments);\n };\n });\n }\n /**\n * Registers a generic store.\n *\n * @param {string} key Store registry key.\n * @param {Object} config Configuration (getSelectors, getActions, subscribe).\n */\n\n\n function registerGenericStore(key, config) {\n if (typeof config.getSelectors !== 'function') {\n throw new TypeError('config.getSelectors must be a function');\n }\n\n if (typeof config.getActions !== 'function') {\n throw new TypeError('config.getActions must be a function');\n }\n\n if (typeof config.subscribe !== 'function') {\n throw new TypeError('config.subscribe must be a function');\n }\n\n stores[key] = config;\n config.subscribe(globalListener);\n }\n\n var registry = {\n registerGenericStore: registerGenericStore,\n stores: stores,\n namespaces: stores,\n // TODO: Deprecate/remove this.\n subscribe: subscribe,\n select: select,\n dispatch: dispatch,\n use: use\n };\n /**\n * Registers a standard `@wordpress/data` store.\n *\n * @param {string} reducerKey Reducer key.\n * @param {Object} options Store description (reducer, actions, selectors, resolvers).\n *\n * @return {Object} Registered store object.\n */\n\n registry.registerStore = function (reducerKey, options) {\n if (!options.reducer) {\n throw new TypeError('Must specify store reducer');\n }\n\n var namespace = Object(_namespace_store_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(reducerKey, options, registry);\n registerGenericStore(reducerKey, namespace);\n return namespace.store;\n }; //\n // TODO:\n // This function will be deprecated as soon as it is no longer internally referenced.\n //\n\n\n function use(plugin, options) {\n registry = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, registry, plugin(registry, options));\n return registry;\n }\n\n Object.entries(Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n 'core/data': _store__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n }, storeConfigs)).map(function (_ref) {\n var _ref2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref, 2),\n name = _ref2[0],\n config = _ref2[1];\n\n return registry.registerStore(name, config);\n });\n return withPlugins(registry);\n}\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/registry.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/resolvers-cache-middleware.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/resolvers-cache-middleware.js ***! + \*********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n/**\n * External dependencies\n */\n\n/**\n * creates a middleware handling resolvers cache invalidation.\n *\n * @param {Object} registry\n * @param {string} reducerKey\n *\n * @return {function} middleware\n */\n\nvar createResolversCacheMiddleware = function createResolversCacheMiddleware(registry, reducerKey) {\n return function () {\n return function (next) {\n return function (action) {\n var resolvers = registry.select('core/data').getCachedResolvers(reducerKey);\n Object.entries(resolvers).forEach(function (_ref) {\n var _ref2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref, 2),\n selectorName = _ref2[0],\n resolversByArgs = _ref2[1];\n\n var resolver = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(registry.namespaces, [reducerKey, 'resolvers', selectorName]);\n\n if (!resolver || !resolver.shouldInvalidate) {\n return;\n }\n\n resolversByArgs.forEach(function (value, args) {\n // resolversByArgs is the map Map([ args ] => boolean) storing the cache resolution status for a given selector.\n // If the value is false it means this resolver has finished its resolution which means we need to invalidate it,\n // if it's true it means it's inflight and the invalidation is not necessary.\n if (value !== false || !resolver.shouldInvalidate.apply(resolver, [action].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(args)))) {\n return;\n } // Trigger cache invalidation\n\n\n registry.dispatch('core/data').invalidateResolution(reducerKey, selectorName, args);\n });\n });\n next(action);\n };\n };\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createResolversCacheMiddleware);\n//# sourceMappingURL=resolvers-cache-middleware.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/resolvers-cache-middleware.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/store/actions.js": +/*!********************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/store/actions.js ***! + \********************************************************************/ +/*! exports provided: startResolution, finishResolution, invalidateResolution */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startResolution\", function() { return startResolution; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishResolution\", function() { return finishResolution; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"invalidateResolution\", function() { return invalidateResolution; });\n/**\n * Returns an action object used in signalling that selector resolution has\n * started.\n *\n * @param {string} reducerKey Registered store reducer key.\n * @param {string} selectorName Name of selector for which resolver triggered.\n * @param {...*} args Arguments to associate for uniqueness.\n *\n * @return {Object} Action object.\n */\nfunction startResolution(reducerKey, selectorName, args) {\n return {\n type: 'START_RESOLUTION',\n reducerKey: reducerKey,\n selectorName: selectorName,\n args: args\n };\n}\n/**\n * Returns an action object used in signalling that selector resolution has\n * completed.\n *\n * @param {string} reducerKey Registered store reducer key.\n * @param {string} selectorName Name of selector for which resolver triggered.\n * @param {...*} args Arguments to associate for uniqueness.\n *\n * @return {Object} Action object.\n */\n\nfunction finishResolution(reducerKey, selectorName, args) {\n return {\n type: 'FINISH_RESOLUTION',\n reducerKey: reducerKey,\n selectorName: selectorName,\n args: args\n };\n}\n/**\n * Returns an action object used in signalling that we should invalidate the resolution cache.\n *\n * @param {string} reducerKey Registered store reducer key.\n * @param {string} selectorName Name of selector for which resolver should be invalidated.\n * @param {Array} args Arguments to associate for uniqueness.\n *\n * @return {Object} Action object.\n */\n\nfunction invalidateResolution(reducerKey, selectorName, args) {\n return {\n type: 'INVALIDATE_RESOLUTION',\n reducerKey: reducerKey,\n selectorName: selectorName,\n args: args\n };\n}\n//# sourceMappingURL=actions.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/store/actions.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/store/index.js": +/*!******************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/store/index.js ***! + \******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _reducer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reducer */ \"./node_modules/@wordpress/data/build-module/store/reducer.js\");\n/* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectors */ \"./node_modules/@wordpress/data/build-module/store/selectors.js\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./actions */ \"./node_modules/@wordpress/data/build-module/store/actions.js\");\n/**\n * Internal dependencies\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n reducer: _reducer__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n actions: _actions__WEBPACK_IMPORTED_MODULE_2__,\n selectors: _selectors__WEBPACK_IMPORTED_MODULE_1__\n});\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/store/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/store/reducer.js": +/*!********************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/store/reducer.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var equivalent_key_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! equivalent-key-map */ \"./node_modules/equivalent-key-map/equivalent-key-map.js\");\n/* harmony import */ var equivalent_key_map__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(equivalent_key_map__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ \"./node_modules/@wordpress/data/build-module/store/utils.js\");\n/**\n * External dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * Reducer function returning next state for selector resolution, object form:\n *\n * reducerKey -> selectorName -> EquivalentKeyMap\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @returns {Object} Next state.\n */\n\nvar isResolved = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"flowRight\"])([Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"onSubKey\"])('reducerKey'), Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"onSubKey\"])('selectorName')])(function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new equivalent_key_map__WEBPACK_IMPORTED_MODULE_1___default.a();\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'START_RESOLUTION':\n case 'FINISH_RESOLUTION':\n {\n var isStarting = action.type === 'START_RESOLUTION';\n var nextState = new equivalent_key_map__WEBPACK_IMPORTED_MODULE_1___default.a(state);\n nextState.set(action.args, isStarting);\n return nextState;\n }\n\n case 'INVALIDATE_RESOLUTION':\n {\n var _nextState = new equivalent_key_map__WEBPACK_IMPORTED_MODULE_1___default.a(state);\n\n _nextState.delete(action.args);\n\n return _nextState;\n }\n }\n\n return state;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (isResolved);\n//# sourceMappingURL=reducer.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/store/reducer.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/store/selectors.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/store/selectors.js ***! + \**********************************************************************/ +/*! exports provided: getIsResolving, hasStartedResolution, hasFinishedResolution, isResolving, getCachedResolvers */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getIsResolving\", function() { return getIsResolving; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasStartedResolution\", function() { return hasStartedResolution; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasFinishedResolution\", function() { return hasFinishedResolution; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isResolving\", function() { return isResolving; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCachedResolvers\", function() { return getCachedResolvers; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies\n */\n\n/**\n * Returns the raw `isResolving` value for a given reducer key, selector name,\n * and arguments set. May be undefined if the selector has never been resolved\n * or not resolved for the given set of arguments, otherwise true or false for\n * resolution started and completed respectively.\n *\n * @param {Object} state Data state.\n * @param {string} reducerKey Registered store reducer key.\n * @param {string} selectorName Selector name.\n * @param {Array} args Arguments passed to selector.\n *\n * @return {?boolean} isResolving value.\n */\n\nfunction getIsResolving(state, reducerKey, selectorName, args) {\n var map = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"get\"])(state, [reducerKey, selectorName]);\n\n if (!map) {\n return;\n }\n\n return map.get(args);\n}\n/**\n * Returns true if resolution has already been triggered for a given reducer\n * key, selector name, and arguments set.\n *\n * @param {Object} state Data state.\n * @param {string} reducerKey Registered store reducer key.\n * @param {string} selectorName Selector name.\n * @param {?Array} args Arguments passed to selector (default `[]`).\n *\n * @return {boolean} Whether resolution has been triggered.\n */\n\nfunction hasStartedResolution(state, reducerKey, selectorName) {\n var args = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n return getIsResolving(state, reducerKey, selectorName, args) !== undefined;\n}\n/**\n * Returns true if resolution has completed for a given reducer key, selector\n * name, and arguments set.\n *\n * @param {Object} state Data state.\n * @param {string} reducerKey Registered store reducer key.\n * @param {string} selectorName Selector name.\n * @param {?Array} args Arguments passed to selector.\n *\n * @return {boolean} Whether resolution has completed.\n */\n\nfunction hasFinishedResolution(state, reducerKey, selectorName) {\n var args = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n return getIsResolving(state, reducerKey, selectorName, args) === false;\n}\n/**\n * Returns true if resolution has been triggered but has not yet completed for\n * a given reducer key, selector name, and arguments set.\n *\n * @param {Object} state Data state.\n * @param {string} reducerKey Registered store reducer key.\n * @param {string} selectorName Selector name.\n * @param {?Array} args Arguments passed to selector.\n *\n * @return {boolean} Whether resolution is in progress.\n */\n\nfunction isResolving(state, reducerKey, selectorName) {\n var args = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n return getIsResolving(state, reducerKey, selectorName, args) === true;\n}\n/**\n * Returns the list of the cached resolvers.\n *\n * @param {Object} state Data state.\n * @param {string} reducerKey Registered store reducer key.\n *\n * @return {Object} Resolvers mapped by args and selectorName.\n */\n\nfunction getCachedResolvers(state, reducerKey) {\n return state.hasOwnProperty(reducerKey) ? state[reducerKey] : {};\n}\n//# sourceMappingURL=selectors.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/store/selectors.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/build-module/store/utils.js": +/*!******************************************************************!*\ + !*** ./node_modules/@wordpress/data/build-module/store/utils.js ***! + \******************************************************************/ +/*! exports provided: onSubKey */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"onSubKey\", function() { return onSubKey; });\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/objectSpread.js\");\n\n\n\n/**\n * Higher-order reducer creator which creates a combined reducer object, keyed\n * by a property on the action object.\n *\n * @param {string} actionProperty Action property by which to key object.\n *\n * @return {Function} Higher-order reducer.\n */\nvar onSubKey = function onSubKey(actionProperty) {\n return function (reducer) {\n return function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n // Retrieve subkey from action. Do not track if undefined; useful for cases\n // where reducer is scoped by action shape.\n var key = action[actionProperty];\n\n if (key === undefined) {\n return state;\n } // Avoid updating state if unchanged. Note that this also accounts for a\n // reducer which returns undefined on a key which is not yet tracked.\n\n\n var nextKeyState = reducer(state[key], action);\n\n if (nextKeyState === state[key]) {\n return state;\n }\n\n return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, state, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, key, nextKeyState));\n };\n };\n};\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/build-module/store/utils.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js": +/*!************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***! + \************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _arrayWithHoles; });\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***! + \***************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _arrayWithoutHoles; });\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js": +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***! + \*******************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _assertThisInitialized; });\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js": +/*!**************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***! + \**************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _asyncToGenerator; });\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js": +/*!************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***! + \************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _classCallCheck; });\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/createClass.js": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/createClass.js ***! + \*********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _createClass; });\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/createClass.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/defineProperty.js": +/*!************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! + \************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _defineProperty; });\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/defineProperty.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/extends.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/extends.js ***! + \*****************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _extends; });\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/extends.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js": +/*!************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***! + \************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _getPrototypeOf; });\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/inherits.js": +/*!******************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/inherits.js ***! + \******************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _inherits; });\n/* harmony import */ var _setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object(_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(subClass, superClass);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/inherits.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/iterableToArray.js": +/*!*************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***! + \*************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _iterableToArray; });\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/iterableToArray.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***! + \******************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _iterableToArrayLimit; });\nfunction _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js": +/*!*************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***! + \*************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _nonIterableRest; });\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***! + \***************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _nonIterableSpread; });\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/objectSpread.js": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/objectSpread.js ***! + \**********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _objectSpread; });\n/* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(target, key, source[key]);\n });\n }\n\n return target;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/objectSpread.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js": +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***! + \***********************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _possibleConstructorReturn; });\n/* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers/esm/typeof */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(self);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js": +/*!************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***! + \************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _setPrototypeOf; });\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***! + \***********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _slicedToArray; });\n/* harmony import */ var _arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js\");\n/* harmony import */ var _iterableToArrayLimit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js\");\n/* harmony import */ var _nonIterableRest__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nonIterableRest */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js\");\n\n\n\nfunction _slicedToArray(arr, i) {\n return Object(_arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr) || Object(_iterableToArrayLimit__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arr, i) || Object(_nonIterableRest__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***! + \***************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _toConsumableArray; });\n/* harmony import */ var _arrayWithoutHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js\");\n/* harmony import */ var _iterableToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/iterableToArray.js\");\n/* harmony import */ var _nonIterableSpread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nonIterableSpread */ \"./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js\");\n\n\n\nfunction _toConsumableArray(arr) {\n return Object(_arrayWithoutHoles__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr) || Object(_iterableToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arr) || Object(_nonIterableSpread__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/typeof.js": +/*!****************************************************************************************!*\ + !*** ./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/typeof.js ***! + \****************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _typeof; });\nfunction _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/data/node_modules/@babel/runtime/helpers/esm/typeof.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/element/build-module/index.js": +/*!***************************************************************!*\ + !*** ./node_modules/@wordpress/element/build-module/index.js ***! + \***************************************************************/ +/*! exports provided: renderToString, RawHTML, Children, cloneElement, Component, createContext, createElement, createRef, forwardRef, Fragment, isValidElement, StrictMode, concatChildren, switchChildrenNodeName, createPortal, findDOMNode, render, unmountComponentAtNode, isEmptyElement */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./react */ \"./node_modules/@wordpress/element/build-module/react.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Children\", function() { return _react__WEBPACK_IMPORTED_MODULE_0__[\"Children\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cloneElement\", function() { return _react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Component\", function() { return _react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createContext\", function() { return _react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createElement\", function() { return _react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createRef\", function() { return _react__WEBPACK_IMPORTED_MODULE_0__[\"createRef\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forwardRef\", function() { return _react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Fragment\", function() { return _react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isValidElement\", function() { return _react__WEBPACK_IMPORTED_MODULE_0__[\"isValidElement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StrictMode\", function() { return _react__WEBPACK_IMPORTED_MODULE_0__[\"StrictMode\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"concatChildren\", function() { return _react__WEBPACK_IMPORTED_MODULE_0__[\"concatChildren\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"switchChildrenNodeName\", function() { return _react__WEBPACK_IMPORTED_MODULE_0__[\"switchChildrenNodeName\"]; });\n\n/* harmony import */ var _react_platform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./react-platform */ \"./node_modules/@wordpress/element/build-module/react-platform.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createPortal\", function() { return _react_platform__WEBPACK_IMPORTED_MODULE_1__[\"createPortal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"findDOMNode\", function() { return _react_platform__WEBPACK_IMPORTED_MODULE_1__[\"findDOMNode\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _react_platform__WEBPACK_IMPORTED_MODULE_1__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unmountComponentAtNode\", function() { return _react_platform__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"]; });\n\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ \"./node_modules/@wordpress/element/build-module/utils.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isEmptyElement\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"isEmptyElement\"]; });\n\n/* harmony import */ var _serialize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./serialize */ \"./node_modules/@wordpress/element/build-module/serialize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"renderToString\", function() { return _serialize__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./raw-html */ \"./node_modules/@wordpress/element/build-module/raw-html.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"RawHTML\", function() { return _raw_html__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/element/build-module/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/element/build-module/raw-html.js": +/*!******************************************************************!*\ + !*** ./node_modules/@wordpress/element/build-module/raw-html.js ***! + \******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return RawHTML; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ \"./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./react */ \"./node_modules/@wordpress/element/build-module/react.js\");\n\n\n\n/**\n * External dependencies\n */\n\n/**\n * Component used as equivalent of Fragment with unescaped HTML, in cases where\n * it is desirable to render dangerous HTML without needing a wrapper element.\n * To preserve additional props, a `div` wrapper _will_ be created if any props\n * aside from `children` are passed.\n *\n * @param {string} props.children HTML to render.\n *\n * @return {WPElement} Dangerously-rendering element.\n */\n\nfunction RawHTML(_ref) {\n var children = _ref.children,\n props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref, [\"children\"]);\n\n // The DIV wrapper will be stripped by serializer, unless there are\n // non-children props present.\n return Object(_react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])('div', Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n dangerouslySetInnerHTML: {\n __html: children\n }\n }, props));\n}\n//# sourceMappingURL=raw-html.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/element/build-module/raw-html.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/element/build-module/react-platform.js": +/*!************************************************************************!*\ + !*** ./node_modules/@wordpress/element/build-module/react-platform.js ***! + \************************************************************************/ +/*! exports provided: createPortal, findDOMNode, render, unmountComponentAtNode */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createPortal\", function() { return react_dom__WEBPACK_IMPORTED_MODULE_0__[\"createPortal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"findDOMNode\", function() { return react_dom__WEBPACK_IMPORTED_MODULE_0__[\"findDOMNode\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return react_dom__WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unmountComponentAtNode\", function() { return react_dom__WEBPACK_IMPORTED_MODULE_0__[\"unmountComponentAtNode\"]; });\n\n/**\n * External dependencies\n */\n\n/**\n * Creates a portal into which a component can be rendered.\n *\n * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235\n *\n * @param {Component} component Component\n * @param {Element} target DOM node into which element should be rendered\n */\n\n\n/**\n * Finds the dom node of a React component\n *\n * @param {Component} component component's instance\n * @param {Element} target DOM node into which element should be rendered\n */\n\n\n/**\n * Renders a given element into the target DOM node.\n *\n * @param {WPElement} element Element to render\n * @param {Element} target DOM node into which element should be rendered\n */\n\n\n/**\n * Removes any mounted element from the target DOM node.\n *\n * @param {Element} target DOM node in which element is to be removed\n */\n\n\n//# sourceMappingURL=react-platform.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/element/build-module/react-platform.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/element/build-module/react.js": +/*!***************************************************************!*\ + !*** ./node_modules/@wordpress/element/build-module/react.js ***! + \***************************************************************/ +/*! exports provided: Children, cloneElement, Component, createContext, createElement, createRef, forwardRef, Fragment, isValidElement, StrictMode, concatChildren, switchChildrenNodeName */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"concatChildren\", function() { return concatChildren; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"switchChildrenNodeName\", function() { return switchChildrenNodeName; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ \"./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Children\", function() { return react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cloneElement\", function() { return react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Component\", function() { return react__WEBPACK_IMPORTED_MODULE_2__[\"Component\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createContext\", function() { return react__WEBPACK_IMPORTED_MODULE_2__[\"createContext\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createElement\", function() { return react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createRef\", function() { return react__WEBPACK_IMPORTED_MODULE_2__[\"createRef\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forwardRef\", function() { return react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Fragment\", function() { return react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isValidElement\", function() { return react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StrictMode\", function() { return react__WEBPACK_IMPORTED_MODULE_2__[\"StrictMode\"]; });\n\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n/**\n * External dependencies\n */\n\n\n\n/**\n * Creates a copy of an element with extended props.\n *\n * @param {WPElement} element Element\n * @param {?Object} props Props to apply to cloned element\n *\n * @return {WPElement} Cloned element.\n */\n\n\n/**\n * A base class to create WordPress Components (Refs, state and lifecycle hooks)\n */\n\n\n/**\n * Creates a context object containing two components: a provider and consumer.\n *\n * @param {Object} defaultValue A default data stored in the context.\n *\n * @return {Object} Context object.\n */\n\n\n/**\n * Returns a new element of given type. Type can be either a string tag name or\n * another function which itself returns an element.\n *\n * @param {?(string|Function)} type Tag name or element creator\n * @param {Object} props Element properties, either attribute\n * set to apply to DOM node or values to\n * pass through to element creator\n * @param {...WPElement} children Descendant elements\n *\n * @return {WPElement} Element.\n */\n\n\n/**\n * Returns an object tracking a reference to a rendered element via its\n * `current` property as either a DOMElement or Element, dependent upon the\n * type of element rendered with the ref attribute.\n *\n * @return {Object} Ref object.\n */\n\n\n/**\n * Component enhancer used to enable passing a ref to its wrapped component.\n * Pass a function argument which receives `props` and `ref` as its arguments,\n * returning an element using the forwarded ref. The return value is a new\n * component which forwards its ref.\n *\n * @param {Function} forwarder Function passed `props` and `ref`, expected to\n * return an element.\n *\n * @return {WPComponent} Enhanced component.\n */\n\n\n/**\n * A component which renders its children without any wrapping element.\n */\n\n\n/**\n * Checks if an object is a valid WPElement\n *\n * @param {Object} objectToCheck The object to be checked.\n *\n * @return {boolean} true if objectToTest is a valid WPElement and false otherwise.\n */\n\n\n\n/**\n * Concatenate two or more React children objects.\n *\n * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate.\n *\n * @return {Array} The concatenated value.\n */\n\nfunction concatChildren() {\n for (var _len = arguments.length, childrenArguments = new Array(_len), _key = 0; _key < _len; _key++) {\n childrenArguments[_key] = arguments[_key];\n }\n\n return childrenArguments.reduce(function (memo, children, i) {\n react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].forEach(children, function (child, j) {\n if (child && 'string' !== typeof child) {\n child = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"])(child, {\n key: [i, j].join()\n });\n }\n\n memo.push(child);\n });\n return memo;\n }, []);\n}\n/**\n * Switches the nodeName of all the elements in the children object.\n *\n * @param {?Object} children Children object.\n * @param {string} nodeName Node name.\n *\n * @return {?Object} The updated children object.\n */\n\nfunction switchChildrenNodeName(children, nodeName) {\n return children && react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].map(children, function (elt, index) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"isString\"])(elt)) {\n return Object(react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(nodeName, {\n key: index\n }, elt);\n }\n\n var _elt$props = elt.props,\n childrenProp = _elt$props.children,\n props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_elt$props, [\"children\"]);\n\n return Object(react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(nodeName, Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n key: index\n }, props), childrenProp);\n });\n}\n//# sourceMappingURL=react.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/element/build-module/react.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/element/build-module/serialize.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@wordpress/element/build-module/serialize.js ***! + \*******************************************************************/ +/*! exports provided: hasPrefix, renderElement, renderNativeComponent, renderComponent, renderAttributes, renderStyle, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasPrefix\", function() { return hasPrefix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderElement\", function() { return renderElement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderNativeComponent\", function() { return renderNativeComponent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderComponent\", function() { return renderComponent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderAttributes\", function() { return renderAttributes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderStyle\", function() { return renderStyle; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ \"./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/escape-html */ \"./node_modules/@wordpress/escape-html/build-module/index.js\");\n/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./react */ \"./node_modules/@wordpress/element/build-module/react.js\");\n/* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./raw-html */ \"./node_modules/@wordpress/element/build-module/raw-html.js\");\n\n\n\n\n/**\n * Parts of this source were derived and modified from fast-react-render,\n * released under the MIT license.\n *\n * https://github.com/alt-j/fast-react-render\n *\n * Copyright (c) 2016 Andrey Morozov\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\nvar _createContext = Object(_react__WEBPACK_IMPORTED_MODULE_5__[\"createContext\"])(),\n Provider = _createContext.Provider,\n Consumer = _createContext.Consumer;\n/**\n * Valid attribute types.\n *\n * @type {Set}\n */\n\n\nvar ATTRIBUTES_TYPES = new Set(['string', 'boolean', 'number']);\n/**\n * Element tags which can be self-closing.\n *\n * @type {Set}\n */\n\nvar SELF_CLOSING_TAGS = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']);\n/**\n * Boolean attributes are attributes whose presence as being assigned is\n * meaningful, even if only empty.\n *\n * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes\n * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3\n *\n * Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ]\n * .filter( ( tr ) => tr.lastChild.textContent.indexOf( 'Boolean attribute' ) !== -1 )\n * .reduce( ( result, tr ) => Object.assign( result, {\n * [ tr.firstChild.textContent.trim() ]: true\n * } ), {} ) ).sort();\n *\n * @type {Set}\n */\n\nvar BOOLEAN_ATTRIBUTES = new Set(['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'download', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch']);\n/**\n * Enumerated attributes are attributes which must be of a specific value form.\n * Like boolean attributes, these are meaningful if specified, even if not of a\n * valid enumerated value.\n *\n * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute\n * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3\n *\n * Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ]\n * .filter( ( tr ) => /^(\"(.+?)\";?\\s*)+/.test( tr.lastChild.textContent.trim() ) )\n * .reduce( ( result, tr ) => Object.assign( result, {\n * [ tr.firstChild.textContent.trim() ]: true\n * } ), {} ) ).sort();\n *\n * Some notable omissions:\n *\n * - `alt`: https://blog.whatwg.org/omit-alt\n *\n * @type {Set}\n */\n\nvar ENUMERATED_ATTRIBUTES = new Set(['autocapitalize', 'autocomplete', 'charset', 'contenteditable', 'crossorigin', 'decoding', 'dir', 'draggable', 'enctype', 'formenctype', 'formmethod', 'http-equiv', 'inputmode', 'kind', 'method', 'preload', 'scope', 'shape', 'spellcheck', 'translate', 'type', 'wrap']);\n/**\n * Set of CSS style properties which support assignment of unitless numbers.\n * Used in rendering of style properties, where `px` unit is assumed unless\n * property is included in this set or value is zero.\n *\n * Generated via:\n *\n * Object.entries( document.createElement( 'div' ).style )\n * .filter( ( [ key ] ) => (\n * ! /^(webkit|ms|moz)/.test( key ) &&\n * ( e.style[ key ] = 10 ) &&\n * e.style[ key ] === '10'\n * ) )\n * .map( ( [ key ] ) => key )\n * .sort();\n *\n * @type {Set}\n */\n\nvar CSS_PROPERTIES_SUPPORTS_UNITLESS = new Set(['animation', 'animationIterationCount', 'baselineShift', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'columnCount', 'cx', 'cy', 'fillOpacity', 'flexGrow', 'flexShrink', 'floodOpacity', 'fontWeight', 'gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart', 'lineHeight', 'opacity', 'order', 'orphans', 'r', 'rx', 'ry', 'shapeImageThreshold', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'tabSize', 'widows', 'x', 'y', 'zIndex', 'zoom']);\n/**\n * Returns true if the specified string is prefixed by one of an array of\n * possible prefixes.\n *\n * @param {string} string String to check.\n * @param {string[]} prefixes Possible prefixes.\n *\n * @return {boolean} Whether string has prefix.\n */\n\nfunction hasPrefix(string, prefixes) {\n return prefixes.some(function (prefix) {\n return string.indexOf(prefix) === 0;\n });\n}\n/**\n * Returns true if the given prop name should be ignored in attributes\n * serialization, or false otherwise.\n *\n * @param {string} attribute Attribute to check.\n *\n * @return {boolean} Whether attribute should be ignored.\n */\n\nfunction isInternalAttribute(attribute) {\n return 'key' === attribute || 'children' === attribute;\n}\n/**\n * Returns the normal form of the element's attribute value for HTML.\n *\n * @param {string} attribute Attribute name.\n * @param {*} value Non-normalized attribute value.\n *\n * @return {string} Normalized attribute value.\n */\n\n\nfunction getNormalAttributeValue(attribute, value) {\n switch (attribute) {\n case 'style':\n return renderStyle(value);\n }\n\n return value;\n}\n/**\n * Returns the normal form of the element's attribute name for HTML.\n *\n * @param {string} attribute Non-normalized attribute name.\n *\n * @return {string} Normalized attribute name.\n */\n\n\nfunction getNormalAttributeName(attribute) {\n switch (attribute) {\n case 'htmlFor':\n return 'for';\n\n case 'className':\n return 'class';\n }\n\n return attribute.toLowerCase();\n}\n/**\n * Returns the normal form of the style property name for HTML.\n *\n * - Converts property names to kebab-case, e.g. 'backgroundColor' → 'background-color'\n * - Leaves custom attributes alone, e.g. '--myBackgroundColor' → '--myBackgroundColor'\n * - Converts vendor-prefixed property names to -kebab-case, e.g. 'MozTransform' → '-moz-transform'\n *\n * @param {string} property Property name.\n *\n * @return {string} Normalized property name.\n */\n\n\nfunction getNormalStylePropertyName(property) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"startsWith\"])(property, '--')) {\n return property;\n }\n\n if (hasPrefix(property, ['ms', 'O', 'Moz', 'Webkit'])) {\n return '-' + Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"kebabCase\"])(property);\n }\n\n return Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"kebabCase\"])(property);\n}\n/**\n * Returns the normal form of the style property value for HTML. Appends a\n * default pixel unit if numeric, not a unitless property, and not zero.\n *\n * @param {string} property Property name.\n * @param {*} value Non-normalized property value.\n *\n * @return {*} Normalized property value.\n */\n\n\nfunction getNormalStylePropertyValue(property, value) {\n if (typeof value === 'number' && 0 !== value && !CSS_PROPERTIES_SUPPORTS_UNITLESS.has(property)) {\n return value + 'px';\n }\n\n return value;\n}\n/**\n * Serializes a React element to string.\n *\n * @param {WPElement} element Element to serialize.\n * @param {?Object} context Context object.\n * @param {?Object} legacyContext Legacy context object.\n *\n * @return {string} Serialized element.\n */\n\n\nfunction renderElement(element, context) {\n var legacyContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (null === element || undefined === element || false === element) {\n return '';\n }\n\n if (Array.isArray(element)) {\n return renderChildren(element, context, legacyContext);\n }\n\n switch (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element)) {\n case 'string':\n return Object(_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_4__[\"escapeHTML\"])(element);\n\n case 'number':\n return element.toString();\n }\n\n var type = element.type,\n props = element.props;\n\n switch (type) {\n case _react__WEBPACK_IMPORTED_MODULE_5__[\"StrictMode\"]:\n case _react__WEBPACK_IMPORTED_MODULE_5__[\"Fragment\"]:\n return renderChildren(props.children, context, legacyContext);\n\n case _raw_html__WEBPACK_IMPORTED_MODULE_6__[\"default\"]:\n var children = props.children,\n wrapperProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\"]);\n\n return renderNativeComponent(Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"isEmpty\"])(wrapperProps) ? null : 'div', Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, wrapperProps, {\n dangerouslySetInnerHTML: {\n __html: children\n }\n }), context, legacyContext);\n }\n\n switch (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(type)) {\n case 'string':\n return renderNativeComponent(type, props, context, legacyContext);\n\n case 'function':\n if (type.prototype && typeof type.prototype.render === 'function') {\n return renderComponent(type, props, context, legacyContext);\n }\n\n return renderElement(type(props, legacyContext), context, legacyContext);\n }\n\n switch (type && type.$$typeof) {\n case Provider.$$typeof:\n return renderChildren(props.children, props.value, legacyContext);\n\n case Consumer.$$typeof:\n return renderElement(props.children(context || type._currentValue), context, legacyContext);\n }\n\n return '';\n}\n/**\n * Serializes a native component type to string.\n *\n * @param {?string} type Native component type to serialize, or null if\n * rendering as fragment of children content.\n * @param {Object} props Props object.\n * @param {?Object} context Context object.\n * @param {?Object} legacyContext Legacy context object.\n *\n * @return {string} Serialized element.\n */\n\nfunction renderNativeComponent(type, props, context) {\n var legacyContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var content = '';\n\n if (type === 'textarea' && props.hasOwnProperty('value')) {\n // Textarea children can be assigned as value prop. If it is, render in\n // place of children. Ensure to omit so it is not assigned as attribute\n // as well.\n content = renderChildren(props.value, context, legacyContext);\n props = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"omit\"])(props, 'value');\n } else if (props.dangerouslySetInnerHTML && typeof props.dangerouslySetInnerHTML.__html === 'string') {\n // Dangerous content is left unescaped.\n content = props.dangerouslySetInnerHTML.__html;\n } else if (typeof props.children !== 'undefined') {\n content = renderChildren(props.children, context, legacyContext);\n }\n\n if (!type) {\n return content;\n }\n\n var attributes = renderAttributes(props);\n\n if (SELF_CLOSING_TAGS.has(type)) {\n return '<' + type + attributes + '/>';\n }\n\n return '<' + type + attributes + '>' + content + '';\n}\n/**\n * Serializes a non-native component type to string.\n *\n * @param {Function} Component Component type to serialize.\n * @param {Object} props Props object.\n * @param {?Object} context Context object.\n * @param {?Object} legacyContext Legacy context object.\n *\n * @return {string} Serialized element\n */\n\nfunction renderComponent(Component, props, context) {\n var legacyContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var instance = new Component(props, legacyContext);\n\n if (typeof instance.getChildContext === 'function') {\n Object.assign(legacyContext, instance.getChildContext());\n }\n\n var html = renderElement(instance.render(), context, legacyContext);\n return html;\n}\n/**\n * Serializes an array of children to string.\n *\n * @param {Array} children Children to serialize.\n * @param {?Object} context Context object.\n * @param {?Object} legacyContext Legacy context object.\n *\n * @return {string} Serialized children.\n */\n\nfunction renderChildren(children, context) {\n var legacyContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var result = '';\n children = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"castArray\"])(children);\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n result += renderElement(child, context, legacyContext);\n }\n\n return result;\n}\n/**\n * Renders a props object as a string of HTML attributes.\n *\n * @param {Object} props Props object.\n *\n * @return {string} Attributes string.\n */\n\n\nfunction renderAttributes(props) {\n var result = '';\n\n for (var key in props) {\n var attribute = getNormalAttributeName(key);\n\n if (!Object(_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_4__[\"isValidAttributeName\"])(attribute)) {\n continue;\n }\n\n var value = getNormalAttributeValue(key, props[key]); // If value is not of serializeable type, skip.\n\n if (!ATTRIBUTES_TYPES.has(Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(value))) {\n continue;\n } // Don't render internal attribute names.\n\n\n if (isInternalAttribute(key)) {\n continue;\n }\n\n var isBooleanAttribute = BOOLEAN_ATTRIBUTES.has(attribute); // Boolean attribute should be omitted outright if its value is false.\n\n if (isBooleanAttribute && value === false) {\n continue;\n }\n\n var isMeaningfulAttribute = isBooleanAttribute || hasPrefix(key, ['data-', 'aria-']) || ENUMERATED_ATTRIBUTES.has(attribute); // Only write boolean value as attribute if meaningful.\n\n if (typeof value === 'boolean' && !isMeaningfulAttribute) {\n continue;\n }\n\n result += ' ' + attribute; // Boolean attributes should write attribute name, but without value.\n // Mere presence of attribute name is effective truthiness.\n\n if (isBooleanAttribute) {\n continue;\n }\n\n if (typeof value === 'string') {\n value = Object(_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_4__[\"escapeAttribute\"])(value);\n }\n\n result += '=\"' + value + '\"';\n }\n\n return result;\n}\n/**\n * Renders a style object as a string attribute value.\n *\n * @param {Object} style Style object.\n *\n * @return {string} Style attribute value.\n */\n\nfunction renderStyle(style) {\n // Only generate from object, e.g. tolerate string value.\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"isPlainObject\"])(style)) {\n return style;\n }\n\n var result;\n\n for (var property in style) {\n var value = style[property];\n\n if (null === value || undefined === value) {\n continue;\n }\n\n if (result) {\n result += ';';\n } else {\n result = '';\n }\n\n var normalName = getNormalStylePropertyName(property);\n var normalValue = getNormalStylePropertyValue(property, value);\n result += normalName + ':' + normalValue;\n }\n\n return result;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (renderElement);\n//# sourceMappingURL=serialize.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/element/build-module/serialize.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/element/build-module/utils.js": +/*!***************************************************************!*\ + !*** ./node_modules/@wordpress/element/build-module/utils.js ***! + \***************************************************************/ +/*! exports provided: isEmptyElement */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isEmptyElement\", function() { return isEmptyElement; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies\n */\n\n/**\n * Checks if the provided WP element is empty.\n *\n * @param {*} element WP element to check.\n * @return {boolean} True when an element is considered empty.\n */\n\nvar isEmptyElement = function isEmptyElement(element) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isNumber\"])(element)) {\n return false;\n }\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isString\"])(element) || Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isArray\"])(element)) {\n return !element.length;\n }\n\n return !element;\n};\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/element/build-module/utils.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/defineProperty.js": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! + \***************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _defineProperty; });\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/defineProperty.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectSpread.js": +/*!*************************************************************************************************!*\ + !*** ./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectSpread.js ***! + \*************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _objectSpread; });\n/* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty */ \"./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(target, key, source[key]);\n });\n }\n\n return target;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectSpread.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js": +/*!************************************************************************************************************!*\ + !*** ./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js ***! + \************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _objectWithoutProperties; });\n/* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./objectWithoutPropertiesLoose */ \"./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js": +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***! + \*****************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _objectWithoutPropertiesLoose; });\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/typeof.js": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/typeof.js ***! + \*******************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _typeof; });\nfunction _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/element/node_modules/@babel/runtime/helpers/esm/typeof.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/escape-html/build-module/index.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@wordpress/escape-html/build-module/index.js ***! + \*******************************************************************/ +/*! exports provided: escapeAmpersand, escapeQuotationMark, escapeLessThan, escapeAttribute, escapeHTML, isValidAttributeName */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"escapeAmpersand\", function() { return escapeAmpersand; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"escapeQuotationMark\", function() { return escapeQuotationMark; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"escapeLessThan\", function() { return escapeLessThan; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"escapeAttribute\", function() { return escapeAttribute; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"escapeHTML\", function() { return escapeHTML; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isValidAttributeName\", function() { return isValidAttributeName; });\n/**\n * Regular expression matching invalid attribute names.\n *\n * \"Attribute names must consist of one or more characters other than controls,\n * U+0020 SPACE, U+0022 (\"), U+0027 ('), U+003E (>), U+002F (/), U+003D (=),\n * and noncharacters.\"\n *\n * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n *\n * @type {RegExp}\n */\nvar REGEXP_INVALID_ATTRIBUTE_NAME = /[\\u007F-\\u009F \"'>/=\"\\uFDD0-\\uFDEF]/;\n/**\n * Returns a string with ampersands escaped. Note that this is an imperfect\n * implementation, where only ampersands which do not appear as a pattern of\n * named, decimal, or hexadecimal character references are escaped. Invalid\n * named references (i.e. ambiguous ampersand) are are still permitted.\n *\n * @link https://w3c.github.io/html/syntax.html#character-references\n * @link https://w3c.github.io/html/syntax.html#ambiguous-ampersand\n * @link https://w3c.github.io/html/syntax.html#named-character-references\n *\n * @param {string} value Original string.\n *\n * @return {string} Escaped string.\n */\n\nfunction escapeAmpersand(value) {\n return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi, '&');\n}\n/**\n * Returns a string with quotation marks replaced.\n *\n * @param {string} value Original string.\n *\n * @return {string} Escaped string.\n */\n\nfunction escapeQuotationMark(value) {\n return value.replace(/\"/g, '"');\n}\n/**\n * Returns a string with less-than sign replaced.\n *\n * @param {string} value Original string.\n *\n * @return {string} Escaped string.\n */\n\nfunction escapeLessThan(value) {\n return value.replace(/ 3 && arguments[3] !== undefined ? arguments[3] : 10;\n\n if (!Object(_validateHookName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(hookName)) {\n return;\n }\n\n if (!Object(_validateNamespace_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(namespace)) {\n return;\n }\n\n if ('function' !== typeof callback) {\n // eslint-disable-next-line no-console\n console.error('The hook callback must be a function.');\n return;\n } // Validate numeric priority\n\n\n if ('number' !== typeof priority) {\n // eslint-disable-next-line no-console\n console.error('If specified, the hook priority must be a number.');\n return;\n }\n\n var handler = {\n callback: callback,\n priority: priority,\n namespace: namespace\n };\n\n if (hooks[hookName]) {\n // Find the correct insert index of the new hook.\n var handlers = hooks[hookName].handlers;\n var i = 0;\n\n while (i < handlers.length) {\n if (handlers[i].priority > priority) {\n break;\n }\n\n i++;\n } // Insert (or append) the new hook.\n\n\n handlers.splice(i, 0, handler); // We may also be currently executing this hook. If the callback\n // we're adding would come after the current callback, there's no\n // problem; otherwise we need to increase the execution index of\n // any other runs by 1 to account for the added element.\n\n (hooks.__current || []).forEach(function (hookInfo) {\n if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {\n hookInfo.currentIndex++;\n }\n });\n } else {\n // This is the first hook of its type.\n hooks[hookName] = {\n handlers: [handler],\n runs: 0\n };\n }\n\n if (hookName !== 'hookAdded') {\n Object(___WEBPACK_IMPORTED_MODULE_2__[\"doAction\"])('hookAdded', hookName, namespace, callback, priority);\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createAddHook);\n//# sourceMappingURL=createAddHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createAddHook.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/hooks/build-module/createCurrentHook.js": +/*!*************************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createCurrentHook.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Returns a function which, when invoked, will return the name of the\n * currently running hook, or `null` if no hook of the given type is currently\n * running.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that returns the current hook.\n */\nfunction createCurrentHook(hooks) {\n /**\n * Returns the name of the currently running hook, or `null` if no hook of\n * the given type is currently running.\n *\n * @return {?string} The name of the currently running hook, or\n * `null` if no hook is currently running.\n */\n return function currentHook() {\n if (!hooks.__current || !hooks.__current.length) {\n return null;\n }\n\n return hooks.__current[hooks.__current.length - 1].name;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createCurrentHook);\n//# sourceMappingURL=createCurrentHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createCurrentHook.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/hooks/build-module/createDidHook.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createDidHook.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _validateHookName_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validateHookName.js */ \"./node_modules/@wordpress/hooks/build-module/validateHookName.js\");\n\n/**\n * Returns a function which, when invoked, will return the number of times a\n * hook has been called.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that returns a hook's call count.\n */\n\nfunction createDidHook(hooks) {\n /**\n * Returns the number of times an action has been fired.\n *\n * @param {string} hookName The hook name to check.\n *\n * @return {number} The number of times the hook has run.\n */\n return function didHook(hookName) {\n if (!Object(_validateHookName_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(hookName)) {\n return;\n }\n\n return hooks[hookName] && hooks[hookName].runs ? hooks[hookName].runs : 0;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createDidHook);\n//# sourceMappingURL=createDidHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createDidHook.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/hooks/build-module/createDoingHook.js": +/*!***********************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createDoingHook.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Returns a function which, when invoked, will return whether a hook is\n * currently being executed.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that returns whether a hook is currently\n * being executed.\n */\nfunction createDoingHook(hooks) {\n /**\n * Returns whether a hook is currently being executed.\n *\n * @param {?string} hookName The name of the hook to check for. If\n * omitted, will check for any hook being executed.\n *\n * @return {boolean} Whether the hook is being executed.\n */\n return function doingHook(hookName) {\n // If the hookName was not passed, check for any current hook.\n if ('undefined' === typeof hookName) {\n return 'undefined' !== typeof hooks.__current[0];\n } // Return the __current hook.\n\n\n return hooks.__current[0] ? hookName === hooks.__current[0].name : false;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createDoingHook);\n//# sourceMappingURL=createDoingHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createDoingHook.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/hooks/build-module/createHasHook.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createHasHook.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Returns a function which, when invoked, will return whether any handlers are\n * attached to a particular hook.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that returns whether any handlers are\n * attached to a particular hook.\n */\nfunction createHasHook(hooks) {\n /**\n * Returns how many handlers are attached for the given hook.\n *\n * @param {string} hookName The name of the hook to check for.\n *\n * @return {boolean} Whether there are handlers that are attached to the given hook.\n */\n return function hasHook(hookName) {\n return hookName in hooks;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createHasHook);\n//# sourceMappingURL=createHasHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createHasHook.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/hooks/build-module/createHooks.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createHooks.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _createAddHook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createAddHook */ \"./node_modules/@wordpress/hooks/build-module/createAddHook.js\");\n/* harmony import */ var _createRemoveHook__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createRemoveHook */ \"./node_modules/@wordpress/hooks/build-module/createRemoveHook.js\");\n/* harmony import */ var _createHasHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createHasHook */ \"./node_modules/@wordpress/hooks/build-module/createHasHook.js\");\n/* harmony import */ var _createRunHook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./createRunHook */ \"./node_modules/@wordpress/hooks/build-module/createRunHook.js\");\n/* harmony import */ var _createCurrentHook__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createCurrentHook */ \"./node_modules/@wordpress/hooks/build-module/createCurrentHook.js\");\n/* harmony import */ var _createDoingHook__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./createDoingHook */ \"./node_modules/@wordpress/hooks/build-module/createDoingHook.js\");\n/* harmony import */ var _createDidHook__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./createDidHook */ \"./node_modules/@wordpress/hooks/build-module/createDidHook.js\");\n\n\n\n\n\n\n\n/**\n * Returns an instance of the hooks object.\n *\n * @return {Object} Object that contains all hooks.\n */\n\nfunction createHooks() {\n var actions = Object.create(null);\n var filters = Object.create(null);\n actions.__current = [];\n filters.__current = [];\n return {\n addAction: Object(_createAddHook__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(actions),\n addFilter: Object(_createAddHook__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(filters),\n removeAction: Object(_createRemoveHook__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions),\n removeFilter: Object(_createRemoveHook__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(filters),\n hasAction: Object(_createHasHook__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(actions),\n hasFilter: Object(_createHasHook__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(filters),\n removeAllActions: Object(_createRemoveHook__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actions, true),\n removeAllFilters: Object(_createRemoveHook__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(filters, true),\n doAction: Object(_createRunHook__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(actions),\n applyFilters: Object(_createRunHook__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(filters, true),\n currentAction: Object(_createCurrentHook__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(actions),\n currentFilter: Object(_createCurrentHook__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(filters),\n doingAction: Object(_createDoingHook__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(actions),\n doingFilter: Object(_createDoingHook__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(filters),\n didAction: Object(_createDidHook__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(actions),\n didFilter: Object(_createDidHook__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(filters),\n actions: actions,\n filters: filters\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createHooks);\n//# sourceMappingURL=createHooks.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createHooks.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/hooks/build-module/createRemoveHook.js": +/*!************************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createRemoveHook.js ***! + \************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _validateNamespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validateNamespace.js */ \"./node_modules/@wordpress/hooks/build-module/validateNamespace.js\");\n/* harmony import */ var _validateHookName_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./validateHookName.js */ \"./node_modules/@wordpress/hooks/build-module/validateHookName.js\");\n/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ */ \"./node_modules/@wordpress/hooks/build-module/index.js\");\n\n\n\n/**\n * Returns a function which, when invoked, will remove a specified hook or all\n * hooks by the given name.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n * @param {boolean} removeAll Whether to remove all callbacks for a hookName, without regard to namespace. Used to create `removeAll*` functions.\n *\n * @return {Function} Function that removes hooks.\n */\n\nfunction createRemoveHook(hooks, removeAll) {\n /**\n * Removes the specified callback (or all callbacks) from the hook with a\n * given hookName and namespace.\n *\n * @param {string} hookName The name of the hook to modify.\n * @param {string} namespace The unique namespace identifying the callback in the form `vendor/plugin/function`.\n *\n * @return {number} The number of callbacks removed.\n */\n return function removeHook(hookName, namespace) {\n if (!Object(_validateHookName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(hookName)) {\n return;\n }\n\n if (!removeAll && !Object(_validateNamespace_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(namespace)) {\n return;\n } // Bail if no hooks exist by this name\n\n\n if (!hooks[hookName]) {\n return 0;\n }\n\n var handlersRemoved = 0;\n\n if (removeAll) {\n handlersRemoved = hooks[hookName].handlers.length;\n hooks[hookName] = {\n runs: hooks[hookName].runs,\n handlers: []\n };\n } else {\n // Try to find the specified callback to remove.\n var handlers = hooks[hookName].handlers;\n\n var _loop = function _loop(i) {\n if (handlers[i].namespace === namespace) {\n handlers.splice(i, 1);\n handlersRemoved++; // This callback may also be part of a hook that is\n // currently executing. If the callback we're removing\n // comes after the current callback, there's no problem;\n // otherwise we need to decrease the execution index of any\n // other runs by 1 to account for the removed element.\n\n (hooks.__current || []).forEach(function (hookInfo) {\n if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {\n hookInfo.currentIndex--;\n }\n });\n }\n };\n\n for (var i = handlers.length - 1; i >= 0; i--) {\n _loop(i);\n }\n }\n\n if (hookName !== 'hookRemoved') {\n Object(___WEBPACK_IMPORTED_MODULE_2__[\"doAction\"])('hookRemoved', hookName, namespace);\n }\n\n return handlersRemoved;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createRemoveHook);\n//# sourceMappingURL=createRemoveHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createRemoveHook.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/hooks/build-module/createRunHook.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createRunHook.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Returns a function which, when invoked, will execute all callbacks\n * registered to a hook of the specified type, optionally returning the final\n * value of the call chain.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n * @param {?boolean} returnFirstArg Whether each hook callback is expected to\n * return its first argument.\n *\n * @return {Function} Function that runs hook callbacks.\n */\nfunction createRunHook(hooks, returnFirstArg) {\n /**\n * Runs all callbacks for the specified hook.\n *\n * @param {string} hookName The name of the hook to run.\n * @param {...*} args Arguments to pass to the hook callbacks.\n *\n * @return {*} Return value of runner, if applicable.\n */\n return function runHooks(hookName) {\n if (!hooks[hookName]) {\n hooks[hookName] = {\n handlers: [],\n runs: 0\n };\n }\n\n hooks[hookName].runs++;\n var handlers = hooks[hookName].handlers;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (!handlers || !handlers.length) {\n return returnFirstArg ? args[0] : undefined;\n }\n\n var hookInfo = {\n name: hookName,\n currentIndex: 0\n };\n\n hooks.__current.push(hookInfo);\n\n while (hookInfo.currentIndex < handlers.length) {\n var handler = handlers[hookInfo.currentIndex];\n var result = handler.callback.apply(null, args);\n\n if (returnFirstArg) {\n args[0] = result;\n }\n\n hookInfo.currentIndex++;\n }\n\n hooks.__current.pop();\n\n if (returnFirstArg) {\n return args[0];\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createRunHook);\n//# sourceMappingURL=createRunHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createRunHook.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/hooks/build-module/index.js": +/*!*************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/index.js ***! + \*************************************************************/ +/*! exports provided: createHooks, addAction, addFilter, removeAction, removeFilter, hasAction, hasFilter, removeAllActions, removeAllFilters, doAction, applyFilters, currentAction, currentFilter, doingAction, doingFilter, didAction, didFilter, actions, filters */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addAction\", function() { return addAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addFilter\", function() { return addFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAction\", function() { return removeAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeFilter\", function() { return removeFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasAction\", function() { return hasAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasFilter\", function() { return hasFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAllActions\", function() { return removeAllActions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAllFilters\", function() { return removeAllFilters; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"doAction\", function() { return doAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyFilters\", function() { return applyFilters; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"currentAction\", function() { return currentAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"currentFilter\", function() { return currentFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"doingAction\", function() { return doingAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"doingFilter\", function() { return doingFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"didAction\", function() { return didAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"didFilter\", function() { return didFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"actions\", function() { return actions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filters\", function() { return filters; });\n/* harmony import */ var _createHooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createHooks */ \"./node_modules/@wordpress/hooks/build-module/createHooks.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createHooks\", function() { return _createHooks__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\nvar _createHooks = Object(_createHooks__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n addAction = _createHooks.addAction,\n addFilter = _createHooks.addFilter,\n removeAction = _createHooks.removeAction,\n removeFilter = _createHooks.removeFilter,\n hasAction = _createHooks.hasAction,\n hasFilter = _createHooks.hasFilter,\n removeAllActions = _createHooks.removeAllActions,\n removeAllFilters = _createHooks.removeAllFilters,\n doAction = _createHooks.doAction,\n applyFilters = _createHooks.applyFilters,\n currentAction = _createHooks.currentAction,\n currentFilter = _createHooks.currentFilter,\n doingAction = _createHooks.doingAction,\n doingFilter = _createHooks.doingFilter,\n didAction = _createHooks.didAction,\n didFilter = _createHooks.didFilter,\n actions = _createHooks.actions,\n filters = _createHooks.filters;\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/hooks/build-module/validateHookName.js": +/*!************************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/validateHookName.js ***! + \************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Validate a hookName string.\n *\n * @param {string} hookName The hook name to validate. Should be a non empty string containing\n * only numbers, letters, dashes, periods and underscores. Also,\n * the hook name cannot begin with `__`.\n *\n * @return {boolean} Whether the hook name is valid.\n */\nfunction validateHookName(hookName) {\n if ('string' !== typeof hookName || '' === hookName) {\n // eslint-disable-next-line no-console\n console.error('The hook name must be a non-empty string.');\n return false;\n }\n\n if (/^__/.test(hookName)) {\n // eslint-disable-next-line no-console\n console.error('The hook name cannot begin with `__`.');\n return false;\n }\n\n if (!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(hookName)) {\n // eslint-disable-next-line no-console\n console.error('The hook name can only contain numbers, letters, dashes, periods and underscores.');\n return false;\n }\n\n return true;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (validateHookName);\n//# sourceMappingURL=validateHookName.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/validateHookName.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/hooks/build-module/validateNamespace.js": +/*!*************************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/validateNamespace.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Validate a namespace string.\n *\n * @param {string} namespace The namespace to validate - should take the form\n * `vendor/plugin/function`.\n *\n * @return {boolean} Whether the namespace is valid.\n */\nfunction validateNamespace(namespace) {\n if ('string' !== typeof namespace || '' === namespace) {\n // eslint-disable-next-line no-console\n console.error('The namespace must be a non-empty string.');\n return false;\n }\n\n if (!/^[a-zA-Z][a-zA-Z0-9_.\\-\\/]*$/.test(namespace)) {\n // eslint-disable-next-line no-console\n console.error('The namespace can only contain numbers, letters, dashes, periods, underscores and slashes.');\n return false;\n }\n\n return true;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (validateNamespace);\n//# sourceMappingURL=validateNamespace.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/validateNamespace.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/i18n/build-module/index.js": +/*!************************************************************!*\ + !*** ./node_modules/@wordpress/i18n/build-module/index.js ***! + \************************************************************/ +/*! exports provided: setLocaleData, __, _x, _n, _nx, sprintf */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setLocaleData\", function() { return setLocaleData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__\", function() { return __; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"_x\", function() { return _x; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"_n\", function() { return _n; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"_nx\", function() { return _nx; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sprintf\", function() { return sprintf; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ \"./node_modules/@wordpress/i18n/node_modules/@babel/runtime/helpers/esm/objectSpread.js\");\n/* harmony import */ var tannin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tannin */ \"./node_modules/tannin/index.js\");\n/* harmony import */ var memize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! memize */ \"./node_modules/memize/index.js\");\n/* harmony import */ var memize__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(memize__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var sprintf_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! sprintf-js */ \"./node_modules/sprintf-js/src/sprintf.js\");\n/* harmony import */ var sprintf_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(sprintf_js__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies\n */\n\n\n\n/**\n * Default locale data to use for Tannin domain when not otherwise provided.\n * Assumes an English plural forms expression.\n *\n * @type {Object}\n */\n\nvar DEFAULT_LOCALE_DATA = {\n '': {\n plural_forms: 'plural=(n!=1)'\n }\n};\n/**\n * Log to console, once per message; or more precisely, per referentially equal\n * argument set. Because Jed throws errors, we log these to the console instead\n * to avoid crashing the application.\n *\n * @param {...*} args Arguments to pass to `console.error`\n */\n\nvar logErrorOnce = memize__WEBPACK_IMPORTED_MODULE_2___default()(console.error); // eslint-disable-line no-console\n\n/**\n * The underlying instance of Tannin to which exported functions interface.\n *\n * @type {Tannin}\n */\n\nvar i18n = new tannin__WEBPACK_IMPORTED_MODULE_1__[\"default\"]({});\n/**\n * Merges locale data into the Tannin instance by domain. Accepts data in a\n * Jed-formatted JSON object shape.\n *\n * @see http://messageformat.github.io/Jed/\n *\n * @param {?Object} data Locale data configuration.\n * @param {?string} domain Domain for which configuration applies.\n */\n\nfunction setLocaleData(data) {\n var domain = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';\n i18n.data[domain] = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, DEFAULT_LOCALE_DATA, i18n.data[domain], data); // Populate default domain configuration (supported locale date which omits\n // a plural forms expression).\n\n i18n.data[domain][''] = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, DEFAULT_LOCALE_DATA[''], i18n.data[domain]['']);\n}\n/**\n * Wrapper for Tannin's `dcnpgettext`. Populates default locale data if not\n * otherwise previously assigned.\n *\n * @param {?string} domain Domain to retrieve the translated text.\n * @param {?string} context Context information for the translators.\n * @param {string} single Text to translate if non-plural. Used as fallback\n * return value on a caught error.\n * @param {?string} plural The text to be used if the number is plural.\n * @param {?number} number The number to compare against to use either the\n * singular or plural form.\n *\n * @return {string} The translated string.\n */\n\nfunction dcnpgettext() {\n var domain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';\n var context = arguments.length > 1 ? arguments[1] : undefined;\n var single = arguments.length > 2 ? arguments[2] : undefined;\n var plural = arguments.length > 3 ? arguments[3] : undefined;\n var number = arguments.length > 4 ? arguments[4] : undefined;\n\n if (!i18n.data[domain]) {\n setLocaleData(undefined, domain);\n }\n\n return i18n.dcnpgettext(domain, context, single, plural, number);\n}\n/**\n * Retrieve the translation of text.\n *\n * @see https://developer.wordpress.org/reference/functions/__/\n *\n * @param {string} text Text to translate.\n * @param {?string} domain Domain to retrieve the translated text.\n *\n * @return {string} Translated text.\n */\n\n\nfunction __(text, domain) {\n return dcnpgettext(domain, undefined, text);\n}\n/**\n * Retrieve translated string with gettext context.\n *\n * @see https://developer.wordpress.org/reference/functions/_x/\n *\n * @param {string} text Text to translate.\n * @param {string} context Context information for the translators.\n * @param {?string} domain Domain to retrieve the translated text.\n *\n * @return {string} Translated context string without pipe.\n */\n\nfunction _x(text, context, domain) {\n return dcnpgettext(domain, context, text);\n}\n/**\n * Translates and retrieves the singular or plural form based on the supplied\n * number.\n *\n * @see https://developer.wordpress.org/reference/functions/_n/\n *\n * @param {string} single The text to be used if the number is singular.\n * @param {string} plural The text to be used if the number is plural.\n * @param {number} number The number to compare against to use either the\n * singular or plural form.\n * @param {?string} domain Domain to retrieve the translated text.\n *\n * @return {string} The translated singular or plural form.\n */\n\nfunction _n(single, plural, number, domain) {\n return dcnpgettext(domain, undefined, single, plural, number);\n}\n/**\n * Translates and retrieves the singular or plural form based on the supplied\n * number, with gettext context.\n *\n * @see https://developer.wordpress.org/reference/functions/_nx/\n *\n * @param {string} single The text to be used if the number is singular.\n * @param {string} plural The text to be used if the number is plural.\n * @param {number} number The number to compare against to use either the\n * singular or plural form.\n * @param {string} context Context information for the translators.\n * @param {?string} domain Domain to retrieve the translated text.\n *\n * @return {string} The translated singular or plural form.\n */\n\nfunction _nx(single, plural, number, context, domain) {\n return dcnpgettext(domain, context, single, plural, number);\n}\n/**\n * Returns a formatted string. If an error occurs in applying the format, the\n * original format string is returned.\n *\n * @param {string} format The format of the string to generate.\n * @param {string[]} ...args Arguments to apply to the format.\n *\n * @see http://www.diveintojavascript.com/projects/javascript-sprintf\n *\n * @return {string} The formatted string.\n */\n\nfunction sprintf(format) {\n try {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return sprintf_js__WEBPACK_IMPORTED_MODULE_3___default.a.sprintf.apply(sprintf_js__WEBPACK_IMPORTED_MODULE_3___default.a, [format].concat(args));\n } catch (error) {\n logErrorOnce('sprintf error: \\n\\n' + error.toString());\n return format;\n }\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/i18n/build-module/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/i18n/node_modules/@babel/runtime/helpers/esm/defineProperty.js": +/*!************************************************************************************************!*\ + !*** ./node_modules/@wordpress/i18n/node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! + \************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _defineProperty; });\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/i18n/node_modules/@babel/runtime/helpers/esm/defineProperty.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/i18n/node_modules/@babel/runtime/helpers/esm/objectSpread.js": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@wordpress/i18n/node_modules/@babel/runtime/helpers/esm/objectSpread.js ***! + \**********************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _objectSpread; });\n/* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty */ \"./node_modules/@wordpress/i18n/node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(target, key, source[key]);\n });\n }\n\n return target;\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/i18n/node_modules/@babel/runtime/helpers/esm/objectSpread.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/is-shallow-equal/arrays.js": +/*!************************************************************!*\ + !*** ./node_modules/@wordpress/is-shallow-equal/arrays.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Returns true if the two arrays are shallow equal, or false otherwise.\n *\n * @param {Array} a First array to compare.\n * @param {Array} b Second array to compare.\n *\n * @return {boolean} Whether the two arrays are shallow equal.\n */\nfunction isShallowEqualArrays( a, b ) {\n\tvar i;\n\n\tif ( a === b ) {\n\t\treturn true;\n\t}\n\n\tif ( a.length !== b.length ) {\n\t\treturn false;\n\t}\n\n\tfor ( i = 0; i < a.length; i++ ) {\n\t\tif ( a[ i ] !== b[ i ] ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nmodule.exports = isShallowEqualArrays;\n\n\n//# sourceURL=webpack:///./node_modules/@wordpress/is-shallow-equal/arrays.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/is-shallow-equal/index.js": +/*!***********************************************************!*\ + !*** ./node_modules/@wordpress/is-shallow-equal/index.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Internal dependencies;\n */\nvar isShallowEqualObjects = __webpack_require__( /*! ./objects */ \"./node_modules/@wordpress/is-shallow-equal/objects.js\" );\nvar isShallowEqualArrays = __webpack_require__( /*! ./arrays */ \"./node_modules/@wordpress/is-shallow-equal/arrays.js\" );\n\nvar isArray = Array.isArray;\n\n/**\n * Returns true if the two arrays or objects are shallow equal, or false\n * otherwise.\n *\n * @param {(Array|Object)} a First object or array to compare.\n * @param {(Array|Object)} b Second object or array to compare.\n *\n * @return {boolean} Whether the two values are shallow equal.\n */\nfunction isShallowEqual( a, b ) {\n\tif ( a && b ) {\n\t\tif ( a.constructor === Object && b.constructor === Object ) {\n\t\t\treturn isShallowEqualObjects( a, b );\n\t\t} else if ( isArray( a ) && isArray( b ) ) {\n\t\t\treturn isShallowEqualArrays( a, b );\n\t\t}\n\t}\n\n\treturn a === b;\n}\n\nmodule.exports = isShallowEqual;\n\n\n//# sourceURL=webpack:///./node_modules/@wordpress/is-shallow-equal/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/is-shallow-equal/objects.js": +/*!*************************************************************!*\ + !*** ./node_modules/@wordpress/is-shallow-equal/objects.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar keys = Object.keys;\n\n/**\n * Returns true if the two objects are shallow equal, or false otherwise.\n *\n * @param {Object} a First object to compare.\n * @param {Object} b Second object to compare.\n *\n * @return {boolean} Whether the two objects are shallow equal.\n */\nfunction isShallowEqualObjects( a, b ) {\n\tvar aKeys, bKeys, i, key;\n\n\tif ( a === b ) {\n\t\treturn true;\n\t}\n\n\taKeys = keys( a );\n\tbKeys = keys( b );\n\n\tif ( aKeys.length !== bKeys.length ) {\n\t\treturn false;\n\t}\n\n\ti = 0;\n\n\twhile ( i < aKeys.length ) {\n\t\tkey = aKeys[ i ];\n\t\tif ( a[ key ] !== b[ key ] ) {\n\t\t\treturn false;\n\t\t}\n\n\t\ti++;\n\t}\n\n\treturn true;\n}\n\nmodule.exports = isShallowEqualObjects;\n\n\n//# sourceURL=webpack:///./node_modules/@wordpress/is-shallow-equal/objects.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/redux-routine/build-module/cast-error.js": +/*!**************************************************************************!*\ + !*** ./node_modules/@wordpress/redux-routine/build-module/cast-error.js ***! + \**************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return castError; });\n/**\n * Casts value as an error if it's not one.\n *\n * @param {*} error The value to cast.\n *\n * @return {Error} The cast error.\n */\nfunction castError(error) {\n if (!(error instanceof Error)) {\n error = new Error(error);\n }\n\n return error;\n}\n//# sourceMappingURL=cast-error.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/redux-routine/build-module/cast-error.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/redux-routine/build-module/index.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@wordpress/redux-routine/build-module/index.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createMiddleware; });\n/* harmony import */ var _is_generator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-generator */ \"./node_modules/@wordpress/redux-routine/build-module/is-generator.js\");\n/* harmony import */ var _runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./runtime */ \"./node_modules/@wordpress/redux-routine/build-module/runtime.js\");\n/**\n * Internal dependencies\n */\n\n\n/**\n * Creates a Redux middleware, given an object of controls where each key is an\n * action type for which to act upon, the value a function which returns either\n * a promise which is to resolve when evaluation of the action should continue,\n * or a value. The value or resolved promise value is assigned on the return\n * value of the yield assignment. If the control handler returns undefined, the\n * execution is not continued.\n *\n * @param {Object} controls Object of control handlers.\n *\n * @return {Function} Co-routine runtime\n */\n\nfunction createMiddleware() {\n var controls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return function (store) {\n var runtime = Object(_runtime__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(controls, store.dispatch);\n return function (next) {\n return function (action) {\n if (!Object(_is_generator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(action)) {\n return next(action);\n }\n\n return runtime(action);\n };\n };\n };\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/redux-routine/build-module/index.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/redux-routine/build-module/is-action.js": +/*!*************************************************************************!*\ + !*** ./node_modules/@wordpress/redux-routine/build-module/is-action.js ***! + \*************************************************************************/ +/*! exports provided: isAction, isActionOfType */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isAction\", function() { return isAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isActionOfType\", function() { return isActionOfType; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External imports\n */\n\n/**\n * Returns true if the given object quacks like an action.\n *\n * @param {*} object Object to test\n *\n * @return {boolean} Whether object is an action.\n */\n\nfunction isAction(object) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isPlainObject\"])(object) && Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isString\"])(object.type);\n}\n/**\n * Returns true if the given object quacks like an action and has a specific\n * action type\n *\n * @param {*} object Object to test\n * @param {string} expectedType The expected type for the action.\n *\n * @return {boolean} Whether object is an action and is of specific type.\n */\n\nfunction isActionOfType(object, expectedType) {\n return isAction(object) && object.type === expectedType;\n}\n//# sourceMappingURL=is-action.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/redux-routine/build-module/is-action.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/redux-routine/build-module/is-generator.js": +/*!****************************************************************************!*\ + !*** ./node_modules/@wordpress/redux-routine/build-module/is-generator.js ***! + \****************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return isGenerator; });\n/**\n * Returns true if the given object is a generator, or false otherwise.\n *\n * @link https://www.ecma-international.org/ecma-262/6.0/#sec-generator-objects\n *\n * @param {*} object Object to test.\n *\n * @return {boolean} Whether object is a generator.\n */\nfunction isGenerator(object) {\n return !!object && object[Symbol.toStringTag] === 'Generator';\n}\n//# sourceMappingURL=is-generator.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/redux-routine/build-module/is-generator.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/redux-routine/build-module/runtime.js": +/*!***********************************************************************!*\ + !*** ./node_modules/@wordpress/redux-routine/build-module/runtime.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createRuntime; });\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"./node_modules/@wordpress/redux-routine/node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var rungen__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rungen */ \"./node_modules/rungen/dist/index.js\");\n/* harmony import */ var rungen__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(rungen__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var is_promise__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! is-promise */ \"./node_modules/is-promise/index.js\");\n/* harmony import */ var is_promise__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(is_promise__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _cast_error__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cast-error */ \"./node_modules/@wordpress/redux-routine/build-module/cast-error.js\");\n/* harmony import */ var _is_action__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./is-action */ \"./node_modules/@wordpress/redux-routine/build-module/is-action.js\");\n\n\n/**\n * External dependencies\n */\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n/**\n * Create a co-routine runtime.\n *\n * @param {Object} controls Object of control handlers.\n * @param {function} dispatch Unhandled action dispatch.\n *\n * @return {function} co-routine runtime\n */\n\nfunction createRuntime() {\n var controls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var dispatch = arguments.length > 1 ? arguments[1] : undefined;\n var rungenControls = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(controls, function (control, actionType) {\n return function (value, next, iterate, yieldNext, yieldError) {\n if (!Object(_is_action__WEBPACK_IMPORTED_MODULE_5__[\"isActionOfType\"])(value, actionType)) {\n return false;\n }\n\n var routine = control(value);\n\n if (is_promise__WEBPACK_IMPORTED_MODULE_3___default()(routine)) {\n // Async control routine awaits resolution.\n routine.then(yieldNext, function (error) {\n return yieldError(Object(_cast_error__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(error));\n });\n } else {\n next(routine);\n }\n\n return true;\n };\n });\n\n var unhandledActionControl = function unhandledActionControl(value, next) {\n if (!Object(_is_action__WEBPACK_IMPORTED_MODULE_5__[\"isAction\"])(value)) {\n return false;\n }\n\n dispatch(value);\n next();\n return true;\n };\n\n rungenControls.push(unhandledActionControl);\n var rungenRuntime = Object(rungen__WEBPACK_IMPORTED_MODULE_1__[\"create\"])(rungenControls);\n return function (action) {\n return new Promise(function (resolve, reject) {\n return rungenRuntime(action, function (result) {\n if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(result) === 'object' && Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"isString\"])(result.type)) {\n dispatch(result);\n }\n\n resolve(result);\n }, reject);\n });\n };\n}\n//# sourceMappingURL=runtime.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/redux-routine/build-module/runtime.js?"); + +/***/ }), + +/***/ "./node_modules/@wordpress/redux-routine/node_modules/@babel/runtime/helpers/esm/typeof.js": +/*!*************************************************************************************************!*\ + !*** ./node_modules/@wordpress/redux-routine/node_modules/@babel/runtime/helpers/esm/typeof.js ***! + \*************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _typeof; });\nfunction _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\n//# sourceURL=webpack:///./node_modules/@wordpress/redux-routine/node_modules/@babel/runtime/helpers/esm/typeof.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-basics/index.js": +/*!**********************************************!*\ + !*** ./node_modules/callbag-basics/index.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("module.exports = {\n forEach: __webpack_require__(/*! callbag-for-each */ \"./node_modules/callbag-for-each/readme.js\"),\n fromObs: __webpack_require__(/*! callbag-from-obs */ \"./node_modules/callbag-from-obs/readme.js\"),\n fromIter: __webpack_require__(/*! callbag-from-iter */ \"./node_modules/callbag-from-iter/index.js\"),\n fromEvent: __webpack_require__(/*! callbag-from-event */ \"./node_modules/callbag-from-event/index.js\"),\n fromPromise: __webpack_require__(/*! callbag-from-promise */ \"./node_modules/callbag-from-promise/index.js\"),\n interval: __webpack_require__(/*! callbag-interval */ \"./node_modules/callbag-interval/index.js\"),\n map: __webpack_require__(/*! callbag-map */ \"./node_modules/callbag-map/readme.js\"),\n scan: __webpack_require__(/*! callbag-scan */ \"./node_modules/callbag-scan/readme.js\"),\n flatten: __webpack_require__(/*! callbag-flatten */ \"./node_modules/callbag-flatten/index.js\"),\n take: __webpack_require__(/*! callbag-take */ \"./node_modules/callbag-take/index.js\"),\n skip: __webpack_require__(/*! callbag-skip */ \"./node_modules/callbag-skip/index.js\"),\n filter: __webpack_require__(/*! callbag-filter */ \"./node_modules/callbag-filter/readme.js\"),\n merge: __webpack_require__(/*! callbag-merge */ \"./node_modules/callbag-merge/readme.js\"),\n concat: __webpack_require__(/*! callbag-concat */ \"./node_modules/callbag-concat/readme.js\"),\n combine: __webpack_require__(/*! callbag-combine */ \"./node_modules/callbag-combine/readme.js\"),\n share: __webpack_require__(/*! callbag-share */ \"./node_modules/callbag-share/index.js\"),\n pipe: __webpack_require__(/*! callbag-pipe */ \"./node_modules/callbag-pipe/readme.js\")\n};\n\n\n\n//# sourceURL=webpack:///./node_modules/callbag-basics/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-combine/readme.js": +/*!************************************************!*\ + !*** ./node_modules/callbag-combine/readme.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-combine\n * ---------------\n *\n * Callbag factory that combines the latest data points from multiple (2 or\n * more) callbag sources. It delivers those latest values as an array. Works\n * with both pullable and listenable sources.\n *\n * `npm install callbag-combine`\n *\n * Example:\n *\n * const interval = require('callbag-interval');\n * const observe = require('callbag-observe');\n * const combine = require('callbag-combine');\n *\n * const source = combine(interval(100), interval(350));\n *\n * observe(x => console.log(x))(source); // [2,0]\n * // [3,0]\n * // [4,0]\n * // [5,0]\n * // [6,0]\n * // [6,1]\n * // [7,1]\n * // [8,1]\n * // ...\n */\n\nconst EMPTY = {};\n\nconst combine = (...sources) => (start, sink) => {\n if (start !== 0) return;\n const n = sources.length;\n if (n === 0) {\n sink(0, () => {});\n sink(1, []);\n sink(2);\n return;\n }\n let Ns = n; // start counter\n let Nd = n; // data counter\n let Ne = n; // end counter\n const vals = new Array(n);\n const sourceTalkbacks = new Array(n);\n const talkback = (t, d) => {\n if (t !== 2) return;\n for (let i = 0; i < n; i++) sourceTalkbacks[i](2);\n };\n sources.forEach((source, i) => {\n vals[i] = EMPTY;\n source(0, (t, d) => {\n if (t === 0) {\n sourceTalkbacks[i] = d;\n if (--Ns === 0) sink(0, talkback);\n } else if (t === 1) {\n const _Nd = !Nd ? 0 : vals[i] === EMPTY ? --Nd : Nd;\n vals[i] = d;\n if (_Nd === 0) {\n const arr = new Array(n);\n for (let j = 0; j < n; ++j) arr[j] = vals[j];\n sink(1, arr);\n }\n } else if (t === 2) {\n if (--Ne === 0) sink(2);\n } else {\n sink(t, d);\n }\n });\n });\n};\n\nmodule.exports = combine;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-combine/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-concat/readme.js": +/*!***********************************************!*\ + !*** ./node_modules/callbag-concat/readme.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-concat\n * --------------\n *\n * Callbag factory that concatenates the data from multiple (2 or more)\n * callbag sources. It starts each source at a time: waits for the previous\n * source to end before starting the next source. Works with both pullable\n * and listenable sources.\n *\n * `npm install callbag-concat`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const concat = require('callbag-concat');\n *\n * const source = concat(fromIter([10,20,30]), fromIter(['a','b']));\n *\n * iterate(x => console.log(x))(source); // 10\n * // 20\n * // 30\n * // a\n * // b\n */\n\nconst concat = (...sources) => (start, sink) => {\n if (start !== 0) return;\n const n = sources.length;\n if (n === 0) {\n sink(0, () => {});\n sink(2);\n return;\n }\n let i = 0;\n let sourceTalkback;\n const talkback = (t, d) => {\n if (t === 1 || t === 2) {\n sourceTalkback(t, d);\n }\n };\n (function next() {\n if (i === n) {\n sink(2);\n return;\n }\n sources[i](0, (t, d) => {\n if (t === 0) {\n sourceTalkback = d;\n if (i === 0) sink(0, talkback);\n else sourceTalkback(1);\n } else if (t === 1) {\n sink(1, d);\n } else if (t === 2) {\n i++;\n next();\n }\n });\n })();\n};\n\nmodule.exports = concat;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-concat/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-drop-repeats/index.js": +/*!****************************************************!*\ + !*** ./node_modules/callbag-drop-repeats/index.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const dropRepeats = pred => src => (start, sink) => {\n const INIT = {};\n let cache = INIT;\n let ask;\n const equals = pred || ((a, b) => a === b);\n start === 0 && src(start, (t, d) => {\n if (t === start) ask = d;\n if (t === 1) return cache !== INIT && equals(cache, d) ? ask(t) : sink(t, cache = d);\n sink(t, d);\n });\n};\n\nmodule.exports = dropRepeats;\n\n//# sourceURL=webpack:///./node_modules/callbag-drop-repeats/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-filter/readme.js": +/*!***********************************************!*\ + !*** ./node_modules/callbag-filter/readme.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-filter\n * --------------\n *\n * Callbag operator that conditionally lets data pass through. Works on either\n * pullable or listenable sources.\n *\n * `npm install callbag-filter`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const filter = require('callbag-filter');\n *\n * const source = filter(x => x % 2)(fromIter([1,2,3,4,5]));\n *\n * iterate(x => console.log(x))(source); // 1\n * // 3\n * // 5\n */\n\nconst filter = condition => source => (start, sink) => {\n if (start !== 0) return;\n let talkback;\n source(0, (t, d) => {\n if (t === 0) {\n talkback = d;\n sink(t, d);\n } else if (t === 1) {\n if (condition(d)) sink(t, d);\n else talkback(1);\n }\n else sink(t, d);\n });\n};\n\nmodule.exports = filter;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-filter/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-flatten/index.js": +/*!***********************************************!*\ + !*** ./node_modules/callbag-flatten/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const flatten = source => (start, sink) => {\n if (start !== 0) return;\n const exists = x => typeof x !== 'undefined';\n const absent = x => typeof x === 'undefined';\n const noop = () => {};\n let outerEnded = false;\n let outerTalkback;\n let innerTalkback;\n function talkback(t) {\n if (t === 1) (innerTalkback || outerTalkback || noop)(1);\n if (t === 2) {\n innerTalkback && innerTalkback(2);\n outerTalkback && outerTalkback(2);\n }\n }\n source(0, (T, D) => {\n if (T === 0) {\n outerTalkback = D;\n sink(0, talkback);\n } else if (T === 1) {\n const innerSource = D;\n if (innerTalkback) innerTalkback(2);\n innerSource(0, (t, d) => {\n if (t === 0) {\n innerTalkback = d;\n innerTalkback(1);\n } else if (t === 1) sink(1, d);\n else if (t === 2 && absent(d)) {\n if (outerEnded) sink(2);\n else {\n innerTalkback = void 0;\n outerTalkback(1);\n }\n }\n else if (t === 2 && exists(d)) sink(2, d);\n });\n } else if (T === 2 && absent(D)) {\n if (!innerTalkback) sink(2);\n else outerEnded = true;\n } else if (T === 2 && exists(D)) sink(2, D);\n });\n};\n\nmodule.exports = flatten;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-flatten/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-for-each/readme.js": +/*!*************************************************!*\ + !*** ./node_modules/callbag-for-each/readme.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-for-each\n * ----------------\n *\n * Callbag sink that consume both pullable and listenable sources. When called\n * on a pullable source, it will iterate through its data. When called on a\n * listenable source, it will observe its data.\n *\n * `npm install callbag-for-each`\n *\n * Examples\n * --------\n *\n * Consume a pullable source:\n *\n * const fromIter = require('callbag-from-iter');\n * const forEach = require('callbag-for-each');\n *\n * const source = fromIter([10,20,30,40])\n *\n * forEach(x => console.log(x))(source); // 10\n * // 20\n * // 30\n * // 40\n *\n * Consume a listenable source:\n *\n * const interval = require('callbag-interval');\n * const forEach = require('callbag-for-each');\n *\n * const source = interval(1000);\n *\n * forEach(x => console.log(x))(source); // 0\n * // 1\n * // 2\n * // 3\n * // ...\n */\n\nconst forEach = operation => source => {\n let talkback;\n source(0, (t, d) => {\n if (t === 0) talkback = d;\n if (t === 1) operation(d);\n if (t === 1 || t === 0) talkback(1);\n });\n};\n\nmodule.exports = forEach;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-for-each/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-from-event/index.js": +/*!**************************************************!*\ + !*** ./node_modules/callbag-from-event/index.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const fromEvent = (node, name) => (start, sink) => {\n if (start !== 0) return;\n const handler = ev => sink(1, ev);\n sink(0, t => {\n if (t === 2) node.removeEventListener(name, handler);\n });\n node.addEventListener(name, handler);\n};\n\nmodule.exports = fromEvent;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-event/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-from-iter/index.js": +/*!*************************************************!*\ + !*** ./node_modules/callbag-from-iter/index.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const fromIter = iter => (start, sink) => {\n if (start !== 0) return;\n const iterator =\n typeof Symbol !== 'undefined' && iter[Symbol.iterator]\n ? iter[Symbol.iterator]()\n : iter;\n let inloop = false;\n let got1 = false;\n let res;\n function loop() {\n inloop = true;\n while (got1) {\n got1 = false;\n res = iterator.next();\n if (res.done) sink(2);\n else sink(1, res.value);\n }\n inloop = false;\n }\n sink(0, t => {\n if (t === 1) {\n got1 = true;\n if (!inloop && !(res && res.done)) loop();\n }\n });\n};\n\nmodule.exports = fromIter;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-iter/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-from-obs/readme.js": +/*!*************************************************!*\ + !*** ./node_modules/callbag-from-obs/readme.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-from-obs\n * --------------\n *\n * Convert an observable (or subscribable) to a callbag listenable source.\n *\n * `npm install callbag-from-obs`\n *\n * Example:\n *\n * Convert an RxJS Observable:\n *\n * const Rx = require('rxjs');\n * const fromObs = require('callbag-from-obs');\n * const observe = require('callbag-observe');\n *\n * const source = fromObs(Rx.Observable.interval(1000).take(4));\n *\n * observe(x => console.log(x)(source); // 0\n * // 1\n * // 2\n * // 3\n *\n * Convert anything that has the `.subscribe` method:\n *\n * const fromObs = require('callbag-from-obs');\n * const observe = require('callbag-observe');\n *\n * const subscribable = {\n * subscribe: (observer) => {\n * let i = 0;\n * setInterval(() => observer.next(i++), 1000);\n * }\n * };\n *\n * const source = fromObs(subscribable);\n *\n * observe(x => console.log(x))(source); // 0\n * // 1\n * // 2\n * // 3\n * // ...\n */\n\nconst fromObs = observable => (start, sink) => {\n if (start !== 0) return;\n let dispose;\n sink(0, t => {\n if (t === 2 && dispose) {\n if (dispose.unsubscribe) dispose.unsubscribe();\n else dispose();\n }\n });\n dispose = observable.subscribe({\n next: x => sink(1, x),\n error: e => sink(2, e),\n complete: () => sink(2)\n });\n};\n\nmodule.exports = fromObs;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-obs/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-from-promise/index.js": +/*!****************************************************!*\ + !*** ./node_modules/callbag-from-promise/index.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const fromPromise = promise => (start, sink) => {\n if (start !== 0) return;\n let ended = false;\n const onfulfilled = val => {\n if (ended) return;\n sink(1, val);\n sink(2);\n };\n const onrejected = err => {\n if (ended) return;\n sink(2, err);\n };\n promise.then(onfulfilled, onrejected);\n sink(0, t => {\n if (t === 2) ended = true;\n });\n};\n\nmodule.exports = fromPromise;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-promise/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-interval/index.js": +/*!************************************************!*\ + !*** ./node_modules/callbag-interval/index.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const interval = period => (start, sink) => {\n if (start !== 0) return;\n let i = 0;\n const id = setInterval(() => {\n sink(1, i++);\n }, period);\n sink(0, t => {\n if (t === 2) clearInterval(id);\n });\n};\n\nmodule.exports = interval;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-interval/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-map/readme.js": +/*!********************************************!*\ + !*** ./node_modules/callbag-map/readme.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-map\n * -----------\n *\n * Callbag operator that applies a transformation on data passing through it.\n * Works on either pullable or listenable sources.\n *\n * `npm install callbag-map`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const map = require('callbag-map');\n *\n * const source = map(x => x * 0.1)(fromIter([10,20,30,40]));\n *\n * iterate(x => console.log(x))(source); // 1\n * // 2\n * // 3\n * // 4\n */\n\nconst map = f => source => (start, sink) => {\n if (start !== 0) return;\n source(0, (t, d) => {\n sink(t, t === 1 ? f(d) : d)\n });\n};\n\nmodule.exports = map;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-map/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-merge/readme.js": +/*!**********************************************!*\ + !*** ./node_modules/callbag-merge/readme.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-merge\n * -------------\n *\n * Callbag factory that merges data from multiple callbag sources. Works well\n * with listenable sources, and while it may work for some pullable sources,\n * it is only designed for listenable sources.\n *\n * `npm install callbag-merge`\n *\n * Example:\n *\n * const interval = require('callbag-interval');\n * const forEach = require('callbag-for-each');\n * const merge = require('callbag-merge');\n *\n * const source = merge(interval(100), interval(350));\n *\n * forEach(x => console.log(x))(source); // 0\n * // 1\n * // 2\n * // 0\n * // 3\n * // 4\n * // 5\n * // ...\n */\n\nfunction merge(...sources) {\n return (start, sink) => {\n if (start !== 0) return;\n const n = sources.length;\n const sourceTalkbacks = new Array(n);\n let startCount = 0;\n let endCount = 0;\n const talkback = t => {\n if (t === 0) return;\n for (let i = 0; i < n; i++) sourceTalkbacks[i] && sourceTalkbacks[i](t);\n };\n for (let i = 0; i < n; i++) {\n sources[i](0, (t, d) => {\n if (t === 0) {\n sourceTalkbacks[i] = d;\n if (++startCount === 1) sink(0, talkback);\n } else if (t === 2) {\n sourceTalkbacks[i] = void 0;\n if (++endCount === n) sink(2);\n } else sink(t, d);\n });\n }\n };\n}\n\nmodule.exports = merge;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-merge/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-pipe/readme.js": +/*!*********************************************!*\ + !*** ./node_modules/callbag-pipe/readme.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-pipe\n * ------------\n *\n * Utility function for plugging callbags together in chain. This utility\n * actually doesn't rely on Callbag specifics, and is basically the same as\n * Ramda's `pipe` or lodash's `flow`. Anyway, this exists just to play nicely\n * with the ecosystem, and to facilitate the import of the function.\n *\n * `npm install callbag-pipe`\n *\n * Example:\n *\n * Create a source with `pipe`, then pass it to a `forEach`:\n *\n * const interval = require('callbag-interval');\n * const forEach = require('callbag-for-each');\n * const combine = require('callbag-combine');\n * const pipe = require('callbag-pipe');\n * const take = require('callbag-take');\n * const map = require('callbag-map');\n *\n * const source = pipe(\n * combine(interval(100), interval(350)),\n * map(([x, y]) => `X${x},Y${y}`),\n * take(10)\n * );\n *\n * forEach(x => console.log(x))(source); // X2,Y0\n * // X3,Y0\n * // X4,Y0\n * // X5,Y0\n * // X6,Y0\n * // X6,Y1\n * // X7,Y1\n * // X8,Y1\n * // X9,Y1\n * // X9,Y2\n *\n *\n * Or use `pipe` to go all the way from source to sink:\n *\n * const interval = require('callbag-interval');\n * const forEach = require('callbag-for-each');\n * const combine = require('callbag-combine');\n * const pipe = require('callbag-pipe');\n * const take = require('callbag-take');\n * const map = require('callbag-map');\n *\n * pipe(\n * combine(interval(100), interval(350)),\n * map(([x, y]) => `X${x},Y${y}`),\n * take(10),\n * forEach(x => console.log(x))\n * );\n * // X2,Y0\n * // X3,Y0\n * // X4,Y0\n * // X5,Y0\n * // X6,Y0\n * // X6,Y1\n * // X7,Y1\n * // X8,Y1\n * // X9,Y1\n * // X9,Y2\n *\n *\n * Nesting\n * -------\n *\n * To use pipe inside another pipe, you need to give the inner pipe an\n * argument, e.g. `s => pipe(s, ...`:\n *\n * const interval = require('callbag-interval');\n * const forEach = require('callbag-for-each');\n * const combine = require('callbag-combine');\n * const pipe = require('callbag-pipe');\n * const take = require('callbag-take');\n * const map = require('callbag-map');\n *\n * pipe(\n * combine(interval(100), interval(350)),\n * s => pipe(s,\n * map(([x, y]) => `X${x},Y${y}`),\n * take(10)\n * ),\n * forEach(x => console.log(x))\n * );\n *\n *\n * This means you can use pipe to create a new operator:\n *\n * const mapThenTake = (f, amount) =>\n * s => pipe(s, map(f), take(amount));\n *\n * pipe(\n * combine(interval(100), interval(350)),\n * mapThenTake(([x, y]) => `X${x},Y${y}`, 10),\n * forEach(x => console.log(x))\n * );\n *\n */\n\nfunction pipe(...cbs) {\n let res = cbs[0];\n for (let i = 1, n = cbs.length; i < n; i++) res = cbs[i](res);\n return res;\n}\n\nmodule.exports = pipe;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-pipe/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-scan/readme.js": +/*!*********************************************!*\ + !*** ./node_modules/callbag-scan/readme.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-scan\n * ------------\n *\n * Callbag operator that combines consecutive values from the same source.\n * It's essentially like array `.reduce`, but delivers a new accumulated value\n * for each value from the callbag source. Works on either pullable or\n * listenable sources.\n *\n * `npm install callbag-scan`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const scan = require('callbag-scan');\n *\n * const iterSource = fromIter([1,2,3,4,5]);\n * const scanned = scan((prev, x) => prev + x, 0)(iterSource);\n *\n * scanned(0, iterate(x => console.log(x))); // 1\n * // 3\n * // 6\n * // 10\n * // 15\n */\n\nfunction scan(reducer, seed) {\n let hasAcc = arguments.length === 2;\n return source => (start, sink) => {\n if (start !== 0) return;\n let acc = seed;\n source(0, (t, d) => {\n if (t === 1) {\n acc = hasAcc ? reducer(acc, d) : ((hasAcc = true), d);\n sink(1, acc);\n } else sink(t, d);\n });\n };\n}\n\nmodule.exports = scan;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-scan/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-share/index.js": +/*!*********************************************!*\ + !*** ./node_modules/callbag-share/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const share = source => {\n let sinks = [];\n let sourceTalkback;\n\n return function shared(start, sink) {\n if (start !== 0) return;\n sinks.push(sink);\n\n const talkback = (t, d) => {\n if (t === 0) return;\n if (t === 2) {\n const i = sinks.indexOf(sink);\n if (i > -1) sinks.splice(i, 1);\n if (!sinks.length) sourceTalkback(2);\n } else {\n sourceTalkback(t, d);\n }\n };\n\n if (sinks.length === 1) {\n source(0, (t, d) => {\n if (t === 0) {\n sourceTalkback = d;\n sink(0, talkback);\n } else for (let s of sinks.slice(0)) s(t, d);\n if (t === 2) sinks = [];\n });\n return\n }\n\n sink(0, talkback);\n }\n}\n\nmodule.exports = share;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-share/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-skip/index.js": +/*!********************************************!*\ + !*** ./node_modules/callbag-skip/index.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const skip = max => source => (start, sink) => {\n if (start !== 0) return;\n let skipped = 0;\n let talkback;\n source(0, (t, d) => {\n if (t === 0) {\n talkback = d;\n sink(t, d);\n } else if (t === 1) {\n if (skipped < max) {\n skipped++;\n talkback(1);\n } else sink(t, d);\n } else {\n sink(t, d);\n }\n });\n};\n\nmodule.exports = skip;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-skip/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-start-with/index.js": +/*!**************************************************!*\ + !*** ./node_modules/callbag-start-with/index.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n\nconst startWith = (...xs) => inputSource => (start, outputSink) => {\n if (start !== 0) return;\n let disposed = false;\n let inputTalkback;\n let trackPull = false;\n let lastPull;\n\n outputSink(0, (ot, od) => {\n if (trackPull && ot === 1) {\n lastPull = [1, od];\n }\n\n if (ot === 2) {\n disposed = true;\n xs.length = 0;\n }\n\n if (!inputTalkback) return;\n inputTalkback(ot, od);\n });\n\n while (xs.length !== 0) {\n if (xs.length === 1) {\n trackPull = true;\n }\n outputSink(1, xs.shift());\n }\n\n if (disposed) return;\n\n inputSource(0, (it, id) => {\n if (it === 0) {\n inputTalkback = id;\n trackPull = false;\n\n if (lastPull) {\n inputTalkback(...lastPull);\n lastPull = null;\n }\n return;\n }\n outputSink(it, id);\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (startWith);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-start-with/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-take/index.js": +/*!********************************************!*\ + !*** ./node_modules/callbag-take/index.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const take = max => source => (start, sink) => {\n if (start !== 0) return;\n let taken = 0;\n let sourceTalkback;\n function talkback(t, d) {\n if (taken < max) sourceTalkback(t, d);\n }\n source(0, (t, d) => {\n if (t === 0) {\n sourceTalkback = d;\n sink(0, talkback);\n } else if (t === 1) {\n if (taken < max) {\n taken++;\n sink(t, d);\n if (taken === max) {\n sink(2);\n sourceTalkback(2);\n }\n }\n } else {\n sink(t, d);\n }\n });\n};\n\nmodule.exports = take;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-take/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-to-obs/readme.js": +/*!***********************************************!*\ + !*** ./node_modules/callbag-to-obs/readme.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/**\n * callbag-to-obs\n * ---------------\n *\n * Convert a listenable callbag source to an observable (or subscribable).\n * The Observable is an object following the ECMAScript Observable proposal\n * https://github.com/tc39/proposal-observable and at a minimum has the method\n * \"subscribe(observer)\" attached to it.\n *\n * `npm install callbag-to-obs`\n *\n * Example:\n *\n * const {pipe, interval, take, filter, map} = require('callbag-basics');\n * const toObservable = require('callbag-to-obs');\n *\n * const observable = pipe(\n * interval(1000), // 0,1,2,3,4,5,6,7,...\n * take(5), // 0,1,2,3,4\n * filter(x => x !== 0), // 1,2,3,4\n * map(x => x * 10), // 10,20,30,40\n * toObservable\n * );\n *\n * observable.subscribe({\n * next: x => console.log(x)\n * });\n */\n\nconst $$observable = __webpack_require__(/*! symbol-observable */ \"./node_modules/symbol-observable/es/index.js\").default;\n\nfunction normalize(observer) {\n if (!observer.start) observer.start = () => { };\n if (!observer.next) observer.next = () => { };\n if (!observer.error) observer.error = () => { };\n if (!observer.complete) observer.complete = () => { };\n}\n\nfunction toObservable(source) {\n return {\n subscribe: function subscribe(observer) {\n normalize(observer);\n let talkback;\n const sub = {\n unsubscribe: function unsubscribe() {\n if (talkback) talkback(2);\n },\n };\n observer.start(sub);\n try {\n source(0, (t, d) => {\n if (t === 0) talkback = d;\n if (t === 1) observer.next(d);\n if (t === 2 && d) observer.error(d);\n else if (t === 2) talkback = void 0, observer.complete(d);\n });\n } catch (err) {\n observer.error(err);\n }\n return sub;\n },\n\n [$$observable]: function () { return this; },\n };\n}\n\nmodule.exports = toObservable;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-to-obs/readme.js?"); + +/***/ }), + +/***/ "./node_modules/classnames/index.js": +/*!******************************************!*\ + !*** ./node_modules/classnames/index.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif ( true && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (true) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n\t\t\treturn classNames;\n\t\t}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n}());\n\n\n//# sourceURL=webpack:///./node_modules/classnames/index.js?"); + +/***/ }), + +/***/ "./node_modules/equivalent-key-map/equivalent-key-map.js": +/*!***************************************************************!*\ + !*** ./node_modules/equivalent-key-map/equivalent-key-map.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\n/**\n * Given an instance of EquivalentKeyMap, returns its internal value pair tuple\n * for a key, if one exists. The tuple members consist of the last reference\n * value for the key (used in efficient subsequent lookups) and the value\n * assigned for the key at the leaf node.\n *\n * @param {EquivalentKeyMap} instance EquivalentKeyMap instance.\n * @param {*} key The key for which to return value pair.\n *\n * @return {?Array} Value pair, if exists.\n */\nfunction getValuePair(instance, key) {\n var _map = instance._map,\n _arrayTreeMap = instance._arrayTreeMap,\n _objectTreeMap = instance._objectTreeMap; // Map keeps a reference to the last object-like key used to set the\n // value, which can be used to shortcut immediately to the value.\n\n if (_map.has(key)) {\n return _map.get(key);\n } // Sort keys to ensure stable retrieval from tree.\n\n\n var properties = Object.keys(key).sort(); // Tree by type to avoid conflicts on numeric object keys, empty value.\n\n var map = Array.isArray(key) ? _arrayTreeMap : _objectTreeMap;\n\n for (var i = 0; i < properties.length; i++) {\n var property = properties[i];\n map = map.get(property);\n\n if (map === undefined) {\n return;\n }\n\n var propertyValue = key[property];\n map = map.get(propertyValue);\n\n if (map === undefined) {\n return;\n }\n }\n\n var valuePair = map.get('_ekm_value');\n\n if (!valuePair) {\n return;\n } // If reached, it implies that an object-like key was set with another\n // reference, so delete the reference and replace with the current.\n\n\n _map.delete(valuePair[0]);\n\n valuePair[0] = key;\n map.set('_ekm_value', valuePair);\n\n _map.set(key, valuePair);\n\n return valuePair;\n}\n/**\n * Variant of a Map object which enables lookup by equivalent (deeply equal)\n * object and array keys.\n */\n\n\nvar EquivalentKeyMap =\n/*#__PURE__*/\nfunction () {\n /**\n * Constructs a new instance of EquivalentKeyMap.\n *\n * @param {Iterable.<*>} iterable Initial pair of key, value for map.\n */\n function EquivalentKeyMap(iterable) {\n _classCallCheck(this, EquivalentKeyMap);\n\n this.clear();\n\n if (iterable instanceof EquivalentKeyMap) {\n // Map#forEach is only means of iterating with support for IE11.\n var iterablePairs = [];\n iterable.forEach(function (value, key) {\n iterablePairs.push([key, value]);\n });\n iterable = iterablePairs;\n }\n\n if (iterable != null) {\n for (var i = 0; i < iterable.length; i++) {\n this.set(iterable[i][0], iterable[i][1]);\n }\n }\n }\n /**\n * Accessor property returning the number of elements.\n *\n * @return {number} Number of elements.\n */\n\n\n _createClass(EquivalentKeyMap, [{\n key: \"set\",\n\n /**\n * Add or update an element with a specified key and value.\n *\n * @param {*} key The key of the element to add.\n * @param {*} value The value of the element to add.\n *\n * @return {EquivalentKeyMap} Map instance.\n */\n value: function set(key, value) {\n // Shortcut non-object-like to set on internal Map.\n if (key === null || _typeof(key) !== 'object') {\n this._map.set(key, value);\n\n return this;\n } // Sort keys to ensure stable assignment into tree.\n\n\n var properties = Object.keys(key).sort();\n var valuePair = [key, value]; // Tree by type to avoid conflicts on numeric object keys, empty value.\n\n var map = Array.isArray(key) ? this._arrayTreeMap : this._objectTreeMap;\n\n for (var i = 0; i < properties.length; i++) {\n var property = properties[i];\n\n if (!map.has(property)) {\n map.set(property, new EquivalentKeyMap());\n }\n\n map = map.get(property);\n var propertyValue = key[property];\n\n if (!map.has(propertyValue)) {\n map.set(propertyValue, new EquivalentKeyMap());\n }\n\n map = map.get(propertyValue);\n } // If an _ekm_value exists, there was already an equivalent key. Before\n // overriding, ensure that the old key reference is removed from map to\n // avoid memory leak of accumulating equivalent keys. This is, in a\n // sense, a poor man's WeakMap, while still enabling iterability.\n\n\n var previousValuePair = map.get('_ekm_value');\n\n if (previousValuePair) {\n this._map.delete(previousValuePair[0]);\n }\n\n map.set('_ekm_value', valuePair);\n\n this._map.set(key, valuePair);\n\n return this;\n }\n /**\n * Returns a specified element.\n *\n * @param {*} key The key of the element to return.\n *\n * @return {?*} The element associated with the specified key or undefined\n * if the key can't be found.\n */\n\n }, {\n key: \"get\",\n value: function get(key) {\n // Shortcut non-object-like to get from internal Map.\n if (key === null || _typeof(key) !== 'object') {\n return this._map.get(key);\n }\n\n var valuePair = getValuePair(this, key);\n\n if (valuePair) {\n return valuePair[1];\n }\n }\n /**\n * Returns a boolean indicating whether an element with the specified key\n * exists or not.\n *\n * @param {*} key The key of the element to test for presence.\n *\n * @return {boolean} Whether an element with the specified key exists.\n */\n\n }, {\n key: \"has\",\n value: function has(key) {\n if (key === null || _typeof(key) !== 'object') {\n return this._map.has(key);\n } // Test on the _presence_ of the pair, not its value, as even undefined\n // can be a valid member value for a key.\n\n\n return getValuePair(this, key) !== undefined;\n }\n /**\n * Removes the specified element.\n *\n * @param {*} key The key of the element to remove.\n *\n * @return {boolean} Returns true if an element existed and has been\n * removed, or false if the element does not exist.\n */\n\n }, {\n key: \"delete\",\n value: function _delete(key) {\n if (!this.has(key)) {\n return false;\n } // This naive implementation will leave orphaned child trees. A better\n // implementation should traverse and remove orphans.\n\n\n this.set(key, undefined);\n return true;\n }\n /**\n * Executes a provided function once per each key/value pair, in insertion\n * order.\n *\n * @param {Function} callback Function to execute for each element.\n * @param {*} thisArg Value to use as `this` when executing\n * `callback`.\n */\n\n }, {\n key: \"forEach\",\n value: function forEach(callback) {\n var _this = this;\n\n var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;\n\n this._map.forEach(function (value, key) {\n // Unwrap value from object-like value pair.\n if (key !== null && _typeof(key) === 'object') {\n value = value[1];\n }\n\n callback.call(thisArg, value, key, _this);\n });\n }\n /**\n * Removes all elements.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this._map = new Map();\n this._arrayTreeMap = new Map();\n this._objectTreeMap = new Map();\n }\n }, {\n key: \"size\",\n get: function get() {\n return this._map.size;\n }\n }]);\n\n return EquivalentKeyMap;\n}();\n\nmodule.exports = EquivalentKeyMap;\n\n\n//# sourceURL=webpack:///./node_modules/equivalent-key-map/equivalent-key-map.js?"); + +/***/ }), + +/***/ "./node_modules/immer/dist/immer.module.js": +/*!*************************************************!*\ + !*** ./node_modules/immer/dist/immer.module.js ***! + \*************************************************/ +/*! exports provided: produce, applyPatches, nothing, setAutoFreeze, setUseProxies, original, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"produce\", function() { return produce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyPatches\", function() { return applyPatches$1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nothing\", function() { return nothing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setAutoFreeze\", function() { return setAutoFreeze; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setUseProxies\", function() { return setUseProxies; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"original\", function() { return original; });\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nfunction generatePatches(state, basepath, patches, inversePatches, baseValue, resultValue) {\n if (patches) if (Array.isArray(baseValue)) generateArrayPatches(state, basepath, patches, inversePatches, baseValue, resultValue);else generateObjectPatches(state, basepath, patches, inversePatches, baseValue, resultValue);\n}\n\nfunction generateArrayPatches(state, basepath, patches, inversePatches, baseValue, resultValue) {\n var shared = Math.min(baseValue.length, resultValue.length);\n for (var i = 0; i < shared; i++) {\n if (state.assigned[i] && baseValue[i] !== resultValue[i]) {\n var path = basepath.concat(i);\n patches.push({ op: \"replace\", path: path, value: resultValue[i] });\n inversePatches.push({ op: \"replace\", path: path, value: baseValue[i] });\n }\n }\n if (shared < resultValue.length) {\n // stuff was added\n for (var _i = shared; _i < resultValue.length; _i++) {\n var _path = basepath.concat(_i);\n patches.push({ op: \"add\", path: _path, value: resultValue[_i] });\n }\n inversePatches.push({\n op: \"replace\",\n path: basepath.concat(\"length\"),\n value: baseValue.length\n });\n } else if (shared < baseValue.length) {\n // stuff was removed\n patches.push({\n op: \"replace\",\n path: basepath.concat(\"length\"),\n value: resultValue.length\n });\n for (var _i2 = shared; _i2 < baseValue.length; _i2++) {\n var _path2 = basepath.concat(_i2);\n inversePatches.push({ op: \"add\", path: _path2, value: baseValue[_i2] });\n }\n }\n}\n\nfunction generateObjectPatches(state, basepath, patches, inversePatches, baseValue, resultValue) {\n each(state.assigned, function (key, assignedValue) {\n var origValue = baseValue[key];\n var value = resultValue[key];\n var op = !assignedValue ? \"remove\" : key in baseValue ? \"replace\" : \"add\";\n if (origValue === baseValue && op === \"replace\") return;\n var path = basepath.concat(key);\n patches.push(op === \"remove\" ? { op: op, path: path } : { op: op, path: path, value: value });\n inversePatches.push(op === \"add\" ? { op: \"remove\", path: path } : op === \"remove\" ? { op: \"add\", path: path, value: origValue } : { op: \"replace\", path: path, value: origValue });\n });\n}\n\nfunction applyPatches(draft, patches) {\n for (var i = 0; i < patches.length; i++) {\n var patch = patches[i];\n var path = patch.path;\n\n if (path.length === 0 && patch.op === \"replace\") {\n draft = patch.value;\n } else {\n var base = draft;\n for (var _i3 = 0; _i3 < path.length - 1; _i3++) {\n base = base[path[_i3]];\n if (!base || (typeof base === \"undefined\" ? \"undefined\" : _typeof(base)) !== \"object\") throw new Error(\"Cannot apply patch, path doesn't resolve: \" + path.join(\"/\"));\n }\n var key = path[path.length - 1];\n switch (patch.op) {\n case \"replace\":\n case \"add\":\n // TODO: add support is not extensive, it does not support insertion or `-` atm!\n base[key] = patch.value;\n break;\n case \"remove\":\n if (Array.isArray(base)) {\n if (key === base.length - 1) base.length -= 1;else throw new Error(\"Remove can only remove the last key of an array, index: \" + key + \", length: \" + base.length);\n } else delete base[key];\n break;\n default:\n throw new Error(\"Unsupported patch operation: \" + patch.op);\n }\n }\n }\n return draft;\n}\n\nvar NOTHING = typeof Symbol !== \"undefined\" ? Symbol(\"immer-nothing\") : defineProperty({}, \"immer-nothing\", true);\n\nvar PROXY_STATE = typeof Symbol !== \"undefined\" ? Symbol(\"immer-proxy-state\") : \"__$immer_state\";\n\nvar RETURNED_AND_MODIFIED_ERROR = \"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.\";\n\nfunction verifyMinified() {}\n\nvar inProduction = typeof process !== \"undefined\" && \"development\" === \"production\" || verifyMinified.name !== \"verifyMinified\";\n\nvar autoFreeze = !inProduction;\nvar useProxies = typeof Proxy !== \"undefined\" && typeof Reflect !== \"undefined\";\n\n/**\n * Automatically freezes any state trees generated by immer.\n * This protects against accidental modifications of the state tree outside of an immer function.\n * This comes with a performance impact, so it is recommended to disable this option in production.\n * It is by default enabled.\n *\n * @returns {void}\n */\nfunction setAutoFreeze(enableAutoFreeze) {\n autoFreeze = enableAutoFreeze;\n}\n\nfunction setUseProxies(value) {\n useProxies = value;\n}\n\nfunction getUseProxies() {\n return useProxies;\n}\n\nfunction isProxy(value) {\n return !!value && !!value[PROXY_STATE];\n}\n\nfunction isProxyable(value) {\n if (!value) return false;\n if ((typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) !== \"object\") return false;\n if (Array.isArray(value)) return true;\n var proto = Object.getPrototypeOf(value);\n return proto === null || proto === Object.prototype;\n}\n\nfunction freeze(value) {\n if (autoFreeze) {\n Object.freeze(value);\n }\n return value;\n}\n\nfunction original(value) {\n if (value && value[PROXY_STATE]) {\n return value[PROXY_STATE].base;\n }\n // otherwise return undefined\n}\n\nvar assign = Object.assign || function assign(target, value) {\n for (var key in value) {\n if (has(value, key)) {\n target[key] = value[key];\n }\n }\n return target;\n};\n\nfunction shallowCopy(value) {\n if (Array.isArray(value)) return value.slice();\n var target = value.__proto__ === undefined ? Object.create(null) : {};\n return assign(target, value);\n}\n\nfunction each(value, cb) {\n if (Array.isArray(value)) {\n for (var i = 0; i < value.length; i++) {\n cb(i, value[i]);\n }\n } else {\n for (var key in value) {\n cb(key, value[key]);\n }\n }\n}\n\nfunction has(thing, prop) {\n return Object.prototype.hasOwnProperty.call(thing, prop);\n}\n\n// given a base object, returns it if unmodified, or return the changed cloned if modified\nfunction finalize(base, path, patches, inversePatches) {\n if (isProxy(base)) {\n var state = base[PROXY_STATE];\n if (state.modified === true) {\n if (state.finalized === true) return state.copy;\n state.finalized = true;\n var result = finalizeObject(useProxies ? state.copy : state.copy = shallowCopy(base), state, path, patches, inversePatches);\n generatePatches(state, path, patches, inversePatches, state.base, result);\n return result;\n } else {\n return state.base;\n }\n }\n finalizeNonProxiedObject(base);\n return base;\n}\n\nfunction finalizeObject(copy, state, path, patches, inversePatches) {\n var base = state.base;\n each(copy, function (prop, value) {\n if (value !== base[prop]) {\n // if there was an assignment on this property, we don't need to generate\n // patches for the subtree\n var _generatePatches = patches && !has(state.assigned, prop);\n copy[prop] = finalize(value, _generatePatches && path.concat(prop), _generatePatches && patches, inversePatches);\n }\n });\n return freeze(copy);\n}\n\nfunction finalizeNonProxiedObject(parent) {\n // If finalize is called on an object that was not a proxy, it means that it is an object that was not there in the original\n // tree and it could contain proxies at arbitrarily places. Let's find and finalize them as well\n if (!isProxyable(parent)) return;\n if (Object.isFrozen(parent)) return;\n each(parent, function (i, child) {\n if (isProxy(child)) {\n parent[i] = finalize(child);\n } else finalizeNonProxiedObject(child);\n });\n // always freeze completely new data\n freeze(parent);\n}\n\nfunction is(x, y) {\n // From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\n// @ts-check\n\nvar proxies = null;\n\nvar objectTraps = {\n get: get$1,\n has: function has$$1(target, prop) {\n return prop in source(target);\n },\n ownKeys: function ownKeys(target) {\n return Reflect.ownKeys(source(target));\n },\n\n set: set$1,\n deleteProperty: deleteProperty,\n getOwnPropertyDescriptor: getOwnPropertyDescriptor,\n defineProperty: defineProperty$1,\n setPrototypeOf: function setPrototypeOf() {\n throw new Error(\"Immer does not support `setPrototypeOf()`.\");\n }\n};\n\nvar arrayTraps = {};\neach(objectTraps, function (key, fn) {\n arrayTraps[key] = function () {\n arguments[0] = arguments[0][0];\n return fn.apply(this, arguments);\n };\n});\narrayTraps.deleteProperty = function (state, prop) {\n if (isNaN(parseInt(prop))) throw new Error(\"Immer does not support deleting properties from arrays: \" + prop);\n return objectTraps.deleteProperty.call(this, state[0], prop);\n};\narrayTraps.set = function (state, prop, value) {\n if (prop !== \"length\" && isNaN(parseInt(prop))) throw new Error(\"Immer does not support setting non-numeric properties on arrays: \" + prop);\n return objectTraps.set.call(this, state[0], prop, value);\n};\n\nfunction createState(parent, base) {\n return {\n modified: false, // this tree is modified (either this object or one of it's children)\n assigned: {}, // true: value was assigned to these props, false: was removed\n finalized: false,\n parent: parent,\n base: base,\n copy: undefined,\n proxies: {}\n };\n}\n\nfunction source(state) {\n return state.modified === true ? state.copy : state.base;\n}\n\nfunction get$1(state, prop) {\n if (prop === PROXY_STATE) return state;\n if (state.modified) {\n var value = state.copy[prop];\n if (value === state.base[prop] && isProxyable(value))\n // only create proxy if it is not yet a proxy, and not a new object\n // (new objects don't need proxying, they will be processed in finalize anyway)\n return state.copy[prop] = createProxy(state, value);\n return value;\n } else {\n if (has(state.proxies, prop)) return state.proxies[prop];\n var _value = state.base[prop];\n if (!isProxy(_value) && isProxyable(_value)) return state.proxies[prop] = createProxy(state, _value);\n return _value;\n }\n}\n\nfunction set$1(state, prop, value) {\n // TODO: optimize\n state.assigned[prop] = true;\n if (!state.modified) {\n if (prop in state.base && is(state.base[prop], value) || has(state.proxies, prop) && state.proxies[prop] === value) return true;\n markChanged(state);\n }\n state.copy[prop] = value;\n return true;\n}\n\nfunction deleteProperty(state, prop) {\n state.assigned[prop] = false;\n markChanged(state);\n delete state.copy[prop];\n return true;\n}\n\nfunction getOwnPropertyDescriptor(state, prop) {\n var owner = state.modified ? state.copy : has(state.proxies, prop) ? state.proxies : state.base;\n var descriptor = Reflect.getOwnPropertyDescriptor(owner, prop);\n if (descriptor && !(Array.isArray(owner) && prop === \"length\")) descriptor.configurable = true;\n return descriptor;\n}\n\nfunction defineProperty$1() {\n throw new Error(\"Immer does not support defining properties on draft objects.\");\n}\n\nfunction markChanged(state) {\n if (!state.modified) {\n state.modified = true;\n state.copy = shallowCopy(state.base);\n // copy the proxies over the base-copy\n Object.assign(state.copy, state.proxies); // yup that works for arrays as well\n if (state.parent) markChanged(state.parent);\n }\n}\n\n// creates a proxy for plain objects / arrays\nfunction createProxy(parentState, base) {\n if (isProxy(base)) throw new Error(\"Immer bug. Plz report.\");\n var state = createState(parentState, base);\n var proxy = Array.isArray(base) ? Proxy.revocable([state], arrayTraps) : Proxy.revocable(state, objectTraps);\n proxies.push(proxy);\n return proxy.proxy;\n}\n\nfunction produceProxy(baseState, producer, patchListener) {\n if (isProxy(baseState)) {\n // See #100, don't nest producers\n var returnValue = producer.call(baseState, baseState);\n return returnValue === undefined ? baseState : returnValue;\n }\n var previousProxies = proxies;\n proxies = [];\n var patches = patchListener && [];\n var inversePatches = patchListener && [];\n try {\n // create proxy for root\n var rootProxy = createProxy(undefined, baseState);\n // execute the thunk\n var _returnValue = producer.call(rootProxy, rootProxy);\n // and finalize the modified proxy\n var result = void 0;\n // check whether the draft was modified and/or a value was returned\n if (_returnValue !== undefined && _returnValue !== rootProxy) {\n // something was returned, and it wasn't the proxy itself\n if (rootProxy[PROXY_STATE].modified) throw new Error(RETURNED_AND_MODIFIED_ERROR);\n\n // See #117\n // Should we just throw when returning a proxy which is not the root, but a subset of the original state?\n // Looks like a wrongly modeled reducer\n result = finalize(_returnValue);\n if (patches) {\n patches.push({ op: \"replace\", path: [], value: result });\n inversePatches.push({ op: \"replace\", path: [], value: baseState });\n }\n } else {\n result = finalize(rootProxy, [], patches, inversePatches);\n }\n // revoke all proxies\n each(proxies, function (_, p) {\n return p.revoke();\n });\n patchListener && patchListener(patches, inversePatches);\n return result;\n } finally {\n proxies = previousProxies;\n }\n}\n\n// @ts-check\n\nvar descriptors = {};\nvar states = null;\n\nfunction createState$1(parent, proxy, base) {\n return {\n modified: false,\n assigned: {}, // true: value was assigned to these props, false: was removed\n hasCopy: false,\n parent: parent,\n base: base,\n proxy: proxy,\n copy: undefined,\n finished: false,\n finalizing: false,\n finalized: false\n };\n}\n\nfunction source$1(state) {\n return state.hasCopy ? state.copy : state.base;\n}\n\nfunction _get(state, prop) {\n assertUnfinished(state);\n var value = source$1(state)[prop];\n if (!state.finalizing && value === state.base[prop] && isProxyable(value)) {\n // only create a proxy if the value is proxyable, and the value was in the base state\n // if it wasn't in the base state, the object is already modified and we will process it in finalize\n prepareCopy(state);\n return state.copy[prop] = createProxy$1(state, value);\n }\n return value;\n}\n\nfunction _set(state, prop, value) {\n assertUnfinished(state);\n state.assigned[prop] = true; // optimization; skip this if there is no listener\n if (!state.modified) {\n if (is(source$1(state)[prop], value)) return;\n markChanged$1(state);\n prepareCopy(state);\n }\n state.copy[prop] = value;\n}\n\nfunction markChanged$1(state) {\n if (!state.modified) {\n state.modified = true;\n if (state.parent) markChanged$1(state.parent);\n }\n}\n\nfunction prepareCopy(state) {\n if (state.hasCopy) return;\n state.hasCopy = true;\n state.copy = shallowCopy(state.base);\n}\n\n// creates a proxy for plain objects / arrays\nfunction createProxy$1(parent, base) {\n var proxy = shallowCopy(base);\n each(base, function (i) {\n Object.defineProperty(proxy, \"\" + i, createPropertyProxy(\"\" + i));\n });\n var state = createState$1(parent, proxy, base);\n createHiddenProperty(proxy, PROXY_STATE, state);\n states.push(state);\n return proxy;\n}\n\nfunction createPropertyProxy(prop) {\n return descriptors[prop] || (descriptors[prop] = {\n configurable: true,\n enumerable: true,\n get: function get$$1() {\n return _get(this[PROXY_STATE], prop);\n },\n set: function set$$1(value) {\n _set(this[PROXY_STATE], prop, value);\n }\n });\n}\n\nfunction assertUnfinished(state) {\n if (state.finished === true) throw new Error(\"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? \" + JSON.stringify(state.copy || state.base));\n}\n\n// this sounds very expensive, but actually it is not that expensive in practice\n// as it will only visit proxies, and only do key-based change detection for objects for\n// which it is not already know that they are changed (that is, only object for which no known key was changed)\nfunction markChangesSweep() {\n // intentionally we process the proxies in reverse order;\n // ideally we start by processing leafs in the tree, because if a child has changed, we don't have to check the parent anymore\n // reverse order of proxy creation approximates this\n for (var i = states.length - 1; i >= 0; i--) {\n var state = states[i];\n if (state.modified === false) {\n if (Array.isArray(state.base)) {\n if (hasArrayChanges(state)) markChanged$1(state);\n } else if (hasObjectChanges(state)) markChanged$1(state);\n }\n }\n}\n\nfunction markChangesRecursively(object) {\n if (!object || (typeof object === \"undefined\" ? \"undefined\" : _typeof(object)) !== \"object\") return;\n var state = object[PROXY_STATE];\n if (!state) return;\n var proxy = state.proxy,\n base = state.base;\n\n if (Array.isArray(object)) {\n if (hasArrayChanges(state)) {\n markChanged$1(state);\n state.assigned.length = true;\n if (proxy.length < base.length) for (var i = proxy.length; i < base.length; i++) {\n state.assigned[i] = false;\n } else for (var _i = base.length; _i < proxy.length; _i++) {\n state.assigned[_i] = true;\n }each(proxy, function (index, child) {\n if (!state.assigned[index]) markChangesRecursively(child);\n });\n }\n } else {\n var _diffKeys = diffKeys(base, proxy),\n added = _diffKeys.added,\n removed = _diffKeys.removed;\n\n if (added.length > 0 || removed.length > 0) markChanged$1(state);\n each(added, function (_, key) {\n state.assigned[key] = true;\n });\n each(removed, function (_, key) {\n state.assigned[key] = false;\n });\n each(proxy, function (key, child) {\n if (!state.assigned[key]) markChangesRecursively(child);\n });\n }\n}\n\nfunction diffKeys(from, to) {\n // TODO: optimize\n var a = Object.keys(from);\n var b = Object.keys(to);\n return {\n added: b.filter(function (key) {\n return a.indexOf(key) === -1;\n }),\n removed: a.filter(function (key) {\n return b.indexOf(key) === -1;\n })\n };\n}\n\nfunction hasObjectChanges(state) {\n var baseKeys = Object.keys(state.base);\n var keys = Object.keys(state.proxy);\n return !shallowEqual(baseKeys, keys);\n}\n\nfunction hasArrayChanges(state) {\n var proxy = state.proxy;\n\n if (proxy.length !== state.base.length) return true;\n // See #116\n // If we first shorten the length, our array interceptors will be removed.\n // If after that new items are added, result in the same original length,\n // those last items will have no intercepting property.\n // So if there is no own descriptor on the last position, we know that items were removed and added\n // N.B.: splice, unshift, etc only shift values around, but not prop descriptors, so we only have to check\n // the last one\n var descriptor = Object.getOwnPropertyDescriptor(proxy, proxy.length - 1);\n // descriptor can be null, but only for newly created sparse arrays, eg. new Array(10)\n if (descriptor && !descriptor.get) return true;\n // For all other cases, we don't have to compare, as they would have been picked up by the index setters\n return false;\n}\n\nfunction produceEs5(baseState, producer, patchListener) {\n if (isProxy(baseState)) {\n // See #100, don't nest producers\n var returnValue = producer.call(baseState, baseState);\n return returnValue === undefined ? baseState : returnValue;\n }\n var prevStates = states;\n states = [];\n var patches = patchListener && [];\n var inversePatches = patchListener && [];\n try {\n // create proxy for root\n var rootProxy = createProxy$1(undefined, baseState);\n // execute the thunk\n var _returnValue = producer.call(rootProxy, rootProxy);\n // and finalize the modified proxy\n each(states, function (_, state) {\n state.finalizing = true;\n });\n var result = void 0;\n // check whether the draft was modified and/or a value was returned\n if (_returnValue !== undefined && _returnValue !== rootProxy) {\n // something was returned, and it wasn't the proxy itself\n if (rootProxy[PROXY_STATE].modified) throw new Error(RETURNED_AND_MODIFIED_ERROR);\n result = finalize(_returnValue);\n if (patches) {\n patches.push({ op: \"replace\", path: [], value: result });\n inversePatches.push({ op: \"replace\", path: [], value: baseState });\n }\n } else {\n if (patchListener) markChangesRecursively(rootProxy);\n markChangesSweep(); // this one is more efficient if we don't need to know which attributes have changed\n result = finalize(rootProxy, [], patches, inversePatches);\n }\n // make sure all proxies become unusable\n each(states, function (_, state) {\n state.finished = true;\n });\n patchListener && patchListener(patches, inversePatches);\n return result;\n } finally {\n states = prevStates;\n }\n}\n\nfunction shallowEqual(objA, objB) {\n //From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js\n if (is(objA, objB)) return true;\n if ((typeof objA === \"undefined\" ? \"undefined\" : _typeof(objA)) !== \"object\" || objA === null || (typeof objB === \"undefined\" ? \"undefined\" : _typeof(objB)) !== \"object\" || objB === null) {\n return false;\n }\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n return true;\n}\n\nfunction createHiddenProperty(target, prop, value) {\n Object.defineProperty(target, prop, {\n value: value,\n enumerable: false,\n writable: true\n });\n}\n\n/**\n * produce takes a state, and runs a function against it.\n * That function can freely mutate the state, as it will create copies-on-write.\n * This means that the original state will stay unchanged, and once the function finishes, the modified state is returned\n *\n * @export\n * @param {any} baseState - the state to start with\n * @param {Function} producer - function that receives a proxy of the base state as first argument and which can be freely modified\n * @param {Function} patchListener - optional function that will be called with all the patches produced here\n * @returns {any} a new state, or the base state if nothing was modified\n */\nfunction produce(baseState, producer, patchListener) {\n // prettier-ignore\n if (arguments.length < 1 || arguments.length > 3) throw new Error(\"produce expects 1 to 3 arguments, got \" + arguments.length);\n\n // curried invocation\n if (typeof baseState === \"function\") {\n // prettier-ignore\n if (typeof producer === \"function\") throw new Error(\"if first argument is a function (curried invocation), the second argument to produce cannot be a function\");\n\n var initialState = producer;\n var recipe = baseState;\n\n return function () {\n var args = arguments;\n\n var currentState = args[0] === undefined && initialState !== undefined ? initialState : args[0];\n\n return produce(currentState, function (draft) {\n args[0] = draft; // blegh!\n return recipe.apply(draft, args);\n });\n };\n }\n\n // prettier-ignore\n {\n if (typeof producer !== \"function\") throw new Error(\"if first argument is not a function, the second argument to produce should be a function\");\n if (patchListener !== undefined && typeof patchListener !== \"function\") throw new Error(\"the third argument of a producer should not be set or a function\");\n }\n\n // if state is a primitive, don't bother proxying at all\n if ((typeof baseState === \"undefined\" ? \"undefined\" : _typeof(baseState)) !== \"object\" || baseState === null) {\n var returnValue = producer(baseState);\n return returnValue === undefined ? baseState : normalizeResult(returnValue);\n }\n\n if (!isProxyable(baseState)) throw new Error(\"the first argument to an immer producer should be a primitive, plain object or array, got \" + (typeof baseState === \"undefined\" ? \"undefined\" : _typeof(baseState)) + \": \\\"\" + baseState + \"\\\"\");\n return normalizeResult(getUseProxies() ? produceProxy(baseState, producer, patchListener) : produceEs5(baseState, producer, patchListener));\n}\n\nfunction normalizeResult(result) {\n return result === NOTHING ? undefined : result;\n}\n\nvar applyPatches$1 = produce(applyPatches);\n\nvar nothing = NOTHING;\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (produce);\n//# sourceMappingURL=immer.module.js.map\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/immer/dist/immer.module.js?"); + +/***/ }), + +/***/ "./node_modules/is-promise/index.js": +/*!******************************************!*\ + !*** ./node_modules/is-promise/index.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n\n\n//# sourceURL=webpack:///./node_modules/is-promise/index.js?"); + +/***/ }), + +/***/ "./node_modules/lodash/lodash.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/lodash.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**\n * @license\n * Lodash \n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.11';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading and trailing whitespace. */\n var reTrim = /^\\s+|\\s+$/g,\n reTrimStart = /^\\s+/,\n reTrimEnd = /\\s+$/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = true && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n\n return result;\n }\n\n if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n\n return result;\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n if (isObject(srcValue)) {\n stack || (stack = new Stack);\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n var index = -1;\n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n value = iteratee(value);\n\n var low = 0,\n high = array == null ? 0 : array.length,\n valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

' + func(text) + '

';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

fred, barney, & pebbles

'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': ' + + + + + +
+ + + diff --git a/build/gutenberg/vendor.js b/build/gutenberg/vendor.js new file mode 100644 index 000000000..19088b69d --- /dev/null +++ b/build/gutenberg/vendor.js @@ -0,0 +1,579 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./packages/vendor/index.js"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js": +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js": +/*!**************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ \"./node_modules/@babel/runtime/helpers/arrayWithHoles.js\");\n\nvar iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ \"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js\");\n\nvar nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ \"./node_modules/@babel/runtime/helpers/nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/slicedToArray.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-basics/index.js": +/*!**********************************************!*\ + !*** ./node_modules/callbag-basics/index.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("module.exports = {\n forEach: __webpack_require__(/*! callbag-for-each */ \"./node_modules/callbag-for-each/readme.js\"),\n fromObs: __webpack_require__(/*! callbag-from-obs */ \"./node_modules/callbag-from-obs/readme.js\"),\n fromIter: __webpack_require__(/*! callbag-from-iter */ \"./node_modules/callbag-from-iter/index.js\"),\n fromEvent: __webpack_require__(/*! callbag-from-event */ \"./node_modules/callbag-from-event/index.js\"),\n fromPromise: __webpack_require__(/*! callbag-from-promise */ \"./node_modules/callbag-from-promise/index.js\"),\n interval: __webpack_require__(/*! callbag-interval */ \"./node_modules/callbag-interval/index.js\"),\n map: __webpack_require__(/*! callbag-map */ \"./node_modules/callbag-map/readme.js\"),\n scan: __webpack_require__(/*! callbag-scan */ \"./node_modules/callbag-scan/readme.js\"),\n flatten: __webpack_require__(/*! callbag-flatten */ \"./node_modules/callbag-flatten/index.js\"),\n take: __webpack_require__(/*! callbag-take */ \"./node_modules/callbag-take/index.js\"),\n skip: __webpack_require__(/*! callbag-skip */ \"./node_modules/callbag-skip/index.js\"),\n filter: __webpack_require__(/*! callbag-filter */ \"./node_modules/callbag-filter/readme.js\"),\n merge: __webpack_require__(/*! callbag-merge */ \"./node_modules/callbag-merge/readme.js\"),\n concat: __webpack_require__(/*! callbag-concat */ \"./node_modules/callbag-concat/readme.js\"),\n combine: __webpack_require__(/*! callbag-combine */ \"./node_modules/callbag-combine/readme.js\"),\n share: __webpack_require__(/*! callbag-share */ \"./node_modules/callbag-share/index.js\"),\n pipe: __webpack_require__(/*! callbag-pipe */ \"./node_modules/callbag-pipe/readme.js\")\n};\n\n\n\n//# sourceURL=webpack:///./node_modules/callbag-basics/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-combine/readme.js": +/*!************************************************!*\ + !*** ./node_modules/callbag-combine/readme.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-combine\n * ---------------\n *\n * Callbag factory that combines the latest data points from multiple (2 or\n * more) callbag sources. It delivers those latest values as an array. Works\n * with both pullable and listenable sources.\n *\n * `npm install callbag-combine`\n *\n * Example:\n *\n * const interval = require('callbag-interval');\n * const observe = require('callbag-observe');\n * const combine = require('callbag-combine');\n *\n * const source = combine(interval(100), interval(350));\n *\n * observe(x => console.log(x))(source); // [2,0]\n * // [3,0]\n * // [4,0]\n * // [5,0]\n * // [6,0]\n * // [6,1]\n * // [7,1]\n * // [8,1]\n * // ...\n */\n\nconst EMPTY = {};\n\nconst combine = (...sources) => (start, sink) => {\n if (start !== 0) return;\n const n = sources.length;\n if (n === 0) {\n sink(0, () => {});\n sink(1, []);\n sink(2);\n return;\n }\n let Ns = n; // start counter\n let Nd = n; // data counter\n let Ne = n; // end counter\n const vals = new Array(n);\n const sourceTalkbacks = new Array(n);\n const talkback = (t, d) => {\n if (t !== 2) return;\n for (let i = 0; i < n; i++) sourceTalkbacks[i](2);\n };\n sources.forEach((source, i) => {\n vals[i] = EMPTY;\n source(0, (t, d) => {\n if (t === 0) {\n sourceTalkbacks[i] = d;\n if (--Ns === 0) sink(0, talkback);\n } else if (t === 1) {\n const _Nd = !Nd ? 0 : vals[i] === EMPTY ? --Nd : Nd;\n vals[i] = d;\n if (_Nd === 0) {\n const arr = new Array(n);\n for (let j = 0; j < n; ++j) arr[j] = vals[j];\n sink(1, arr);\n }\n } else if (t === 2) {\n if (--Ne === 0) sink(2);\n } else {\n sink(t, d);\n }\n });\n });\n};\n\nmodule.exports = combine;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-combine/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-concat/readme.js": +/*!***********************************************!*\ + !*** ./node_modules/callbag-concat/readme.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-concat\n * --------------\n *\n * Callbag factory that concatenates the data from multiple (2 or more)\n * callbag sources. It starts each source at a time: waits for the previous\n * source to end before starting the next source. Works with both pullable\n * and listenable sources.\n *\n * `npm install callbag-concat`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const concat = require('callbag-concat');\n *\n * const source = concat(fromIter([10,20,30]), fromIter(['a','b']));\n *\n * iterate(x => console.log(x))(source); // 10\n * // 20\n * // 30\n * // a\n * // b\n */\n\nconst concat = (...sources) => (start, sink) => {\n if (start !== 0) return;\n const n = sources.length;\n if (n === 0) {\n sink(0, () => {});\n sink(2);\n return;\n }\n let i = 0;\n let sourceTalkback;\n const talkback = (t, d) => {\n if (t === 1 || t === 2) {\n sourceTalkback(t, d);\n }\n };\n (function next() {\n if (i === n) {\n sink(2);\n return;\n }\n sources[i](0, (t, d) => {\n if (t === 0) {\n sourceTalkback = d;\n if (i === 0) sink(0, talkback);\n else sourceTalkback(1);\n } else if (t === 1) {\n sink(1, d);\n } else if (t === 2) {\n i++;\n next();\n }\n });\n })();\n};\n\nmodule.exports = concat;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-concat/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-drop-repeats/index.js": +/*!****************************************************!*\ + !*** ./node_modules/callbag-drop-repeats/index.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const dropRepeats = pred => src => (start, sink) => {\n const INIT = {};\n let cache = INIT;\n let ask;\n const equals = pred || ((a, b) => a === b);\n start === 0 && src(start, (t, d) => {\n if (t === start) ask = d;\n if (t === 1) return cache !== INIT && equals(cache, d) ? ask(t) : sink(t, cache = d);\n sink(t, d);\n });\n};\n\nmodule.exports = dropRepeats;\n\n//# sourceURL=webpack:///./node_modules/callbag-drop-repeats/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-filter/readme.js": +/*!***********************************************!*\ + !*** ./node_modules/callbag-filter/readme.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-filter\n * --------------\n *\n * Callbag operator that conditionally lets data pass through. Works on either\n * pullable or listenable sources.\n *\n * `npm install callbag-filter`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const filter = require('callbag-filter');\n *\n * const source = filter(x => x % 2)(fromIter([1,2,3,4,5]));\n *\n * iterate(x => console.log(x))(source); // 1\n * // 3\n * // 5\n */\n\nconst filter = condition => source => (start, sink) => {\n if (start !== 0) return;\n let talkback;\n source(0, (t, d) => {\n if (t === 0) {\n talkback = d;\n sink(t, d);\n } else if (t === 1) {\n if (condition(d)) sink(t, d);\n else talkback(1);\n }\n else sink(t, d);\n });\n};\n\nmodule.exports = filter;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-filter/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-flatten/index.js": +/*!***********************************************!*\ + !*** ./node_modules/callbag-flatten/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const flatten = source => (start, sink) => {\n if (start !== 0) return;\n const exists = x => typeof x !== 'undefined';\n const absent = x => typeof x === 'undefined';\n const noop = () => {};\n let outerEnded = false;\n let outerTalkback;\n let innerTalkback;\n function talkback(t) {\n if (t === 1) (innerTalkback || outerTalkback || noop)(1);\n if (t === 2) {\n innerTalkback && innerTalkback(2);\n outerTalkback && outerTalkback(2);\n }\n }\n source(0, (T, D) => {\n if (T === 0) {\n outerTalkback = D;\n sink(0, talkback);\n } else if (T === 1) {\n const innerSource = D;\n if (innerTalkback) innerTalkback(2);\n innerSource(0, (t, d) => {\n if (t === 0) {\n innerTalkback = d;\n innerTalkback(1);\n } else if (t === 1) sink(1, d);\n else if (t === 2 && absent(d)) {\n if (outerEnded) sink(2);\n else {\n innerTalkback = void 0;\n outerTalkback(1);\n }\n }\n else if (t === 2 && exists(d)) sink(2, d);\n });\n } else if (T === 2 && absent(D)) {\n if (!innerTalkback) sink(2);\n else outerEnded = true;\n } else if (T === 2 && exists(D)) sink(2, D);\n });\n};\n\nmodule.exports = flatten;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-flatten/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-for-each/readme.js": +/*!*************************************************!*\ + !*** ./node_modules/callbag-for-each/readme.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-for-each\n * ----------------\n *\n * Callbag sink that consume both pullable and listenable sources. When called\n * on a pullable source, it will iterate through its data. When called on a\n * listenable source, it will observe its data.\n *\n * `npm install callbag-for-each`\n *\n * Examples\n * --------\n *\n * Consume a pullable source:\n *\n * const fromIter = require('callbag-from-iter');\n * const forEach = require('callbag-for-each');\n *\n * const source = fromIter([10,20,30,40])\n *\n * forEach(x => console.log(x))(source); // 10\n * // 20\n * // 30\n * // 40\n *\n * Consume a listenable source:\n *\n * const interval = require('callbag-interval');\n * const forEach = require('callbag-for-each');\n *\n * const source = interval(1000);\n *\n * forEach(x => console.log(x))(source); // 0\n * // 1\n * // 2\n * // 3\n * // ...\n */\n\nconst forEach = operation => source => {\n let talkback;\n source(0, (t, d) => {\n if (t === 0) talkback = d;\n if (t === 1) operation(d);\n if (t === 1 || t === 0) talkback(1);\n });\n};\n\nmodule.exports = forEach;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-for-each/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-from-event/index.js": +/*!**************************************************!*\ + !*** ./node_modules/callbag-from-event/index.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const fromEvent = (node, name) => (start, sink) => {\n if (start !== 0) return;\n const handler = ev => sink(1, ev);\n sink(0, t => {\n if (t === 2) node.removeEventListener(name, handler);\n });\n node.addEventListener(name, handler);\n};\n\nmodule.exports = fromEvent;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-event/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-from-iter/index.js": +/*!*************************************************!*\ + !*** ./node_modules/callbag-from-iter/index.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const fromIter = iter => (start, sink) => {\n if (start !== 0) return;\n const iterator =\n typeof Symbol !== 'undefined' && iter[Symbol.iterator]\n ? iter[Symbol.iterator]()\n : iter;\n let inloop = false;\n let got1 = false;\n let res;\n function loop() {\n inloop = true;\n while (got1) {\n got1 = false;\n res = iterator.next();\n if (res.done) sink(2);\n else sink(1, res.value);\n }\n inloop = false;\n }\n sink(0, t => {\n if (t === 1) {\n got1 = true;\n if (!inloop && !(res && res.done)) loop();\n }\n });\n};\n\nmodule.exports = fromIter;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-iter/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-from-obs/readme.js": +/*!*************************************************!*\ + !*** ./node_modules/callbag-from-obs/readme.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-from-obs\n * --------------\n *\n * Convert an observable (or subscribable) to a callbag listenable source.\n *\n * `npm install callbag-from-obs`\n *\n * Example:\n *\n * Convert an RxJS Observable:\n *\n * const Rx = require('rxjs');\n * const fromObs = require('callbag-from-obs');\n * const observe = require('callbag-observe');\n *\n * const source = fromObs(Rx.Observable.interval(1000).take(4));\n *\n * observe(x => console.log(x)(source); // 0\n * // 1\n * // 2\n * // 3\n *\n * Convert anything that has the `.subscribe` method:\n *\n * const fromObs = require('callbag-from-obs');\n * const observe = require('callbag-observe');\n *\n * const subscribable = {\n * subscribe: (observer) => {\n * let i = 0;\n * setInterval(() => observer.next(i++), 1000);\n * }\n * };\n *\n * const source = fromObs(subscribable);\n *\n * observe(x => console.log(x))(source); // 0\n * // 1\n * // 2\n * // 3\n * // ...\n */\n\nconst fromObs = observable => (start, sink) => {\n if (start !== 0) return;\n let dispose;\n sink(0, t => {\n if (t === 2 && dispose) {\n if (dispose.unsubscribe) dispose.unsubscribe();\n else dispose();\n }\n });\n dispose = observable.subscribe({\n next: x => sink(1, x),\n error: e => sink(2, e),\n complete: () => sink(2)\n });\n};\n\nmodule.exports = fromObs;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-obs/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-from-promise/index.js": +/*!****************************************************!*\ + !*** ./node_modules/callbag-from-promise/index.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const fromPromise = promise => (start, sink) => {\n if (start !== 0) return;\n let ended = false;\n const onfulfilled = val => {\n if (ended) return;\n sink(1, val);\n sink(2);\n };\n const onrejected = err => {\n if (ended) return;\n sink(2, err);\n };\n promise.then(onfulfilled, onrejected);\n sink(0, t => {\n if (t === 2) ended = true;\n });\n};\n\nmodule.exports = fromPromise;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-promise/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-interval/index.js": +/*!************************************************!*\ + !*** ./node_modules/callbag-interval/index.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const interval = period => (start, sink) => {\n if (start !== 0) return;\n let i = 0;\n const id = setInterval(() => {\n sink(1, i++);\n }, period);\n sink(0, t => {\n if (t === 2) clearInterval(id);\n });\n};\n\nmodule.exports = interval;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-interval/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-map/readme.js": +/*!********************************************!*\ + !*** ./node_modules/callbag-map/readme.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-map\n * -----------\n *\n * Callbag operator that applies a transformation on data passing through it.\n * Works on either pullable or listenable sources.\n *\n * `npm install callbag-map`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const map = require('callbag-map');\n *\n * const source = map(x => x * 0.1)(fromIter([10,20,30,40]));\n *\n * iterate(x => console.log(x))(source); // 1\n * // 2\n * // 3\n * // 4\n */\n\nconst map = f => source => (start, sink) => {\n if (start !== 0) return;\n source(0, (t, d) => {\n sink(t, t === 1 ? f(d) : d)\n });\n};\n\nmodule.exports = map;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-map/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-merge/readme.js": +/*!**********************************************!*\ + !*** ./node_modules/callbag-merge/readme.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-merge\n * -------------\n *\n * Callbag factory that merges data from multiple callbag sources. Works well\n * with listenable sources, and while it may work for some pullable sources,\n * it is only designed for listenable sources.\n *\n * `npm install callbag-merge`\n *\n * Example:\n *\n * const interval = require('callbag-interval');\n * const forEach = require('callbag-for-each');\n * const merge = require('callbag-merge');\n *\n * const source = merge(interval(100), interval(350));\n *\n * forEach(x => console.log(x))(source); // 0\n * // 1\n * // 2\n * // 0\n * // 3\n * // 4\n * // 5\n * // ...\n */\n\nfunction merge(...sources) {\n return (start, sink) => {\n if (start !== 0) return;\n const n = sources.length;\n const sourceTalkbacks = new Array(n);\n let startCount = 0;\n let endCount = 0;\n const talkback = t => {\n if (t === 0) return;\n for (let i = 0; i < n; i++) sourceTalkbacks[i] && sourceTalkbacks[i](t);\n };\n for (let i = 0; i < n; i++) {\n sources[i](0, (t, d) => {\n if (t === 0) {\n sourceTalkbacks[i] = d;\n if (++startCount === 1) sink(0, talkback);\n } else if (t === 2) {\n sourceTalkbacks[i] = void 0;\n if (++endCount === n) sink(2);\n } else sink(t, d);\n });\n }\n };\n}\n\nmodule.exports = merge;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-merge/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-pipe/readme.js": +/*!*********************************************!*\ + !*** ./node_modules/callbag-pipe/readme.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-pipe\n * ------------\n *\n * Utility function for plugging callbags together in chain. This utility\n * actually doesn't rely on Callbag specifics, and is basically the same as\n * Ramda's `pipe` or lodash's `flow`. Anyway, this exists just to play nicely\n * with the ecosystem, and to facilitate the import of the function.\n *\n * `npm install callbag-pipe`\n *\n * Example:\n *\n * Create a source with `pipe`, then pass it to a `forEach`:\n *\n * const interval = require('callbag-interval');\n * const forEach = require('callbag-for-each');\n * const combine = require('callbag-combine');\n * const pipe = require('callbag-pipe');\n * const take = require('callbag-take');\n * const map = require('callbag-map');\n *\n * const source = pipe(\n * combine(interval(100), interval(350)),\n * map(([x, y]) => `X${x},Y${y}`),\n * take(10)\n * );\n *\n * forEach(x => console.log(x))(source); // X2,Y0\n * // X3,Y0\n * // X4,Y0\n * // X5,Y0\n * // X6,Y0\n * // X6,Y1\n * // X7,Y1\n * // X8,Y1\n * // X9,Y1\n * // X9,Y2\n *\n *\n * Or use `pipe` to go all the way from source to sink:\n *\n * const interval = require('callbag-interval');\n * const forEach = require('callbag-for-each');\n * const combine = require('callbag-combine');\n * const pipe = require('callbag-pipe');\n * const take = require('callbag-take');\n * const map = require('callbag-map');\n *\n * pipe(\n * combine(interval(100), interval(350)),\n * map(([x, y]) => `X${x},Y${y}`),\n * take(10),\n * forEach(x => console.log(x))\n * );\n * // X2,Y0\n * // X3,Y0\n * // X4,Y0\n * // X5,Y0\n * // X6,Y0\n * // X6,Y1\n * // X7,Y1\n * // X8,Y1\n * // X9,Y1\n * // X9,Y2\n *\n *\n * Nesting\n * -------\n *\n * To use pipe inside another pipe, you need to give the inner pipe an\n * argument, e.g. `s => pipe(s, ...`:\n *\n * const interval = require('callbag-interval');\n * const forEach = require('callbag-for-each');\n * const combine = require('callbag-combine');\n * const pipe = require('callbag-pipe');\n * const take = require('callbag-take');\n * const map = require('callbag-map');\n *\n * pipe(\n * combine(interval(100), interval(350)),\n * s => pipe(s,\n * map(([x, y]) => `X${x},Y${y}`),\n * take(10)\n * ),\n * forEach(x => console.log(x))\n * );\n *\n *\n * This means you can use pipe to create a new operator:\n *\n * const mapThenTake = (f, amount) =>\n * s => pipe(s, map(f), take(amount));\n *\n * pipe(\n * combine(interval(100), interval(350)),\n * mapThenTake(([x, y]) => `X${x},Y${y}`, 10),\n * forEach(x => console.log(x))\n * );\n *\n */\n\nfunction pipe(...cbs) {\n let res = cbs[0];\n for (let i = 1, n = cbs.length; i < n; i++) res = cbs[i](res);\n return res;\n}\n\nmodule.exports = pipe;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-pipe/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-scan/readme.js": +/*!*********************************************!*\ + !*** ./node_modules/callbag-scan/readme.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/**\n * callbag-scan\n * ------------\n *\n * Callbag operator that combines consecutive values from the same source.\n * It's essentially like array `.reduce`, but delivers a new accumulated value\n * for each value from the callbag source. Works on either pullable or\n * listenable sources.\n *\n * `npm install callbag-scan`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const scan = require('callbag-scan');\n *\n * const iterSource = fromIter([1,2,3,4,5]);\n * const scanned = scan((prev, x) => prev + x, 0)(iterSource);\n *\n * scanned(0, iterate(x => console.log(x))); // 1\n * // 3\n * // 6\n * // 10\n * // 15\n */\n\nfunction scan(reducer, seed) {\n let hasAcc = arguments.length === 2;\n return source => (start, sink) => {\n if (start !== 0) return;\n let acc = seed;\n source(0, (t, d) => {\n if (t === 1) {\n acc = hasAcc ? reducer(acc, d) : ((hasAcc = true), d);\n sink(1, acc);\n } else sink(t, d);\n });\n };\n}\n\nmodule.exports = scan;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-scan/readme.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-share/index.js": +/*!*********************************************!*\ + !*** ./node_modules/callbag-share/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const share = source => {\n let sinks = [];\n let sourceTalkback;\n\n return function shared(start, sink) {\n if (start !== 0) return;\n sinks.push(sink);\n\n const talkback = (t, d) => {\n if (t === 0) return;\n if (t === 2) {\n const i = sinks.indexOf(sink);\n if (i > -1) sinks.splice(i, 1);\n if (!sinks.length) sourceTalkback(2);\n } else {\n sourceTalkback(t, d);\n }\n };\n\n if (sinks.length === 1) {\n source(0, (t, d) => {\n if (t === 0) {\n sourceTalkback = d;\n sink(0, talkback);\n } else for (let s of sinks.slice(0)) s(t, d);\n if (t === 2) sinks = [];\n });\n return\n }\n\n sink(0, talkback);\n }\n}\n\nmodule.exports = share;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-share/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-skip/index.js": +/*!********************************************!*\ + !*** ./node_modules/callbag-skip/index.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const skip = max => source => (start, sink) => {\n if (start !== 0) return;\n let skipped = 0;\n let talkback;\n source(0, (t, d) => {\n if (t === 0) {\n talkback = d;\n sink(t, d);\n } else if (t === 1) {\n if (skipped < max) {\n skipped++;\n talkback(1);\n } else sink(t, d);\n } else {\n sink(t, d);\n }\n });\n};\n\nmodule.exports = skip;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-skip/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-start-with/index.js": +/*!**************************************************!*\ + !*** ./node_modules/callbag-start-with/index.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n\nconst startWith = (...xs) => inputSource => (start, outputSink) => {\n if (start !== 0) return;\n let disposed = false;\n let inputTalkback;\n let trackPull = false;\n let lastPull;\n\n outputSink(0, (ot, od) => {\n if (trackPull && ot === 1) {\n lastPull = [1, od];\n }\n\n if (ot === 2) {\n disposed = true;\n xs.length = 0;\n }\n\n if (!inputTalkback) return;\n inputTalkback(ot, od);\n });\n\n while (xs.length !== 0) {\n if (xs.length === 1) {\n trackPull = true;\n }\n outputSink(1, xs.shift());\n }\n\n if (disposed) return;\n\n inputSource(0, (it, id) => {\n if (it === 0) {\n inputTalkback = id;\n trackPull = false;\n\n if (lastPull) {\n inputTalkback(...lastPull);\n lastPull = null;\n }\n return;\n }\n outputSink(it, id);\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (startWith);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-start-with/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-take/index.js": +/*!********************************************!*\ + !*** ./node_modules/callbag-take/index.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("const take = max => source => (start, sink) => {\n if (start !== 0) return;\n let taken = 0;\n let sourceTalkback;\n function talkback(t, d) {\n if (taken < max) sourceTalkback(t, d);\n }\n source(0, (t, d) => {\n if (t === 0) {\n sourceTalkback = d;\n sink(0, talkback);\n } else if (t === 1) {\n if (taken < max) {\n taken++;\n sink(t, d);\n if (taken === max) {\n sink(2);\n sourceTalkback(2);\n }\n }\n } else {\n sink(t, d);\n }\n });\n};\n\nmodule.exports = take;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-take/index.js?"); + +/***/ }), + +/***/ "./node_modules/callbag-to-obs/readme.js": +/*!***********************************************!*\ + !*** ./node_modules/callbag-to-obs/readme.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/**\n * callbag-to-obs\n * ---------------\n *\n * Convert a listenable callbag source to an observable (or subscribable).\n * The Observable is an object following the ECMAScript Observable proposal\n * https://github.com/tc39/proposal-observable and at a minimum has the method\n * \"subscribe(observer)\" attached to it.\n *\n * `npm install callbag-to-obs`\n *\n * Example:\n *\n * const {pipe, interval, take, filter, map} = require('callbag-basics');\n * const toObservable = require('callbag-to-obs');\n *\n * const observable = pipe(\n * interval(1000), // 0,1,2,3,4,5,6,7,...\n * take(5), // 0,1,2,3,4\n * filter(x => x !== 0), // 1,2,3,4\n * map(x => x * 10), // 10,20,30,40\n * toObservable\n * );\n *\n * observable.subscribe({\n * next: x => console.log(x)\n * });\n */\n\nconst $$observable = __webpack_require__(/*! symbol-observable */ \"./node_modules/symbol-observable/es/index.js\").default;\n\nfunction normalize(observer) {\n if (!observer.start) observer.start = () => { };\n if (!observer.next) observer.next = () => { };\n if (!observer.error) observer.error = () => { };\n if (!observer.complete) observer.complete = () => { };\n}\n\nfunction toObservable(source) {\n return {\n subscribe: function subscribe(observer) {\n normalize(observer);\n let talkback;\n const sub = {\n unsubscribe: function unsubscribe() {\n if (talkback) talkback(2);\n },\n };\n observer.start(sub);\n try {\n source(0, (t, d) => {\n if (t === 0) talkback = d;\n if (t === 1) observer.next(d);\n if (t === 2 && d) observer.error(d);\n else if (t === 2) talkback = void 0, observer.complete(d);\n });\n } catch (err) {\n observer.error(err);\n }\n return sub;\n },\n\n [$$observable]: function () { return this; },\n };\n}\n\nmodule.exports = toObservable;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-to-obs/readme.js?"); + +/***/ }), + +/***/ "./node_modules/classnames/index.js": +/*!******************************************!*\ + !*** ./node_modules/classnames/index.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif ( true && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (true) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n\t\t\treturn classNames;\n\t\t}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n}());\n\n\n//# sourceURL=webpack:///./node_modules/classnames/index.js?"); + +/***/ }), + +/***/ "./node_modules/immer/dist/immer.module.js": +/*!*************************************************!*\ + !*** ./node_modules/immer/dist/immer.module.js ***! + \*************************************************/ +/*! exports provided: produce, applyPatches, nothing, setAutoFreeze, setUseProxies, original, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"produce\", function() { return produce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyPatches\", function() { return applyPatches$1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nothing\", function() { return nothing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setAutoFreeze\", function() { return setAutoFreeze; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setUseProxies\", function() { return setUseProxies; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"original\", function() { return original; });\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nfunction generatePatches(state, basepath, patches, inversePatches, baseValue, resultValue) {\n if (patches) if (Array.isArray(baseValue)) generateArrayPatches(state, basepath, patches, inversePatches, baseValue, resultValue);else generateObjectPatches(state, basepath, patches, inversePatches, baseValue, resultValue);\n}\n\nfunction generateArrayPatches(state, basepath, patches, inversePatches, baseValue, resultValue) {\n var shared = Math.min(baseValue.length, resultValue.length);\n for (var i = 0; i < shared; i++) {\n if (state.assigned[i] && baseValue[i] !== resultValue[i]) {\n var path = basepath.concat(i);\n patches.push({ op: \"replace\", path: path, value: resultValue[i] });\n inversePatches.push({ op: \"replace\", path: path, value: baseValue[i] });\n }\n }\n if (shared < resultValue.length) {\n // stuff was added\n for (var _i = shared; _i < resultValue.length; _i++) {\n var _path = basepath.concat(_i);\n patches.push({ op: \"add\", path: _path, value: resultValue[_i] });\n }\n inversePatches.push({\n op: \"replace\",\n path: basepath.concat(\"length\"),\n value: baseValue.length\n });\n } else if (shared < baseValue.length) {\n // stuff was removed\n patches.push({\n op: \"replace\",\n path: basepath.concat(\"length\"),\n value: resultValue.length\n });\n for (var _i2 = shared; _i2 < baseValue.length; _i2++) {\n var _path2 = basepath.concat(_i2);\n inversePatches.push({ op: \"add\", path: _path2, value: baseValue[_i2] });\n }\n }\n}\n\nfunction generateObjectPatches(state, basepath, patches, inversePatches, baseValue, resultValue) {\n each(state.assigned, function (key, assignedValue) {\n var origValue = baseValue[key];\n var value = resultValue[key];\n var op = !assignedValue ? \"remove\" : key in baseValue ? \"replace\" : \"add\";\n if (origValue === baseValue && op === \"replace\") return;\n var path = basepath.concat(key);\n patches.push(op === \"remove\" ? { op: op, path: path } : { op: op, path: path, value: value });\n inversePatches.push(op === \"add\" ? { op: \"remove\", path: path } : op === \"remove\" ? { op: \"add\", path: path, value: origValue } : { op: \"replace\", path: path, value: origValue });\n });\n}\n\nfunction applyPatches(draft, patches) {\n for (var i = 0; i < patches.length; i++) {\n var patch = patches[i];\n var path = patch.path;\n\n if (path.length === 0 && patch.op === \"replace\") {\n draft = patch.value;\n } else {\n var base = draft;\n for (var _i3 = 0; _i3 < path.length - 1; _i3++) {\n base = base[path[_i3]];\n if (!base || (typeof base === \"undefined\" ? \"undefined\" : _typeof(base)) !== \"object\") throw new Error(\"Cannot apply patch, path doesn't resolve: \" + path.join(\"/\"));\n }\n var key = path[path.length - 1];\n switch (patch.op) {\n case \"replace\":\n case \"add\":\n // TODO: add support is not extensive, it does not support insertion or `-` atm!\n base[key] = patch.value;\n break;\n case \"remove\":\n if (Array.isArray(base)) {\n if (key === base.length - 1) base.length -= 1;else throw new Error(\"Remove can only remove the last key of an array, index: \" + key + \", length: \" + base.length);\n } else delete base[key];\n break;\n default:\n throw new Error(\"Unsupported patch operation: \" + patch.op);\n }\n }\n }\n return draft;\n}\n\nvar NOTHING = typeof Symbol !== \"undefined\" ? Symbol(\"immer-nothing\") : defineProperty({}, \"immer-nothing\", true);\n\nvar PROXY_STATE = typeof Symbol !== \"undefined\" ? Symbol(\"immer-proxy-state\") : \"__$immer_state\";\n\nvar RETURNED_AND_MODIFIED_ERROR = \"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.\";\n\nfunction verifyMinified() {}\n\nvar inProduction = typeof process !== \"undefined\" && \"development\" === \"production\" || verifyMinified.name !== \"verifyMinified\";\n\nvar autoFreeze = !inProduction;\nvar useProxies = typeof Proxy !== \"undefined\" && typeof Reflect !== \"undefined\";\n\n/**\n * Automatically freezes any state trees generated by immer.\n * This protects against accidental modifications of the state tree outside of an immer function.\n * This comes with a performance impact, so it is recommended to disable this option in production.\n * It is by default enabled.\n *\n * @returns {void}\n */\nfunction setAutoFreeze(enableAutoFreeze) {\n autoFreeze = enableAutoFreeze;\n}\n\nfunction setUseProxies(value) {\n useProxies = value;\n}\n\nfunction getUseProxies() {\n return useProxies;\n}\n\nfunction isProxy(value) {\n return !!value && !!value[PROXY_STATE];\n}\n\nfunction isProxyable(value) {\n if (!value) return false;\n if ((typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) !== \"object\") return false;\n if (Array.isArray(value)) return true;\n var proto = Object.getPrototypeOf(value);\n return proto === null || proto === Object.prototype;\n}\n\nfunction freeze(value) {\n if (autoFreeze) {\n Object.freeze(value);\n }\n return value;\n}\n\nfunction original(value) {\n if (value && value[PROXY_STATE]) {\n return value[PROXY_STATE].base;\n }\n // otherwise return undefined\n}\n\nvar assign = Object.assign || function assign(target, value) {\n for (var key in value) {\n if (has(value, key)) {\n target[key] = value[key];\n }\n }\n return target;\n};\n\nfunction shallowCopy(value) {\n if (Array.isArray(value)) return value.slice();\n var target = value.__proto__ === undefined ? Object.create(null) : {};\n return assign(target, value);\n}\n\nfunction each(value, cb) {\n if (Array.isArray(value)) {\n for (var i = 0; i < value.length; i++) {\n cb(i, value[i]);\n }\n } else {\n for (var key in value) {\n cb(key, value[key]);\n }\n }\n}\n\nfunction has(thing, prop) {\n return Object.prototype.hasOwnProperty.call(thing, prop);\n}\n\n// given a base object, returns it if unmodified, or return the changed cloned if modified\nfunction finalize(base, path, patches, inversePatches) {\n if (isProxy(base)) {\n var state = base[PROXY_STATE];\n if (state.modified === true) {\n if (state.finalized === true) return state.copy;\n state.finalized = true;\n var result = finalizeObject(useProxies ? state.copy : state.copy = shallowCopy(base), state, path, patches, inversePatches);\n generatePatches(state, path, patches, inversePatches, state.base, result);\n return result;\n } else {\n return state.base;\n }\n }\n finalizeNonProxiedObject(base);\n return base;\n}\n\nfunction finalizeObject(copy, state, path, patches, inversePatches) {\n var base = state.base;\n each(copy, function (prop, value) {\n if (value !== base[prop]) {\n // if there was an assignment on this property, we don't need to generate\n // patches for the subtree\n var _generatePatches = patches && !has(state.assigned, prop);\n copy[prop] = finalize(value, _generatePatches && path.concat(prop), _generatePatches && patches, inversePatches);\n }\n });\n return freeze(copy);\n}\n\nfunction finalizeNonProxiedObject(parent) {\n // If finalize is called on an object that was not a proxy, it means that it is an object that was not there in the original\n // tree and it could contain proxies at arbitrarily places. Let's find and finalize them as well\n if (!isProxyable(parent)) return;\n if (Object.isFrozen(parent)) return;\n each(parent, function (i, child) {\n if (isProxy(child)) {\n parent[i] = finalize(child);\n } else finalizeNonProxiedObject(child);\n });\n // always freeze completely new data\n freeze(parent);\n}\n\nfunction is(x, y) {\n // From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\n// @ts-check\n\nvar proxies = null;\n\nvar objectTraps = {\n get: get$1,\n has: function has$$1(target, prop) {\n return prop in source(target);\n },\n ownKeys: function ownKeys(target) {\n return Reflect.ownKeys(source(target));\n },\n\n set: set$1,\n deleteProperty: deleteProperty,\n getOwnPropertyDescriptor: getOwnPropertyDescriptor,\n defineProperty: defineProperty$1,\n setPrototypeOf: function setPrototypeOf() {\n throw new Error(\"Immer does not support `setPrototypeOf()`.\");\n }\n};\n\nvar arrayTraps = {};\neach(objectTraps, function (key, fn) {\n arrayTraps[key] = function () {\n arguments[0] = arguments[0][0];\n return fn.apply(this, arguments);\n };\n});\narrayTraps.deleteProperty = function (state, prop) {\n if (isNaN(parseInt(prop))) throw new Error(\"Immer does not support deleting properties from arrays: \" + prop);\n return objectTraps.deleteProperty.call(this, state[0], prop);\n};\narrayTraps.set = function (state, prop, value) {\n if (prop !== \"length\" && isNaN(parseInt(prop))) throw new Error(\"Immer does not support setting non-numeric properties on arrays: \" + prop);\n return objectTraps.set.call(this, state[0], prop, value);\n};\n\nfunction createState(parent, base) {\n return {\n modified: false, // this tree is modified (either this object or one of it's children)\n assigned: {}, // true: value was assigned to these props, false: was removed\n finalized: false,\n parent: parent,\n base: base,\n copy: undefined,\n proxies: {}\n };\n}\n\nfunction source(state) {\n return state.modified === true ? state.copy : state.base;\n}\n\nfunction get$1(state, prop) {\n if (prop === PROXY_STATE) return state;\n if (state.modified) {\n var value = state.copy[prop];\n if (value === state.base[prop] && isProxyable(value))\n // only create proxy if it is not yet a proxy, and not a new object\n // (new objects don't need proxying, they will be processed in finalize anyway)\n return state.copy[prop] = createProxy(state, value);\n return value;\n } else {\n if (has(state.proxies, prop)) return state.proxies[prop];\n var _value = state.base[prop];\n if (!isProxy(_value) && isProxyable(_value)) return state.proxies[prop] = createProxy(state, _value);\n return _value;\n }\n}\n\nfunction set$1(state, prop, value) {\n // TODO: optimize\n state.assigned[prop] = true;\n if (!state.modified) {\n if (prop in state.base && is(state.base[prop], value) || has(state.proxies, prop) && state.proxies[prop] === value) return true;\n markChanged(state);\n }\n state.copy[prop] = value;\n return true;\n}\n\nfunction deleteProperty(state, prop) {\n state.assigned[prop] = false;\n markChanged(state);\n delete state.copy[prop];\n return true;\n}\n\nfunction getOwnPropertyDescriptor(state, prop) {\n var owner = state.modified ? state.copy : has(state.proxies, prop) ? state.proxies : state.base;\n var descriptor = Reflect.getOwnPropertyDescriptor(owner, prop);\n if (descriptor && !(Array.isArray(owner) && prop === \"length\")) descriptor.configurable = true;\n return descriptor;\n}\n\nfunction defineProperty$1() {\n throw new Error(\"Immer does not support defining properties on draft objects.\");\n}\n\nfunction markChanged(state) {\n if (!state.modified) {\n state.modified = true;\n state.copy = shallowCopy(state.base);\n // copy the proxies over the base-copy\n Object.assign(state.copy, state.proxies); // yup that works for arrays as well\n if (state.parent) markChanged(state.parent);\n }\n}\n\n// creates a proxy for plain objects / arrays\nfunction createProxy(parentState, base) {\n if (isProxy(base)) throw new Error(\"Immer bug. Plz report.\");\n var state = createState(parentState, base);\n var proxy = Array.isArray(base) ? Proxy.revocable([state], arrayTraps) : Proxy.revocable(state, objectTraps);\n proxies.push(proxy);\n return proxy.proxy;\n}\n\nfunction produceProxy(baseState, producer, patchListener) {\n if (isProxy(baseState)) {\n // See #100, don't nest producers\n var returnValue = producer.call(baseState, baseState);\n return returnValue === undefined ? baseState : returnValue;\n }\n var previousProxies = proxies;\n proxies = [];\n var patches = patchListener && [];\n var inversePatches = patchListener && [];\n try {\n // create proxy for root\n var rootProxy = createProxy(undefined, baseState);\n // execute the thunk\n var _returnValue = producer.call(rootProxy, rootProxy);\n // and finalize the modified proxy\n var result = void 0;\n // check whether the draft was modified and/or a value was returned\n if (_returnValue !== undefined && _returnValue !== rootProxy) {\n // something was returned, and it wasn't the proxy itself\n if (rootProxy[PROXY_STATE].modified) throw new Error(RETURNED_AND_MODIFIED_ERROR);\n\n // See #117\n // Should we just throw when returning a proxy which is not the root, but a subset of the original state?\n // Looks like a wrongly modeled reducer\n result = finalize(_returnValue);\n if (patches) {\n patches.push({ op: \"replace\", path: [], value: result });\n inversePatches.push({ op: \"replace\", path: [], value: baseState });\n }\n } else {\n result = finalize(rootProxy, [], patches, inversePatches);\n }\n // revoke all proxies\n each(proxies, function (_, p) {\n return p.revoke();\n });\n patchListener && patchListener(patches, inversePatches);\n return result;\n } finally {\n proxies = previousProxies;\n }\n}\n\n// @ts-check\n\nvar descriptors = {};\nvar states = null;\n\nfunction createState$1(parent, proxy, base) {\n return {\n modified: false,\n assigned: {}, // true: value was assigned to these props, false: was removed\n hasCopy: false,\n parent: parent,\n base: base,\n proxy: proxy,\n copy: undefined,\n finished: false,\n finalizing: false,\n finalized: false\n };\n}\n\nfunction source$1(state) {\n return state.hasCopy ? state.copy : state.base;\n}\n\nfunction _get(state, prop) {\n assertUnfinished(state);\n var value = source$1(state)[prop];\n if (!state.finalizing && value === state.base[prop] && isProxyable(value)) {\n // only create a proxy if the value is proxyable, and the value was in the base state\n // if it wasn't in the base state, the object is already modified and we will process it in finalize\n prepareCopy(state);\n return state.copy[prop] = createProxy$1(state, value);\n }\n return value;\n}\n\nfunction _set(state, prop, value) {\n assertUnfinished(state);\n state.assigned[prop] = true; // optimization; skip this if there is no listener\n if (!state.modified) {\n if (is(source$1(state)[prop], value)) return;\n markChanged$1(state);\n prepareCopy(state);\n }\n state.copy[prop] = value;\n}\n\nfunction markChanged$1(state) {\n if (!state.modified) {\n state.modified = true;\n if (state.parent) markChanged$1(state.parent);\n }\n}\n\nfunction prepareCopy(state) {\n if (state.hasCopy) return;\n state.hasCopy = true;\n state.copy = shallowCopy(state.base);\n}\n\n// creates a proxy for plain objects / arrays\nfunction createProxy$1(parent, base) {\n var proxy = shallowCopy(base);\n each(base, function (i) {\n Object.defineProperty(proxy, \"\" + i, createPropertyProxy(\"\" + i));\n });\n var state = createState$1(parent, proxy, base);\n createHiddenProperty(proxy, PROXY_STATE, state);\n states.push(state);\n return proxy;\n}\n\nfunction createPropertyProxy(prop) {\n return descriptors[prop] || (descriptors[prop] = {\n configurable: true,\n enumerable: true,\n get: function get$$1() {\n return _get(this[PROXY_STATE], prop);\n },\n set: function set$$1(value) {\n _set(this[PROXY_STATE], prop, value);\n }\n });\n}\n\nfunction assertUnfinished(state) {\n if (state.finished === true) throw new Error(\"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? \" + JSON.stringify(state.copy || state.base));\n}\n\n// this sounds very expensive, but actually it is not that expensive in practice\n// as it will only visit proxies, and only do key-based change detection for objects for\n// which it is not already know that they are changed (that is, only object for which no known key was changed)\nfunction markChangesSweep() {\n // intentionally we process the proxies in reverse order;\n // ideally we start by processing leafs in the tree, because if a child has changed, we don't have to check the parent anymore\n // reverse order of proxy creation approximates this\n for (var i = states.length - 1; i >= 0; i--) {\n var state = states[i];\n if (state.modified === false) {\n if (Array.isArray(state.base)) {\n if (hasArrayChanges(state)) markChanged$1(state);\n } else if (hasObjectChanges(state)) markChanged$1(state);\n }\n }\n}\n\nfunction markChangesRecursively(object) {\n if (!object || (typeof object === \"undefined\" ? \"undefined\" : _typeof(object)) !== \"object\") return;\n var state = object[PROXY_STATE];\n if (!state) return;\n var proxy = state.proxy,\n base = state.base;\n\n if (Array.isArray(object)) {\n if (hasArrayChanges(state)) {\n markChanged$1(state);\n state.assigned.length = true;\n if (proxy.length < base.length) for (var i = proxy.length; i < base.length; i++) {\n state.assigned[i] = false;\n } else for (var _i = base.length; _i < proxy.length; _i++) {\n state.assigned[_i] = true;\n }each(proxy, function (index, child) {\n if (!state.assigned[index]) markChangesRecursively(child);\n });\n }\n } else {\n var _diffKeys = diffKeys(base, proxy),\n added = _diffKeys.added,\n removed = _diffKeys.removed;\n\n if (added.length > 0 || removed.length > 0) markChanged$1(state);\n each(added, function (_, key) {\n state.assigned[key] = true;\n });\n each(removed, function (_, key) {\n state.assigned[key] = false;\n });\n each(proxy, function (key, child) {\n if (!state.assigned[key]) markChangesRecursively(child);\n });\n }\n}\n\nfunction diffKeys(from, to) {\n // TODO: optimize\n var a = Object.keys(from);\n var b = Object.keys(to);\n return {\n added: b.filter(function (key) {\n return a.indexOf(key) === -1;\n }),\n removed: a.filter(function (key) {\n return b.indexOf(key) === -1;\n })\n };\n}\n\nfunction hasObjectChanges(state) {\n var baseKeys = Object.keys(state.base);\n var keys = Object.keys(state.proxy);\n return !shallowEqual(baseKeys, keys);\n}\n\nfunction hasArrayChanges(state) {\n var proxy = state.proxy;\n\n if (proxy.length !== state.base.length) return true;\n // See #116\n // If we first shorten the length, our array interceptors will be removed.\n // If after that new items are added, result in the same original length,\n // those last items will have no intercepting property.\n // So if there is no own descriptor on the last position, we know that items were removed and added\n // N.B.: splice, unshift, etc only shift values around, but not prop descriptors, so we only have to check\n // the last one\n var descriptor = Object.getOwnPropertyDescriptor(proxy, proxy.length - 1);\n // descriptor can be null, but only for newly created sparse arrays, eg. new Array(10)\n if (descriptor && !descriptor.get) return true;\n // For all other cases, we don't have to compare, as they would have been picked up by the index setters\n return false;\n}\n\nfunction produceEs5(baseState, producer, patchListener) {\n if (isProxy(baseState)) {\n // See #100, don't nest producers\n var returnValue = producer.call(baseState, baseState);\n return returnValue === undefined ? baseState : returnValue;\n }\n var prevStates = states;\n states = [];\n var patches = patchListener && [];\n var inversePatches = patchListener && [];\n try {\n // create proxy for root\n var rootProxy = createProxy$1(undefined, baseState);\n // execute the thunk\n var _returnValue = producer.call(rootProxy, rootProxy);\n // and finalize the modified proxy\n each(states, function (_, state) {\n state.finalizing = true;\n });\n var result = void 0;\n // check whether the draft was modified and/or a value was returned\n if (_returnValue !== undefined && _returnValue !== rootProxy) {\n // something was returned, and it wasn't the proxy itself\n if (rootProxy[PROXY_STATE].modified) throw new Error(RETURNED_AND_MODIFIED_ERROR);\n result = finalize(_returnValue);\n if (patches) {\n patches.push({ op: \"replace\", path: [], value: result });\n inversePatches.push({ op: \"replace\", path: [], value: baseState });\n }\n } else {\n if (patchListener) markChangesRecursively(rootProxy);\n markChangesSweep(); // this one is more efficient if we don't need to know which attributes have changed\n result = finalize(rootProxy, [], patches, inversePatches);\n }\n // make sure all proxies become unusable\n each(states, function (_, state) {\n state.finished = true;\n });\n patchListener && patchListener(patches, inversePatches);\n return result;\n } finally {\n states = prevStates;\n }\n}\n\nfunction shallowEqual(objA, objB) {\n //From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js\n if (is(objA, objB)) return true;\n if ((typeof objA === \"undefined\" ? \"undefined\" : _typeof(objA)) !== \"object\" || objA === null || (typeof objB === \"undefined\" ? \"undefined\" : _typeof(objB)) !== \"object\" || objB === null) {\n return false;\n }\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n return true;\n}\n\nfunction createHiddenProperty(target, prop, value) {\n Object.defineProperty(target, prop, {\n value: value,\n enumerable: false,\n writable: true\n });\n}\n\n/**\n * produce takes a state, and runs a function against it.\n * That function can freely mutate the state, as it will create copies-on-write.\n * This means that the original state will stay unchanged, and once the function finishes, the modified state is returned\n *\n * @export\n * @param {any} baseState - the state to start with\n * @param {Function} producer - function that receives a proxy of the base state as first argument and which can be freely modified\n * @param {Function} patchListener - optional function that will be called with all the patches produced here\n * @returns {any} a new state, or the base state if nothing was modified\n */\nfunction produce(baseState, producer, patchListener) {\n // prettier-ignore\n if (arguments.length < 1 || arguments.length > 3) throw new Error(\"produce expects 1 to 3 arguments, got \" + arguments.length);\n\n // curried invocation\n if (typeof baseState === \"function\") {\n // prettier-ignore\n if (typeof producer === \"function\") throw new Error(\"if first argument is a function (curried invocation), the second argument to produce cannot be a function\");\n\n var initialState = producer;\n var recipe = baseState;\n\n return function () {\n var args = arguments;\n\n var currentState = args[0] === undefined && initialState !== undefined ? initialState : args[0];\n\n return produce(currentState, function (draft) {\n args[0] = draft; // blegh!\n return recipe.apply(draft, args);\n });\n };\n }\n\n // prettier-ignore\n {\n if (typeof producer !== \"function\") throw new Error(\"if first argument is not a function, the second argument to produce should be a function\");\n if (patchListener !== undefined && typeof patchListener !== \"function\") throw new Error(\"the third argument of a producer should not be set or a function\");\n }\n\n // if state is a primitive, don't bother proxying at all\n if ((typeof baseState === \"undefined\" ? \"undefined\" : _typeof(baseState)) !== \"object\" || baseState === null) {\n var returnValue = producer(baseState);\n return returnValue === undefined ? baseState : normalizeResult(returnValue);\n }\n\n if (!isProxyable(baseState)) throw new Error(\"the first argument to an immer producer should be a primitive, plain object or array, got \" + (typeof baseState === \"undefined\" ? \"undefined\" : _typeof(baseState)) + \": \\\"\" + baseState + \"\\\"\");\n return normalizeResult(getUseProxies() ? produceProxy(baseState, producer, patchListener) : produceEs5(baseState, producer, patchListener));\n}\n\nfunction normalizeResult(result) {\n return result === NOTHING ? undefined : result;\n}\n\nvar applyPatches$1 = produce(applyPatches);\n\nvar nothing = NOTHING;\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (produce);\n//# sourceMappingURL=immer.module.js.map\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/immer/dist/immer.module.js?"); + +/***/ }), + +/***/ "./node_modules/nanoid/index.browser.js": +/*!**********************************************!*\ + !*** ./node_modules/nanoid/index.browser.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("if (true) {\n if (typeof self === 'undefined' || (!self.crypto && !self.msCrypto)) {\n throw new Error(\n 'Your browser does not have secure random generator. ' +\n 'If you don’t need unpredictable IDs, you can use nanoid/non-secure.'\n )\n }\n}\n\nvar crypto = self.crypto || self.msCrypto\n\n/*\n * This alphabet uses a-z A-Z 0-9 _- symbols.\n * Symbols order was changed for better gzip compression.\n */\nvar url = 'Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz-'\n\nmodule.exports = function (size) {\n size = size || 21\n var id = ''\n var bytes = crypto.getRandomValues(new Uint8Array(size))\n while (0 < size--) {\n id += url[bytes[size] & 63]\n }\n return id\n}\n\n\n//# sourceURL=webpack:///./node_modules/nanoid/index.browser.js?"); + +/***/ }), + +/***/ "./node_modules/process/browser.js": +/*!*****************************************!*\ + !*** ./node_modules/process/browser.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack:///./node_modules/process/browser.js?"); + +/***/ }), + +/***/ "./node_modules/refract-callbag/index.es.js": +/*!**************************************************!*\ + !*** ./node_modules/refract-callbag/index.es.js ***! + \**************************************************/ +/*! exports provided: withEffects, compose, asProps, toProps, PROPS_EFFECT, useRefract, toRender, COMPONENT_EFFECT */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withEffects\", function() { return withEffects; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"compose\", function() { return compose; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"asProps\", function() { return asProps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toProps\", function() { return toProps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PROPS_EFFECT\", function() { return PROPS_EFFECT; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useRefract\", function() { return useRefract; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toRender\", function() { return toRender; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"COMPONENT_EFFECT\", function() { return COMPONENT_EFFECT; });\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! symbol-observable */ \"./node_modules/symbol-observable/es/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n};\n\nvar PROPS_EFFECT = '@@refract/effect/props';\r\nvar COMPONENT_EFFECT = '@@refract/effect/component';\r\nvar toProps = function (props) { return ({\r\n type: PROPS_EFFECT,\r\n payload: {\r\n replace: false,\r\n props: props\r\n }\r\n}); };\r\nvar asProps = function (props) { return ({\r\n type: PROPS_EFFECT,\r\n payload: {\r\n replace: true,\r\n props: props\r\n }\r\n}); };\r\nvar toRender = function (data) { return ({\r\n type: COMPONENT_EFFECT,\r\n payload: data\r\n}); };\n\nvar MOUNT_EVENT = '@@refract/event/mount';\r\nvar UNMOUNT_EVENT = '@@refract/event/unmount';\r\nvar DataType;\r\n(function (DataType) {\r\n DataType[\"EVENT\"] = \"event\";\r\n DataType[\"PROPS\"] = \"props\";\r\n DataType[\"CALLBACK\"] = \"callback\";\r\n})(DataType || (DataType = {}));\r\nvar isEvent = function (eventName) { return function (data, index) {\r\n return data.type === DataType.EVENT &&\r\n data.payload.name === eventName;\r\n}; };\r\nvar isProps = function (data) { return data.type === DataType.PROPS; };\r\nvar isCallback = function (propName) { return function (data) {\r\n return data.type === DataType.CALLBACK &&\r\n data.payload.name === propName;\r\n}; };\r\nvar createEventData = function (name, value) { return ({\r\n type: DataType.EVENT,\r\n payload: {\r\n name: name,\r\n value: value\r\n }\r\n}); };\r\nvar createPropsData = function (props) { return ({\r\n type: DataType.PROPS,\r\n payload: props\r\n}); };\r\nvar createCallbackData = function (name, args) { return ({\r\n type: DataType.CALLBACK,\r\n payload: {\r\n name: name,\r\n args: args\r\n }\r\n}); };\r\nvar shallowEquals = function (left, right) {\r\n return left === right ||\r\n (Object.keys(left).length === Object.keys(right).length &&\r\n Object.keys(left).every(function (leftKey) { return left[leftKey] === right[leftKey]; }));\r\n};\n\nvar fromObs = __webpack_require__(/*! callbag-from-obs */ \"./node_modules/refract-callbag/node_modules/callbag-from-obs/readme.js\");\r\nvar toObs = __webpack_require__(/*! callbag-to-obs */ \"./node_modules/callbag-to-obs/readme.js\");\r\nvar dropRepeats = __webpack_require__(/*! callbag-drop-repeats */ \"./node_modules/callbag-drop-repeats/index.js\");\r\nvar map = __webpack_require__(/*! callbag-map */ \"./node_modules/callbag-map/readme.js\");\r\nvar pipe = __webpack_require__(/*! callbag-pipe */ \"./node_modules/callbag-pipe/readme.js\");\r\nvar filter = __webpack_require__(/*! callbag-filter */ \"./node_modules/callbag-filter/readme.js\");\r\nvar subscribeToSink = function (sink, next, error) {\r\n return toObs(sink).subscribe({\r\n next: next,\r\n error: error\r\n });\r\n};\r\nvar getComponentBase = function (data, pushEvent) {\r\n var fromEvent = function (eventName, valueTransformer) {\r\n return pipe(data, filter(isEvent(eventName)), map(function (data) {\r\n var value = data.payload.value;\r\n return valueTransformer ? valueTransformer(value) : value;\r\n }));\r\n };\r\n var useEvent = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var eventName = args[0];\r\n var hasSeedValue = args.length > 1;\r\n var seedValue = args[2];\r\n var events$ = fromEvent(eventName);\r\n var pushEventValue = pushEvent(eventName);\r\n return [\r\n !hasSeedValue ? events$ : pipe(events$, Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(seedValue)),\r\n pushEventValue\r\n ];\r\n };\r\n return {\r\n mount: pipe(data, filter(isEvent(MOUNT_EVENT)), map(function () { return undefined; })),\r\n unmount: pipe(data, filter(isEvent(UNMOUNT_EVENT)), map(function () { return undefined; })),\r\n fromEvent: fromEvent,\r\n pushEvent: pushEvent,\r\n useEvent: useEvent\r\n };\r\n};\r\nvar getObserve = function (getProp, data, decoratedProps) {\r\n return function observe(propName, valueTransformer) {\r\n if (decoratedProps &&\r\n propName &&\r\n typeof getProp(propName) === 'function') {\r\n return pipe(data(), filter(isCallback(propName)), map(function (data) {\r\n var args = data.payload.args;\r\n return valueTransformer ? valueTransformer(args) : args[0];\r\n }));\r\n }\r\n if (propName) {\r\n return pipe(data(), filter(isProps), map(function (data) {\r\n var prop = data.payload[propName];\r\n return valueTransformer ? valueTransformer(prop) : prop;\r\n }), dropRepeats());\r\n }\r\n return pipe(data(), filter(isProps), map(function (data) { return data.payload; }), dropRepeats(shallowEquals));\r\n };\r\n};\r\nvar createComponent = function (getProp, dataObservable, pushEvent, decoratedProps) {\r\n var data = function () { return fromObs(dataObservable); };\r\n return __assign({ observe: getObserve(getProp, data, decoratedProps) }, getComponentBase(data(), pushEvent));\r\n};\n\nvar configureComponent = function (aperture, instance, isValidElement$$1, isComponentClass, handler, errorHandler, mergeProps, decorateProps) {\r\n if (isValidElement$$1 === void 0) { isValidElement$$1 = function () { return false; }; }\r\n if (isComponentClass === void 0) { isComponentClass = function () { return false; }; }\r\n instance.state = {\r\n renderEffect: false,\r\n children: null,\r\n props: {}\r\n };\r\n var setState = function (state) {\r\n if (instance.unmounted) {\r\n return;\r\n }\r\n if (instance.mounted) {\r\n instance.setState(state);\r\n }\r\n else {\r\n instance.state = __assign({}, instance.state, state);\r\n }\r\n };\r\n var finalHandler = function (initialProps, initialContext) {\r\n var effectHandler = handler\r\n ? handler(initialProps, initialContext)\r\n : function () { return void 0; };\r\n return function (effect) {\r\n if (isValidElement$$1(effect)) {\r\n setState({\r\n renderEffect: true,\r\n children: effect\r\n });\r\n }\r\n else if (effect && effect.type === PROPS_EFFECT) {\r\n var payload = effect.payload;\r\n setState({\r\n replace: payload.replace,\r\n props: mergeProps\r\n ? __assign({}, instance.state.props, payload.props) : payload.props\r\n });\r\n }\r\n else {\r\n effectHandler(effect);\r\n }\r\n };\r\n };\r\n var decoratedProps = {};\r\n var listeners = [];\r\n var addListener = function (listener) {\r\n listeners = listeners.concat(listener);\r\n };\r\n var removeListener = function (listener) {\r\n listeners = listeners.filter(function (l) { return l !== listener; });\r\n };\r\n var pushEvent = function (eventName) { return function (val) {\r\n listeners.forEach(function (listener) {\r\n listener.next(createEventData(eventName, val));\r\n });\r\n }; };\r\n var decorateProp = function (container, prop, propName) {\r\n if (propName === 'children' || isComponentClass(prop)) {\r\n return;\r\n }\r\n container[propName] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n listeners.forEach(function (listener) {\r\n listener.next(createCallbackData(propName, args));\r\n });\r\n return prop.apply(void 0, args);\r\n };\r\n };\r\n if (decorateProps) {\r\n Object.keys(instance.props).forEach(function (propName) {\r\n if (typeof instance.props[propName] === 'function') {\r\n decorateProp(decoratedProps, instance.props[propName], propName);\r\n }\r\n });\r\n }\r\n var dataObservable = (_a = {\r\n subscribe: function (listener) {\r\n addListener(listener);\r\n listener.next(createPropsData(instance.props));\r\n return { unsubscribe: function () { return removeListener(listener); } };\r\n }\r\n },\r\n _a[symbol_observable__WEBPACK_IMPORTED_MODULE_1__[\"default\"]] = function () {\r\n return this;\r\n },\r\n _a);\r\n var component = createComponent(function (propName) { return instance.props[propName]; }, dataObservable, pushEvent, decorateProps);\r\n var sinkObservable = aperture(component, instance.props, instance.context);\r\n var sinkSubscription = subscribeToSink(sinkObservable, finalHandler(instance.props, instance.context), errorHandler\r\n ? errorHandler(instance.props, instance.context)\r\n : undefined);\r\n instance.reDecorateProps = function (nextProps) {\r\n if (decorateProps) {\r\n Object.keys(nextProps).forEach(function (propName) {\r\n if (typeof instance.props[propName] === 'function' &&\r\n nextProps[propName] !== instance.props[propName]) {\r\n decorateProp(decoratedProps, nextProps[propName], propName);\r\n }\r\n });\r\n }\r\n };\r\n instance.pushProps = function (props) {\r\n listeners.forEach(function (listener) {\r\n listener.next(createPropsData(props));\r\n });\r\n };\r\n instance.triggerMount = function () {\r\n pushEvent(MOUNT_EVENT)();\r\n };\r\n instance.triggerUnmount = function () {\r\n pushEvent(UNMOUNT_EVENT)();\r\n sinkSubscription.unsubscribe();\r\n };\r\n instance.getChildProps = function () {\r\n var state = instance.state;\r\n var stateProps = state.props;\r\n if (state.replace === true) {\r\n return __assign({}, stateProps, { pushEvent: pushEvent });\r\n }\r\n var additionalProps = __assign({}, decoratedProps, { pushEvent: pushEvent });\r\n if (state.replace === false) {\r\n return __assign({}, instance.props, additionalProps, stateProps);\r\n }\r\n return __assign({}, instance.props, additionalProps);\r\n };\r\n instance.havePropsChanged = function (newProps, newState) {\r\n var state = instance.state;\r\n if (state.renderEffect) {\r\n return state.children !== newState.children;\r\n }\r\n var haveStatePropsChanged = !shallowEquals(state.props, newState.props);\r\n if (newState.replace === true) {\r\n return haveStatePropsChanged;\r\n }\r\n var havePropsChanged = !shallowEquals(instance.props, newProps);\r\n if (newState.replace === false) {\r\n return havePropsChanged || haveStatePropsChanged;\r\n }\r\n return havePropsChanged;\r\n };\r\n var _a;\r\n};\n\nvar isComponentClass = function (ComponentClass) {\r\n return Boolean(ComponentClass &&\r\n ComponentClass.prototype &&\r\n ComponentClass.prototype.isReactComponent);\r\n};\r\nvar Empty = function () { return null; };\r\nvar withEffects = function (aperture, config) {\r\n if (config === void 0) { config = {}; }\r\n return function (BaseComponent) {\r\n if (BaseComponent === void 0) { BaseComponent = Empty; }\r\n return _a = /** @class */ (function (_super) {\r\n __extends(WithEffects, _super);\r\n function WithEffects(props, context) {\r\n var _this = _super.call(this, props, context) || this;\r\n _this.mounted = false;\r\n _this.unmounted = false;\r\n configureComponent(aperture, _this, react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"], isComponentClass, config.handler, config.errorHandler, config.mergeProps, config.decorateProps !== false);\r\n return _this;\r\n }\r\n WithEffects.prototype.componentDidMount = function () {\r\n this.mounted = true;\r\n this.triggerMount();\r\n };\r\n WithEffects.prototype.componentWillReceiveProps = function (nextProps) {\r\n this.reDecorateProps(nextProps);\r\n this.pushProps(nextProps);\r\n };\r\n WithEffects.prototype.shouldComponentUpdate = function (nextProps, nextState) {\r\n return this.havePropsChanged(nextProps, nextState);\r\n };\r\n WithEffects.prototype.componentWillUnmount = function () {\r\n this.unmounted = true;\r\n this.triggerUnmount();\r\n };\r\n WithEffects.prototype.render = function () {\r\n if (this.state.children) {\r\n return this.state.children;\r\n }\r\n return Object(react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(BaseComponent, this.getChildProps());\r\n };\r\n return WithEffects;\r\n }(react__WEBPACK_IMPORTED_MODULE_2__[\"Component\"])),\r\n _a.contextType = config.Context,\r\n _a;\r\n var _a;\r\n };\r\n};\n\nvar identity = function (arg) { return arg; };\r\nvar compose = function () {\r\n var fns = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n fns[_i] = arguments[_i];\r\n }\r\n if (fns.length === 0) {\r\n return identity;\r\n }\r\n if (fns.length === 1) {\r\n return fns[0];\r\n }\r\n return function (arg) {\r\n return fns.reduceRight(function (previousResult, fn) { return fn(previousResult); }, arg);\r\n };\r\n};\n\nvar configureHook = function (aperture, data, handler, errorHandler) {\r\n if (handler === void 0) { handler = function () { return function () { return void 0; }; }; }\r\n var returnedData;\r\n var lastData = data;\r\n var setComponentData;\r\n var finalHandler = function (initialData) {\r\n var effectHandler = handler(initialData);\r\n return function (effect) {\r\n if (effect && effect.type === COMPONENT_EFFECT) {\r\n if (setComponentData) {\r\n setComponentData(effect.payload);\r\n }\r\n else {\r\n returnedData = effect.payload;\r\n }\r\n }\r\n else {\r\n effectHandler(effect);\r\n }\r\n };\r\n };\r\n var listeners = [];\r\n var addListener = function (listener) {\r\n listeners = listeners.concat(listener);\r\n };\r\n var removeListener = function (listener) {\r\n listeners = listeners.filter(function (l) { return l !== listener; });\r\n };\r\n var pushEvent = function (eventName) { return function (val) {\r\n listeners.forEach(function (listener) {\r\n listener.next(createEventData(eventName, val));\r\n });\r\n }; };\r\n var dataObservable = (_a = {\r\n subscribe: function (listener) {\r\n addListener(listener);\r\n listener.next(createPropsData(lastData));\r\n return { unsubscribe: function () { return removeListener(listener); } };\r\n }\r\n },\r\n _a[symbol_observable__WEBPACK_IMPORTED_MODULE_1__[\"default\"]] = function () {\r\n return this;\r\n },\r\n _a);\r\n var component = createComponent(function (propName) { return data[propName]; }, dataObservable, pushEvent, false);\r\n var sinkObservable = aperture(component, data);\r\n var sinkSubscription = subscribeToSink(sinkObservable, finalHandler(data), errorHandler ? errorHandler(data) : undefined);\r\n var pushMountEvent = function () {\r\n pushEvent(MOUNT_EVENT)();\r\n };\r\n var pushUnmountEvent = function () {\r\n pushEvent(UNMOUNT_EVENT)();\r\n };\r\n return {\r\n data: returnedData,\r\n unsubscribe: function () {\r\n pushUnmountEvent();\r\n sinkSubscription.unsubscribe();\r\n },\r\n pushMountEvent: pushMountEvent,\r\n pushData: function (data) {\r\n lastData = data;\r\n listeners.forEach(function (listener) {\r\n listener.next(createPropsData(data));\r\n });\r\n },\r\n registerSetData: function (setData) {\r\n setComponentData = function (data) { return setData(function (hook) { return (__assign({}, hook, { data: data })); }); };\r\n }\r\n };\r\n var _a;\r\n};\n\n// @ts-ignore\r\nvar useRefract = function (aperture, data, config) {\r\n if (config === void 0) { config = {}; }\r\n var _a = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"])(configureHook(aperture, data, config.handler, config.errorHandler)), hook = _a[0], setData = _a[1];\r\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useLayoutEffect\"])(function () {\r\n hook.registerSetData(setData);\r\n hook.pushMountEvent();\r\n return function () { return hook.unsubscribe(); };\r\n }, []);\r\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\r\n hook.pushData(data);\r\n });\r\n return hook.data;\r\n};\n\n\n\n\n//# sourceURL=webpack:///./node_modules/refract-callbag/index.es.js?"); + +/***/ }), + +/***/ "./node_modules/refract-callbag/node_modules/callbag-from-obs/readme.js": +/*!******************************************************************************!*\ + !*** ./node_modules/refract-callbag/node_modules/callbag-from-obs/readme.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/**\n * callbag-from-obs\n * --------------\n *\n * Convert an observable (or subscribable) to a callbag listenable source.\n *\n * `npm install callbag-from-obs`\n *\n * Example:\n *\n * Convert an RxJS Observable:\n *\n * const Rx = require('rxjs');\n * const fromObs = require('callbag-from-obs');\n * const observe = require('callbag-observe');\n *\n * const source = fromObs(Rx.Observable.interval(1000).take(4));\n *\n * observe(x => console.log(x)(source); // 0\n * // 1\n * // 2\n * // 3\n *\n * Convert anything that has the `.subscribe` method:\n *\n * const fromObs = require('callbag-from-obs');\n * const observe = require('callbag-observe');\n *\n * const subscribable = {\n * subscribe: (observer) => {\n * let i = 0;\n * setInterval(() => observer.next(i++), 1000);\n * }\n * };\n *\n * const source = fromObs(subscribable);\n *\n * observe(x => console.log(x))(source); // 0\n * // 1\n * // 2\n * // 3\n * // ...\n */\n\nconst $$observable = __webpack_require__(/*! symbol-observable */ \"./node_modules/symbol-observable/es/index.js\").default;\n\nconst fromObs = observable => (start, sink) => {\n if (start !== 0) return;\n let dispose;\n sink(0, t => {\n if (t === 2 && dispose) {\n if (dispose.unsubscribe) dispose.unsubscribe();\n else dispose();\n }\n });\n observable = observable[$$observable] ? observable[$$observable]() : observable;\n dispose = observable.subscribe({\n next: x => sink(1, x),\n error: e => sink(2, e),\n complete: () => sink(2)\n });\n};\n\nmodule.exports = fromObs;\n\n\n//# sourceURL=webpack:///./node_modules/refract-callbag/node_modules/callbag-from-obs/readme.js?"); + +/***/ }), + +/***/ "./node_modules/symbol-observable/es/index.js": +/*!****************************************************!*\ + !*** ./node_modules/symbol-observable/es/index.js ***! + \****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ponyfill.js */ \"./node_modules/symbol-observable/es/ponyfill.js\");\n/* global window */\n\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (true) {\n root = module;\n} else {}\n\nvar result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(root);\n/* harmony default export */ __webpack_exports__[\"default\"] = (result);\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../../webpack/buildin/harmony-module.js */ \"./node_modules/webpack/buildin/harmony-module.js\")(module)))\n\n//# sourceURL=webpack:///./node_modules/symbol-observable/es/index.js?"); + +/***/ }), + +/***/ "./node_modules/symbol-observable/es/ponyfill.js": +/*!*******************************************************!*\ + !*** ./node_modules/symbol-observable/es/ponyfill.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return symbolObservablePonyfill; });\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n\n//# sourceURL=webpack:///./node_modules/symbol-observable/es/ponyfill.js?"); + +/***/ }), + +/***/ "./node_modules/webpack/buildin/global.js": +/*!***********************************!*\ + !*** (webpack)/buildin/global.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack:///(webpack)/buildin/global.js?"); + +/***/ }), + +/***/ "./node_modules/webpack/buildin/harmony-module.js": +/*!*******************************************!*\ + !*** (webpack)/buildin/harmony-module.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n\n//# sourceURL=webpack:///(webpack)/buildin/harmony-module.js?"); + +/***/ }), + +/***/ "./packages/vendor/index.js": +/*!**********************************!*\ + !*** ./packages/vendor/index.js ***! + \**********************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var nanoid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! nanoid */ \"./node_modules/nanoid/index.browser.js\");\n/* harmony import */ var nanoid__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(nanoid__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! immer */ \"./node_modules/immer/dist/immer.module.js\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! refract-callbag */ \"./node_modules/refract-callbag/index.es.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! callbag-basics */ \"./node_modules/callbag-basics/index.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_13__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Prevent the conflicts with WordPress's Underscore lib.\n */\n\nif (!window.lodash) {\n lodash__WEBPACK_IMPORTED_MODULE_11__[\"noConflict\"]();\n}\n/**\n * Setup the vendor variables used by Carbon Fields.\n */\n\n\nwindow.cf = window.cf || {};\nwindow.cf.vendor = [['react', react__WEBPACK_IMPORTED_MODULE_1___default.a], ['react-dom', react_dom__WEBPACK_IMPORTED_MODULE_2___default.a], ['nanoid', nanoid__WEBPACK_IMPORTED_MODULE_3___default.a], ['immer', immer__WEBPACK_IMPORTED_MODULE_4__[\"default\"]], ['@wordpress/compose', _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__], ['@wordpress/element', _wordpress_element__WEBPACK_IMPORTED_MODULE_6__], ['@wordpress/hooks', _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__], ['@wordpress/data', _wordpress_data__WEBPACK_IMPORTED_MODULE_8__], ['@wordpress/i18n', _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__], ['classnames', classnames__WEBPACK_IMPORTED_MODULE_10__], ['lodash', lodash__WEBPACK_IMPORTED_MODULE_11__], ['refract-callbag', refract_callbag__WEBPACK_IMPORTED_MODULE_12__], ['callbag-basics', callbag_basics__WEBPACK_IMPORTED_MODULE_13__]].reduce(function (vendors, _ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n key = _ref2[0],\n implementation = _ref2[1];\n\n vendors[key] = implementation;\n return vendors;\n}, {});\n/**\n * Setup the enviroment variables used by Carbon Fields.\n */\n\nwindow.cf.hooks = _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__;\nwindow.cf.element = _wordpress_element__WEBPACK_IMPORTED_MODULE_6__;\n\n//# sourceURL=webpack:///./packages/vendor/index.js?"); + +/***/ }), + +/***/ "@wordpress/compose": +/*!*********************************!*\ + !*** external ["wp","compose"] ***! + \*********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = wp[\"compose\"];\n\n//# sourceURL=webpack:///external_%5B%22wp%22,%22compose%22%5D?"); + +/***/ }), + +/***/ "@wordpress/data": +/*!******************************!*\ + !*** external ["wp","data"] ***! + \******************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = wp[\"data\"];\n\n//# sourceURL=webpack:///external_%5B%22wp%22,%22data%22%5D?"); + +/***/ }), + +/***/ "@wordpress/element": +/*!*********************************!*\ + !*** external ["wp","element"] ***! + \*********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = wp[\"element\"];\n\n//# sourceURL=webpack:///external_%5B%22wp%22,%22element%22%5D?"); + +/***/ }), + +/***/ "@wordpress/hooks": +/*!*******************************!*\ + !*** external ["wp","hooks"] ***! + \*******************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = wp[\"hooks\"];\n\n//# sourceURL=webpack:///external_%5B%22wp%22,%22hooks%22%5D?"); + +/***/ }), + +/***/ "@wordpress/i18n": +/*!******************************!*\ + !*** external ["wp","i18n"] ***! + \******************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = wp[\"i18n\"];\n\n//# sourceURL=webpack:///external_%5B%22wp%22,%22i18n%22%5D?"); + +/***/ }), + +/***/ "lodash": +/*!*************************!*\ + !*** external "lodash" ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = lodash;\n\n//# sourceURL=webpack:///external_%22lodash%22?"); + +/***/ }), + +/***/ "react": +/*!************************!*\ + !*** external "React" ***! + \************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = React;\n\n//# sourceURL=webpack:///external_%22React%22?"); + +/***/ }), + +/***/ "react-dom": +/*!***************************!*\ + !*** external "ReactDOM" ***! + \***************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = ReactDOM;\n\n//# sourceURL=webpack:///external_%22ReactDOM%22?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/build/gutenberg/vendor.min.js b/build/gutenberg/vendor.min.js new file mode 100644 index 000000000..b11e723bc --- /dev/null +++ b/build/gutenberg/vendor.min.js @@ -0,0 +1,11 @@ +!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=41)}([function(e,n){e.exports=React},function(e,n,t){"use strict";t.r(n),function(e,r){var o,i=t(17);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var u=Object(i.a)(o);n.default=u}.call(this,t(36),t(37)(e))},function(e,n){e.exports=wp.element},function(e,n){e.exports=wp.hooks},function(e,n){e.exports=lodash},function(e,n){e.exports=(e=>n=>(t,r)=>{0===t&&n(0,(n,t)=>{r(n,1===n?e(t):t)})})},function(e,n){e.exports=(e=>n=>(t,r)=>{if(0!==t)return;let o;n(0,(n,t)=>{0===n?(o=t,r(n,t)):1===n?e(t)?r(n,t):o(1):r(n,t)})})},function(e,n){e.exports=function(...e){let n=e[0];for(let t=1,r=e.length;t0||h.length>0)&&T(n),v(d,function(e,t){n.assigned[t]=!0}),v(h,function(e,t){n.assigned[t]=!1}),v(f,function(e,t){n.assigned[e]||_(t)})}}}}function R(e){return!function(e,n){if(m(e,n))return!0;if("object"!==(void 0===e?"undefined":t(e))||null===e||"object"!==(void 0===n?"undefined":t(n))||null===n)return!1;var r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;for(var i=0;i=0;e--){var n=A[e];!1===n.modified&&(Array.isArray(n.base)?L(n)&&T(n):R(n)&&T(n))}}(),d=b(a,[],i,f);return v(A,function(e,n){n.finished=!0}),t&&t(i,f),d}finally{A=o}}function D(e,n,r){if(arguments.length<1||arguments.length>3)throw new Error("produce expects 1 to 3 arguments, got "+arguments.length);if("function"==typeof e){if("function"==typeof n)throw new Error("if first argument is a function (curried invocation), the second argument to produce cannot be a function");var o=n,i=e;return function(){var e=arguments;return D(void 0===e[0]&&void 0!==o?o:e[0],function(n){return e[0]=n,i.apply(n,e)})}}if("function"!=typeof n)throw new Error("if first argument is not a function, the second argument to produce should be a function");if(void 0!==r&&"function"!=typeof r)throw new Error("the third argument of a producer should not be set or a function");if("object"!==(void 0===e?"undefined":t(e))||null===e){var f=n(e);return void 0===f?e:I(f)}if(!p(e))throw new Error("the first argument to an immer producer should be a primitive, plain object or array, got "+(void 0===e?"undefined":t(e))+': "'+e+'"');return I(a?function(e,n,t){if(s(e)){var r=n.call(e,e);return void 0===r?e:r}var o=g;g=[];var i=t&&[],f=t&&[];try{var a=j(void 0,e),p=n.call(a,a),l=void 0;if(void 0!==p&&p!==a){if(a[u].modified)throw new Error(c);l=b(p),i&&(i.push({op:"replace",path:[],value:l}),f.push({op:"replace",path:[],value:e}))}else l=b(a,[],i,f);return v(g,function(e,n){return n.revoke()}),t&&t(i,f),l}finally{g=o}}(e,n,r):M(e,n,r))}function I(e){return e===i?void 0:e}D(function(e,n){for(var r=0;r1)for(var t=1;tn=>{let t;n(0,(n,r)=>{0===n&&(t=r),1===n&&e(r),1!==n&&0!==n||t(1)})})},function(e,n){e.exports=(e=>(n,t)=>{if(0!==n)return;let r;t(0,e=>{2===e&&r&&(r.unsubscribe?r.unsubscribe():r())}),r=e.subscribe({next:e=>t(1,e),error:e=>t(2,e),complete:()=>t(2)})})},function(e,n){e.exports=(e=>(n,t)=>{if(0!==n)return;const r="undefined"!=typeof Symbol&&e[Symbol.iterator]?e[Symbol.iterator]():e;let o,i=!1,u=!1;t(0,e=>{1===e&&(u=!0,i||o&&o.done||function(){for(i=!0;u;)u=!1,(o=r.next()).done?t(2):t(1,o.value);i=!1}())})})},function(e,n){e.exports=((e,n)=>(t,r)=>{if(0!==t)return;const o=e=>r(1,e);r(0,t=>{2===t&&e.removeEventListener(n,o)}),e.addEventListener(n,o)})},function(e,n){e.exports=(e=>(n,t)=>{if(0!==n)return;let r=!1;e.then(e=>{r||(t(1,e),t(2))},e=>{r||t(2,e)}),t(0,e=>{2===e&&(r=!0)})})},function(e,n){e.exports=(e=>(n,t)=>{if(0!==n)return;let r=0;const o=setInterval(()=>{t(1,r++)},e);t(0,e=>{2===e&&clearInterval(o)})})},function(e,n){e.exports=function(e,n){let t=2===arguments.length;return r=>(o,i)=>{if(0!==o)return;let u=n;r(0,(n,r)=>{1===n?(u=t?e(u,r):(t=!0,r),i(1,u)):i(n,r)})}}},function(e,n){e.exports=(e=>(n,t)=>{if(0!==n)return;const r=e=>void 0!==e,o=e=>void 0===e,i=()=>{};let u,c,f=!1;function a(e){1===e&&(c||u||i)(1),2===e&&(c&&c(2),u&&u(2))}e(0,(e,n)=>{if(0===e)u=n,t(0,a);else if(1===e){const e=n;c&&c(2),e(0,(e,n)=>{0===e?(c=n)(1):1===e?t(1,n):2===e&&o(n)?f?t(2):(c=void 0,u(1)):2===e&&r(n)&&t(2,n)})}else 2===e&&o(n)?c?f=!0:t(2):2===e&&r(n)&&t(2,n)})})},function(e,n){e.exports=(e=>n=>(t,r)=>{if(0!==t)return;let o,i=0;function u(n,t){i{0===n?(o=t,r(0,u)):1===n?in=>(t,r)=>{if(0!==t)return;let o,i=0;n(0,(n,t)=>{0===n?(o=t,r(n,t)):1===n&&i{if(0!==n)return;const r=e.length,o=new Array(r);let i=0,u=0;const c=e=>{if(0!==e)for(let n=0;n{0===e?(o[n]=f,1==++i&&t(0,c)):2===e?(o[n]=void 0,++u===r&&t(2)):t(e,f)})}}},function(e,n){e.exports=((...e)=>(n,t)=>{if(0!==n)return;const r=e.length;if(0===r)return t(0,()=>{}),void t(2);let o,i=0;const u=(e,n)=>{1!==e&&2!==e||o(e,n)};!function n(){i!==r?e[i](0,(e,r)=>{0===e?(o=r,0===i?t(0,u):o(1)):1===e?t(1,r):2===e&&(i++,n())}):t(2)}()})},function(e,n){const t={};e.exports=((...e)=>(n,r)=>{if(0!==n)return;const o=e.length;if(0===o)return r(0,()=>{}),r(1,[]),void r(2);let i=o,u=o,c=o;const f=new Array(o),a=new Array(o),s=(e,n)=>{if(2===e)for(let e=0;e{f[n]=t,e(0,(e,p)=>{if(0===e)a[n]=p,0==--i&&r(0,s);else if(1===e){const e=u?f[n]===t?--u:u:0;if(f[n]=p,0===e){const e=new Array(o);for(let n=0;n{let n,t=[];return function(r,o){if(0!==r)return;t.push(o);const i=(e,r)=>{if(0!==e)if(2===e){const e=t.indexOf(o);e>-1&&t.splice(e,1),t.length||n(2)}else n(e,r)};1!==t.length?o(0,i):e(0,(e,r)=>{if(0===e)n=r,o(0,i);else for(let n of t.slice(0))n(e,r);2===e&&(t=[])})}})},function(e,n){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,n){e.exports=function(e){if(!e.webpackPolyfill){var n=Object.create(e);n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),Object.defineProperty(n,"exports",{enumerable:!0}),n.webpackPolyfill=1}return n}},function(e,n,t){const r=t(1).default;e.exports=(e=>(n,t)=>{if(0!==n)return;let o;t(0,e=>{2===e&&o&&(o.unsubscribe?o.unsubscribe():o())}),e=e[r]?e[r]():e,o=e.subscribe({next:e=>t(1,e),error:e=>t(2,e),complete:()=>t(2)})})},function(e,n,t){const r=t(1).default;e.exports=function(e){return{subscribe:function(n){let t;!function(e){e.start||(e.start=(()=>{})),e.next||(e.next=(()=>{})),e.error||(e.error=(()=>{})),e.complete||(e.complete=(()=>{}))}(n);const r={unsubscribe:function(){t&&t(2)}};n.start(r);try{e(0,(e,r)=>{0===e&&(t=r),1===e&&n.next(r),2===e&&r?n.error(r):2===e&&(t=void 0,n.complete(r))})}catch(e){n.error(e)}return r},[r]:function(){return this}}}},function(e,n){e.exports=(e=>n=>(t,r)=>{const o={};let i,u=o;const c=e||((e,n)=>e===n);0===t&&n(t,(e,n)=>{if(e===t&&(i=n),1===e)return u!==o&&c(u,n)?i(e):r(e,u=n);r(e,n)})})},function(e,n,t){"use strict";t.r(n);var r={};t.r(r),t.d(r,"withEffects",function(){return W}),t.d(r,"compose",function(){return q}),t.d(r,"asProps",function(){return S}),t.d(r,"toProps",function(){return A}),t.d(r,"PROPS_EFFECT",function(){return j}),t.d(r,"useRefract",function(){return G}),t.d(r,"toRender",function(){return T}),t.d(r,"COMPONENT_EFFECT",function(){return P});var o,i=t(8),u=t.n(i),c=t(0),f=t.n(c),a=t(9),s=t.n(a),p=t(10),l=t.n(p),d=t(11),h=t(12),v=t(2),y=t(3),b=t(13),m=t(14),g=t(15),w=t(4),x=t(1),O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},E=Object.assign||function(e){for(var n,t=1,r=arguments.length;t1,u=e[2],c=t(o),f=n(o);return[i?N(c,((...e)=>n=>(t,r)=>{if(0!==t)return;let o,i,u=!1,c=!1;for(r(0,(n,t)=>{c&&1===n&&(i=[1,t]),2===n&&(u=!0,e.length=0),o&&o(n,t)});0!==e.length;)1===e.length&&(c=!0),r(1,e.shift());u||n(0,(e,n)=>{if(0===e)return o=n,c=!1,void(i&&(o(...i),i=null));r(e,n)})})(u)):c,f]}}}(i(),t))},V=function(e,n,t,r,i,u,c,f){void 0===t&&(t=function(){return!1}),void 0===r&&(r=function(){return!1}),n.state={renderEffect:!1,children:null,props:{}};var a=function(e){n.unmounted||(n.mounted?n.setState(e):n.state=E({},n.state,e))},s={},p=[],l=function(e){return function(n){p.forEach(function(t){t.next(_(e,n))})}},d=function(e,n,t){"children"===t||r(n)||(e[t]=function(){for(var e=[],r=0;r Date: Wed, 12 Dec 2018 16:25:03 +0200 Subject: [PATCH 03/11] Bump v3.0.0-rc.1 --- config.php | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.php b/config.php index 2d0608791..92c137180 100644 --- a/config.php +++ b/config.php @@ -4,7 +4,7 @@ # Define version constant if ( ! defined( __NAMESPACE__ . '\VERSION' ) ) { - define( __NAMESPACE__ . '\VERSION', '3.0.0-beta.1' ); + define( __NAMESPACE__ . '\VERSION', '3.0.0-rc.1' ); } # Define root directory diff --git a/package.json b/package.json index 8ae6c6487..a2f783973 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "carbon-fields", - "version": "3.0.0-beta.1", + "version": "3.0.0-rc.1", "description": "WordPress developer-friendly custom fields for post types, taxonomy terms, users, comments, widgets, options, navigation menus and more.", "directories": { "test": "tests" From b5e165c05aef28a985a1a4126d20967787fb689d Mon Sep 17 00:00:00 2001 From: Viktor Vasilev Date: Fri, 14 Dec 2018 11:21:06 +0200 Subject: [PATCH 04/11] Add bundles --- build/classic/core.css | 116 ++++++++++++++++++++++++++++-- build/classic/core.js | 47 ++++++++++-- build/classic/core.min.css | 2 +- build/classic/core.min.js | 6 +- build/classic/metaboxes.css | 63 ++++++++++++++++ build/classic/metaboxes.js | 88 +++++++++++++---------- build/classic/metaboxes.min.css | 2 +- build/classic/metaboxes.min.js | 2 +- build/classic/report.html | 65 ----------------- build/gutenberg/blocks.css | 36 ++++++++++ build/gutenberg/blocks.js | 53 +++++++------- build/gutenberg/blocks.min.css | 2 +- build/gutenberg/blocks.min.js | 2 +- build/gutenberg/core.css | 116 ++++++++++++++++++++++++++++-- build/gutenberg/core.js | 47 ++++++++++-- build/gutenberg/core.min.css | 2 +- build/gutenberg/core.min.js | 6 +- build/gutenberg/metaboxes.css | 63 ++++++++++++++++ build/gutenberg/metaboxes.js | 88 +++++++++++++---------- build/gutenberg/metaboxes.min.css | 2 +- build/gutenberg/metaboxes.min.js | 2 +- build/gutenberg/report.html | 65 ----------------- 22 files changed, 600 insertions(+), 275 deletions(-) delete mode 100644 build/classic/report.html delete mode 100644 build/gutenberg/report.html diff --git a/build/classic/core.css b/build/classic/core.css index c69eaffa1..94f095fe3 100644 --- a/build/classic/core.css +++ b/build/classic/core.css @@ -85,6 +85,7 @@ align-items: center; justify-content: space-between; flex: 1; + min-width: 0; margin-right: 8px; } .cf-association__option-title { @@ -93,7 +94,8 @@ line-height: 1.4; color: #32373c; white-space: nowrap; - text-overflow: ellipsis; } + text-overflow: ellipsis; + margin-right: 4px; } .cf-association__option--selected .cf-association__option-title { color: #82878c; } @@ -295,11 +297,27 @@ .cf-complex--tabbed-vertical .cf-complex__groups { flex: 0 0 80%; } -.cf-complex--grid .cf-complex__group { - position: relative; - margin-bottom: 12px; } - .cf-complex--grid .cf-complex__group:last-child { - margin-bottom: 0; } +.cf-complex__group { + box-sizing: border-box; } + .cf-complex--grid .cf-complex__group { + position: relative; + margin-bottom: 12px; } + .cf-complex--grid .cf-complex__group:last-child { + margin-bottom: 0; } + +.cf-complex__group-placeholder { + position: relative; } + .cf-complex__group-placeholder:not(:last-child) { + margin-bottom: 12px; } + .cf-complex__group-placeholder::before { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + border: 1px dashed #e2e4e7; + box-sizing: border-box; + content: ''; } /** * Head @@ -340,7 +358,8 @@ flex-wrap: wrap; border-width: 0 0 1px 1px; border-style: solid; - border-color: #e2e4e7; } + border-color: #e2e4e7; + background-color: #fff; } .cf-complex__group-body[hidden] { display: none; } .cf-complex--grid .cf-complex__group-body { @@ -1485,6 +1504,75 @@ span.flatpickr-weekday { .cf-media-gallery__item-remove:hover::before { color: #b5bcc2; } +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Multiselect + ========================================================================== */ +.cf-multiselect__control { + height: 30px; + min-height: 0; + border-color: #e2e4e7; } + .cf-multiselect__control:hover { + border-color: #e2e4e7; } + .cf-multiselect__control--is-focused, .cf-multiselect__control--is-focused:hover { + border-color: #00a0d2 !important; + box-shadow: none; } + +.cf-multiselect__placeholder { + color: #b5bcc2; } + +.cf-multiselect__value-container { + padding-left: 4px; + padding-right: 4px; } + +.cf-multiselect__multi-value { + align-items: center; + margin: 0; + background-color: transparent; } + +.cf-multiselect__multi-value__label { + padding-left: 3px; + font-size: 12px; + line-height: 1; } + +.cf-multiselect__multi-value__remove { + padding: 0; } + .cf-multiselect__multi-value__remove:hover { + background-color: transparent; } + +.cf-multiselect__input input[id], +.cf-multiselect__input input[id]:focus { + box-shadow: none; } + +.cf-multiselect__menu { + z-index: 9999; } + +.cf-multiselect__option { + padding: 4px; } + .cf-multiselect__option--is-focused { + background-color: #00a0d2; + color: #fff; } + /* ========================================================================== Colors ========================================================================== */ @@ -1559,6 +1647,9 @@ span.flatpickr-weekday { position: relative; padding: 4px; } +.cf-container-term-meta .cf-radio__label { + display: inline; } + .cf-radio-image .cf-radio__label { display: inline-block; } @@ -1678,6 +1769,10 @@ span.flatpickr-weekday { .cf-container-term-meta .cf-separator .cf-field__head { display: none; } +.cf-container-term-meta .cf-separator .cf-field__body { + position: absolute; + left: 0; } + /* ========================================================================== Colors ========================================================================== */ @@ -1711,6 +1806,9 @@ span.flatpickr-weekday { .cf-field .cf-set__input { margin-top: 0; } +.cf-container-term-meta .cf-set__label { + display: inline; } + /* ========================================================================== Colors ========================================================================== */ @@ -1799,6 +1897,10 @@ span.flatpickr-weekday { box-sizing: border-box; flex: 1 1 100%; } +@media (max-width: 1024px) { + .cf-field { + flex-basis: 100% !important; } } + .cf-rich-text .cf-field__body { box-sizing: content-box; } diff --git a/build/classic/core.js b/build/classic/core.js index abb368d87..f7504c19a 100644 --- a/build/classic/core.js +++ b/build/classic/core.js @@ -3200,7 +3200,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../registry/fields */ \"./packages/core/registry/fields.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar ComplexGroup =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexGroup, _Component);\n\n function ComplexGroup() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexGroup);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexGroup)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleClick\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onToggle = _this$props.onToggle;\n onToggle(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneClick\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n onClone = _this$props2.onClone;\n onClone(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveClick\", function () {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n onRemove = _this$props3.onRemove;\n onRemove(id);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexGroup, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n index = _this$props4.index,\n label = _this$props4.label,\n name = _this$props4.name,\n prefix = _this$props4.prefix,\n tabbed = _this$props4.tabbed,\n hidden = _this$props4.hidden,\n collapsed = _this$props4.collapsed,\n allowClone = _this$props4.allowClone,\n fields = _this$props4.fields,\n context = _this$props4.context,\n onFieldSetup = _this$props4.onFieldSetup;\n var groupClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group', {\n 'cf-complex__group--collapsed': collapsed\n });\n var toggleClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('dashicons-before', 'cf-complex__group-action-icon', {\n 'dashicons-arrow-up': !collapsed,\n 'dashicons-arrow-down': collapsed\n });\n var actionsClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group-actions', {\n 'cf-complex__group-actions--tabbed': tabbed\n });\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: groupClasses,\n hidden: hidden\n }, name && __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(prefix, \"[value]\"),\n value: name\n }), !tabbed && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__group-head\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-index\"\n }, index + 1), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-title\"\n }, label)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__group-body\",\n hidden: collapsed\n }, fields.map(function (field) {\n var FieldEdit = Object(_registry_fields__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, context);\n\n if (!FieldEdit) {\n return null;\n }\n\n var _onFieldSetup = onFieldSetup(field, {}, _this2.props),\n _onFieldSetup2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_onFieldSetup, 2),\n Field = _onFieldSetup2[0],\n props = _onFieldSetup2[1];\n\n return (// The `key` will be assigned via `onFieldSetup`.\n // eslint-disable-next-line react/jsx-key\n __webpack_provided_wp_dot_element.createElement(Field, props, __webpack_provided_wp_dot_element.createElement(FieldEdit, props))\n );\n })), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: actionsClasses\n }, allowClone && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleCloneClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"dashicons-before dashicons-admin-page cf-complex__group-action-icon\"\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Duplicate', 'carbon-fields-ui'))), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleRemoveClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"dashicons-before dashicons-trash cf-complex__group-action-icon\"\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Remove', 'carbon-fields-ui'))), !tabbed && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleToggleClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: toggleClasses\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Collapse', 'carbon-fields-ui')))));\n }\n }]);\n\n return ComplexGroup;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexGroup);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/group.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../registry/fields */ \"./packages/core/registry/fields.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar ComplexGroup =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexGroup, _Component);\n\n function ComplexGroup() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexGroup);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexGroup)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleClick\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onToggle = _this$props.onToggle;\n onToggle(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneClick\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n onClone = _this$props2.onClone;\n onClone(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveClick\", function () {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n onRemove = _this$props3.onRemove;\n onRemove(id);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexGroup, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n index = _this$props4.index,\n label = _this$props4.label,\n name = _this$props4.name,\n prefix = _this$props4.prefix,\n tabbed = _this$props4.tabbed,\n hidden = _this$props4.hidden,\n collapsed = _this$props4.collapsed,\n allowClone = _this$props4.allowClone,\n fields = _this$props4.fields,\n context = _this$props4.context,\n onFieldSetup = _this$props4.onFieldSetup;\n var groupClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group', {\n 'cf-complex__group--collapsed': collapsed\n });\n var toggleClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('dashicons-before', 'cf-complex__group-action-icon', {\n 'dashicons-arrow-up': !collapsed,\n 'dashicons-arrow-down': collapsed\n });\n var actionsClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group-actions', {\n 'cf-complex__group-actions--tabbed': tabbed\n });\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: groupClasses,\n hidden: hidden\n }, name && __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(prefix, \"[value]\"),\n value: name\n }), !tabbed && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__group-head\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-index\"\n }, index + 1), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-title\"\n }, label)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__group-body\",\n hidden: !tabbed && collapsed\n }, fields.map(function (field) {\n var FieldEdit = Object(_registry_fields__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, context);\n\n if (!FieldEdit) {\n return null;\n }\n\n var _onFieldSetup = onFieldSetup(field, {}, _this2.props),\n _onFieldSetup2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_onFieldSetup, 2),\n Field = _onFieldSetup2[0],\n props = _onFieldSetup2[1];\n\n return (// The `key` will be assigned via `onFieldSetup`.\n // eslint-disable-next-line react/jsx-key\n __webpack_provided_wp_dot_element.createElement(Field, props, __webpack_provided_wp_dot_element.createElement(FieldEdit, props))\n );\n })), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: actionsClasses\n }, allowClone && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleCloneClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"dashicons-before dashicons-admin-page cf-complex__group-action-icon\"\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Duplicate', 'carbon-fields-ui'))), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleRemoveClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"dashicons-before dashicons-trash cf-complex__group-action-icon\"\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Remove', 'carbon-fields-ui'))), !tabbed && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleToggleClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: toggleClasses\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Collapse', 'carbon-fields-ui')))));\n }\n }]);\n\n return ComplexGroup;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexGroup);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/group.js?"); /***/ }), @@ -3212,7 +3212,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./tabs */ \"./packages/core/fields/complex/tabs.js\");\n/* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./inserter */ \"./packages/core/fields/complex/inserter.js\");\n/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./group */ \"./packages/core/fields/complex/group.js\");\n/* harmony import */ var _placeholder__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./placeholder */ \"./packages/core/fields/complex/placeholder.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"groupsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"tabsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"state\", {\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(_this.props.value, \"0.\".concat(_this.props.groupIdKey), null)\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddGroup\", function (selection) {\n var _this$props = _this.props,\n groupIdKey = _this$props.groupIdKey,\n onAddGroup = _this$props.onAddGroup;\n onAddGroup(selection, function (group) {\n if (_this.isTabbed) {\n _this.handleTabsChange(group[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleCloneGroup\", function (groupId) {\n var _this$props2 = _this.props,\n groupIdKey = _this$props2.groupIdKey,\n onCloneGroup = _this$props2.onCloneGroup;\n\n var group = _this.findGroup(groupId);\n\n onCloneGroup(group, function (clonedGroup) {\n if (_this.isTabbed) {\n _this.handleTabsChange(clonedGroup[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveGroup\", function (groupId) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n groupIdKey = _this$props3.groupIdKey,\n onRemoveGroup = _this$props3.onRemoveGroup;\n\n var group = _this.findGroup(groupId);\n\n if (_this.isTabbed) {\n var currentIndex = value.indexOf(group);\n var nextIndex = currentIndex > 0 ? currentIndex - 1 : 1;\n\n _this.setState({\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(value, \"\".concat(nextIndex, \".\").concat(groupIdKey), null)\n });\n }\n\n onRemoveGroup(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleToggleAllClick\", function () {\n var _this$props4 = _this.props,\n allGroupsAreCollapsed = _this$props4.allGroupsAreCollapsed,\n onToggleAllGroups = _this$props4.onToggleAllGroups;\n onToggleAllGroups(!allGroupsAreCollapsed);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSortGroups\", function (groups) {\n var _this$props5 = _this.props,\n id = _this$props5.id,\n onChange = _this$props5.onChange;\n onChange(id, groups);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleTabsChange\", function (groupId) {\n _this.setState({\n currentTab: groupId\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, [{\n key: \"findGroup\",\n\n /**\n * Finds a group.\n *\n * @param {string} groupId\n * @return {?Object}\n */\n value: function findGroup(groupId) {\n var _this$props6 = this.props,\n value = _this$props6.value,\n groupIdKey = _this$props6.groupIdKey;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(value, [groupIdKey, groupId]);\n }\n /**\n * Returns a list of groups that can be added if the field\n * doesn't allow duplicating of groups.\n *\n * @param {string} key\n * @return {Object[]}\n */\n\n }, {\n key: \"getAvailableGroups\",\n value: function getAvailableGroups(key) {\n var _this$props7 = this.props,\n field = _this$props7.field,\n value = _this$props7.value;\n\n if (field.duplicate_groups_allowed) {\n return field.groups;\n }\n\n var existingGroupNames = value.map(function (group) {\n return group[key];\n });\n return field.groups.filter(function (_ref) {\n var name = _ref.name;\n return existingGroupNames.indexOf(name) === -1;\n });\n }\n /**\n * Returns a list of labels of existing groups.\n *\n * @return {string[]}\n */\n\n }, {\n key: \"getGroupLabels\",\n value: function getGroupLabels() {\n var _this$props8 = this.props,\n field = _this$props8.field,\n groupValues = _this$props8.groupValues;\n return groupValues.map(function (_ref2, index) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_ref2, 2),\n name = _ref3[0],\n values = _ref3[1];\n\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(field.groups, ['name', name]);\n\n if (!group) {\n return 'N/A';\n }\n\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isString\"])(group.label_template)) {\n return group.label;\n }\n\n try {\n var label = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"template\"])(group.label_template)(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({\n $_index: index\n }, values));\n return label || group.label;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Couldn't create the label of group - \".concat(e.message));\n return 'N/A';\n }\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} selection\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var _this$props9 = this.props,\n value = _this$props9.value,\n field = _this$props9.field,\n groupIdKey = _this$props9.groupIdKey,\n groupFilterKey = _this$props9.groupFilterKey,\n allGroupsAreCollapsed = _this$props9.allGroupsAreCollapsed,\n onGroupSetup = _this$props9.onGroupSetup,\n onGroupFieldSetup = _this$props9.onGroupFieldSetup,\n onToggleGroup = _this$props9.onToggleGroup;\n var availableGroups = this.getAvailableGroups(groupFilterKey);\n var groupLabels = this.getGroupLabels(); // TODO: Move this to a memoized function.\n\n var tabs = value.map(function (group, index) {\n var id = group[groupIdKey];\n var label = groupLabels[index];\n return {\n id: id,\n label: label\n };\n });\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Fragment\"], null, this.isTabbed && !!value.length && __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n forwardedRef: this.tabsList,\n options: {\n axis: field.layout === 'tabbed-vertical' ? 'y' : 'x',\n forcePlaceholderSize: true\n },\n onUpdate: this.handleSortGroups\n }, __webpack_provided_wp_dot_element.createElement(_tabs__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n ref: this.tabsList,\n items: tabs,\n current: currentTab,\n onChange: this.handleTabsChange\n }, !!availableGroups.length && !this.isMaximumReached && __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: \"+\",\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }))), !value.length && __webpack_provided_wp_dot_element.createElement(_placeholder__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n label: \"There are no entries yet.\"\n }, __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n })), !!value.length && __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n options: {\n handle: '.cf-complex__group-head'\n },\n forwardedRef: this.groupsList,\n onUpdate: this.handleSortGroups\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__groups\",\n ref: this.groupsList\n }, value.map(function (group, index) {\n return (// The `key` will be assigned via `onGroupSetup`.\n // eslint-disable-next-line react/jsx-key\n __webpack_provided_wp_dot_element.createElement(_group__WEBPACK_IMPORTED_MODULE_18__[\"default\"], onGroupSetup(group, {\n index: index,\n label: groupLabels[index],\n tabbed: _this2.isTabbed,\n hidden: _this2.isTabbed && group[groupIdKey] !== currentTab,\n allowClone: field.duplicate_groups_allowed && !_this2.isMaximumReached,\n onFieldSetup: onGroupFieldSetup,\n onClone: _this2.handleCloneGroup,\n onRemove: _this2.handleRemoveGroup,\n onToggle: onToggleGroup\n }))\n );\n }))), !this.isTabbed && !!value.length && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__actions\"\n }, !!availableGroups.length && !this.isMaximumReached && __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-complex__toggler\",\n onClick: this.handleToggleAllClick\n }, allGroupsAreCollapsed ? 'Expand All' : 'Collapse All')));\n }\n }, {\n key: \"isTabbed\",\n\n /**\n * Returns true if the field is using tabs for the layout.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.props.field.layout.indexOf('tabbed') > -1;\n }\n /**\n * Returns true if the maximum number of entries is reached.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isMaximumReached\",\n get: function get() {\n var _this$props10 = this.props,\n field = _this$props10.field,\n value = _this$props10.value;\n return field.max > 0 && value.length >= field.max;\n }\n /**\n * Returns the text used in \"Add Entry\" button.\n *\n * @return {string}\n */\n\n }, {\n key: \"inserterButtonText\",\n get: function get() {\n var field = this.props.field;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Add %s', 'carbon-fields-ui'), field.labels.singular_name);\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.field-wrapper', 'carbon-fields/core', function (OriginalField) {\n return function (props) {\n var field = props.field;\n\n if (field.type !== 'complex') {\n return __webpack_provided_wp_dot_element.createElement(OriginalField, props);\n }\n\n return __webpack_provided_wp_dot_element.createElement(OriginalField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n className: \"cf-complex--\".concat(field.layout)\n }, props));\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n labels = field.labels,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n var label = min === 1 ? labels.singular_name : labels.plural_name;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Minimum number of rows not reached (%1$d %2$s)', 'carbon-fields-ui'), Number(min), label.toLowerCase());\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./tabs */ \"./packages/core/fields/complex/tabs.js\");\n/* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./inserter */ \"./packages/core/fields/complex/inserter.js\");\n/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./group */ \"./packages/core/fields/complex/group.js\");\n/* harmony import */ var _placeholder__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./placeholder */ \"./packages/core/fields/complex/placeholder.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"groupsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"tabsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"state\", {\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(_this.props.value, \"0.\".concat(_this.props.groupIdKey), null)\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddGroup\", function (selection) {\n var _this$props = _this.props,\n groupIdKey = _this$props.groupIdKey,\n onAddGroup = _this$props.onAddGroup;\n onAddGroup(selection, function (group) {\n if (_this.isTabbed) {\n _this.handleTabsChange(group[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleCloneGroup\", function (groupId) {\n var _this$props2 = _this.props,\n groupIdKey = _this$props2.groupIdKey,\n onCloneGroup = _this$props2.onCloneGroup;\n\n var group = _this.findGroup(groupId);\n\n onCloneGroup(group, function (clonedGroup) {\n if (_this.isTabbed) {\n _this.handleTabsChange(clonedGroup[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveGroup\", function (groupId) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n groupIdKey = _this$props3.groupIdKey,\n onRemoveGroup = _this$props3.onRemoveGroup;\n\n var group = _this.findGroup(groupId);\n\n if (_this.isTabbed) {\n var currentIndex = value.indexOf(group);\n var nextIndex = currentIndex > 0 ? currentIndex - 1 : 1;\n\n _this.setState({\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(value, \"\".concat(nextIndex, \".\").concat(groupIdKey), null)\n });\n }\n\n onRemoveGroup(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleToggleAllClick\", function () {\n var _this$props4 = _this.props,\n allGroupsAreCollapsed = _this$props4.allGroupsAreCollapsed,\n onToggleAllGroups = _this$props4.onToggleAllGroups;\n onToggleAllGroups(!allGroupsAreCollapsed);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSortGroups\", function (groups) {\n var _this$props5 = _this.props,\n id = _this$props5.id,\n onChange = _this$props5.onChange;\n onChange(id, groups);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleTabsChange\", function (groupId) {\n _this.setState({\n currentTab: groupId\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, [{\n key: \"findGroup\",\n\n /**\n * Finds a group.\n *\n * @param {string} groupId\n * @return {?Object}\n */\n value: function findGroup(groupId) {\n var _this$props6 = this.props,\n value = _this$props6.value,\n groupIdKey = _this$props6.groupIdKey;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(value, [groupIdKey, groupId]);\n }\n /**\n * Returns a list of groups that can be added if the field\n * doesn't allow duplicating of groups.\n *\n * @param {string} key\n * @return {Object[]}\n */\n\n }, {\n key: \"getAvailableGroups\",\n value: function getAvailableGroups(key) {\n var _this$props7 = this.props,\n field = _this$props7.field,\n value = _this$props7.value;\n\n if (field.duplicate_groups_allowed) {\n return field.groups;\n }\n\n var existingGroupNames = value.map(function (group) {\n return group[key];\n });\n return field.groups.filter(function (_ref) {\n var name = _ref.name;\n return existingGroupNames.indexOf(name) === -1;\n });\n }\n /**\n * Returns a list of labels of existing groups.\n *\n * @return {string[]}\n */\n\n }, {\n key: \"getGroupLabels\",\n value: function getGroupLabels() {\n var _this$props8 = this.props,\n field = _this$props8.field,\n groupValues = _this$props8.groupValues;\n return groupValues.map(function (_ref2, index) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_ref2, 2),\n name = _ref3[0],\n values = _ref3[1];\n\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(field.groups, ['name', name]);\n\n if (!group) {\n return 'N/A';\n }\n\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isString\"])(group.label_template)) {\n return group.label;\n }\n\n try {\n var label = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"template\"])(group.label_template)(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({\n $_index: index\n }, values));\n return label || group.label;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Couldn't create the label of group - \".concat(e.message));\n return 'N/A';\n }\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} selection\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var _this$props9 = this.props,\n value = _this$props9.value,\n field = _this$props9.field,\n groupIdKey = _this$props9.groupIdKey,\n groupFilterKey = _this$props9.groupFilterKey,\n allGroupsAreCollapsed = _this$props9.allGroupsAreCollapsed,\n onGroupSetup = _this$props9.onGroupSetup,\n onGroupFieldSetup = _this$props9.onGroupFieldSetup,\n onToggleGroup = _this$props9.onToggleGroup;\n var availableGroups = this.getAvailableGroups(groupFilterKey);\n var groupLabels = this.getGroupLabels(); // TODO: Move this to a memoized function.\n\n var tabs = value.map(function (group, index) {\n var id = group[groupIdKey];\n var label = groupLabels[index];\n return {\n id: id,\n label: label\n };\n });\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Fragment\"], null, this.isTabbed && !!value.length && __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n forwardedRef: this.tabsList,\n options: {\n axis: field.layout === 'tabbed-vertical' ? 'y' : 'x',\n forcePlaceholderSize: true\n },\n onUpdate: this.handleSortGroups\n }, __webpack_provided_wp_dot_element.createElement(_tabs__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n ref: this.tabsList,\n items: tabs,\n current: currentTab,\n onChange: this.handleTabsChange\n }, !!availableGroups.length && !this.isMaximumReached && __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: \"+\",\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }))), !value.length && __webpack_provided_wp_dot_element.createElement(_placeholder__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n label: \"There are no entries yet.\"\n }, __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n })), !!value.length && __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n options: {\n axis: 'y',\n handle: '.cf-complex__group-head',\n placeholder: 'cf-complex__group-placeholder',\n forcePlaceholderSize: true\n },\n forwardedRef: this.groupsList,\n onUpdate: this.handleSortGroups\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__groups\",\n ref: this.groupsList\n }, value.map(function (group, index) {\n return (// The `key` will be assigned via `onGroupSetup`.\n // eslint-disable-next-line react/jsx-key\n __webpack_provided_wp_dot_element.createElement(_group__WEBPACK_IMPORTED_MODULE_18__[\"default\"], onGroupSetup(group, {\n index: index,\n label: groupLabels[index],\n tabbed: _this2.isTabbed,\n hidden: _this2.isTabbed && group[groupIdKey] !== currentTab,\n allowClone: field.duplicate_groups_allowed && !_this2.isMaximumReached,\n onFieldSetup: onGroupFieldSetup,\n onClone: _this2.handleCloneGroup,\n onRemove: _this2.handleRemoveGroup,\n onToggle: onToggleGroup\n }))\n );\n }))), !this.isTabbed && !!value.length && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__actions\"\n }, !!availableGroups.length && !this.isMaximumReached && __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-complex__toggler\",\n onClick: this.handleToggleAllClick\n }, allGroupsAreCollapsed ? 'Expand All' : 'Collapse All')));\n }\n }, {\n key: \"isTabbed\",\n\n /**\n * Returns true if the field is using tabs for the layout.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.props.field.layout.indexOf('tabbed') > -1;\n }\n /**\n * Returns true if the maximum number of entries is reached.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isMaximumReached\",\n get: function get() {\n var _this$props10 = this.props,\n field = _this$props10.field,\n value = _this$props10.value;\n return field.max > 0 && value.length >= field.max;\n }\n /**\n * Returns the text used in \"Add Entry\" button.\n *\n * @return {string}\n */\n\n }, {\n key: \"inserterButtonText\",\n get: function get() {\n var field = this.props.field;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Add %s', 'carbon-fields-ui'), field.labels.singular_name);\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.field-wrapper', 'carbon-fields/core', function (OriginalField) {\n return function (props) {\n var field = props.field;\n\n if (field.type !== 'complex') {\n return __webpack_provided_wp_dot_element.createElement(OriginalField, props);\n }\n\n return __webpack_provided_wp_dot_element.createElement(OriginalField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n className: \"cf-complex--\".concat(field.layout)\n }, props));\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n labels = field.labels,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n var label = min === 1 ? labels.singular_name : labels.plural_name;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Minimum number of rows not reached (%1$d %2$s)', 'carbon-fields-ui'), Number(min), label.toLowerCase());\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/index.js?"); /***/ }), @@ -3259,7 +3259,19 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Renders the tabs navigation.\n *\n * @param {Object} props\n * @param {Object[]} props.items\n * @param {string} props.current\n * @param {mixed} props.children\n * @param {Function} props.onChange\n * @param {Object} ref\n * @return {void}\n */\n\nfunction ComplexTabs(_ref, ref) {\n var items = _ref.items,\n current = _ref.current,\n children = _ref.children,\n onChange = _ref.onChange;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__tabs\"\n }, __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-complex__tabs-list\",\n ref: ref\n }, items.map(function (item, index) {\n var classes = classnames__WEBPACK_IMPORTED_MODULE_0___default()('cf-complex__tabs-item', {\n 'cf-complex__tabs-item--current': item.id === current\n });\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n key: item.id,\n className: classes,\n onClick: function onClick() {\n return onChange(item.id);\n }\n }, item.label ? __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__tabs-title\",\n dangerouslySetInnerHTML: {\n __html: item.label\n }\n }) : null, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__tabs-index\"\n }, index + 1));\n })), children);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"])(ComplexTabs));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/tabs.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Renders the tabs navigation.\n *\n * @param {Object} props\n * @param {Object[]} props.items\n * @param {string} props.current\n * @param {mixed} props.children\n * @param {Function} props.onChange\n * @param {Object} ref\n * @return {void}\n */\n\nfunction ComplexTabs(_ref, ref) {\n var items = _ref.items,\n current = _ref.current,\n children = _ref.children,\n onChange = _ref.onChange;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__tabs\"\n }, __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-complex__tabs-list\",\n ref: ref\n }, items.map(function (item, index) {\n var classes = classnames__WEBPACK_IMPORTED_MODULE_0___default()('cf-complex__tabs-item', {\n 'cf-complex__tabs-item--current': item.id === current\n });\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n key: item.id,\n className: classes,\n onClick: function onClick() {\n return onChange(item.id);\n }\n }, item.label ? __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__tabs-title\",\n dangerouslySetInnerHTML: {\n __html: item.label\n }\n }) : __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__tabs-index\"\n }, index + 1));\n })), children);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"])(ComplexTabs));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/tabs.js?"); + +/***/ }), + +/***/ "./packages/core/fields/date/index.js": +/*!********************************************!*\ + !*** ./packages/core/fields/date/index.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _hocs_with_props__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../hocs/with-props */ \"./packages/core/hocs/with-props/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../datetime */ \"./packages/core/fields/datetime/index.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_hocs_with_props__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function (props) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Select Date', 'carbon-fields-ui')\n });\n})(_datetime__WEBPACK_IMPORTED_MODULE_3__[\"default\"]));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/date/index.js?"); /***/ }), @@ -3341,7 +3353,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hocs/with-filters */ \"./packages/core/hocs/with-filters/index.js\");\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../registry/fields */ \"./packages/core/registry/fields.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./association */ \"./packages/core/fields/association/index.js\");\n/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./checkbox */ \"./packages/core/fields/checkbox/index.js\");\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./color */ \"./packages/core/fields/color/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./complex */ \"./packages/core/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./datetime */ \"./packages/core/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./file */ \"./packages/core/fields/file/index.js\");\n/* harmony import */ var _hidden__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hidden */ \"./packages/core/fields/hidden/index.js\");\n/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./html */ \"./packages/core/fields/html/index.js\");\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./map */ \"./packages/core/fields/map/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./media-gallery */ \"./packages/core/fields/media-gallery/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./multiselect */ \"./packages/core/fields/multiselect/index.js\");\n/* harmony import */ var _oembed__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./oembed */ \"./packages/core/fields/oembed/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./radio */ \"./packages/core/fields/radio/index.js\");\n/* harmony import */ var _radio_image__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./radio-image */ \"./packages/core/fields/radio-image/index.js\");\n/* harmony import */ var _rich_text__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./rich-text */ \"./packages/core/fields/rich-text/index.js\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./select */ \"./packages/core/fields/select/index.js\");\n/* harmony import */ var _separator__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./separator */ \"./packages/core/fields/separator/index.js\");\n/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./set */ \"./packages/core/fields/set/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sidebar */ \"./packages/core/fields/sidebar/index.js\");\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./text */ \"./packages/core/fields/text/index.js\");\n/* harmony import */ var _textarea__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./textarea */ \"./packages/core/fields/textarea/index.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Extends the fields with necessary hooks.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.register-field-type', 'carbon-fields/core', function (type, context, component) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"compose\"])(Object(_hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\"carbon-fields.field-edit.\".concat(context)), Object(_hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\"carbon-fields.\".concat(type, \".\").concat(context)))(component);\n});\n/**\n * Registers the fields.\n */\n\n[['association', _association__WEBPACK_IMPORTED_MODULE_5__[\"default\"]], ['checkbox', _checkbox__WEBPACK_IMPORTED_MODULE_6__[\"default\"]], ['color', _color__WEBPACK_IMPORTED_MODULE_7__[\"default\"]], ['complex', _complex__WEBPACK_IMPORTED_MODULE_8__[\"default\"]], ['date', _datetime__WEBPACK_IMPORTED_MODULE_9__[\"default\"]], ['date_time', _datetime__WEBPACK_IMPORTED_MODULE_9__[\"default\"]], ['file', _file__WEBPACK_IMPORTED_MODULE_10__[\"default\"]], ['footer_scripts', _textarea__WEBPACK_IMPORTED_MODULE_25__[\"default\"]], ['gravity_form', _select__WEBPACK_IMPORTED_MODULE_20__[\"default\"]], ['header_scripts', _textarea__WEBPACK_IMPORTED_MODULE_25__[\"default\"]], ['hidden', _hidden__WEBPACK_IMPORTED_MODULE_11__[\"default\"]], ['html', _html__WEBPACK_IMPORTED_MODULE_12__[\"default\"]], ['image', _file__WEBPACK_IMPORTED_MODULE_10__[\"default\"]], ['map', _map__WEBPACK_IMPORTED_MODULE_13__[\"default\"]], ['multiselect', _multiselect__WEBPACK_IMPORTED_MODULE_15__[\"default\"]], ['media_gallery', _media_gallery__WEBPACK_IMPORTED_MODULE_14__[\"default\"]], ['oembed', _oembed__WEBPACK_IMPORTED_MODULE_16__[\"default\"]], ['radio', _radio__WEBPACK_IMPORTED_MODULE_17__[\"default\"]], ['radio_image', _radio_image__WEBPACK_IMPORTED_MODULE_18__[\"default\"]], ['rich_text', _rich_text__WEBPACK_IMPORTED_MODULE_19__[\"default\"]], ['select', _select__WEBPACK_IMPORTED_MODULE_20__[\"default\"]], ['separator', _separator__WEBPACK_IMPORTED_MODULE_21__[\"default\"]], ['set', _set__WEBPACK_IMPORTED_MODULE_22__[\"default\"]], ['sidebar', _sidebar__WEBPACK_IMPORTED_MODULE_23__[\"default\"]], ['text', _text__WEBPACK_IMPORTED_MODULE_24__[\"default\"]], ['textarea', _textarea__WEBPACK_IMPORTED_MODULE_25__[\"default\"]], ['time', _datetime__WEBPACK_IMPORTED_MODULE_9__[\"default\"]]].forEach(function (field) {\n return _registry_fields__WEBPACK_IMPORTED_MODULE_4__[\"registerFieldType\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(field));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hocs/with-filters */ \"./packages/core/hocs/with-filters/index.js\");\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../registry/fields */ \"./packages/core/registry/fields.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./association */ \"./packages/core/fields/association/index.js\");\n/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./checkbox */ \"./packages/core/fields/checkbox/index.js\");\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./color */ \"./packages/core/fields/color/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./complex */ \"./packages/core/fields/complex/index.js\");\n/* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./date */ \"./packages/core/fields/date/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./datetime */ \"./packages/core/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./file */ \"./packages/core/fields/file/index.js\");\n/* harmony import */ var _hidden__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./hidden */ \"./packages/core/fields/hidden/index.js\");\n/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./html */ \"./packages/core/fields/html/index.js\");\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./map */ \"./packages/core/fields/map/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./media-gallery */ \"./packages/core/fields/media-gallery/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./multiselect */ \"./packages/core/fields/multiselect/index.js\");\n/* harmony import */ var _oembed__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./oembed */ \"./packages/core/fields/oembed/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./radio */ \"./packages/core/fields/radio/index.js\");\n/* harmony import */ var _radio_image__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./radio-image */ \"./packages/core/fields/radio-image/index.js\");\n/* harmony import */ var _rich_text__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./rich-text */ \"./packages/core/fields/rich-text/index.js\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./select */ \"./packages/core/fields/select/index.js\");\n/* harmony import */ var _separator__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./separator */ \"./packages/core/fields/separator/index.js\");\n/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./set */ \"./packages/core/fields/set/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./sidebar */ \"./packages/core/fields/sidebar/index.js\");\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./text */ \"./packages/core/fields/text/index.js\");\n/* harmony import */ var _textarea__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./textarea */ \"./packages/core/fields/textarea/index.js\");\n/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./time */ \"./packages/core/fields/time/index.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Extends the fields with necessary hooks.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.register-field-type', 'carbon-fields/core', function (type, context, component) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"compose\"])(Object(_hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\"carbon-fields.field-edit.\".concat(context)), Object(_hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\"carbon-fields.\".concat(type, \".\").concat(context)))(component);\n});\n/**\n * Registers the fields.\n */\n\n[['association', _association__WEBPACK_IMPORTED_MODULE_5__[\"default\"]], ['checkbox', _checkbox__WEBPACK_IMPORTED_MODULE_6__[\"default\"]], ['color', _color__WEBPACK_IMPORTED_MODULE_7__[\"default\"]], ['complex', _complex__WEBPACK_IMPORTED_MODULE_8__[\"default\"]], ['date', _date__WEBPACK_IMPORTED_MODULE_9__[\"default\"]], ['date_time', _datetime__WEBPACK_IMPORTED_MODULE_10__[\"default\"]], ['file', _file__WEBPACK_IMPORTED_MODULE_11__[\"default\"]], ['footer_scripts', _textarea__WEBPACK_IMPORTED_MODULE_26__[\"default\"]], ['gravity_form', _select__WEBPACK_IMPORTED_MODULE_21__[\"default\"]], ['header_scripts', _textarea__WEBPACK_IMPORTED_MODULE_26__[\"default\"]], ['hidden', _hidden__WEBPACK_IMPORTED_MODULE_12__[\"default\"]], ['html', _html__WEBPACK_IMPORTED_MODULE_13__[\"default\"]], ['image', _file__WEBPACK_IMPORTED_MODULE_11__[\"default\"]], ['map', _map__WEBPACK_IMPORTED_MODULE_14__[\"default\"]], ['multiselect', _multiselect__WEBPACK_IMPORTED_MODULE_16__[\"default\"]], ['media_gallery', _media_gallery__WEBPACK_IMPORTED_MODULE_15__[\"default\"]], ['oembed', _oembed__WEBPACK_IMPORTED_MODULE_17__[\"default\"]], ['radio', _radio__WEBPACK_IMPORTED_MODULE_18__[\"default\"]], ['radio_image', _radio_image__WEBPACK_IMPORTED_MODULE_19__[\"default\"]], ['rich_text', _rich_text__WEBPACK_IMPORTED_MODULE_20__[\"default\"]], ['select', _select__WEBPACK_IMPORTED_MODULE_21__[\"default\"]], ['separator', _separator__WEBPACK_IMPORTED_MODULE_22__[\"default\"]], ['set', _set__WEBPACK_IMPORTED_MODULE_23__[\"default\"]], ['sidebar', _sidebar__WEBPACK_IMPORTED_MODULE_24__[\"default\"]], ['text', _text__WEBPACK_IMPORTED_MODULE_25__[\"default\"]], ['textarea', _textarea__WEBPACK_IMPORTED_MODULE_26__[\"default\"]], ['time', _time__WEBPACK_IMPORTED_MODULE_27__[\"default\"]]].forEach(function (field) {\n return _registry_fields__WEBPACK_IMPORTED_MODULE_4__[\"registerFieldType\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(field));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/index.js?"); /***/ }), @@ -3353,7 +3365,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var observe_resize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! observe-resize */ \"./node_modules/observe-resize/index.js\");\n/* harmony import */ var observe_resize__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(observe_resize__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\nvar GoogleMap =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(GoogleMap, _Component);\n\n function GoogleMap() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, GoogleMap);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(GoogleMap)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"node\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"createRef\"])());\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(GoogleMap, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this2 = this;\n\n // Google Maps SDK isn't loaded at this moment.\n // TODO: Delay initialization of metaboxes & blocks.\n var interval = setInterval(function () {\n if (window.google) {\n clearInterval(interval);\n\n _this2.setupMap();\n\n _this2.setupMapEvents();\n\n _this2.updateMap(_this2.props);\n\n _this2.cancelResizeObserver = observe_resize__WEBPACK_IMPORTED_MODULE_7___default()(_this2.node.current, function () {\n _this2.updateMap(_this2.props);\n });\n }\n }, 100);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var _this$props = this.props,\n lat = _this$props.lat,\n lng = _this$props.lng,\n zoom = _this$props.zoom;\n\n if (this.marker) {\n var markerLat = this.marker.getPosition().lat();\n var markerLng = this.marker.getPosition().lng();\n var mapZoom = this.map.getZoom();\n\n if (lat !== markerLat || lng !== markerLng) {\n var location = new window.google.maps.LatLng(lat, lng);\n this.marker.setPosition(location);\n this.map.setCenter(location);\n }\n\n if (zoom !== mapZoom) {\n this.map.setZoom(zoom);\n }\n }\n\n this.updateMap(this.props);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelResizeObserver();\n window.google.maps.event.clearInstanceListeners(this.map);\n }\n /**\n * Initializes the map into placeholder element.\n *\n * @return {void}\n */\n\n }, {\n key: \"setupMap\",\n value: function setupMap() {\n var _this$props2 = this.props,\n lat = _this$props2.lat,\n lng = _this$props2.lng,\n zoom = _this$props2.zoom;\n var position = new window.google.maps.LatLng(lat, lng);\n this.map = new window.google.maps.Map(this.node.current, {\n zoom: zoom,\n center: position,\n mapTypeId: window.google.maps.MapTypeId.ROADMAP,\n scrollwheel: false\n });\n this.marker = new window.google.maps.Marker({\n position: position,\n map: this.map,\n draggable: true\n });\n }\n /**\n * Adds the listeners for the map's events.\n *\n * @return {void}\n */\n\n }, {\n key: \"setupMapEvents\",\n value: function setupMapEvents() {\n var _this3 = this;\n\n var enableScrollZoom = function enableScrollZoom() {\n _this3.map.setOptions({\n scrollwheel: true\n });\n };\n\n window.google.maps.event.addListenerOnce(this.map, 'click', enableScrollZoom);\n window.google.maps.event.addListenerOnce(this.map, 'dragend', enableScrollZoom); // Update the zoom when the map is changed.\n\n window.google.maps.event.addListener(this.map, 'zoom_changed', function () {\n _this3.props.onChange({\n zoom: _this3.map.getZoom()\n });\n }); // Update the position when the marker is moved.\n\n window.google.maps.event.addListener(this.marker, 'dragend', function () {\n _this3.props.onChange({\n lat: _this3.marker.getPosition().lat(),\n lng: _this3.marker.getPosition().lng()\n });\n });\n }\n /**\n * Re-draws the map.\n *\n * @param {Object} props\n * @return {void}\n */\n\n }, {\n key: \"updateMap\",\n value: function updateMap(props) {\n var _this4 = this;\n\n var lat = props.lat,\n lng = props.lng;\n var location = new window.google.maps.LatLng(lat, lng);\n setTimeout(function () {\n window.google.maps.event.trigger(_this4.map, 'resize');\n\n _this4.map.setCenter(location);\n }, 10);\n }\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n ref: this.node,\n className: this.props.className\n });\n }\n }]);\n\n return GoogleMap;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (GoogleMap);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/map/google-map.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var observe_resize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! observe-resize */ \"./node_modules/observe-resize/index.js\");\n/* harmony import */ var observe_resize__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(observe_resize__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\nvar GoogleMap =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(GoogleMap, _Component);\n\n function GoogleMap() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, GoogleMap);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(GoogleMap)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"node\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"createRef\"])());\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(GoogleMap, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this2 = this;\n\n this.setupMap();\n this.setupMapEvents();\n this.updateMap(this.props);\n this.cancelResizeObserver = observe_resize__WEBPACK_IMPORTED_MODULE_7___default()(this.node.current, function () {\n _this2.updateMap(_this2.props);\n });\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var _this$props = this.props,\n lat = _this$props.lat,\n lng = _this$props.lng,\n zoom = _this$props.zoom;\n\n if (this.marker) {\n var markerLat = this.marker.getPosition().lat();\n var markerLng = this.marker.getPosition().lng();\n var mapZoom = this.map.getZoom();\n\n if (lat !== markerLat || lng !== markerLng) {\n var location = new window.google.maps.LatLng(lat, lng);\n this.marker.setPosition(location);\n this.map.setCenter(location);\n }\n\n if (zoom !== mapZoom) {\n this.map.setZoom(zoom);\n }\n }\n\n this.updateMap(this.props);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelResizeObserver();\n window.google.maps.event.clearInstanceListeners(this.map);\n }\n /**\n * Initializes the map into placeholder element.\n *\n * @return {void}\n */\n\n }, {\n key: \"setupMap\",\n value: function setupMap() {\n var _this$props2 = this.props,\n lat = _this$props2.lat,\n lng = _this$props2.lng,\n zoom = _this$props2.zoom;\n var position = new window.google.maps.LatLng(lat, lng);\n this.map = new window.google.maps.Map(this.node.current, {\n zoom: zoom,\n center: position,\n mapTypeId: window.google.maps.MapTypeId.ROADMAP,\n scrollwheel: false\n });\n this.marker = new window.google.maps.Marker({\n position: position,\n map: this.map,\n draggable: true\n });\n }\n /**\n * Adds the listeners for the map's events.\n *\n * @return {void}\n */\n\n }, {\n key: \"setupMapEvents\",\n value: function setupMapEvents() {\n var _this3 = this;\n\n var enableScrollZoom = function enableScrollZoom() {\n _this3.map.setOptions({\n scrollwheel: true\n });\n };\n\n window.google.maps.event.addListenerOnce(this.map, 'click', enableScrollZoom);\n window.google.maps.event.addListenerOnce(this.map, 'dragend', enableScrollZoom); // Update the zoom when the map is changed.\n\n window.google.maps.event.addListener(this.map, 'zoom_changed', function () {\n _this3.props.onChange({\n zoom: _this3.map.getZoom()\n });\n }); // Update the position when the marker is moved.\n\n window.google.maps.event.addListener(this.marker, 'dragend', function () {\n _this3.props.onChange({\n lat: _this3.marker.getPosition().lat(),\n lng: _this3.marker.getPosition().lng()\n });\n });\n }\n /**\n * Re-draws the map.\n *\n * @param {Object} props\n * @return {void}\n */\n\n }, {\n key: \"updateMap\",\n value: function updateMap(props) {\n var _this4 = this;\n\n var lat = props.lat,\n lng = props.lng;\n var location = new window.google.maps.LatLng(lat, lng);\n setTimeout(function () {\n window.google.maps.event.trigger(_this4.map, 'resize');\n\n _this4.map.setCenter(location);\n }, 10);\n }\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n ref: this.node,\n className: this.props.className\n });\n }\n }]);\n\n return GoogleMap;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (GoogleMap);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/map/google-map.js?"); /***/ }), @@ -3411,7 +3423,18 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var react_select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-select */ \"./node_modules/react-select/dist/react-select.esm.js\");\n/* harmony import */ var _components_no_options__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/no-options */ \"./packages/core/components/no-options/index.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * The internal dependencies.\n */\n\n\n\nvar MultiselectField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(MultiselectField, _Component);\n\n function MultiselectField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, MultiselectField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(MultiselectField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleChange\", function (selected) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, selected.map(function (item) {\n return item.value;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"filterValues\", function (values) {\n var field = _this.props.field;\n return field.options.filter(function (option) {\n return values.indexOf(option.value) > -1;\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(MultiselectField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return field.options.length > 0 ? __webpack_provided_wp_dot_element.createElement(react_select__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n id: id,\n name: name,\n value: this.filterValues(value),\n options: field.options,\n delimiter: field.valueDelimiter,\n onChange: this.handleChange,\n className: \"cf-multiselect__select\",\n classNamePrefix: \"cf-multiselect\",\n isMulti: true\n }) : __webpack_provided_wp_dot_element.createElement(_components_no_options__WEBPACK_IMPORTED_MODULE_9__[\"default\"], null);\n }\n }]);\n\n return MultiselectField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (MultiselectField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/multiselect/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var react_select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-select */ \"./node_modules/react-select/dist/react-select.esm.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/multiselect/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _components_no_options__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/no-options */ \"./packages/core/components/no-options/index.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\nvar MultiselectField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(MultiselectField, _Component);\n\n function MultiselectField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, MultiselectField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(MultiselectField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleChange\", function (selected) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, selected.map(function (item) {\n return item.value;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"filterValues\", function (values) {\n var field = _this.props.field;\n return field.options.filter(function (option) {\n return values.indexOf(option.value) > -1;\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(MultiselectField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return field.options.length > 0 ? __webpack_provided_wp_dot_element.createElement(react_select__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n id: id,\n name: name,\n value: this.filterValues(value),\n options: field.options,\n delimiter: field.valueDelimiter,\n onChange: this.handleChange,\n className: \"cf-multiselect__select\",\n classNamePrefix: \"cf-multiselect\",\n isMulti: true\n }) : __webpack_provided_wp_dot_element.createElement(_components_no_options__WEBPACK_IMPORTED_MODULE_10__[\"default\"], null);\n }\n }]);\n\n return MultiselectField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (MultiselectField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/multiselect/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/multiselect/style.scss": +/*!*****************************************************!*\ + !*** ./packages/core/fields/multiselect/style.scss ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/multiselect/style.scss?"); /***/ }), @@ -3635,6 +3658,18 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ }), +/***/ "./packages/core/fields/time/index.js": +/*!********************************************!*\ + !*** ./packages/core/fields/time/index.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _hocs_with_props__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../hocs/with-props */ \"./packages/core/hocs/with-props/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../datetime */ \"./packages/core/fields/datetime/index.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_hocs_with_props__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function (props) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n icon: 'clock',\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Select Time', 'carbon-fields-ui')\n });\n})(_datetime__WEBPACK_IMPORTED_MODULE_3__[\"default\"]));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/time/index.js?"); + +/***/ }), + /***/ "./packages/core/hocs/with-conditional-logic/compare.js": /*!**************************************************************!*\ !*** ./packages/core/hocs/with-conditional-logic/compare.js ***! diff --git a/build/classic/core.min.css b/build/classic/core.min.css index fcd076334..a33c63153 100644 --- a/build/classic/core.min.css +++ b/build/classic/core.min.css @@ -1 +1 @@ -.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{position:relative;z-index:0}.cf-complex--tabbed-vertical .cf-complex__groups{flex:0 0 80%}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px}.cf-complex__group-body[hidden]{display:none}.cf-complex--grid .cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex--grid .cf-complex__group-actions{position:absolute;top:12px;right:12px}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex--tabbed-horizontal .cf-complex__tabs{display:inline-flex;margin-bottom:-5px}.cf-complex--tabbed-vertical .cf-complex__tabs{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex--tabbed-horizontal .cf-complex__tabs-item{margin:0 4px 4px 0}.cf-complex--tabbed-vertical .cf-complex__tabs-item~.cf-complex__tabs-item{border-top-width:0}.cf-complex__tabs-item--current,.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex--tabbed-horizontal .cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex--tabbed-vertical .cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label{margin:8px 0 12px}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-text__input{display:block;width:100%;margin:0}.cf-textarea__input{display:block;width:100%;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file +.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{position:relative;z-index:0}.cf-complex--tabbed-vertical .cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex--grid .cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex--grid .cf-complex__group-actions{position:absolute;top:12px;right:12px}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex--tabbed-horizontal .cf-complex__tabs{display:inline-flex;margin-bottom:-5px}.cf-complex--tabbed-vertical .cf-complex__tabs{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex--tabbed-horizontal .cf-complex__tabs-item{margin:0 4px 4px 0}.cf-complex--tabbed-vertical .cf-complex__tabs-item~.cf-complex__tabs-item{border-top-width:0}.cf-complex__tabs-item--current,.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex--tabbed-horizontal .cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex--tabbed-vertical .cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label{margin:8px 0 12px}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%;margin:0}.cf-textarea__input{display:block;width:100%;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file diff --git a/build/classic/core.min.js b/build/classic/core.min.js index 16a3427da..a1b343838 100644 --- a/build/classic/core.min.js +++ b/build/classic/core.min.js @@ -1,10 +1,10 @@ -this.cf=this.cf||{},this.cf.core=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=322)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.cf.vendor.react}()},function(e,t){!function(){e.exports=this.cf.vendor["@wordpress/element"]}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.cf.vendor.lodash}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n1?t-1:0),i=1;i=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},h}(r.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},i}},function(e,t,n){"use strict";var r=n(3),o=n.n(r),a=n(15),i=n.n(a),u=n(13),s=n.n(u),c=n(17),l=n.n(c),f=n(5),p=n.n(f),d=n(6),h=n.n(d),m=n(7),g=n.n(m),v=n(8),b=n.n(v),y=n(9),E=n.n(y),w=n(2),x=n(14),O=n(18),C=n(11),_=n(26),k=function(e){function t(){return p()(this,t),g()(this,b()(t).apply(this,arguments))}return E()(t,e),h()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.onSelect,n=e.typeFilter;this.props.initMediaBrowser({onSelect:t,typeFilter:n})}},{key:"componentWillUnmount",value:function(){this.props.destroyMediaBrowser()}},{key:"render",value:function(){var e=this.props.openMediaBrowser;return this.props.children({openMediaBrowser:e})}}]),t}(w.Component),S=Object(O.withEffects)(function(e){var t=[{event:"initMediaBrowserEvent",prop:"initMediaBrowser",type:"INIT_MEDIA_BROWSER"},{event:"openMediaBrowserEvent",prop:"openMediaBrowser",type:"OPEN_MEDIA_BROWSER"},{event:"destroyMediaBrowserEvent",prop:"destroyMediaBrowser",type:"DESTROY_MEDIA_BROWSER"}].map(function(t){var n=e.useEvent(t.event),r=l()(n,2),o=r[0],a=r[1];return s()({},t,{action:a,channel$:o})}),n=Object(C.pipe)(C.combine.apply(void 0,i()(t.map(function(e){var t=e.action,n=e.prop;return Object(_.a)({action:t,prop:n})}))),Object(C.map)(function(e){return Object(O.toProps)(e.reduce(function(e,t){return s()({},e,o()({},t.prop,t.action))},{}))}));return C.merge.apply(void 0,[n].concat(i()(t.map(function(e){var t=e.channel$,n=e.type;return Object(C.pipe)(t,Object(C.map)(function(e){return{type:n,payload:e}}))}))))},{handler:function(e){var t=null;return function(n){switch(n.type){case"INIT_MEDIA_BROWSER":var r=n.payload,o=r.onSelect,a=r.typeFilter;if(!o)return;(t=wp.media({title:e.title,library:{type:a},button:{text:e.buttonLabel},multiple:e.multiple})).on("select",function(){var e=t.state().get("selection").toJSON();o(e)});break;case"OPEN_MEDIA_BROWSER":t&&t.open();break;case"DESTROY_MEDIA_BROWSER":t=null}}}});t.a=Object(x.compose)(S)(k)},function(e,t,n){"use strict";var r=n(10);t.a=function(e){return new Promise(function(t,n){var o=wp.media.ajax({data:{action:"query-attachments",query:{post__in:e}}});o.done(function(e){t(e)}),o.fail(function(){n(Object(r.__)("An error occurred while trying to fetch files data.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(312),n(30)),w=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():e.createElement(E.a,null)}}]),n}(y.Component);t.a=w}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(0),h=n.n(d),m=n(3),g=n.n(m),v=n(53),b=function(t){function n(){var e,t;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i1?t.setState(function(e){return{menuVisible:!e.menuVisible}}):r(n[0])}),g()(h()(h()(t)),"handleItemClick",function(e){t.setState({menuVisible:!1}),t.props.onSelect(e)}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.buttonText,o=n.groups;return e.createElement("div",{className:"cf-complex__inserter"},e.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},r),o.length>1&&e.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},o.map(function(n,r){return e.createElement("li",{className:"cf-complex__inserter-item",key:r,onClick:function(){return t.handleItemClick(n)}},n.label)})))}}]),n}(n(2).Component);t.a=Object(v.a)(b)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(13),i=n.n(a),u=n(5),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(129),O=n.n(x),C=(n(293),function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(79),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(63)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(85)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(42),o=n(190),a=n(191),i=n(192),u=n(193),s=n(194);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(32)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(199),o=n(206),a=n(208),i=n(209),u=n(210);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0?e.createElement("select",{id:n,name:r,value:o||Object(b.get)(a.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},a.options.map(function(t){return e.createElement("option",{key:t.value,value:t.value},t.label)})):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return i});var r=n(2),o=Object(r.createContext)(!1),a=o.Provider,i=o.Consumer},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(36))},function(e,t,n){var r=n(172),o=n(40);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(174),o=n(82),a=n(23),i=n(62),u=n(83),s=n(84),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,h=d?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||h.push(g);return h}},function(e,t,n){var r=n(175),o=n(27),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&el))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=l}function E(){var e=o();if(y(e))return w(e);p=setTimeout(E,function(e){var n=t-(e-d);return g?u(n,l-(e-h)):n}(e))}function w(e){return p=void 0,v&&s?b(e):(s=c=void 0,f)}function x(){var e=o(),n=y(e);if(s=arguments,c=this,d=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(E,t),m?b(e):f}(d);if(g)return p=setTimeout(E,t),b(d)}return void 0===p&&(p=setTimeout(E,t)),f}return t=a(t)||0,r(n)&&(m=!!n.leading,l=(g="maxWait"in n)?i(a(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,s=d=c=p=void 0},x.flush=function(){return void 0===p?f:w(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(284)),o=a(n(286));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,i.polyfill)(p);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(113),i=n(310);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(20),i=n.n(a),u=n(14),s=n(22),c=n(4),l=(n(319),n(148)),f=n(34);t.a=Object(u.compose)(Object(s.withSelect)(function(e,t){var n=e("carbon-fields/core"),r=n.getValidationError,o=n.isFieldVisible;return{error:r(t.id),hidden:!o(t.id)}}),Object(f.a)("carbon-fields.field-wrapper"))(function(t){var n=t.id,r=t.field,a=t.error,u=t.hidden,s=t.className,f=t.children,p=r.width?{flexBasis:"".concat(r.width,"%")}:null,d=["cf-field","cf-".concat(Object(c.kebabCase)(r.type)),{"cf-field--has-width":!!r.width,"cf-field--invalid":!!a},s].concat(o()(r.classes));return e.createElement("div",{className:i()(d),style:p,hidden:u},e.createElement("div",{className:"cf-field__head"},r.label&&e.createElement("label",{className:"cf-field__label",htmlFor:n},r.label,r.required&&e.createElement("span",{className:"cf-field__asterisk"},"*"))),!u&&e.createElement("div",{className:"cf-field__body"},f),u&&e.createElement(l.a,{className:"cf-field__body"},f),r.help_text&&e.createElement("em",{className:"cf-field__help",dangerouslySetInnerHTML:{__html:r.help_text}}),a&&e.createElement("span",{className:"cf-field__error"},a))})}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(13),i=n.n(a),u=n(15),s=n.n(u),c=n(5),l=n.n(c),f=n(6),p=n.n(f),d=n(7),h=n.n(d),m=n(8),g=n.n(m),v=n(9),b=n.n(v),y=n(0),E=n.n(y),w=n(3),x=n.n(w),O=n(37),C=n.n(O),_=n(10),k=n(2),S=n(14),j=n(19),D=n(18),A=n(20),M=n.n(A),F=n(4),T=n(11),P=n(26),N=(n(160),n(38)),I=n(35),R=n(119),L=function(t){function n(){var e,t;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&a.length>=r.max||(i(o,s()(a).concat([Object(F.pick)(e,"id","type","subtype")])),u({selectedOptions:s()(c).concat([e])}))}),x()(E()(E()(t)),"handleRemoveItem",function(e){var n=t.props,r=n.value,o=n.id,a=n.onChange,i=n.setState,u=n.selectedOptions;a(o,Object(F.without)(r,e)),i({selectedOptions:Object(F.without)(u,e)})}),x()(E()(E()(t)),"handleSort",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),t}return b()(n,t),p()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var t=this,n=this.props,r=n.name,o=n.value,a=n.field,i=n.totalOptionsCount,u=n.selectedOptions,s=n.queryTerm,c=this.props.options;return a.duplicates_allowed||(c=C()(c,function(e){e.map(function(e){return e.disabled=!!Object(F.find)(o,function(t){return Object(F.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),e.createElement(k.Fragment,null,e.createElement("div",{className:"cf-association__bar"},e.createElement(N.a,{value:s,onChange:this.handleSearchChange}),e.createElement("span",{className:"cf-association__counter"},Object(_.sprintf)(Object(_.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(c.length),Number(i)))),e.createElement("div",{className:"cf-association__cols"},e.createElement("div",{className:"cf-association__col"},c.map(function(n,r){return e.createElement("div",{className:M()("cf-association__option",{"cf-association__option--selected":n.disabled}),key:r},n.thumbnail&&e.createElement("img",{className:"cf-association__option-thumb",src:n.thumbnail}),e.createElement("div",{className:"cf-association__option-content"},e.createElement("span",{className:"cf-association__option-title"},n.title),e.createElement("span",{className:"cf-association__option-type"},n.type)),e.createElement("div",{className:"cf-association__option-actions"},e.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:n.edit_link}),!n.disabled&&(a.max<0||o.length0&&t.length=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";var r=n(10);t.a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(o,a){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){o(e)}),i.fail(function(){a(Object(r.__)("An error occured.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(163),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;t.setState({currentTab:Object(k.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),x()(E()(E()(t)),"handleToggleAllClick",function(){var e=t.props,n=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!n)}),x()(E()(E()(t)),"handleSortGroups",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),x()(E()(E()(t)),"handleTabsChange",function(e){t.setState({currentTab:e})}),t}return b()(n,t),p()(n,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(k.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=s()(e,2),o=r[0],a=r[1],u=Object(k.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(k.isString)(u.label_template))return u.label;try{return Object(k.template)(u.label_template)(i()({$_index:n},a))||u.label}catch(e){return console.error("Couldn't create the label of group - ".concat(e.message)),"N/A"}})}},{key:"render",value:function(){var t=this,n=this.state.currentTab,r=this.props,o=r.value,a=r.field,i=r.groupIdKey,u=r.groupFilterKey,s=r.allGroupsAreCollapsed,c=r.onGroupSetup,l=r.onGroupFieldSetup,f=r.onToggleGroup,p=this.getAvailableGroups(u),d=this.getGroupLabels(),h=o.map(function(e,t){return{id:e[i],label:d[t]}});return e.createElement(C.Fragment,null,this.isTabbed&&!!o.length&&e.createElement(S.a,{items:o,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===a.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleSortGroups},e.createElement(j.a,{ref:this.tabsList,items:h,current:n,onChange:this.handleTabsChange},!!p.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:"+",groups:p,onSelect:this.handleAddGroup}))),!o.length&&e.createElement(M.a,{label:"There are no entries yet."},e.createElement(D.a,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup})),!!o.length&&e.createElement(S.a,{items:o,options:{handle:".cf-complex__group-head"},forwardedRef:this.groupsList,onUpdate:this.handleSortGroups},e.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},o.map(function(r,o){return e.createElement(A.a,c(r,{index:o,label:d[o],tabbed:t.isTabbed,hidden:t.isTabbed&&r[i]!==n,allowClone:a.duplicate_groups_allowed&&!t.isMaximumReached,onFieldSetup:l,onClone:t.handleCloneGroup,onRemove:t.handleRemoveGroup,onToggle:f}))}))),!this.isTabbed&&!!o.length&&e.createElement("div",{className:"cf-complex__actions"},!!p.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup}),e.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},s?"Expand All":"Collapse All")))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(_.sprintf)(Object(_.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),n}(C.Component);Object(O.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(t){return function(n){var r=n.field;return"complex"!==r.type?e.createElement(t,n):e.createElement(t,o()({className:"cf-complex--".concat(r.layout)},n))}}),Object(O.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(k.isEmpty)(t))return Object(_.__)("This field is required. ","carbon-fields-ui");if(n>0&&t.length=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===l.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);l.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return l.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();f.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},f.defaultProps={options:{}},t.default=f},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=function(t){function n(){return i()(this,n),l()(this,p()(n).apply(this,arguments))}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.value,a=t.field;return e.createElement("input",o()({type:"hidden",name:n,value:r,className:"hidden-text"},a.attributes))}}]),n}(n(2).Component);t.a=m}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(2);t.a=function(t){var n=t.field;return e.createElement(r.RawHTML,{className:"cf-html__content"},n.html)}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(13),i=n.n(a),u=n(5),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(26),x=n(2),O=n(10),C=n(18),_=n(4),k=n(11),S=(n(295),n(38)),j=n(133),D=function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1})}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?e.createElement(b.a,{id:n,name:r,value:this.filterValues(o),options:a.options,delimiter:a.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){(function(t){for(var r=n(303),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],c=0;!u&&c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(14),w=n(10),x=n(18),O=n(11),C=n(26),_=n(4),k=(n(311),n(38)),S=n(141),j=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.embedCode,i=t.embedType,u=t.provider;return e.createElement("div",{ref:this.node},e.createElement(k.a,{id:n,value:o,onChange:this.handleChange}),a?e.createElement(S.a,{html:a,type:i,provider:u}):null,e.createElement("input",{type:"hidden",name:r,value:o,readOnly:!0}))}}]),n}(y.Component),D=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),A=Object(x.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=o()(t,2),r=n[0],a=n[1],i=Object(O.pipe)(Object(C.a)({onFetchEmbedCode:a}),Object(O.map)(x.toProps)),u=Object(O.pipe)(r,Object(O.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(O.merge)(i,u)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(w.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(w.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}});t.a=Object(E.compose)(D,A)(j)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(0),h=n.n(d),m=n(2),g=function(t){function n(){var e;return o()(this,n),(e=s()(this,l()(n).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(h()(h()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(h()(h()(e))),e}return p()(n,t),i()(n,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,c=u.height;"resize"!==o||s===a&&c===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var t=this;return e.createElement("div",{className:"cf-oembed__preview"},e.createElement("iframe",{ref:function(e){return t.iframe=e},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var t="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",n="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(t,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),r=e.createElement("html",{lang:document.documentElement.lang},e.createElement("head",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),e.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},e.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),e.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:n}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(m.renderToString)(r)),this.iframe.contentWindow.document.close()}}}]),n}(m.Component);t.a=g}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(52),i=n(56);n(313),t.a=Object(a.a)(function(t){return o()({},t,{field:o()({},t.field,{options:t.field.options.map(function(t){return o()({},t,{label:e.createElement("img",{className:"cf-radio-image__image",src:t.label})})})})})})(i.a)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(13),i=n.n(a),u=n(5),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(10),O=n(4),C=n(20),_=n.n(C),k=function(t){function n(){var e;return s()(this,n),e=p()(this,h()(n).call(this)),E()(b()(b()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(O.isString)(t)?t:t.target.value)}),E()(b()(b()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=i()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=i()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return g()(n,t),l()(n,[{key:"componentDidMount",value:function(){setTimeout(this.initEditor,100)}},{key:"componentWillUnmount",value:function(){this.destroyEditor()}},{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field,s=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":u.rich_editing},{"html-active":!u.rich_editing}],c=u.media_buttons?Object(O.template)(u.media_buttons)({id:r}):null;return e.createElement("div",{id:"wp-".concat(r,"-wrap"),className:_()(s),ref:function(e){return t.editorNode=e}},u.media_buttons&&e.createElement("div",{id:"wp-".concat(r,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},e.createElement("span",{dangerouslySetInnerHTML:{__html:c}})),u.rich_editing&&e.createElement("div",{className:"wp-editor-tabs"},e.createElement("button",{type:"button",id:"".concat(r,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":r},Object(x.__)("Visual","carbon-fields-ui")),e.createElement("button",{type:"button",id:"".concat(r,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":r},Object(x.__)("Text","carbon-fields-ui"))),e.createElement("div",{id:"wp-".concat(r,"-editor-container"),className:"wp-editor-container"},e.createElement("textarea",o()({style:{width:"100%"},className:"regular-text",id:r,name:a,value:i,onChange:this.handleChange},u.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),n}(w.Component);t.a=k}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(2),h=(n(315),function(t){function n(){return o()(this,n),s()(this,l()(n).apply(this,arguments))}return p()(n,t),i()(n,[{key:"render",value:function(){return e.createElement("h3",null,this.props.field.label)}}]),n}(d.Component));t.a=h}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(4),w=(n(316),n(30)),x=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1}),t}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field;return u.options.length>0?e.createElement("ul",{className:"cf-set__list"},u.options.map(function(n,s){return e.createElement("li",{className:"cf-set__list-item",key:s},e.createElement("input",o()({type:"checkbox",id:"".concat(r,"-").concat(n.value),name:"".concat(a,"[]"),checked:t.isChecked(i,n),value:n.value,className:"cf-set__input",onChange:t.handleChange},u.attributes)),e.createElement("label",{className:"cf-set__label",htmlFor:"".concat(r,"-").concat(n.value)},n.label))})):e.createElement(w.a,null)}}]),n}(y.Component);t.a=x}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(26),E=n(2),w=n(10),x=n(18),O=n(4),C=n(11),_=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;ar&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===f.inserted[v]&&(n="",h(e,t),f.inserted[v]=n)}var O=function(){var e=w.apply(this,arguments),t=a+"-"+v;return void 0===f.registered[t]&&(f.registered[t]=b),x("."+t,e),t};function C(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):n+=t+" "}),n}function _(e,t){var n=[],r=C(n,e);return n.length<2?e:r+O(n,t)}function k(e){f.inserted[e]=!0}if(l){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){l&&(d.flush(),d.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},C=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},_=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function A(e){return D(e)?window.pageYOffset:e.scrollTop}function M(e,t){D(e)?window.scrollTo(0,t):e.scrollTop=t}function F(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k,a=A(e),i=t-a,u=0;!function t(){var s,c=i*((s=(s=u+=10)/n-1)*s*s+1)+a;M(e,c),u=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&F(s,C,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&w>=r)return a&&F(s,C,160),{placement:"bottom",maxHeight:i?w-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&E>=r)&&(k=i?E-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return M(s,C),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&F(s,_,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&E>=r){var S=t;return(!i&&x>=r||i&&E>=r)&&(S=i?E-y:x-y),a&&F(s,_,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!l,isFixedPosition:l,theme:s});c&&c(f),r.setState(f)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||P(e);return E({},r.props,{placement:t,maxHeight:r.state.maxHeight})},O(r,n)}return w(t,e),b(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(a.Component);N.contextTypes={getPortalPlacement:l.a.func};var I=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},R=I,L=I,H=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};H.defaultProps={children:"No options"};var B=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};B.defaultProps={children:"Loading..."};var V=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=l-f-c,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),p.scrollTop=l,m=!0,r.isBottom=!0):!d&&-t>c&&(i&&!r.isTop&&i(e),p.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},O(r,n)}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return i.a.createElement(Z,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(a.Component),le=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=x(e,["isEnabled"]);return t?i.a.createElement(ce,n):this.props.children}}]),t}(a.Component);le.defaultProps={isEnabled:!0};var fe=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,s=e.hasValue;return i.a.createElement("div",{className:r(Object(u.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s},n)},t)}}]),t}(a.Component),pe=function(e){var t=e.size,n=x(e,["size"]);return i.a.createElement("svg",E({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(u.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},de=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},he=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},me=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},ge=me,ve=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};ve.defaultProps={children:i.a.createElement(he,null)};var be=me,ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};ye.defaultProps={children:i.a.createElement(de,null)};var Ee=function(e){var t=e.color,n=e.delay,r=e.offset;return i.a.createElement("span",{className:Object(u.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(u.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var we=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,s=e.isRtl,c=e.theme.colors,l=a?c.neutral80:c.neutral20;return i.a.createElement("div",E({},o,{className:n(Object(u.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),i.a.createElement(Ee,{color:l,delay:0,offset:s}),i.a.createElement(Ee,{color:l,delay:160,offset:!0}),i.a.createElement(Ee,{color:l,delay:320,offset:!s}))};we.defaultProps={size:4};var xe=function(e){var t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)},Oe=xe,Ce=xe,_e=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)}}]),t}(a.Component);_e.defaultProps={children:i.a.createElement(de,{size:14})};var ke=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,s=e.getStyles,c=e.innerProps,l=e.isDisabled,f=e.removeProps,p=e.selectProps,d=r.Container,h=r.Label,m=r.Remove,g=E({className:o(Object(u.a)(s("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":l},n)},c),v={className:o(Object(u.a)(s("multiValueLabel",this.props)),{"multi-value__label":!0},n)},b=E({className:o(Object(u.a)(s("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},f);return i.a.createElement(d,{data:a,innerProps:g,selectProps:p},i.a.createElement(h,{data:a,innerProps:v,selectProps:p},t),i.a.createElement(m,{data:a,innerProps:b,selectProps:p}))}}]),t}(a.Component);ke.defaultProps={cropWithEllipsis:!0};var Se={ClearIndicator:ye,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,c=e.innerRef,l=e.innerProps;return i.a.createElement("div",E({ref:c,className:n(Object(u.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":s},o)},l),t)},DropdownIndicator:ve,DownChevron:he,CrossIcon:de,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,c=e.label,l=e.theme;return i.a.createElement("div",{className:r(Object(u.a)(o("group",e)),{group:!0},n)},i.a.createElement(a,E({},s,{theme:l,getStyles:o,cx:r}),c),i.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=x(e,["className","cx","getStyles","theme"]);return i.a.createElement("div",E({className:n(Object(u.a)(r("groupHeading",E({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return i.a.createElement("div",{className:r(Object(u.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return i.a.createElement("span",E({},o,{className:n(Object(u.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,s=e.isDisabled,c=e.theme,l=x(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return i.a.createElement("div",{className:Object(u.a)(r("input",E({theme:c},l)))},i.a.createElement(p.a,E({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:s},l)))},LoadingIndicator:we,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps,c=r(Object(u.a)(o("menu",e)),{menu:!0},n);return i.a.createElement("div",E({className:c},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef;return i.a.createElement("div",{className:r(Object(u.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:s},t)},MenuPortal:V,LoadingMessage:B,NoOptionsMessage:H,MultiValue:ke,MultiValueContainer:Oe,MultiValueLabel:Ce,MultiValueRemove:_e,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,c=e.isSelected,l=e.innerRef,f=e.innerProps;return i.a.createElement("div",E({ref:l,className:r(Object(u.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":c},n)},f),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,c=e.isRtl;return i.a.createElement("div",E({className:r(Object(u.a)(o("container",e)),{"--is-disabled":s,"--is-rtl":c},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:fe},je=function(e){return E({},Se,e.components)},De={clearIndicator:be,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:ge,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:L,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return y(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),y(t,"backgroundColor",i.neutral0),y(t,"borderRadius",o),y(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),y(t,"marginBottom",a.menuGutter),y(t,"marginTop",a.menuGutter),y(t,"position","absolute"),y(t,"width","100%"),y(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:R,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ae={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Me={backspaceRemovesValue:!0,blurInputOnSelect:T(),captureMenuScroll:!T(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=E({ignoreCase:!0,ignoreAccents:!0,stringify:K,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?$(t):t,c=i?$(a(e)):a(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=q(s),c=q(c)),"start"===u?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Fe=1,Te=function(e){function t(e){v(this,t);var n=O(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pe.call(n);var r=e.value;n.cacheComponents=h(n.cacheComponents,Y).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Fe);var o=j(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=j(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!u&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?M(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,c=-1;if(a.length){switch(e){case"previous":c=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ae):E({},Ae,this.props.theme):Ae}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,c=this.state.selectValue,l=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+S(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:l,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var c=a?void 0:function(){return n.onOptionHover(e)},l=a?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:l,onMouseMove:c,onMouseOver:c,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:f,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,c=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,c=r||this.getElementId("input");if(!n)return i.a.createElement(J,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:k,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,d=f.theme;return i.a.createElement(u,E({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,f=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,h=l.inputValue,m=l.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue;if(!this.hasValue()||!f)return h?null:i.a.createElement(s,E({},c,{key:"placeholder",isDisabled:p}),m);if(d)return v.map(function(t){var u=t===b;return i.a.createElement(n,E({},c,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var y=v[0];return i.a.createElement(u,E({},c,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:u,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?i.a.createElement(e,E({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.a.createElement(n,E({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,O=m.maxMenuHeight,C=m.menuIsOpen,_=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,j=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,A=m.noOptionsMessage,M=m.onMenuScrollToTop,F=m.onMenuScrollToBottom;if(!C)return null;var T=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,i.a.createElement(l,E({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},P=void 0;if(this.hasOptions())P=h.render.map(function(t){if("group"===t.type){t.type;var o=x(t,["type"]),a=t.key+"-heading";return i.a.createElement(n,E({},f,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return T(e)}))}if("option"===t.type)return T(t)});else if(b){var I=y({inputValue:v});if(null===I)return null;P=i.a.createElement(s,f,I)}else{var R=A({inputValue:v});if(null===R)return null;P=i.a.createElement(c,f,R)}var L={minMenuHeight:w,maxMenuHeight:O,menuPlacement:_,menuPosition:k,menuShouldScrollIntoView:D},H=i.a.createElement(N,E({},f,L),function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return i.a.createElement(o,E({},f,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),i.a.createElement(le,{isEnabled:g,onTopArrive:M,onBottomArrive:F},i.a.createElement(se,{isEnabled:j},i.a.createElement(a,E({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),P))))});return S||"fixed"===k?i.a.createElement(u,E({},f,{appendTo:S,controlElement:this.controlRef,menuPlacement:_,menuPosition:k}),H):H}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(o){if(n){var s=u.map(function(t){return e.getOptionValue(t)}).join(n);return i.a.createElement("input",{name:a,type:"hidden",value:s})}var c=u.length>0?u.map(function(t,n){return i.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):i.a.createElement("input",{name:a,type:"hidden"});return i.a.createElement("div",null,c)}var l=u[0]?this.getOptionValue(u[0]):"";return i.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?i.a.createElement(X,{"aria-live":"assertive"},i.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),i.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,u=a.className,s=a.id,c=a.isDisabled,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.a.createElement(r,E({},f,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:l}),this.renderLiveRegion(),i.a.createElement(t,E({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:l}),i.a.createElement(o,E({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),i.a.createElement(n,E({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(a.Component);Te.defaultProps=Me;var Pe=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=je({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(_(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=De[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,E({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=C(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=C(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof l&&(l(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!c||!f||!m||p&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(c){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":c?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!c){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":c?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":c?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!c)return;e.focusOption("pageup");break;case"PageDown":if(!c)return;e.focusOption("pagedown");break;case"Home":if(!c)return;e.focusOption("first");break;case"End":if(!c)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Ne=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;v(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=c(n(1)),o=c(n(21)),a=c(n(25)),i=n(50),u=c(n(289)),s=c(n(290));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,c=e.hsv,l=e.hsl,f=e.onChange,p=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:l,hsv:c,onChange:f})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:l,onChange:f})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:l,renderers:m,onChange:f}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:l,hex:o,onChange:f,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:f,onSwatchHover:p}))};l.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},l.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(l)},function(e,t,n){"use strict";var r=n(167);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(169)),o=u(n(61)),a=u(n(180)),i=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(31),o=n(23),a=n(27);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(39),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(173)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(43);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(42);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(42),o=n(71),a=n(72);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(86),o=n(196),a=n(28),i=n(90),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t,n){var r,o=n(197),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(200),o=n(42),a=n(71);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(201),o=n(202),a=n(203),i=n(204),u=n(205);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(244);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(69),o=n(103),a=n(104),i=n(246),u=n(247),s=n(250),c=n(251),l=n(252),f=n(253),p=n(94),d=n(254),h=n(46),m=n(255),g=n(256),v=n(261),b=n(23),y=n(62),E=n(263),w=n(28),x=n(265),O=n(40),C="[object Arguments]",_="[object Function]",k="[object Object]",S={};S[C]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[_]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var F,T=1&n,P=2&n,N=4&n;if(j&&(F=A?j(t,D,A,M):j(t)),void 0!==F)return F;if(!w(t))return t;var I=b(t);if(I){if(F=m(t),!T)return c(t,F)}else{var R=h(t),L=R==_||"[object GeneratorFunction]"==R;if(y(t))return s(t,T);if(R==k||R==C||L&&!A){if(F=P||L?{}:v(t),!T)return P?f(t,u(F,t)):l(t,i(F,t))}else{if(!S[R])return A?t:{};F=g(t,R,T)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,F),x(t))return t.forEach(function(r){F.add(e(r,n,j,r,t,M))}),F;if(E(t))return t.forEach(function(r,o){F.set(o,e(r,n,j,o,t,M))}),F;var B=N?P?d:p:P?keysIn:O,V=I?void 0:B(t);return o(V||t,function(r,o){V&&(r=t[o=r]),a(F,o,e(r,n,j,o,t,M))}),F}},function(e,t,n){var r=n(32),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(49),o=n(40);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(49),o=n(106);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(28),o=n(67),a=n(249),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(63)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*c/a)/100,n.hsl.a!==l)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:l,source:"rgb"}}else{var f;if(f=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==f)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*c/a+100)/100,n.hsl.h!==l)return{h:l,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==f)return{h:f,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?c=a:l<0?l=0:l>i&&(l=i);var f=100*c/a,p=-100*l/i+100;return{h:n.hsl.h,s:f,v:p,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=T(e,360),t=T(t,100),n=T(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,f,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=F(s),{ok:h,format:e.format||m,r:c(255,l(u.r,0)),g:c(255,l(u.g,0)),b:c(255,l(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r,o,a=l(e,t,n),i=c(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(p(r));return a}function D(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(p({h:r,s:o,v:a})),a=(a+u)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(L(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*T(this._r,255))+"%",g:s(100*T(this._g,255))+"%",b:s(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%)":"rgba("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:R(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),a=n/100;return p({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,a=p.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},p.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;cs&&(s=r,u=p(t[c]));return p.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var A=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,l(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function L(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var B,V,U,z=(V="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",U="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+V),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+V),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+V),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:l.fields,className:"flexbox-fix"},r.default.createElement("div",{style:l.double},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"hex",value:s.replace("#",""),onChange:f})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.alpha},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:f,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t1?t-1:0),i=1;i=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},h}(r.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},i}},function(e,t,n){"use strict";var r=n(3),o=n.n(r),a=n(15),i=n.n(a),u=n(12),s=n.n(u),c=n(17),l=n.n(c),f=n(5),p=n.n(f),d=n(6),h=n.n(d),m=n(7),g=n.n(m),v=n(8),b=n.n(v),y=n(9),E=n.n(y),w=n(2),x=n(14),O=n(18),C=n(11),_=n(26),k=function(e){function t(){return p()(this,t),g()(this,b()(t).apply(this,arguments))}return E()(t,e),h()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.onSelect,n=e.typeFilter;this.props.initMediaBrowser({onSelect:t,typeFilter:n})}},{key:"componentWillUnmount",value:function(){this.props.destroyMediaBrowser()}},{key:"render",value:function(){var e=this.props.openMediaBrowser;return this.props.children({openMediaBrowser:e})}}]),t}(w.Component),S=Object(O.withEffects)(function(e){var t=[{event:"initMediaBrowserEvent",prop:"initMediaBrowser",type:"INIT_MEDIA_BROWSER"},{event:"openMediaBrowserEvent",prop:"openMediaBrowser",type:"OPEN_MEDIA_BROWSER"},{event:"destroyMediaBrowserEvent",prop:"destroyMediaBrowser",type:"DESTROY_MEDIA_BROWSER"}].map(function(t){var n=e.useEvent(t.event),r=l()(n,2),o=r[0],a=r[1];return s()({},t,{action:a,channel$:o})}),n=Object(C.pipe)(C.combine.apply(void 0,i()(t.map(function(e){var t=e.action,n=e.prop;return Object(_.a)({action:t,prop:n})}))),Object(C.map)(function(e){return Object(O.toProps)(e.reduce(function(e,t){return s()({},e,o()({},t.prop,t.action))},{}))}));return C.merge.apply(void 0,[n].concat(i()(t.map(function(e){var t=e.channel$,n=e.type;return Object(C.pipe)(t,Object(C.map)(function(e){return{type:n,payload:e}}))}))))},{handler:function(e){var t=null;return function(n){switch(n.type){case"INIT_MEDIA_BROWSER":var r=n.payload,o=r.onSelect,a=r.typeFilter;if(!o)return;(t=wp.media({title:e.title,library:{type:a},button:{text:e.buttonLabel},multiple:e.multiple})).on("select",function(){var e=t.state().get("selection").toJSON();o(e)});break;case"OPEN_MEDIA_BROWSER":t&&t.open();break;case"DESTROY_MEDIA_BROWSER":t=null}}}});t.a=Object(x.compose)(S)(k)},function(e,t,n){"use strict";var r=n(10);t.a=function(e){return new Promise(function(t,n){var o=wp.media.ajax({data:{action:"query-attachments",query:{post__in:e}}});o.done(function(e){t(e)}),o.fail(function(){n(Object(r.__)("An error occurred while trying to fetch files data.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(313),n(31)),w=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():e.createElement(E.a,null)}}]),n}(y.Component);t.a=w}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(0),h=n.n(d),m=n(3),g=n.n(m),v=n(54),b=function(t){function n(){var e,t;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i1?t.setState(function(e){return{menuVisible:!e.menuVisible}}):r(n[0])}),g()(h()(h()(t)),"handleItemClick",function(e){t.setState({menuVisible:!1}),t.props.onSelect(e)}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.buttonText,o=n.groups;return e.createElement("div",{className:"cf-complex__inserter"},e.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},r),o.length>1&&e.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},o.map(function(n,r){return e.createElement("li",{className:"cf-complex__inserter-item",key:r,onClick:function(){return t.handleItemClick(n)}},n.label)})))}}]),n}(n(2).Component);t.a=Object(v.a)(b)}).call(this,n(2))},function(e,t,n){"use strict";var r=u(n(305)),o=u(n(310)),a=u(n(115)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:a.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(319),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(79),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(63)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(85)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(44),o=n(190),a=n(191),i=n(192),u=n(193),s=n(194);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(33)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(199),o=n(206),a=n(208),i=n(209),u=n(210);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0?e.createElement("select",{id:n,name:r,value:o||Object(b.get)(a.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},a.options.map(function(t){return e.createElement("option",{key:t.value,value:t.value},t.label)})):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return i});var r=n(2),o=Object(r.createContext)(!1),a=o.Provider,i=o.Consumer},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(37))},function(e,t,n){var r=n(172),o=n(42);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(174),o=n(82),a=n(23),i=n(62),u=n(83),s=n(84),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,h=d?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||h.push(g);return h}},function(e,t,n){var r=n(175),o=n(27),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&el))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=l}function E(){var e=o();if(y(e))return w(e);p=setTimeout(E,function(e){var n=t-(e-d);return g?u(n,l-(e-h)):n}(e))}function w(e){return p=void 0,v&&s?b(e):(s=c=void 0,f)}function x(){var e=o(),n=y(e);if(s=arguments,c=this,d=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(E,t),m?b(e):f}(d);if(g)return p=setTimeout(E,t),b(d)}return void 0===p&&(p=setTimeout(E,t)),f}return t=a(t)||0,r(n)&&(m=!!n.leading,l=(g="maxWait"in n)?i(a(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,s=d=c=p=void 0},x.flush=function(){return void 0===p?f:w(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(284)),o=a(n(286));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,i.polyfill)(p);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(113),i=n(311);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(20),i=n.n(a),u=n(14),s=n(22),c=n(4),l=(n(320),n(148)),f=n(35);t.a=Object(u.compose)(Object(s.withSelect)(function(e,t){var n=e("carbon-fields/core"),r=n.getValidationError,o=n.isFieldVisible;return{error:r(t.id),hidden:!o(t.id)}}),Object(f.a)("carbon-fields.field-wrapper"))(function(t){var n=t.id,r=t.field,a=t.error,u=t.hidden,s=t.className,f=t.children,p=r.width?{flexBasis:"".concat(r.width,"%")}:null,d=["cf-field","cf-".concat(Object(c.kebabCase)(r.type)),{"cf-field--has-width":!!r.width,"cf-field--invalid":!!a},s].concat(o()(r.classes));return e.createElement("div",{className:i()(d),style:p,hidden:u},e.createElement("div",{className:"cf-field__head"},r.label&&e.createElement("label",{className:"cf-field__label",htmlFor:n},r.label,r.required&&e.createElement("span",{className:"cf-field__asterisk"},"*"))),!u&&e.createElement("div",{className:"cf-field__body"},f),u&&e.createElement(l.a,{className:"cf-field__body"},f),r.help_text&&e.createElement("em",{className:"cf-field__help",dangerouslySetInnerHTML:{__html:r.help_text}}),a&&e.createElement("span",{className:"cf-field__error"},a))})}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(12),i=n.n(a),u=n(15),s=n.n(u),c=n(5),l=n.n(c),f=n(6),p=n.n(f),d=n(7),h=n.n(d),m=n(8),g=n.n(m),v=n(9),b=n.n(v),y=n(0),E=n.n(y),w=n(3),x=n.n(w),O=n(38),C=n.n(O),_=n(10),k=n(2),S=n(14),j=n(19),D=n(18),A=n(20),M=n.n(A),F=n(4),T=n(11),P=n(26),N=(n(160),n(39)),I=n(36),R=n(119),L=function(t){function n(){var e,t;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&a.length>=r.max||(i(o,s()(a).concat([Object(F.pick)(e,"id","type","subtype")])),u({selectedOptions:s()(c).concat([e])}))}),x()(E()(E()(t)),"handleRemoveItem",function(e){var n=t.props,r=n.value,o=n.id,a=n.onChange,i=n.setState,u=n.selectedOptions;a(o,Object(F.without)(r,e)),i({selectedOptions:Object(F.without)(u,e)})}),x()(E()(E()(t)),"handleSort",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),t}return b()(n,t),p()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var t=this,n=this.props,r=n.name,o=n.value,a=n.field,i=n.totalOptionsCount,u=n.selectedOptions,s=n.queryTerm,c=this.props.options;return a.duplicates_allowed||(c=C()(c,function(e){e.map(function(e){return e.disabled=!!Object(F.find)(o,function(t){return Object(F.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),e.createElement(k.Fragment,null,e.createElement("div",{className:"cf-association__bar"},e.createElement(N.a,{value:s,onChange:this.handleSearchChange}),e.createElement("span",{className:"cf-association__counter"},Object(_.sprintf)(Object(_.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(c.length),Number(i)))),e.createElement("div",{className:"cf-association__cols"},e.createElement("div",{className:"cf-association__col"},c.map(function(n,r){return e.createElement("div",{className:M()("cf-association__option",{"cf-association__option--selected":n.disabled}),key:r},n.thumbnail&&e.createElement("img",{className:"cf-association__option-thumb",src:n.thumbnail}),e.createElement("div",{className:"cf-association__option-content"},e.createElement("span",{className:"cf-association__option-title"},n.title),e.createElement("span",{className:"cf-association__option-type"},n.type)),e.createElement("div",{className:"cf-association__option-actions"},e.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:n.edit_link}),!n.disabled&&(a.max<0||o.length0&&t.length=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";var r=n(10);t.a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(o,a){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){o(e)}),i.fail(function(){a(Object(r.__)("An error occured.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(163),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;t.setState({currentTab:Object(k.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),x()(E()(E()(t)),"handleToggleAllClick",function(){var e=t.props,n=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!n)}),x()(E()(E()(t)),"handleSortGroups",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),x()(E()(E()(t)),"handleTabsChange",function(e){t.setState({currentTab:e})}),t}return b()(n,t),p()(n,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(k.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=s()(e,2),o=r[0],a=r[1],u=Object(k.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(k.isString)(u.label_template))return u.label;try{return Object(k.template)(u.label_template)(i()({$_index:n},a))||u.label}catch(e){return console.error("Couldn't create the label of group - ".concat(e.message)),"N/A"}})}},{key:"render",value:function(){var t=this,n=this.state.currentTab,r=this.props,o=r.value,a=r.field,i=r.groupIdKey,u=r.groupFilterKey,s=r.allGroupsAreCollapsed,c=r.onGroupSetup,l=r.onGroupFieldSetup,f=r.onToggleGroup,p=this.getAvailableGroups(u),d=this.getGroupLabels(),h=o.map(function(e,t){return{id:e[i],label:d[t]}});return e.createElement(C.Fragment,null,this.isTabbed&&!!o.length&&e.createElement(S.a,{items:o,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===a.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleSortGroups},e.createElement(j.a,{ref:this.tabsList,items:h,current:n,onChange:this.handleTabsChange},!!p.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:"+",groups:p,onSelect:this.handleAddGroup}))),!o.length&&e.createElement(M.a,{label:"There are no entries yet."},e.createElement(D.a,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup})),!!o.length&&e.createElement(S.a,{items:o,options:{axis:"y",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forcePlaceholderSize:!0},forwardedRef:this.groupsList,onUpdate:this.handleSortGroups},e.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},o.map(function(r,o){return e.createElement(A.a,c(r,{index:o,label:d[o],tabbed:t.isTabbed,hidden:t.isTabbed&&r[i]!==n,allowClone:a.duplicate_groups_allowed&&!t.isMaximumReached,onFieldSetup:l,onClone:t.handleCloneGroup,onRemove:t.handleRemoveGroup,onToggle:f}))}))),!this.isTabbed&&!!o.length&&e.createElement("div",{className:"cf-complex__actions"},!!p.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup}),e.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},s?"Expand All":"Collapse All")))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(_.sprintf)(Object(_.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),n}(C.Component);Object(O.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(t){return function(n){var r=n.field;return"complex"!==r.type?e.createElement(t,n):e.createElement(t,o()({className:"cf-complex--".concat(r.layout)},n))}}),Object(O.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(k.isEmpty)(t))return Object(_.__)("This field is required. ","carbon-fields-ui");if(n>0&&t.length=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===l.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);l.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return l.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();f.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},f.defaultProps={options:{}},t.default=f},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=function(t){function n(){return i()(this,n),l()(this,p()(n).apply(this,arguments))}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.value,a=t.field;return e.createElement("input",o()({type:"hidden",name:n,value:r,className:"hidden-text"},a.attributes))}}]),n}(n(2).Component);t.a=m}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(2);t.a=function(t){var n=t.field;return e.createElement(r.RawHTML,{className:"cf-html__content"},n.html)}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(12),i=n.n(a),u=n(5),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(26),x=n(2),O=n(10),C=n(18),_=n(4),k=n(11),S=(n(295),n(39)),j=n(133),D=function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1})}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?e.createElement(b.a,{id:n,name:r,value:this.filterValues(o),options:a.options,delimiter:a.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){(function(t){for(var r=n(304),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],c=0;!u&&c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(14),w=n(10),x=n(18),O=n(11),C=n(26),_=n(4),k=(n(312),n(39)),S=n(141),j=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.embedCode,i=t.embedType,u=t.provider;return e.createElement("div",{ref:this.node},e.createElement(k.a,{id:n,value:o,onChange:this.handleChange}),a?e.createElement(S.a,{html:a,type:i,provider:u}):null,e.createElement("input",{type:"hidden",name:r,value:o,readOnly:!0}))}}]),n}(y.Component),D=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),A=Object(x.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=o()(t,2),r=n[0],a=n[1],i=Object(O.pipe)(Object(C.a)({onFetchEmbedCode:a}),Object(O.map)(x.toProps)),u=Object(O.pipe)(r,Object(O.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(O.merge)(i,u)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(w.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(w.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}});t.a=Object(E.compose)(D,A)(j)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(0),h=n.n(d),m=n(2),g=function(t){function n(){var e;return o()(this,n),(e=s()(this,l()(n).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(h()(h()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(h()(h()(e))),e}return p()(n,t),i()(n,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,c=u.height;"resize"!==o||s===a&&c===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var t=this;return e.createElement("div",{className:"cf-oembed__preview"},e.createElement("iframe",{ref:function(e){return t.iframe=e},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var t="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",n="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(t,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),r=e.createElement("html",{lang:document.documentElement.lang},e.createElement("head",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),e.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},e.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),e.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:n}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(m.renderToString)(r)),this.iframe.contentWindow.document.close()}}}]),n}(m.Component);t.a=g}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(12),o=n.n(r),a=n(29),i=n(57);n(314),t.a=Object(a.a)(function(t){return o()({},t,{field:o()({},t.field,{options:t.field.options.map(function(t){return o()({},t,{label:e.createElement("img",{className:"cf-radio-image__image",src:t.label})})})})})})(i.a)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(12),i=n.n(a),u=n(5),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(10),O=n(4),C=n(20),_=n.n(C),k=function(t){function n(){var e;return s()(this,n),e=p()(this,h()(n).call(this)),E()(b()(b()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(O.isString)(t)?t:t.target.value)}),E()(b()(b()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=i()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=i()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return g()(n,t),l()(n,[{key:"componentDidMount",value:function(){setTimeout(this.initEditor,100)}},{key:"componentWillUnmount",value:function(){this.destroyEditor()}},{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field,s=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":u.rich_editing},{"html-active":!u.rich_editing}],c=u.media_buttons?Object(O.template)(u.media_buttons)({id:r}):null;return e.createElement("div",{id:"wp-".concat(r,"-wrap"),className:_()(s),ref:function(e){return t.editorNode=e}},u.media_buttons&&e.createElement("div",{id:"wp-".concat(r,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},e.createElement("span",{dangerouslySetInnerHTML:{__html:c}})),u.rich_editing&&e.createElement("div",{className:"wp-editor-tabs"},e.createElement("button",{type:"button",id:"".concat(r,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":r},Object(x.__)("Visual","carbon-fields-ui")),e.createElement("button",{type:"button",id:"".concat(r,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":r},Object(x.__)("Text","carbon-fields-ui"))),e.createElement("div",{id:"wp-".concat(r,"-editor-container"),className:"wp-editor-container"},e.createElement("textarea",o()({style:{width:"100%"},className:"regular-text",id:r,name:a,value:i,onChange:this.handleChange},u.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),n}(w.Component);t.a=k}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(2),h=(n(316),function(t){function n(){return o()(this,n),s()(this,l()(n).apply(this,arguments))}return p()(n,t),i()(n,[{key:"render",value:function(){return e.createElement("h3",null,this.props.field.label)}}]),n}(d.Component));t.a=h}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(4),w=(n(317),n(31)),x=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1}),t}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field;return u.options.length>0?e.createElement("ul",{className:"cf-set__list"},u.options.map(function(n,s){return e.createElement("li",{className:"cf-set__list-item",key:s},e.createElement("input",o()({type:"checkbox",id:"".concat(r,"-").concat(n.value),name:"".concat(a,"[]"),checked:t.isChecked(i,n),value:n.value,className:"cf-set__input",onChange:t.handleChange},u.attributes)),e.createElement("label",{className:"cf-set__label",htmlFor:"".concat(r,"-").concat(n.value)},n.label))})):e.createElement(w.a,null)}}]),n}(y.Component);t.a=x}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(26),E=n(2),w=n(10),x=n(18),O=n(4),C=n(11),_=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;ar&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===f.inserted[v]&&(n="",h(e,t),f.inserted[v]=n)}var O=function(){var e=w.apply(this,arguments),t=a+"-"+v;return void 0===f.registered[t]&&(f.registered[t]=b),x("."+t,e),t};function C(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):n+=t+" "}),n}function _(e,t){var n=[],r=C(n,e);return n.length<2?e:r+O(n,t)}function k(e){f.inserted[e]=!0}if(l){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){l&&(d.flush(),d.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},C=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},_=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function A(e){return D(e)?window.pageYOffset:e.scrollTop}function M(e,t){D(e)?window.scrollTo(0,t):e.scrollTop=t}function F(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k,a=A(e),i=t-a,u=0;!function t(){var s,c=i*((s=(s=u+=10)/n-1)*s*s+1)+a;M(e,c),u=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&F(s,C,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&w>=r)return a&&F(s,C,160),{placement:"bottom",maxHeight:i?w-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&E>=r)&&(k=i?E-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return M(s,C),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&F(s,_,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&E>=r){var S=t;return(!i&&x>=r||i&&E>=r)&&(S=i?E-y:x-y),a&&F(s,_,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!l,isFixedPosition:l,theme:s});c&&c(f),r.setState(f)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||P(e);return E({},r.props,{placement:t,maxHeight:r.state.maxHeight})},O(r,n)}return w(t,e),b(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(a.Component);N.contextTypes={getPortalPlacement:l.a.func};var I=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},R=I,L=I,H=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};H.defaultProps={children:"No options"};var B=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};B.defaultProps={children:"Loading..."};var V=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=l-f-c,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),p.scrollTop=l,m=!0,r.isBottom=!0):!d&&-t>c&&(i&&!r.isTop&&i(e),p.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},O(r,n)}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return i.a.createElement(Z,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(a.Component),le=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=x(e,["isEnabled"]);return t?i.a.createElement(ce,n):this.props.children}}]),t}(a.Component);le.defaultProps={isEnabled:!0};var fe=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,s=e.hasValue;return i.a.createElement("div",{className:r(Object(u.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s},n)},t)}}]),t}(a.Component),pe=function(e){var t=e.size,n=x(e,["size"]);return i.a.createElement("svg",E({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(u.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},de=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},he=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},me=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},ge=me,ve=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};ve.defaultProps={children:i.a.createElement(he,null)};var be=me,ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};ye.defaultProps={children:i.a.createElement(de,null)};var Ee=function(e){var t=e.color,n=e.delay,r=e.offset;return i.a.createElement("span",{className:Object(u.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(u.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var we=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,s=e.isRtl,c=e.theme.colors,l=a?c.neutral80:c.neutral20;return i.a.createElement("div",E({},o,{className:n(Object(u.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),i.a.createElement(Ee,{color:l,delay:0,offset:s}),i.a.createElement(Ee,{color:l,delay:160,offset:!0}),i.a.createElement(Ee,{color:l,delay:320,offset:!s}))};we.defaultProps={size:4};var xe=function(e){var t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)},Oe=xe,Ce=xe,_e=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)}}]),t}(a.Component);_e.defaultProps={children:i.a.createElement(de,{size:14})};var ke=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,s=e.getStyles,c=e.innerProps,l=e.isDisabled,f=e.removeProps,p=e.selectProps,d=r.Container,h=r.Label,m=r.Remove,g=E({className:o(Object(u.a)(s("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":l},n)},c),v={className:o(Object(u.a)(s("multiValueLabel",this.props)),{"multi-value__label":!0},n)},b=E({className:o(Object(u.a)(s("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},f);return i.a.createElement(d,{data:a,innerProps:g,selectProps:p},i.a.createElement(h,{data:a,innerProps:v,selectProps:p},t),i.a.createElement(m,{data:a,innerProps:b,selectProps:p}))}}]),t}(a.Component);ke.defaultProps={cropWithEllipsis:!0};var Se={ClearIndicator:ye,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,c=e.innerRef,l=e.innerProps;return i.a.createElement("div",E({ref:c,className:n(Object(u.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":s},o)},l),t)},DropdownIndicator:ve,DownChevron:he,CrossIcon:de,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,c=e.label,l=e.theme;return i.a.createElement("div",{className:r(Object(u.a)(o("group",e)),{group:!0},n)},i.a.createElement(a,E({},s,{theme:l,getStyles:o,cx:r}),c),i.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=x(e,["className","cx","getStyles","theme"]);return i.a.createElement("div",E({className:n(Object(u.a)(r("groupHeading",E({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return i.a.createElement("div",{className:r(Object(u.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return i.a.createElement("span",E({},o,{className:n(Object(u.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,s=e.isDisabled,c=e.theme,l=x(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return i.a.createElement("div",{className:Object(u.a)(r("input",E({theme:c},l)))},i.a.createElement(p.a,E({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:s},l)))},LoadingIndicator:we,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps,c=r(Object(u.a)(o("menu",e)),{menu:!0},n);return i.a.createElement("div",E({className:c},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef;return i.a.createElement("div",{className:r(Object(u.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:s},t)},MenuPortal:V,LoadingMessage:B,NoOptionsMessage:H,MultiValue:ke,MultiValueContainer:Oe,MultiValueLabel:Ce,MultiValueRemove:_e,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,c=e.isSelected,l=e.innerRef,f=e.innerProps;return i.a.createElement("div",E({ref:l,className:r(Object(u.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":c},n)},f),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,c=e.isRtl;return i.a.createElement("div",E({className:r(Object(u.a)(o("container",e)),{"--is-disabled":s,"--is-rtl":c},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:fe},je=function(e){return E({},Se,e.components)},De={clearIndicator:be,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:ge,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:L,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return y(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),y(t,"backgroundColor",i.neutral0),y(t,"borderRadius",o),y(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),y(t,"marginBottom",a.menuGutter),y(t,"marginTop",a.menuGutter),y(t,"position","absolute"),y(t,"width","100%"),y(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:R,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ae={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Me={backspaceRemovesValue:!0,blurInputOnSelect:T(),captureMenuScroll:!T(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=E({ignoreCase:!0,ignoreAccents:!0,stringify:K,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?$(t):t,c=i?$(a(e)):a(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=q(s),c=q(c)),"start"===u?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Fe=1,Te=function(e){function t(e){v(this,t);var n=O(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pe.call(n);var r=e.value;n.cacheComponents=h(n.cacheComponents,Y).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Fe);var o=j(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=j(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!u&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?M(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,c=-1;if(a.length){switch(e){case"previous":c=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ae):E({},Ae,this.props.theme):Ae}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,c=this.state.selectValue,l=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+S(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:l,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var c=a?void 0:function(){return n.onOptionHover(e)},l=a?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:l,onMouseMove:c,onMouseOver:c,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:f,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,c=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,c=r||this.getElementId("input");if(!n)return i.a.createElement(J,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:k,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,d=f.theme;return i.a.createElement(u,E({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,f=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,h=l.inputValue,m=l.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue;if(!this.hasValue()||!f)return h?null:i.a.createElement(s,E({},c,{key:"placeholder",isDisabled:p}),m);if(d)return v.map(function(t){var u=t===b;return i.a.createElement(n,E({},c,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var y=v[0];return i.a.createElement(u,E({},c,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:u,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?i.a.createElement(e,E({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.a.createElement(n,E({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,O=m.maxMenuHeight,C=m.menuIsOpen,_=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,j=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,A=m.noOptionsMessage,M=m.onMenuScrollToTop,F=m.onMenuScrollToBottom;if(!C)return null;var T=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,i.a.createElement(l,E({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},P=void 0;if(this.hasOptions())P=h.render.map(function(t){if("group"===t.type){t.type;var o=x(t,["type"]),a=t.key+"-heading";return i.a.createElement(n,E({},f,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return T(e)}))}if("option"===t.type)return T(t)});else if(b){var I=y({inputValue:v});if(null===I)return null;P=i.a.createElement(s,f,I)}else{var R=A({inputValue:v});if(null===R)return null;P=i.a.createElement(c,f,R)}var L={minMenuHeight:w,maxMenuHeight:O,menuPlacement:_,menuPosition:k,menuShouldScrollIntoView:D},H=i.a.createElement(N,E({},f,L),function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return i.a.createElement(o,E({},f,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),i.a.createElement(le,{isEnabled:g,onTopArrive:M,onBottomArrive:F},i.a.createElement(se,{isEnabled:j},i.a.createElement(a,E({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),P))))});return S||"fixed"===k?i.a.createElement(u,E({},f,{appendTo:S,controlElement:this.controlRef,menuPlacement:_,menuPosition:k}),H):H}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(o){if(n){var s=u.map(function(t){return e.getOptionValue(t)}).join(n);return i.a.createElement("input",{name:a,type:"hidden",value:s})}var c=u.length>0?u.map(function(t,n){return i.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):i.a.createElement("input",{name:a,type:"hidden"});return i.a.createElement("div",null,c)}var l=u[0]?this.getOptionValue(u[0]):"";return i.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?i.a.createElement(X,{"aria-live":"assertive"},i.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),i.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,u=a.className,s=a.id,c=a.isDisabled,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.a.createElement(r,E({},f,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:l}),this.renderLiveRegion(),i.a.createElement(t,E({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:l}),i.a.createElement(o,E({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),i.a.createElement(n,E({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(a.Component);Te.defaultProps=Me;var Pe=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=je({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(_(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=De[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,E({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=C(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=C(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof l&&(l(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!c||!f||!m||p&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(c){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":c?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!c){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":c?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":c?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!c)return;e.focusOption("pageup");break;case"PageDown":if(!c)return;e.focusOption("pagedown");break;case"Home":if(!c)return;e.focusOption("first");break;case"End":if(!c)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Ne=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;v(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=c(n(1)),o=c(n(21)),a=c(n(25)),i=n(52),u=c(n(289)),s=c(n(290));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,c=e.hsv,l=e.hsl,f=e.onChange,p=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:l,hsv:c,onChange:f})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:l,onChange:f})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:l,renderers:m,onChange:f}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:l,hex:o,onChange:f,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:f,onSwatchHover:p}))};l.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},l.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(l)},function(e,t,n){"use strict";var r=n(167);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(169)),o=u(n(61)),a=u(n(180)),i=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(32),o=n(23),a=n(27);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(41),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(173)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(45);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(44);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(44),o=n(71),a=n(72);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(86),o=n(196),a=n(28),i=n(90),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t,n){var r,o=n(197),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(200),o=n(44),a=n(71);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(201),o=n(202),a=n(203),i=n(204),u=n(205);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(244);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(69),o=n(103),a=n(104),i=n(246),u=n(247),s=n(250),c=n(251),l=n(252),f=n(253),p=n(94),d=n(254),h=n(48),m=n(255),g=n(256),v=n(261),b=n(23),y=n(62),E=n(263),w=n(28),x=n(265),O=n(42),C="[object Arguments]",_="[object Function]",k="[object Object]",S={};S[C]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[_]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var F,T=1&n,P=2&n,N=4&n;if(j&&(F=A?j(t,D,A,M):j(t)),void 0!==F)return F;if(!w(t))return t;var I=b(t);if(I){if(F=m(t),!T)return c(t,F)}else{var R=h(t),L=R==_||"[object GeneratorFunction]"==R;if(y(t))return s(t,T);if(R==k||R==C||L&&!A){if(F=P||L?{}:v(t),!T)return P?f(t,u(F,t)):l(t,i(F,t))}else{if(!S[R])return A?t:{};F=g(t,R,T)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,F),x(t))return t.forEach(function(r){F.add(e(r,n,j,r,t,M))}),F;if(E(t))return t.forEach(function(r,o){F.set(o,e(r,n,j,o,t,M))}),F;var B=N?P?d:p:P?keysIn:O,V=I?void 0:B(t);return o(V||t,function(r,o){V&&(r=t[o=r]),a(F,o,e(r,n,j,o,t,M))}),F}},function(e,t,n){var r=n(33),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(51),o=n(42);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(51),o=n(106);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(28),o=n(67),a=n(249),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(63)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*c/a)/100,n.hsl.a!==l)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:l,source:"rgb"}}else{var f;if(f=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==f)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*c/a+100)/100,n.hsl.h!==l)return{h:l,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==f)return{h:f,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?c=a:l<0?l=0:l>i&&(l=i);var f=100*c/a,p=-100*l/i+100;return{h:n.hsl.h,s:f,v:p,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=T(e,360),t=T(t,100),n=T(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,f,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=F(s),{ok:h,format:e.format||m,r:c(255,l(u.r,0)),g:c(255,l(u.g,0)),b:c(255,l(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r,o,a=l(e,t,n),i=c(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(p(r));return a}function D(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(p({h:r,s:o,v:a})),a=(a+u)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(L(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*T(this._r,255))+"%",g:s(100*T(this._g,255))+"%",b:s(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%)":"rgba("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:R(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),a=n/100;return p({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,a=p.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},p.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;cs&&(s=r,u=p(t[c]));return p.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var A=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,l(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function L(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var B,V,U,z=(V="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",U="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+V),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+V),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+V),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:l.fields,className:"flexbox-fix"},r.default.createElement("div",{style:l.double},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"hex",value:s.replace("#",""),onChange:f})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.alpha},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:f,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},c={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},l=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},f=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r,a){if(0===e||e){var s,c=a||o,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var f=t||(n||g).dateFormat,p=String(e).trim();if("today"===p)s=new Date,r=!0;else if(/Z$/.test(p)||/GMT$/.test(p))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,f);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function E(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(l=o===s.hourElement?l-i-t(!s.amPM):a,p&&N(void 0,1,s.hourElement)),s.amPM&&f&&(1===u?l+c===23:Math.abs(l-c)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(l)}}(n);var r=s._input.value;_(),ge(),s._input.value!==r&&s._debouncedChange()}}function _(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var c=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,c.getHours()))===c.getHours()&&(o=Math.max(o,c.getMinutes())),o===c.getMinutes()&&(a=Math.max(a,c.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function F(){fe("onChange")}function T(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function R(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===p(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===p(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===p(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&p(e,s.selectedDates[0])>=0&&p(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),fe("onDayCreate",a),a}function L(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var c=o.children[u];if(-1===c.className.indexOf("hidden")&&J(c.dateObj))return c}}function B(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,c=i.children.length,l=u;l>=0&&l0?c:-1);l+=o){var f=i.children[l];if(-1===f.className.indexOf("hidden")&&J(f.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return L(f)}s.changeMonth(o),B(H(o),0)}(r,t):L(r)}function V(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",c=i?"nextMonthDay hidden":"nextMonthDay",l=r+1-n,f=0;l<=r;l++,f++)a.appendChild(R(u,new Date(e,t-1,l),l,f));for(l=1;l<=o;l++,f++)a.appendChild(R("",new Date(e,t,l),l,f));for(var p=o+1;p<=42-n&&(1===s.config.showMonths||f%7!=0);p++,f++)a.appendChild(R(c,new Date(e,t+1,p%o),p,f));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,fe("onYearChange")),U(),fe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),fe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&p(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&p(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),B(H(1),0)):B(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),B(H(1),0)):a||B(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var c=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),l=c.indexOf(e.target);if(-1!==l){var f=c[l+(e.shiftKey?-1:1)];void 0!==f?(e.preventDefault(),f.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],_(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],_(),ge()}fe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,c=0,l=r;lr&&lu)?u=l:l>n&&(!c||l0&&l0&&l>c;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=l||(nt&&l===n&&a.classList.add("endRange"),l>=u&&(0===c||l<=c)&&d(l,n,t)&&a.classList.add("inRange")))))},v=0,b=p.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===C.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},C.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?C.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=l(s),s.parseDate=f({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){fe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),c=window.innerHeight-u.bottom,l="above"===a||"below"!==a&&cn,f=window.pageYOffset+u.top+(l?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!l),v(s.calendarContainer,"arrowBottom",l),!s.config.inline){var p=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=p+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=f+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=p+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==p(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(_(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&fe("onYearChange"),fe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():L(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,c="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||c)&&ie()}F()}}s.parseDate=f({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&fe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),fe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&fe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=T,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void fe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),fe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),T(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);ce(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),T(),k(),ge(t),t&&fe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function ce(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function le(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function fe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&fe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=le(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=le(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):C.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):C.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var c=0;c-1?s.config[p]=r(f[p]).map(g).concat(s.config[p]):void 0===t[p]&&(s.config[p]=f[p])}fe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&ce(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),fe("onChange"),fe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(F,w),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),F()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),fe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},c={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},l=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},f=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r,a){if(0===e||e){var s,c=a||o,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var f=t||(n||g).dateFormat,p=String(e).trim();if("today"===p)s=new Date,r=!0;else if(/Z$/.test(p)||/GMT$/.test(p))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,f);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function E(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(l=o===s.hourElement?l-i-t(!s.amPM):a,p&&N(void 0,1,s.hourElement)),s.amPM&&f&&(1===u?l+c===23:Math.abs(l-c)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(l)}}(n);var r=s._input.value;_(),ge(),s._input.value!==r&&s._debouncedChange()}}function _(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var c=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,c.getHours()))===c.getHours()&&(o=Math.max(o,c.getMinutes())),o===c.getMinutes()&&(a=Math.max(a,c.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function F(){fe("onChange")}function T(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function R(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===p(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===p(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===p(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&p(e,s.selectedDates[0])>=0&&p(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),fe("onDayCreate",a),a}function L(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var c=o.children[u];if(-1===c.className.indexOf("hidden")&&J(c.dateObj))return c}}function B(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,c=i.children.length,l=u;l>=0&&l0?c:-1);l+=o){var f=i.children[l];if(-1===f.className.indexOf("hidden")&&J(f.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return L(f)}s.changeMonth(o),B(H(o),0)}(r,t):L(r)}function V(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",c=i?"nextMonthDay hidden":"nextMonthDay",l=r+1-n,f=0;l<=r;l++,f++)a.appendChild(R(u,new Date(e,t-1,l),l,f));for(l=1;l<=o;l++,f++)a.appendChild(R("",new Date(e,t,l),l,f));for(var p=o+1;p<=42-n&&(1===s.config.showMonths||f%7!=0);p++,f++)a.appendChild(R(c,new Date(e,t+1,p%o),p,f));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,fe("onYearChange")),U(),fe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),fe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&p(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&p(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),B(H(1),0)):B(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),B(H(1),0)):a||B(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var c=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),l=c.indexOf(e.target);if(-1!==l){var f=c[l+(e.shiftKey?-1:1)];void 0!==f?(e.preventDefault(),f.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],_(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],_(),ge()}fe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,c=0,l=r;lr&&lu)?u=l:l>n&&(!c||l0&&l0&&l>c;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=l||(nt&&l===n&&a.classList.add("endRange"),l>=u&&(0===c||l<=c)&&d(l,n,t)&&a.classList.add("inRange")))))},v=0,b=p.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===C.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},C.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?C.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=l(s),s.parseDate=f({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){fe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),c=window.innerHeight-u.bottom,l="above"===a||"below"!==a&&cn,f=window.pageYOffset+u.top+(l?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!l),v(s.calendarContainer,"arrowBottom",l),!s.config.inline){var p=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=p+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=f+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=p+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==p(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(_(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&fe("onYearChange"),fe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():L(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,c="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||c)&&ie()}F()}}s.parseDate=f({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&fe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),fe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&fe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=T,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void fe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),fe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),T(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);ce(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),T(),k(),ge(t),t&&fe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function ce(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function le(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function fe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&fe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=le(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=le(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):C.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):C.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var c=0;c-1?s.config[p]=r(f[p]).map(g).concat(s.config[p]):void 0===t[p]&&(s.config[p]=f[p])}fe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&ce(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),fe("onChange"),fe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(F,w),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),F()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),fe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(e[s=l[c]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&E(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!E(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=g,f.ok=v,f.equal=function(e,t,n){e!=t&&g(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(36))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var c,E="",C=!1,_=["{","}"];return d(n)&&(C=!0,_=["[","]"]),O(n)&&(E=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(E=" "+RegExp.prototype.toString.call(n)),w(n)&&(E=" "+Date.prototype.toUTCString.call(n)),x(n)&&(E=" "+f(n)),0!==i.length||C&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=C?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,_)):_[0]+E+_[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return E(e)&&"[object RegExp]"===C(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===C(e)}function x(e){return E(e)&&("[object Error]"===C(e)||e instanceof Error)}function O(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=E,t.isDate=w,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(299);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[_((e=new Date).getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(300),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(36),n(111))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(111))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(305)),o=u(n(308)),a=u(n(1)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var c=o in t,l=o in u,f=t[o],p=(0,r.isValidElement)(f)&&!f.props.in;!l||c&&!p?l||!c||p?l&&c&&(0,r.isValidElement)(f)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:f.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(f.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return l()({},e,s()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(f.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function d(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function h(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function m(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function g(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function v(e,t){return e.validation[t]||null}function b(e,t){return-1===e.hiddenFields.indexOf(t)}Object(i.registerStore)("carbon-fields/core",{reducer:p,actions:r,selectors:o});var y=n(15),E=n.n(y),w=n(14),x=n(19),O=n(34),C=n(33),_=n(117),k=n(120),S=n(121),j=n(125),D=n(58),A=n(76),M=n(130),F=n(131),T=n(132),P=n(135),N=n(136),I=n(140),R=n(56),L=n(142),H=n(143),B=n(77),V=n(144),U=n(145),z=n(146),W=n(147),Y=n(60);Object(x.addFilter)("carbon-fields.register-field-type","carbon-fields/core",function(e,t,n){return Object(w.compose)(Object(O.a)("carbon-fields.field-edit.".concat(t)),Object(O.a)("carbon-fields.".concat(e,".").concat(t)))(n)}),[["association",_.a],["checkbox",k.a],["color",S.a],["complex",j.a],["date",D.a],["date_time",D.a],["file",A.a],["footer_scripts",Y.a],["gravity_form",B.a],["header_scripts",Y.a],["hidden",M.a],["html",F.a],["image",A.a],["map",T.a],["multiselect",N.a],["media_gallery",P.a],["oembed",I.a],["radio",R.a],["radio_image",L.a],["rich_text",H.a],["select",B.a],["separator",V.a],["set",U.a],["sidebar",z.a],["text",W.a],["textarea",Y.a],["time",D.a]].forEach(function(e){return C.b.apply(void 0,E()(e))});var G=n(51),q=n(116),$=n(52),K=n(17),X=n.n(K),J=function(e,t){return e===t},Z=n(18),Q=n(11),ee=Object(Z.withEffects)(function(e,t){if(t.field.required){var n=e.mount,r=e.unmount,o=e.observe("value"),a=e.observe("visible");return Object(Q.merge)(Object(Q.pipe)(Object(Q.combine)(o,a,n),Object(Q.filter)(function(e){return X()(e,2)[1]}),Object(Q.take)(1),Object(Q.map)(function(e){return{type:"VALIDATE",payload:{value:X()(e,1)[0],transient:!0}}})),Object(Q.pipe)(o,function(e){return function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(o=n,e(0,function(e,t){0===e?(a=t)(1):1===e&&(i=!0,a(2))})),1===t?i?r(1,n):o(1):r(t,n)})}}}}(n),function(e){return void 0===e&&(e=J),function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(a=n),1===t?i&&e(o,n)?a(1):(i=!0,o=n,r(1,n)):r(t,n)})}}}}(),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(Q.map)(function(e){return{type:"VALIDATE",payload:{value:e,transient:!1}}})),Object(Q.pipe)(r,Object(Q.map)(function(){return{type:"RESET"}})))}},{handler:function(e){return function(t){var n=e.id,r=e.field,o=e.markAsInvalid,i=e.markAsValid,u=e.lockSaving,s=e.unlockSaving;switch(t.type){case"VALIDATE":var c=t.payload,l=c.value,p=c.transient,d="carbon-fields.".concat(r.type,".validate"),h=Object(x.hasFilter)(d)?Object(x.applyFilters)(d,r,l):function(e){var t=Object(f.isObject)(e);return t&&!Object(f.isEmpty)(e)||!t&&e?null:Object(a.__)("This field is required. ","carbon-fields-ui")}(l);h?(p||o(n,h),u(n)):(p||i(n),s(n));break;case"RESET":i(n),s(n)}}}}),te=Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{markAsValid:t.markAsValid,markAsInvalid:t.markAsInvalid}}),ne=Object(w.compose)(te,ee);function re(e,t){function n(t,n){if(!Object(f.isEmpty)(n.field.conditional_logic))return e(n,t)}function r(e){return function(n){var r=e.field.conditional_logic,o=r.relation,a=r.rules,i=t(e,n),u=a.reduce(function(e,t){if(!Object(f.has)(i,t.field))return console.error('An unknown field is used in condition - "'.concat(t.field,'".')),e.concat(!1);var n=function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;case">":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(f.some)(n,function(t){return t==e});case"NOT IN":return Object(f.every)(n,function(t){return t!=e});case"INCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(i[t.field],t.compare,t.value);return e.concat(n)},[]),s=!1;switch(o){case"AND":s=Object(f.every)(u);break;case"OR":s=Object(f.some)(u)}s?e.showField(e.id):e.hideField(e.id)}}return Object(w.createHigherOrderComponent)(function(e){return Object(w.compose)(Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(i.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(Z.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var oe=n(149),ae=n.n(oe),ie="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function ue(){return"cf-".concat(ae()(ie,21))}function se(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(e[s=l[c]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&E(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!E(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=g,f.ok=v,f.equal=function(e,t,n){e!=t&&g(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(37))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var c,E="",C=!1,_=["{","}"];return d(n)&&(C=!0,_=["[","]"]),O(n)&&(E=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(E=" "+RegExp.prototype.toString.call(n)),w(n)&&(E=" "+Date.prototype.toUTCString.call(n)),x(n)&&(E=" "+f(n)),0!==i.length||C&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=C?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,_)):_[0]+E+_[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return E(e)&&"[object RegExp]"===C(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===C(e)}function x(e){return E(e)&&("[object Error]"===C(e)||e instanceof Error)}function O(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=E,t.isDate=w,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(299);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[_((e=new Date).getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(300),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(37),n(111))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(111))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(306)),o=u(n(309)),a=u(n(1)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var c=o in t,l=o in u,f=t[o],p=(0,r.isValidElement)(f)&&!f.props.in;!l||c&&!p?l||!c||p?l&&c&&(0,r.isValidElement)(f)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:f.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(f.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return l()({},e,s()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(f.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function d(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function h(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function m(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function g(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function v(e,t){return e.validation[t]||null}function b(e,t){return-1===e.hiddenFields.indexOf(t)}Object(i.registerStore)("carbon-fields/core",{reducer:p,actions:r,selectors:o});var y=n(15),E=n.n(y),w=n(14),x=n(19),O=n(35),C=n(34),_=n(117),k=n(120),S=n(121),j=n(125),D=n(29),A=n(40),M=Object(D.a)(function(e){return l()({},e,{buttonText:Object(a.__)("Select Date","carbon-fields-ui")})})(A.a),F=n(76),T=n(130),P=n(131),N=n(132),I=n(135),R=n(136),L=n(140),H=n(57),B=n(142),V=n(143),U=n(77),z=n(144),W=n(145),Y=n(146),G=n(147),q=n(60),$=Object(D.a)(function(e){return l()({},e,{icon:"clock",buttonText:Object(a.__)("Select Time","carbon-fields-ui")})})(A.a);Object(x.addFilter)("carbon-fields.register-field-type","carbon-fields/core",function(e,t,n){return Object(w.compose)(Object(O.a)("carbon-fields.field-edit.".concat(t)),Object(O.a)("carbon-fields.".concat(e,".").concat(t)))(n)}),[["association",_.a],["checkbox",k.a],["color",S.a],["complex",j.a],["date",M],["date_time",A.a],["file",F.a],["footer_scripts",q.a],["gravity_form",U.a],["header_scripts",q.a],["hidden",T.a],["html",P.a],["image",F.a],["map",N.a],["multiselect",R.a],["media_gallery",I.a],["oembed",L.a],["radio",H.a],["radio_image",B.a],["rich_text",V.a],["select",U.a],["separator",z.a],["set",W.a],["sidebar",Y.a],["text",G.a],["textarea",q.a],["time",$]].forEach(function(e){return C.b.apply(void 0,E()(e))});var K=n(53),X=n(116),J=n(17),Z=n.n(J),Q=function(e,t){return e===t},ee=n(18),te=n(11),ne=Object(ee.withEffects)(function(e,t){if(t.field.required){var n=e.mount,r=e.unmount,o=e.observe("value"),a=e.observe("visible");return Object(te.merge)(Object(te.pipe)(Object(te.combine)(o,a,n),Object(te.filter)(function(e){return Z()(e,2)[1]}),Object(te.take)(1),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:Z()(e,1)[0],transient:!0}}})),Object(te.pipe)(o,function(e){return function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(o=n,e(0,function(e,t){0===e?(a=t)(1):1===e&&(i=!0,a(2))})),1===t?i?r(1,n):o(1):r(t,n)})}}}}(n),function(e){return void 0===e&&(e=Q),function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(a=n),1===t?i&&e(o,n)?a(1):(i=!0,o=n,r(1,n)):r(t,n)})}}}}(),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:e,transient:!1}}})),Object(te.pipe)(r,Object(te.map)(function(){return{type:"RESET"}})))}},{handler:function(e){return function(t){var n=e.id,r=e.field,o=e.markAsInvalid,i=e.markAsValid,u=e.lockSaving,s=e.unlockSaving;switch(t.type){case"VALIDATE":var c=t.payload,l=c.value,p=c.transient,d="carbon-fields.".concat(r.type,".validate"),h=Object(x.hasFilter)(d)?Object(x.applyFilters)(d,r,l):function(e){var t=Object(f.isObject)(e);return t&&!Object(f.isEmpty)(e)||!t&&e?null:Object(a.__)("This field is required. ","carbon-fields-ui")}(l);h?(p||o(n,h),u(n)):(p||i(n),s(n));break;case"RESET":i(n),s(n)}}}}),re=Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{markAsValid:t.markAsValid,markAsInvalid:t.markAsInvalid}}),oe=Object(w.compose)(re,ne);function ae(e,t){function n(t,n){if(!Object(f.isEmpty)(n.field.conditional_logic))return e(n,t)}function r(e){return function(n){var r=e.field.conditional_logic,o=r.relation,a=r.rules,i=t(e,n),u=a.reduce(function(e,t){if(!Object(f.has)(i,t.field))return console.error('An unknown field is used in condition - "'.concat(t.field,'".')),e.concat(!1);var n=function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;case">":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(f.some)(n,function(t){return t==e});case"NOT IN":return Object(f.every)(n,function(t){return t!=e});case"INCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(i[t.field],t.compare,t.value);return e.concat(n)},[]),s=!1;switch(o){case"AND":s=Object(f.every)(u);break;case"OR":s=Object(f.some)(u)}s?e.showField(e.id):e.hideField(e.id)}}return Object(w.createHigherOrderComponent)(function(e){return Object(w.compose)(Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(i.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(ee.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var ie=n(149),ue=n.n(ie),se="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function ce(){return"cf-".concat(ue()(se,21))}function le(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r (start, sink) => {\n if (start !== 0) return;\n i /***/ }), -/***/ "./node_modules/callbag-debounce/es/debounce.js": -/*!******************************************************!*\ - !*** ./node_modules/callbag-debounce/es/debounce.js ***! - \******************************************************/ -/*! exports provided: debounce */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"debounce\", function() { return debounce; });\n/**\n * Debounces the given listenable source\n *\n * @param {number} wait - The number of ms to wait before letting a value pass\n * @returns {Function}\n */\nfunction debounce(wait) {\n return function (source) { return function (start, sink) {\n if (start !== 0)\n return;\n var timeout;\n source(0, function (t, d) {\n if (t === 1 || (t === 2 && d === undefined)) {\n // t === 1 means the source is emitting a value\n // t === 2 and d === undefined means the source emits a completion\n if (!timeout && t === 2) {\n return sink(t, d);\n }\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(function () {\n sink(t, d);\n timeout = undefined;\n }, wait);\n }\n else\n sink(t, d);\n });\n }; };\n}\n//# sourceMappingURL=debounce.js.map\n\n//# sourceURL=webpack:///./node_modules/callbag-debounce/es/debounce.js?"); - -/***/ }), - /***/ "./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js": /*!***********************************************************************************************!*\ !*** ./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js ***! @@ -455,7 +443,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderContainer\", function() { return renderContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeContainers; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks */ \"./packages/metaboxes/containers/hooks.js\");\n/* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./widget */ \"./packages/metaboxes/containers/widget/index.js\");\n/* harmony import */ var _term_meta__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./term-meta */ \"./packages/metaboxes/containers/term-meta/index.js\");\n/* harmony import */ var _theme_options__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-options */ \"./packages/metaboxes/containers/theme-options/index.js\");\n/* harmony import */ var _components_container__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../components/container */ \"./packages/metaboxes/components/container/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./registry */ \"./packages/metaboxes/containers/registry.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Registers the containers.\n */\n\n['post_meta', 'term_meta', 'user_meta', 'comment_meta', 'network', 'theme_options', 'nav_menu_item', 'widget'].forEach(function (type) {\n return Object(_registry__WEBPACK_IMPORTED_MODULE_9__[\"registerContainerType\"])(type, _components_container__WEBPACK_IMPORTED_MODULE_8__[\"default\"]);\n});\n/**\n * Renders the given container.\n *\n * @param {Object} container\n * @param {string} context\n * @return {void}\n */\n\nfunction renderContainer(container, context) {\n var node = document.querySelector(\".container-\".concat(container.id));\n var Component = Object(_registry__WEBPACK_IMPORTED_MODULE_9__[\"getContainerType\"])(container.type, context);\n\n if (node) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(__webpack_provided_wp_dot_element.createElement(Component, {\n id: container.id\n }), node);\n } else {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Could not find DOM element for container \"%1$s\".', 'carbon-fields-ui'), container.id));\n }\n}\n/**\n * Initializes the containers.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeContainers(context) {\n var containers = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getContainers();\n Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"forEach\"])(containers, function (container) {\n renderContainer(container, context);\n });\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderContainer\", function() { return renderContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeContainers; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks */ \"./packages/metaboxes/containers/hooks.js\");\n/* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./widget */ \"./packages/metaboxes/containers/widget/index.js\");\n/* harmony import */ var _term_meta__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./term-meta */ \"./packages/metaboxes/containers/term-meta/index.js\");\n/* harmony import */ var _theme_options__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-options */ \"./packages/metaboxes/containers/theme-options/index.js\");\n/* harmony import */ var _user_meta__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./user-meta */ \"./packages/metaboxes/containers/user-meta/index.js\");\n/* harmony import */ var _components_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/container */ \"./packages/metaboxes/components/container/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./registry */ \"./packages/metaboxes/containers/registry.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n/**\n * Registers the containers.\n */\n\n['post_meta', 'term_meta', 'user_meta', 'comment_meta', 'network', 'theme_options', 'nav_menu_item', 'widget'].forEach(function (type) {\n return Object(_registry__WEBPACK_IMPORTED_MODULE_10__[\"registerContainerType\"])(type, _components_container__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\n});\n/**\n * Renders the given container.\n *\n * @param {Object} container\n * @param {string} context\n * @return {void}\n */\n\nfunction renderContainer(container, context) {\n var node = document.querySelector(\".container-\".concat(container.id));\n var Component = Object(_registry__WEBPACK_IMPORTED_MODULE_10__[\"getContainerType\"])(container.type, context);\n\n if (node) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(__webpack_provided_wp_dot_element.createElement(Component, {\n id: container.id\n }), node);\n } else {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Could not find DOM element for container \"%1$s\".', 'carbon-fields-ui'), container.id));\n }\n}\n/**\n * Initializes the containers.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeContainers(context) {\n var containers = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getContainers();\n Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"forEach\"])(containers, function (container) {\n renderContainer(container, context);\n });\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/index.js?"); /***/ }), @@ -517,6 +505,29 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ }), +/***/ "./packages/metaboxes/containers/user-meta/index.js": +/*!**********************************************************!*\ + !*** ./packages/metaboxes/containers/user-meta/index.js ***! + \**********************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/user-meta/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/user-meta/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/containers/user-meta/style.scss": +/*!************************************************************!*\ + !*** ./packages/metaboxes/containers/user-meta/style.scss ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/user-meta/style.scss?"); + +/***/ }), + /***/ "./packages/metaboxes/containers/widget/index.js": /*!*******************************************************!*\ !*** ./packages/metaboxes/containers/widget/index.js ***! @@ -563,18 +574,6 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ }), -/***/ "./packages/metaboxes/fields/date/index.js": -/*!*************************************************!*\ - !*** ./packages/metaboxes/fields/date/index.js ***! - \*************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.date-field.metabox', 'carbon-fields/metaboxes', function (OriginalDatetimeField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalDatetimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Date', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/date/index.js?"); - -/***/ }), - /***/ "./packages/metaboxes/fields/datetime/index.js": /*!*****************************************************!*\ !*** ./packages/metaboxes/fields/datetime/index.js ***! @@ -619,7 +618,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./date */ \"./packages/metaboxes/fields/date/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./time */ \"./packages/metaboxes/fields/time/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./multiselect */ \"./packages/metaboxes/fields/multiselect/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/index.js?"); /***/ }), @@ -646,6 +645,29 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ }), +/***/ "./packages/metaboxes/fields/multiselect/index.js": +/*!********************************************************!*\ + !*** ./packages/metaboxes/fields/multiselect/index.js ***! + \********************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/multiselect/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/multiselect/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/multiselect/style.scss": +/*!**********************************************************!*\ + !*** ./packages/metaboxes/fields/multiselect/style.scss ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/multiselect/style.scss?"); + +/***/ }), + /***/ "./packages/metaboxes/fields/radio/index.js": /*!**************************************************!*\ !*** ./packages/metaboxes/fields/radio/index.js ***! @@ -681,18 +703,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ }), -/***/ "./packages/metaboxes/fields/time/index.js": -/*!*************************************************!*\ - !*** ./packages/metaboxes/fields/time/index.js ***! - \*************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.time.metabox', 'carbon-fields/metaboxes', function (OriginalDatetimeField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalDatetimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n icon: \"clock\",\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Time', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/time/index.js?"); - -/***/ }), - /***/ "./packages/metaboxes/hocs/with-conditional-logic/index.js": /*!*****************************************************************!*\ !*** ./packages/metaboxes/hocs/with-conditional-logic/index.js ***! @@ -701,7 +711,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_debounce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-debounce */ \"./node_modules/callbag-debounce/es/debounce.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.field.container_id)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(getFieldsByContainerId, props.field.container_id)), Object(callbag_debounce__WEBPACK_IMPORTED_MODULE_3__[\"debounce\"])(250), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_6__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.field.container_id);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"find\"])(fields, function (field) {\n return field.container_id === props.field.container_id && Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-conditional-logic/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.field.container_id)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"fromSelector\"])(getFieldsByContainerId, props.field.container_id)), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.field.container_id);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(fields, function (field) {\n return field.container_id === props.field.container_id && Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-conditional-logic/index.js?"); /***/ }), diff --git a/build/classic/metaboxes.min.css b/build/classic/metaboxes.min.css index 15a9607cc..d7aa7c483 100644 --- a/build/classic/metaboxes.min.css +++ b/build/classic/metaboxes.min.css @@ -1 +1 @@ -.postbox .cf-complex__inserter-menu{margin:0;border-radius:3px;background-color:#191e23}.postbox .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-color:transparent #191e23;border-style:solid;border-width:5px 5px 5px 0;margin-top:-5px;content:""}.postbox .cf-complex__inserter-item{font-weight:600;color:#fff;transition:color .1s linear}.postbox .cf-complex__inserter-item:hover{color:#00a0d2}.postbox .cf-complex__tabs-item,.postbox .cf-complex__tabs .cf-complex__inserter-button{font-weight:600;color:#23282d}.postbox .cf-field{flex:1 1 100%;padding:12px;border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.postbox .cf-field__label{padding-bottom:5px;font-weight:600;color:#23282d}.cf-field__help{display:inline-block;color:#666;margin-top:10px}.postbox .cf-media-gallery__inner{border:1px solid #e2e4e7}.postbox .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__actions{padding-left:0}.cf-container-term-meta .cf-media-gallery__list{margin:0 -8px;max-height:285px}.cf-container-term-meta .cf-media-gallery__item{flex-basis:20%}.cf-container-term-meta .cf-media-gallery__item-inner,.postbox .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__item-preview,.postbox .cf-media-gallery__item-preview{background-color:#f3f4f5}.cf-container-term-meta .cf-media-gallery__item-name,.postbox .cf-media-gallery__item-name{border-top:1px solid #e2e4e7;background-color:#f3f4f5}.inside .cf-radio-image .cf-radio__input:focus~.cf-radio__label{box-shadow:0 0 2px rgba(0,160,210,.8)}.inside .cf-radio-image__image{border:1px solid #b5bcc2}.inside .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.inside .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-container-widget .cf-field{margin:1em 0 .2em}.cf-container-term-meta{margin-bottom:13px}.carbon-table-row .cf-container-term-meta{margin-bottom:0}.cf-container-term-meta .cf-field{margin-top:13px}.cf-container-term-meta .cf-field:first-child{margin-top:0}.carbon-table-row .cf-field__head{position:absolute;left:0;font-weight:600}.carbon-table-row .cf-field__body{width:95%}.carbon-network #post-body.columns-2 #postbox-container-1.fixed,.carbon-theme-options #post-body.columns-2 #postbox-container-1.fixed{position:fixed;right:0;margin-right:20px}.carbon-box.hide-if-js:not([hidden]){display:block}#poststuff .carbon-box .inside,.carbon-box .inside{padding:0;margin:0}.cf-container__fields{display:flex;flex-wrap:wrap;margin:-1px -1px 0 0}.cf-container__fields[hidden]{display:none}.block-editor .cf-container__fields{border-left:1px solid #e2e4e7}.cf-container__tabs{position:relative;z-index:1;padding:12px 12px 0;border-bottom:1px solid #e2e4e7;background-color:#fbfbfc}.cf-container__tabs-list{display:flex;flex-wrap:wrap;margin:0 0 -1px}.cf-container__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0 8px 0 0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-container__tabs-item:hover{background-color:#fff}.cf-container__tabs-item--current{background-color:#fff;border-bottom-color:#fff} \ No newline at end of file +.postbox .cf-complex__inserter-menu{margin:0;border-radius:3px;background-color:#191e23}.postbox .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-color:transparent #191e23;border-style:solid;border-width:5px 5px 5px 0;margin-top:-5px;content:""}.postbox .cf-complex__inserter-item{font-weight:600;color:#fff;transition:color .1s linear}.postbox .cf-complex__inserter-item:hover{color:#00a0d2}.postbox .cf-complex__tabs-item,.postbox .cf-complex__tabs .cf-complex__inserter-button{font-weight:600;color:#23282d}.postbox .cf-field{flex:1 1 100%;padding:12px;border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.postbox .cf-field__label{padding-bottom:5px;font-weight:600;color:#23282d}.cf-field__help{display:inline-block;color:#666;margin-top:10px}.postbox .cf-multiselect__control{border-color:#ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.postbox .cf-multiselect__control--is-focused,.postbox .cf-multiselect__control--is-focused:hover{box-shadow:0 0 2px rgba(0,115,170,.8)}.postbox .cf-media-gallery__inner{border:1px solid #e2e4e7}.postbox .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__actions{padding-left:0}.cf-container-term-meta .cf-media-gallery__list{margin:0 -8px;max-height:285px}.cf-container-term-meta .cf-media-gallery__item{flex-basis:20%}.cf-container-term-meta .cf-media-gallery__item-inner,.postbox .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__item-preview,.postbox .cf-media-gallery__item-preview{background-color:#f3f4f5}.cf-container-term-meta .cf-media-gallery__item-name,.postbox .cf-media-gallery__item-name{border-top:1px solid #e2e4e7;background-color:#f3f4f5}.inside .cf-radio-image .cf-radio__input:focus~.cf-radio__label{box-shadow:0 0 2px rgba(0,160,210,.8)}.inside .cf-radio-image__image{border:1px solid #b5bcc2}.inside .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.inside .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-container-widget .cf-field{margin:1em 0 .2em}.cf-container-term-meta{margin-bottom:13px}.carbon-table-row .cf-container-term-meta{margin-bottom:0}.cf-container-term-meta .cf-field{margin-top:13px}.cf-container-term-meta .cf-field:first-child{margin-top:0}.carbon-table-row .cf-field__head{position:absolute;left:0;font-weight:600}.carbon-table-row .cf-field__body{width:95%}.carbon-network #post-body.columns-2 #postbox-container-1.fixed,.carbon-theme-options #post-body.columns-2 #postbox-container-1.fixed{position:fixed;right:0;margin-right:20px}.cf-container-user-meta{max-width:600px}.carbon-box.hide-if-js:not([hidden]){display:block}#poststuff .carbon-box .inside,.carbon-box .inside{padding:0;margin:0}.cf-container__fields{display:flex;flex-wrap:wrap;margin:-1px -1px 0 0}.cf-container__fields[hidden]{display:none}.block-editor .cf-container__fields{border-left:1px solid #e2e4e7}.cf-container__tabs{position:relative;z-index:1;padding:12px 12px 0;border-bottom:1px solid #e2e4e7;background-color:#fbfbfc}.cf-container__tabs-list{display:flex;flex-wrap:wrap;margin:0 0 -1px}.cf-container__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0 8px 0 0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-container__tabs-item:hover{background-color:#fff}.cf-container__tabs-item--current{background-color:#fff;border-bottom-color:#fff} \ No newline at end of file diff --git a/build/classic/metaboxes.min.js b/build/classic/metaboxes.min.js index e82a817b3..6c54319a5 100644 --- a/build/classic/metaboxes.min.js +++ b/build/classic/metaboxes.min.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=65)}([function(e,t){e.exports=cf.vendor.lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=cf.vendor["@wordpress/hooks"]},function(e,t){e.exports=cf.vendor["@wordpress/data"]},function(e,t){e.exports=cf.core},function(e,t){e.exports=cf.vendor["@wordpress/i18n"]},function(e,t){e.exports=cf.vendor["@wordpress/element"]},function(e,t,n){var r=n(9);e.exports=function(e){for(var t=1;t(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=cf.vendor.classnames},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return c});var r=n(4),o=Object(r.createRegistry)("container",["classic","gutenberg"]),i=o.registerContainerType,c=o.getContainerType},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return s});var r=n(6),o=n(34),i=n(38),c=n(39),a=n(37),u=n(20),l=n(17);function s(t){var n=window.cf.config.pagenow;Object(r.render)(e.createElement(r.Fragment,null,!Object(u.a)()&&e.createElement(o.a,null),(n===l.d||n===l.c)&&e.createElement(c.a,null),e.createElement(i.a,{context:t})),document.createElement("div"));var s=document.querySelector("#poststuff");s&&Object(r.render)(e.createElement(a.a,null),s.appendChild(document.createElement("div")))}}).call(this,n(6))},function(e,t,n){"use strict";var r=n(14),o=n(3),i=n(4);t.a=Object(r.withEffects)(function(){return Object(i.fromSelector)(Object(o.select)("carbon-fields/metaboxes").isSavingLocked)},{handler:function(){return function(e){document.querySelectorAll('\n\t\t\t#publishing-action input#publish,\n\t\t\t#publishing-action input#save,\n\t\t\t#addtag input#submit,\n\t\t\t#edittag input[type="submit"],\n\t\t\t#your-profile input#submit\n\t\t').forEach(function(t){t.disabled=e})}}})(function(){return null})},function(e,t){e.exports=(e=>t=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),i=n(24),c=n.n(i),a=n(25),u=n.n(a),l=n(26),s=n.n(l),d=n(27),f=n.n(d),p=n(28),b=n.n(p),m=n(8),v=n.n(m),O=n(9),j=n.n(O),g=n(31),y=n.n(g),h=n(6),_=n(0),w=n(4),E=(n(64),n(29)),x=function(t){function n(){var e,t;c()(this,n);for(var r=arguments.length,o=new Array(r),i=0;it=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})},m=n(15),v=n(4);function O(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function j(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function g(e){for(var t=[],n=e,r=j(e);r>0&&n;)if(j(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var y={post_ancestors:[],post_parent_id:0,post_level:1};function h(e){var t=e.options[e.selectedIndex];return{post_ancestors:g(t),post_parent_id:O(t),post_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(s.pipe)(Object(s.fromEvent)(e,"change"),Object(s.map)(function(e){return h(e.target)}),b(h(e))):Object(p.a)(y)}),Object(u.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(s.pipe)(Object(s.combine)(Object(v.fromSelector)(Object(o.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"parent")),Object(m.a)(l.isEqual),Object(s.map)(function(e){var r=f()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return y;var a=t(i);if(!Object(l.get)(a,["hierarchical"],!1))return y;var u=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(l.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:u,post_parent_id:c,post_level:u.length+1}}))});var _=n(35),w=n.n(_),E=(e,t,n)=>w()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),x={post_format:"standard"};function S(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(u.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(s.pipe)(E(e,"input.post-format","change"),Object(s.map)(function(e){return S(e.target)}),b(S(e.querySelector("input.post-format:checked")))):Object(p.a)(x)}),Object(u.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(s.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"format"),Object(m.a)(),Object(s.filter)(Boolean),Object(s.map)(function(e){return{post_format:e}}),b(x))});var F={post_template:""};function T(e){return{post_template:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(s.pipe)(Object(s.fromEvent)(e,"change"),Object(s.map)(function(e){return T(e.target)}),b(T(e))):Object(p.a)(F)}),Object(u.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(s.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"template"),Object(m.a)(),Object(s.filter)(l.isString),Object(s.map)(function(e){return{post_template:e}}),b(F))});var I=n(7),C=n.n(I),A=n(9),D=n.n(A),k=n(16),N=n.n(k);function G(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(G(window.tagBox,"parseTags"),G(window.tagBox,"flushTags")),Object(u.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(s.pipe)(s.merge.apply(void 0,N()((e=document.querySelectorAll('div[id^="taxonomy-"]'),N()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(s.pipe)(E(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(s.scan)(function(e,n){var r=n.target;return a()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(l.pull)(e[t],n)})},D()({},t,[])),b(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return N()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},D()({},e,[]))}(t)))}))).concat(N()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return N()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(s.pipe)(Object(s.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(s.map)(function(e){var n=e.target;return D()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),b(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return D()({},e,n)}(t)))})}()))),Object(s.scan)(function(e,t){return{post_term:C()({},e.post_term,t)}},{post_term:{}}));var e}),Object(u.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core").getTaxonomies,t=Object(o.select)("core/editor").getEditedPostAttribute;return Object(s.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(s.filter)(Boolean),Object(s.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(l.fromPairs)(n)}}))});var L={term_ancestors:[],term_parent:0,term_level:1};function P(e){var t=e.options[e.selectedIndex];return{term_ancestors:g(t),term_parent:O(t),term_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(s.pipe)(Object(s.fromEvent)(e,"change"),Object(s.map)(function(e){return P(e.target)}),b(P(e))):Object(p.a)(L)});var V={user_role:""};function B(e){return{user_role:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return t?Object(p.a)({user_role:t.dataset.profileRole}):Object(p.a)(V)}return Object(s.pipe)(Object(s.fromEvent)(e,"change"),Object(s.map)(function(e){return B(e.target)}),b(B(e)))});var R=n(6),q=n(5),U=n(21),M={operators:[],isOperatorSupported:function(e){return this.operators.indexOf(e)>-1},evaluate:function(){return!1}},Q={comparers:[C()({},M,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),C()({},M,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),C()({},M,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(l.intersection)(e,n).length;default:return!1}}}),H={boolean:K,post_term:$,post_ancestor_id:C()({},Q,{comparers:[W,z],getEnvironmentValue:function(e,t){return Object(l.get)(t,"post_ancestors",[])}}),post_parent_id:Q,post_level:Q,post_format:Q,post_template:Q,term_level:Q,term_parent:C()({},Q,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(l.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(l.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:C()({},Q,{comparers:[W,z],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(l.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(l.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(l.get)(t,"term_ancestors",[])}}),user_role:Q},J=Object(o.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),X=Object(i.withEffects)(function(e,t){var n=t.context,r=Object(u.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(u.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(u.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),c=Object(u.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),d=Object(u.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),f=Object(u.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(s.pipe)(Object(s.merge)(r,o,i,c,d,f),Object(s.scan)(function(e,t){return a()(e,function(e){Object(l.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(l.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(l.get)(H,t.type);return r?r.isFulfiled(t,n):(console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=f()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o));c&&(c.hidden=!i),a&&(i&&!a.dataset.mounted&&(a.dataset.mounted=!0,Object(U.b)(t[o],n)),!i&&a.dataset.mounted&&(delete a.dataset.mounted,Object(R.unmountComponentAtNode)(a)))})}}});t.a=Object(r.compose)(J,X)(function(){return null})},function(e,t,n){"use strict";var r=n(3),o=n(6),i=n(0),c=n(14),a=n(1);function u(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var l=n(18),s=n(30),d=n.n(s);function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n-1}t.a=Object(c.withEffects)(function(){return Object(a.merge)(Object(a.pipe)(f(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(a.filter)(function(e){return m(e.$widget[0].id)}),Object(a.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(a.pipe)(f(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(a.filter)(function(e){var t=e.data;return Object(i.startsWith)(t,"deleted:")&&m(t)}),Object(a.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(r.select)("carbon-fields/metaboxes").getContainerById,n=Object(r.dispatch)("carbon-fields/metaboxes"),c=n.addContainer,a=n.removeContainer,s=n.addFields,d=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var f,m=e.payload,v=m.event,O=m.$widget,j=Object(i.flow)(u,JSON.parse)(O.find("[data-json]").data("json")),g=[];if("widget-updated"===v.type&&(f=t(j.id).fields.map(function(e){return e.id})),j.fields=j.fields.map(function(e){return Object(l.a)(e,j,g)}),s(g),c(j),"widget-updated"===v.type&&d(f),Object(p.b)(j,"classic"),window.cf.config.pagenow===b.c&&"widget-added"===v.type){var y=O.find('[name="widget-id"]').val();O.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(y).liveUpdateMode=!1}break;case"WIDGET_DELETED":var h=e.payload.data.replace("deleted:",""),w="".concat(b.a).concat(h),E=t(w);Object(o.unmountComponentAtNode)(document.querySelector(".container-".concat(w)));var x=_.map(E.fields,"id");a(w),d(x)}}}})(function(){return null})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";(function(e){var t=n(24),r=n.n(t),o=n(25),i=n.n(o),c=n(26),a=n.n(c),u=n(27),l=n.n(u),s=n(28),d=n.n(s),f=n(8),p=n.n(f),b=n(9),m=n.n(b),v=n(10),O=n.n(v),j=n(6),g=n(2),y=n(11),h=n(3),_=n(0),w=n(4),E=(n(46),n(29)),x=n(18),S=function(e){function t(){var e,n;r()(this,t);for(var o=arguments.length,i=new Array(o),c=0;c0&&n.toggleClass("fixed",e>=o).css("top",r)}}}))},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupState",function(){return v}),n.d(r,"updateState",function(){return O}),n.d(r,"updateFieldValue",function(){return j}),n.d(r,"addFields",function(){return g}),n.d(r,"cloneFields",function(){return y}),n.d(r,"removeFields",function(){return h}),n.d(r,"addContainer",function(){return _}),n.d(r,"removeContainer",function(){return w}),n.d(r,"receiveSidebar",function(){return E}),n.d(r,"lockSaving",function(){return x}),n.d(r,"unlockSaving",function(){return S});var o={};n.r(o),n.d(o,"getContainers",function(){return F}),n.d(o,"getContainerById",function(){return T}),n.d(o,"getFields",function(){return I}),n.d(o,"getFieldsByContainerId",function(){return C}),n.d(o,"getFieldById",function(){return A}),n.d(o,"isSavingLocked",function(){return D}),n.d(o,"isDirty",function(){return k}),n.d(o,"getComplexGroupValues",function(){return N});var i=n(5),c=n(3),a=n(0),u=n(9),l=n.n(u),s=n(7),d=n.n(s),f=n(10),p=n.n(f),b=n(4),m=Object(c.combineReducers)({containers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return p()(e,function(e){Object(a.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return p()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(a.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return p()(e,function(e){Object(a.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return p()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return p()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return p()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(a.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(b.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(b.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(a.assign)(e,Object(a.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(a.omit)(e,n);case"RECEIVE_SIDEBAR":return p()(e,function(e){Object(a.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return d()({},e,l()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(a.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function v(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function O(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function g(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function y(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function h(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function _(e){return{type:"ADD_CONTAINER",payload:e}}function w(e){return{type:"REMOVE_CONTAINER",payload:e}}function E(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function x(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function S(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function F(e){return e.containers}function T(e,t){return e.containers[t]}function I(e){return e.fields}function C(e,t){return Object(a.filter)(e.fields,["container_id",t])}function A(e,t){return e.fields[t]}function D(e){return Object.keys(e.savingLock).length>0}function k(e){return e.isDirty}function N(e,t){var n=Object(a.pick)(I(e),t);return n=Object(a.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(a.mapValues)(n,function(e){return e.value})}var G=n(22);Object(c.registerStore)("carbon-fields/metaboxes",{reducer:m,actions:r,selectors:o});var L=Object(G.a)(Object(a.get)(window.cf,"preloaded.containers",[])),P=L.containers,V=L.fields;Object(c.dispatch)("carbon-fields/metaboxes").setupState(Object(a.keyBy)(P,"id"),Object(a.keyBy)(V,"id"));var B=n(11),R=n(2),q=n(23),U=n(19),M=n.n(U),Q=n(12),K=n(15),W=n(1);function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Object(a.pick)(t,Object(a.difference)(Object(a.map)(e.fields,"id"),n))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(a.map)(e,function(e){return[e.id,"".concat(Object(a.repeat)("parent.",t)).concat(e.base_name)]})}var H=Object(b.withConditionalLogic)(function(e){var t=Object(c.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(W.pipe)(Object(W.merge)(Object(Q.a)(t(e.field.container_id)),Object(b.fromSelector)(t,e.field.container_id)),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(K.a)(a.isEqual))},function(e,t){t=Object(a.keyBy)(t,"id");var n=Object(c.select)("carbon-fields/metaboxes").getContainerById(e.field.container_id),r=[];if(Object(a.some)(n.fields,["id",e.id]))r=z(r=$(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(a.find)(t,function(t){return t.container_id===e.field.container_id&&Object(a.startsWith)(o,t.name)}),u=o.split(/\[|\]/g);u.shift(),(u=u.filter(function(e){return""!==e})).pop();var l=u.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=z(r=$(n,t,[i.id]),l+1);for(var s="".concat(i.id,".value");u.length>0;){var d=u.shift(),f=!isNaN(d),p=!f;if(f){s="".concat(s,"[").concat(d,"]");var b=$(Object(a.get)(t,s),t,[e.id]);r=r.concat(z(b,l)),s="".concat(s,".fields")}if(p){var m=Object(a.find)(Object(a.get)(t,s),["name",d]);s="".concat(m.id,".value"),l--}}}return r=r.map(function(e){var n=M()(e,2),r=n[0];return[n[1],Object(a.get)(t,"".concat(r,".value"))]}),Object(a.fromPairs)(r)}),J=n(20);n(43),n(48),n(49),n(50),n(51),n(52),n(54),Object(R.addFilter)("carbon-fields.sidebar.metabox","carbon-fields/metaboxes",Object(c.withDispatch)(function(e){return{onAdded:e("carbon-fields/metaboxes").receiveSidebar}})),n(55),Object(R.addFilter)("carbon-fields.field-edit.metabox","carbon-fields/metaboxes",Object(B.compose)(q.a,H,Object(c.withDispatch)(function(e){if(Object(J.a)()){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}var n=e("carbon-fields/metaboxes");return{lockSaving:n.lockSaving,unlockSaving:n.unlockSaving}}),b.withValidation));var X=n(33),Y=n(21);Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var Z=Object(J.a)()?"gutenberg":"classic";Object(Y.a)(Z),Object(X.a)(Z)},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(2),c=n(3),a=n(14),u=n(1),l=n(30),s=n.n(l),d=n(22);n(61),Object(i.addFilter)("carbon-fields.term_meta.classic","carbon-fields/metaboxes",Object(a.withEffects)(function(){return Object(u.pipe)((e="ajaxSuccess","add-tag",s()(function(t){var n=function(e,n,o,i){Object(r.isString)(o.data)&&o.data.indexOf("add-tag")>-1&&t(1,{event:e,xhr:n,settings:o,data:i})}.handler;return window.jQuery(document).on(e,{handler:n}),function(){window.jQuery(document).off(e,{handler:n})}})),Object(u.filter)(function(e){var t=e.settings,n=e.data;return t.data.indexOf("carbon_fields_container")>-1&&!n.documentElement.querySelector("wp_error")}));var e},{handler:function(e){return function(){var t=o.a.map(e.container.fields,"id"),n=Object(d.a)(o.a.get(window.cf,"preloaded.containers",[])),r=n.containers,i=n.fields,a=o.a.find(r,["id",e.id]),u=o.a.filter(i,["container_id",e.id]),l=Object(c.dispatch)("carbon-fields/metaboxes"),s=l.updateState,f=l.removeFields;s(o.a.keyBy([a],"id"),o.a.keyBy(u,"id")),f(t)}}}))},function(e,t,n){"use strict";var r=n(11),o=n(2),i=n(4),c=n(3),a=Object(r.createHigherOrderComponent)(function(e){return Object(c.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(o.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(r.compose)(a,Object(i.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)})}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=66)}([function(e,t){e.exports=cf.vendor.lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=cf.vendor["@wordpress/data"]},function(e,t){e.exports=cf.vendor["@wordpress/hooks"]},function(e,t){e.exports=cf.core},function(e,t){e.exports=cf.vendor["@wordpress/i18n"]},function(e,t,n){var r=n(9);e.exports=function(e){for(var t=1;t(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=cf.vendor.classnames},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return c});var r=n(4),o=Object(r.createRegistry)("container",["classic","gutenberg"]),i=o.registerContainerType,c=o.getContainerType},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return l});var r=n(7),o=n(34),i=n(38),c=n(39),a=n(37),u=n(20),s=n(17);function l(t){var n=window.cf.config.pagenow;Object(r.render)(e.createElement(r.Fragment,null,!Object(u.a)()&&e.createElement(o.a,null),(n===s.d||n===s.c)&&e.createElement(c.a,null),e.createElement(i.a,{context:t})),document.createElement("div"));var l=document.querySelector("#poststuff");l&&Object(r.render)(e.createElement(a.a,null),l.appendChild(document.createElement("div")))}}).call(this,n(7))},function(e,t,n){"use strict";var r=n(13),o=n(2),i=n(4);t.a=Object(r.withEffects)(function(){return Object(i.fromSelector)(Object(o.select)("carbon-fields/metaboxes").isSavingLocked)},{handler:function(){return function(e){document.querySelectorAll('\n\t\t\t#publishing-action input#publish,\n\t\t\t#publishing-action input#save,\n\t\t\t#addtag input#submit,\n\t\t\t#edittag input[type="submit"],\n\t\t\t#your-profile input#submit\n\t\t').forEach(function(t){t.disabled=e})}}})(function(){return null})},function(e,t){e.exports=(e=>t=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),i=n(24),c=n.n(i),a=n(25),u=n.n(a),s=n(26),l=n.n(s),d=n(27),f=n.n(d),p=n(28),b=n.n(p),m=n(8),v=n.n(m),O=n(9),j=n.n(O),g=n(31),y=n.n(g),h=n(7),_=n(0),w=n(4),E=(n(65),n(29)),x=function(t){function n(){var e,t;c()(this,n);for(var r=arguments.length,o=new Array(r),i=0;it=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})},m=n(14),v=n(4);function O(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function j(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function g(e){for(var t=[],n=e,r=j(e);r>0&&n;)if(j(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var y={post_ancestors:[],post_parent_id:0,post_level:1};function h(e){var t=e.options[e.selectedIndex];return{post_ancestors:g(t),post_parent_id:O(t),post_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return h(e.target)}),b(h(e))):Object(p.a)(y)}),Object(u.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(l.pipe)(Object(l.combine)(Object(v.fromSelector)(Object(o.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"parent")),Object(m.a)(s.isEqual),Object(l.map)(function(e){var r=f()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return y;var a=t(i);if(!Object(s.get)(a,["hierarchical"],!1))return y;var u=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(s.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:u,post_parent_id:c,post_level:u.length+1}}))});var _=n(35),w=n.n(_),E=(e,t,n)=>w()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),x={post_format:"standard"};function S(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(u.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(l.pipe)(E(e,"input.post-format","change"),Object(l.map)(function(e){return S(e.target)}),b(S(e.querySelector("input.post-format:checked")))):Object(p.a)(x)}),Object(u.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"format"),Object(m.a)(),Object(l.filter)(Boolean),Object(l.map)(function(e){return{post_format:e}}),b(x))});var F={post_template:""};function I(e){return{post_template:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return I(e.target)}),b(I(e))):Object(p.a)(F)}),Object(u.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"template"),Object(m.a)(),Object(l.filter)(s.isString),Object(l.map)(function(e){return{post_template:e}}),b(F))});var T=n(6),C=n.n(T),A=n(9),D=n.n(A),N=n(16),k=n.n(N);function G(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(G(window.tagBox,"parseTags"),G(window.tagBox,"flushTags")),Object(u.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(l.pipe)(l.merge.apply(void 0,k()((e=document.querySelectorAll('div[id^="taxonomy-"]'),k()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(l.pipe)(E(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(l.scan)(function(e,n){var r=n.target;return a()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(s.pull)(e[t],n)})},D()({},t,[])),b(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return k()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},D()({},e,[]))}(t)))}))).concat(k()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return k()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(l.pipe)(Object(l.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(l.map)(function(e){var n=e.target;return D()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),b(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return D()({},e,n)}(t)))})}()))),Object(l.scan)(function(e,t){return{post_term:C()({},e.post_term,t)}},{post_term:{}}));var e}),Object(u.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core").getTaxonomies,t=Object(o.select)("core/editor").getEditedPostAttribute;return Object(l.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(l.filter)(Boolean),Object(l.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(s.fromPairs)(n)}}))});var L={term_ancestors:[],term_parent:0,term_level:1};function P(e){var t=e.options[e.selectedIndex];return{term_ancestors:g(t),term_parent:O(t),term_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return P(e.target)}),b(P(e))):Object(p.a)(L)});var V={user_role:""};function B(e){return{user_role:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return t?Object(p.a)({user_role:t.dataset.profileRole}):Object(p.a)(V)}return Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return B(e.target)}),b(B(e)))});var R=n(7),q=n(5),U=n(21),M={operators:[],isOperatorSupported:function(e){return this.operators.indexOf(e)>-1},evaluate:function(){return!1}},Q={comparers:[C()({},M,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),C()({},M,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),C()({},M,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(s.intersection)(e,n).length;default:return!1}}}),H={boolean:K,post_term:$,post_ancestor_id:C()({},Q,{comparers:[W,z],getEnvironmentValue:function(e,t){return Object(s.get)(t,"post_ancestors",[])}}),post_parent_id:Q,post_level:Q,post_format:Q,post_template:Q,term_level:Q,term_parent:C()({},Q,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:C()({},Q,{comparers:[W,z],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(s.get)(t,"term_ancestors",[])}}),user_role:Q},J=Object(o.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),X=Object(i.withEffects)(function(e,t){var n=t.context,r=Object(u.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(u.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(u.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),c=Object(u.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),d=Object(u.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),f=Object(u.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(l.pipe)(Object(l.merge)(r,o,i,c,d,f),Object(l.scan)(function(e,t){return a()(e,function(e){Object(s.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(s.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(s.get)(H,t.type);return r?r.isFulfiled(t,n):(console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=f()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o));c&&(c.hidden=!i),a&&(i&&!a.dataset.mounted&&(a.dataset.mounted=!0,Object(U.b)(t[o],n)),!i&&a.dataset.mounted&&(delete a.dataset.mounted,Object(R.unmountComponentAtNode)(a)))})}}});t.a=Object(r.compose)(J,X)(function(){return null})},function(e,t,n){"use strict";var r=n(2),o=n(7),i=n(0),c=n(13),a=n(1);function u(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var s=n(18),l=n(30),d=n.n(l);function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n-1}t.a=Object(c.withEffects)(function(){return Object(a.merge)(Object(a.pipe)(f(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(a.filter)(function(e){return m(e.$widget[0].id)}),Object(a.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(a.pipe)(f(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(a.filter)(function(e){var t=e.data;return Object(i.startsWith)(t,"deleted:")&&m(t)}),Object(a.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(r.select)("carbon-fields/metaboxes").getContainerById,n=Object(r.dispatch)("carbon-fields/metaboxes"),c=n.addContainer,a=n.removeContainer,l=n.addFields,d=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var f,m=e.payload,v=m.event,O=m.$widget,j=Object(i.flow)(u,JSON.parse)(O.find("[data-json]").data("json")),g=[];if("widget-updated"===v.type&&(f=t(j.id).fields.map(function(e){return e.id})),j.fields=j.fields.map(function(e){return Object(s.a)(e,j,g)}),l(g),c(j),"widget-updated"===v.type&&d(f),Object(p.b)(j,"classic"),window.cf.config.pagenow===b.c&&"widget-added"===v.type){var y=O.find('[name="widget-id"]').val();O.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(y).liveUpdateMode=!1}break;case"WIDGET_DELETED":var h=e.payload.data.replace("deleted:",""),w="".concat(b.a).concat(h),E=t(w);Object(o.unmountComponentAtNode)(document.querySelector(".container-".concat(w)));var x=_.map(E.fields,"id");a(w),d(x)}}}})(function(){return null})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";(function(e){var t=n(24),r=n.n(t),o=n(25),i=n.n(o),c=n(26),a=n.n(c),u=n(27),s=n.n(u),l=n(28),d=n.n(l),f=n(8),p=n.n(f),b=n(9),m=n.n(b),v=n(10),O=n.n(v),j=n(7),g=n(3),y=n(11),h=n(2),_=n(0),w=n(4),E=(n(46),n(29)),x=n(18),S=function(e){function t(){var e,n;r()(this,t);for(var o=arguments.length,i=new Array(o),c=0;c0&&n.toggleClass("fixed",e>=o).css("top",r)}}}))},function(e,t,n){},function(e,t,n){"use strict";n(64)},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupState",function(){return v}),n.d(r,"updateState",function(){return O}),n.d(r,"updateFieldValue",function(){return j}),n.d(r,"addFields",function(){return g}),n.d(r,"cloneFields",function(){return y}),n.d(r,"removeFields",function(){return h}),n.d(r,"addContainer",function(){return _}),n.d(r,"removeContainer",function(){return w}),n.d(r,"receiveSidebar",function(){return E}),n.d(r,"lockSaving",function(){return x}),n.d(r,"unlockSaving",function(){return S});var o={};n.r(o),n.d(o,"getContainers",function(){return F}),n.d(o,"getContainerById",function(){return I}),n.d(o,"getFields",function(){return T}),n.d(o,"getFieldsByContainerId",function(){return C}),n.d(o,"getFieldById",function(){return A}),n.d(o,"isSavingLocked",function(){return D}),n.d(o,"isDirty",function(){return N}),n.d(o,"getComplexGroupValues",function(){return k});var i=n(5),c=n(2),a=n(0),u=n(9),s=n.n(u),l=n(6),d=n.n(l),f=n(10),p=n.n(f),b=n(4),m=Object(c.combineReducers)({containers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return p()(e,function(e){Object(a.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return p()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(a.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return p()(e,function(e){Object(a.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return p()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return p()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return p()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(a.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(b.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(b.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(a.assign)(e,Object(a.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(a.omit)(e,n);case"RECEIVE_SIDEBAR":return p()(e,function(e){Object(a.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return d()({},e,s()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(a.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function v(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function O(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function g(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function y(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function h(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function _(e){return{type:"ADD_CONTAINER",payload:e}}function w(e){return{type:"REMOVE_CONTAINER",payload:e}}function E(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function x(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function S(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function F(e){return e.containers}function I(e,t){return e.containers[t]}function T(e){return e.fields}function C(e,t){return Object(a.filter)(e.fields,["container_id",t])}function A(e,t){return e.fields[t]}function D(e){return Object.keys(e.savingLock).length>0}function N(e){return e.isDirty}function k(e,t){var n=Object(a.pick)(T(e),t);return n=Object(a.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(a.mapValues)(n,function(e){return e.value})}var G=n(22);Object(c.registerStore)("carbon-fields/metaboxes",{reducer:m,actions:r,selectors:o});var L=Object(G.a)(Object(a.get)(window.cf,"preloaded.containers",[])),P=L.containers,V=L.fields;Object(c.dispatch)("carbon-fields/metaboxes").setupState(Object(a.keyBy)(P,"id"),Object(a.keyBy)(V,"id"));var B=n(11),R=n(3),q=n(23),U=n(19),M=n.n(U),Q=n(12),K=n(14),W=n(1);function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Object(a.pick)(t,Object(a.difference)(Object(a.map)(e.fields,"id"),n))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(a.map)(e,function(e){return[e.id,"".concat(Object(a.repeat)("parent.",t)).concat(e.base_name)]})}var H=Object(b.withConditionalLogic)(function(e){var t=Object(c.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(W.pipe)(Object(W.merge)(Object(Q.a)(t(e.field.container_id)),Object(b.fromSelector)(t,e.field.container_id)),Object(K.a)(a.isEqual))},function(e,t){t=Object(a.keyBy)(t,"id");var n=Object(c.select)("carbon-fields/metaboxes").getContainerById(e.field.container_id),r=[];if(Object(a.some)(n.fields,["id",e.id]))r=z(r=$(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(a.find)(t,function(t){return t.container_id===e.field.container_id&&Object(a.startsWith)(o,t.name)}),u=o.split(/\[|\]/g);u.shift(),(u=u.filter(function(e){return""!==e})).pop();var s=u.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=z(r=$(n,t,[i.id]),s+1);for(var l="".concat(i.id,".value");u.length>0;){var d=u.shift(),f=!isNaN(d),p=!f;if(f){l="".concat(l,"[").concat(d,"]");var b=$(Object(a.get)(t,l),t,[e.id]);r=r.concat(z(b,s)),l="".concat(l,".fields")}if(p){var m=Object(a.find)(Object(a.get)(t,l),["name",d]);l="".concat(m.id,".value"),s--}}}return r=r.map(function(e){var n=M()(e,2),r=n[0];return[n[1],Object(a.get)(t,"".concat(r,".value"))]}),Object(a.fromPairs)(r)}),J=n(20);n(43),n(48),n(49),n(50),n(51),n(52),n(54),Object(R.addFilter)("carbon-fields.sidebar.metabox","carbon-fields/metaboxes",Object(c.withDispatch)(function(e){return{onAdded:e("carbon-fields/metaboxes").receiveSidebar}})),Object(R.addFilter)("carbon-fields.field-edit.metabox","carbon-fields/metaboxes",Object(B.compose)(q.a,H,Object(c.withDispatch)(function(e){if(Object(J.a)()){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}var n=e("carbon-fields/metaboxes");return{lockSaving:n.lockSaving,unlockSaving:n.unlockSaving}}),b.withValidation));var X=n(33),Y=n(21);Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var Z=Object(J.a)()?"gutenberg":"classic";Object(Y.a)(Z),Object(X.a)(Z)},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(3),c=n(2),a=n(13),u=n(1),s=n(30),l=n.n(s),d=n(22);n(60),Object(i.addFilter)("carbon-fields.term_meta.classic","carbon-fields/metaboxes",Object(a.withEffects)(function(){return Object(u.pipe)((e="ajaxSuccess","add-tag",l()(function(t){var n=function(e,n,o,i){Object(r.isString)(o.data)&&o.data.indexOf("add-tag")>-1&&t(1,{event:e,xhr:n,settings:o,data:i})}.handler;return window.jQuery(document).on(e,{handler:n}),function(){window.jQuery(document).off(e,{handler:n})}})),Object(u.filter)(function(e){var t=e.settings,n=e.data;return t.data.indexOf("carbon_fields_container")>-1&&!n.documentElement.querySelector("wp_error")}));var e},{handler:function(e){return function(){var t=o.a.map(e.container.fields,"id"),n=Object(d.a)(o.a.get(window.cf,"preloaded.containers",[])),r=n.containers,i=n.fields,a=o.a.find(r,["id",e.id]),u=o.a.filter(i,["container_id",e.id]),s=Object(c.dispatch)("carbon-fields/metaboxes"),l=s.updateState,f=s.removeFields;l(o.a.keyBy([a],"id"),o.a.keyBy(u,"id")),f(t)}}}))},function(e,t,n){"use strict";var r=n(11),o=n(3),i=n(4),c=n(2),a=Object(r.createHigherOrderComponent)(function(e){return Object(c.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(o.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(r.compose)(a,Object(i.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)})}]); \ No newline at end of file diff --git a/build/classic/report.html b/build/classic/report.html deleted file mode 100644 index cb41bc0f3..000000000 --- a/build/classic/report.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - Webpack Bundle Analyzer - - - - - - - - - -
- - - diff --git a/build/gutenberg/blocks.css b/build/gutenberg/blocks.css index 1f81253cb..030c82c6b 100644 --- a/build/gutenberg/blocks.css +++ b/build/gutenberg/blocks.css @@ -302,6 +302,42 @@ .block-editor .cf-map__search:focus-within ~ .cf-map__canvas { border-color: #00a0d2; } +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Multiselect + ========================================================================== */ +.wp-block .cf-multiselect__control { + border-radius: 0; } + +.edit-post-sidebar .cf-multiselect__control, +.edit-post-sidebar .cf-multiselect__control:hover { + border-color: #8d96a0; } + +.edit-post-sidebar .cf-multiselect__control--is-focused, +.edit-post-sidebar .cf-multiselect__control--is-focused:hover { + border-color: #00a0d2; + box-shadow: 0 0 0 1px #00a0d2; } + /* ========================================================================== Colors ========================================================================== */ diff --git a/build/gutenberg/blocks.js b/build/gutenberg/blocks.js index 1a8302f5c..956806eab 100644 --- a/build/gutenberg/blocks.js +++ b/build/gutenberg/blocks.js @@ -469,7 +469,7 @@ eval("const take = max => source => (start, sink) => {\n if (start !== 0) retur /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/editor */ \"@wordpress/editor\");\n/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_editor__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/components/block-edit/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../field */ \"./packages/blocks/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar BlockEdit =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(BlockEdit, _Component);\n\n function BlockEdit() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, BlockEdit);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(BlockEdit)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n mode: 'edit'\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFieldChange\", function (fieldId, value) {\n var _this$props = _this.props,\n attributes = _this$props.attributes,\n setAttributes = _this$props.setAttributes;\n var fieldName = fieldId.replace(/^.+__(.+)?$/, '$1');\n setAttributes({\n data: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, attributes.data, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()({}, fieldName, value))\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleModeChange\", function () {\n _this.setState({\n mode: _this.isInEditMode ? 'preview' : 'edit'\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(BlockEdit, [{\n key: \"renderFields\",\n\n /**\n * Renders the fields.\n *\n * @return {Object}\n */\n value: function renderFields() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n clientId = _this$props2.clientId,\n fields = _this$props2.fields,\n attributes = _this$props2.attributes;\n return wp.element.createElement(\"div\", {\n className: \"cf-block__fields\"\n }, fields.map(function (field, index) {\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_14__[\"getFieldType\"])(field.type, 'block');\n\n if (!FieldEdit) {\n return null;\n }\n\n var id = \"cf-\".concat(clientId, \"__\").concat(field.base_name);\n var value = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(attributes.data, field.base_name, field.default_value);\n return wp.element.createElement(_field__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n key: index,\n id: id,\n field: field\n }, wp.element.createElement(FieldEdit, {\n id: id,\n blockId: clientId,\n value: value,\n field: field,\n onChange: _this2.handleFieldChange\n }));\n }));\n }\n /**\n * Render the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var _this$props3 = this.props,\n name = _this$props3.name,\n attributes = _this$props3.attributes,\n supportsPreview = _this$props3.supportsPreview;\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Fragment\"], null, supportsPreview && wp.element.createElement(_wordpress_editor__WEBPACK_IMPORTED_MODULE_10__[\"BlockControls\"], null, wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__[\"Toolbar\"], {\n controls: [{\n icon: this.isInEditMode ? 'visibility' : 'hidden',\n title: this.isInEditMode ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Show preview', 'carbon-fields-ui') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Hide preview', 'carbon-fields-ui'),\n onClick: this.handleModeChange\n }]\n })), this.isInEditMode && this.renderFields(), this.isInPreviewMode && wp.element.createElement(\"div\", {\n className: \"cf-block__preview\"\n }, wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__[\"ServerSideRender\"], {\n block: name,\n attributes: attributes\n })), this.isInPreviewMode && wp.element.createElement(_wordpress_editor__WEBPACK_IMPORTED_MODULE_10__[\"InspectorControls\"], null, wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__[\"PanelBody\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Fields', 'carbon-fields-ui')\n }, this.renderFields())));\n }\n }, {\n key: \"isInEditMode\",\n\n /**\n * Returns whether the block is in edit mode.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.state.mode === 'edit';\n }\n /**\n * Returns whether the block is in edit mode.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isInPreviewMode\",\n get: function get() {\n return this.state.mode === 'preview';\n }\n }]);\n\n return BlockEdit;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withSelect\"])(function (select, _ref) {\n var name = _ref.name;\n\n var _select = select('core/blocks'),\n hasBlockSupport = _select.hasBlockSupport;\n\n var _select2 = select('carbon-fields/blocks'),\n getFieldDefinitionsByBlockName = _select2.getFieldDefinitionsByBlockName;\n\n return {\n fields: getFieldDefinitionsByBlockName(name),\n supportsPreview: hasBlockSupport(name, 'preview')\n };\n})(BlockEdit));\n\n//# sourceURL=webpack:///./packages/blocks/components/block-edit/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/editor */ \"@wordpress/editor\");\n/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_editor__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/components/block-edit/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../field */ \"./packages/blocks/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar BlockEdit =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(BlockEdit, _Component);\n\n function BlockEdit() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, BlockEdit);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(BlockEdit)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n mode: 'edit'\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFieldChange\", function (fieldId, value) {\n var _this$props = _this.props,\n attributes = _this$props.attributes,\n setAttributes = _this$props.setAttributes;\n var fieldName = fieldId.replace(/^.+__(.+)?$/, '$1');\n setAttributes({\n data: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, attributes.data, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()({}, fieldName, value))\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleModeChange\", function () {\n _this.setState({\n mode: _this.isInEditMode ? 'preview' : 'edit'\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(BlockEdit, [{\n key: \"renderFields\",\n\n /**\n * Renders the fields.\n *\n * @return {Object}\n */\n value: function renderFields() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n clientId = _this$props2.clientId,\n fields = _this$props2.fields,\n attributes = _this$props2.attributes;\n return wp.element.createElement(\"div\", {\n className: \"cf-block__fields\"\n }, fields.map(function (field, index) {\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_14__[\"getFieldType\"])(field.type, 'block');\n\n if (!FieldEdit) {\n return null;\n }\n\n var id = \"cf-\".concat(clientId, \"__\").concat(field.base_name);\n var value = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(attributes.data, field.base_name, field.default_value);\n return wp.element.createElement(_field__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n key: index,\n id: id,\n field: field\n }, wp.element.createElement(FieldEdit, {\n id: id,\n blockId: clientId,\n value: value,\n field: field,\n name: field.base_name,\n onChange: _this2.handleFieldChange\n }));\n }));\n }\n /**\n * Render the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var _this$props3 = this.props,\n name = _this$props3.name,\n attributes = _this$props3.attributes,\n supportsPreview = _this$props3.supportsPreview;\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Fragment\"], null, supportsPreview && wp.element.createElement(_wordpress_editor__WEBPACK_IMPORTED_MODULE_10__[\"BlockControls\"], null, wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__[\"Toolbar\"], {\n controls: [{\n icon: this.isInEditMode ? 'visibility' : 'hidden',\n title: this.isInEditMode ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Show preview', 'carbon-fields-ui') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Hide preview', 'carbon-fields-ui'),\n onClick: this.handleModeChange\n }]\n })), this.isInEditMode && this.renderFields(), this.isInPreviewMode && wp.element.createElement(\"div\", {\n className: \"cf-block__preview\"\n }, wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__[\"ServerSideRender\"], {\n block: name,\n attributes: attributes\n })), this.isInPreviewMode && wp.element.createElement(_wordpress_editor__WEBPACK_IMPORTED_MODULE_10__[\"InspectorControls\"], null, wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__[\"PanelBody\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Fields', 'carbon-fields-ui')\n }, this.renderFields())));\n }\n }, {\n key: \"isInEditMode\",\n\n /**\n * Returns whether the block is in edit mode.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.state.mode === 'edit';\n }\n /**\n * Returns whether the block is in edit mode.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isInPreviewMode\",\n get: function get() {\n return this.state.mode === 'preview';\n }\n }]);\n\n return BlockEdit;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withSelect\"])(function (select, _ref) {\n var name = _ref.name;\n\n var _select = select('core/blocks'),\n hasBlockSupport = _select.hasBlockSupport;\n\n var _select2 = select('carbon-fields/blocks'),\n getFieldDefinitionsByBlockName = _select2.getFieldDefinitionsByBlockName;\n\n return {\n fields: getFieldDefinitionsByBlockName(name),\n supportsPreview: hasBlockSupport(name, 'preview')\n };\n})(BlockEdit));\n\n//# sourceURL=webpack:///./packages/blocks/components/block-edit/index.js?"); /***/ }), @@ -562,7 +562,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/field */ \"./packages/blocks/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n collapsedGroups: []\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n value = _this$props.value,\n onChange = _this$props.onChange;\n var data = {};\n data._id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__[\"uniqueId\"])();\n data._type = group.name;\n group.fields.reduce(function (accumulator, field) {\n accumulator[field.base_name] = field.default_value;\n return accumulator;\n }, data);\n onChange(id, value.concat(data));\n callback(data);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n onChange = _this$props2.onChange;\n var index = value.indexOf(group);\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"cloneDeep\"])(group);\n clonedGroup._id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__[\"uniqueId\"])();\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n draft.splice(index + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n onChange = _this$props3.onChange;\n var groupIndex = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"findIndex\"])(value, ['_id', group._id]);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n draft.splice(groupIndex, 1);\n }));\n\n _this.setState(function (_ref) {\n var collapsedGroups = _ref.collapsedGroups;\n return {\n collapsedGroups: Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"without\"])(collapsedGroups, group._id)\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleGroup\", function (groupId) {\n _this.setState(function (_ref2) {\n var collapsedGroups = _ref2.collapsedGroups;\n\n if (collapsedGroups.indexOf(groupId) > -1) {\n collapsedGroups = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"without\"])(collapsedGroups, groupId);\n } else {\n collapsedGroups = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(collapsedGroups).concat([groupId]);\n }\n\n return {\n collapsedGroups: collapsedGroups\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleAllGroups\", function () {\n var value = _this.props.value;\n\n _this.setState(function (_ref3) {\n var collapsedGroups = _ref3.collapsedGroups;\n\n if (collapsedGroups.length !== value.length) {\n collapsedGroups = value.map(function (group) {\n return group._id;\n });\n } else {\n collapsedGroups = [];\n }\n\n return {\n collapsedGroups: collapsedGroups\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleGroupSetup\", function (group, props) {\n var fields = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"get\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"find\"])(_this.props.field.groups, ['name', group._type]), 'fields', []);\n var values = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"omit\"])(group, ['_id', '_type']);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"assign\"])({}, props, {\n key: group._id,\n id: group._id,\n fields: fields,\n collapsed: _this.state.collapsedGroups.indexOf(group._id) > -1,\n context: 'block',\n values: values\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n var blockId = _this.props.blockId;\n var id = \"\".concat(_this.props.id, \"__\").concat(groupProps.id, \"__\").concat(field.base_name);\n var value = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"get\"])(groupProps, \"values.\".concat(field.base_name));\n return [_components_field__WEBPACK_IMPORTED_MODULE_14__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"assign\"])({}, props, {\n key: id,\n id: id,\n blockId: blockId,\n field: field,\n value: value,\n onChange: _this.handleGroupFieldChange\n })];\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleGroupFieldChange\", function (fieldId, fieldValue) {\n var _this$props4 = _this.props,\n id = _this$props4.id,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n var path = fieldId.split('__');\n var fieldName = path.pop();\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"find\"])(draft, ['_id', path.pop()]);\n Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"set\"])(group, fieldName, fieldValue);\n }));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexField, [{\n key: \"getGroupValues\",\n\n /**\n * Returns a list of group values.\n *\n * @return {Array}\n */\n value: function getGroupValues() {\n return this.props.value.map(function (group) {\n var values = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"mapKeys\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"omit\"])(group, ['_id', '_type']), function (value, key) {\n return key.replace(/\\-/g, '_');\n });\n return [group._type, values];\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} group\n * @param {Function} callback\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props5 = this.props,\n value = _this$props5.value,\n children = _this$props5.children;\n var groupValues = this.getGroupValues();\n var allGroupsAreCollapsed = this.state.collapsedGroups.length === value.length;\n return children({\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.block', 'carbon-fields/blocks', function (OriginalComplexField) {\n return function (props) {\n var id = props.id,\n name = props.name,\n value = props.value,\n error = props.error,\n field = props.field;\n return wp.element.createElement(ComplexField, props, function (_ref4) {\n var groupValues = _ref4.groupValues,\n allGroupsAreCollapsed = _ref4.allGroupsAreCollapsed,\n handleGroupSetup = _ref4.handleGroupSetup,\n handleGroupFieldSetup = _ref4.handleGroupFieldSetup,\n handleAddGroup = _ref4.handleAddGroup,\n handleCloneGroup = _ref4.handleCloneGroup,\n handleRemoveGroup = _ref4.handleRemoveGroup,\n handleToggleGroup = _ref4.handleToggleGroup,\n handleToggleAllGroups = _ref4.handleToggleAllGroups;\n return wp.element.createElement(OriginalComplexField, {\n groupIdKey: \"_id\",\n groupFilterKey: \"_type\",\n id: id,\n name: name,\n value: value,\n error: error,\n field: field,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n };\n});\n\n//# sourceURL=webpack:///./packages/blocks/fields/complex/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/field */ \"./packages/blocks/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n collapsedGroups: _this.props.value.reduce(function (accumulator, _ref) {\n var _id = _ref._id,\n _type = _ref._type;\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"find\"])(_this.props.field.groups, ['name', _type]);\n\n if (!group.collapsed) {\n return accumulator;\n }\n\n return accumulator.concat(_id);\n }, [])\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n value = _this$props.value,\n onChange = _this$props.onChange;\n var data = {};\n data._id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__[\"uniqueId\"])();\n data._type = group.name;\n group.fields.reduce(function (accumulator, field) {\n accumulator[field.base_name] = field.default_value;\n return accumulator;\n }, data);\n onChange(id, value.concat(data));\n callback(data);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n onChange = _this$props2.onChange;\n var index = value.indexOf(group);\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"cloneDeep\"])(group);\n clonedGroup._id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__[\"uniqueId\"])();\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n draft.splice(index + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n onChange = _this$props3.onChange;\n var groupIndex = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"findIndex\"])(value, ['_id', group._id]);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n draft.splice(groupIndex, 1);\n }));\n\n _this.setState(function (_ref2) {\n var collapsedGroups = _ref2.collapsedGroups;\n return {\n collapsedGroups: Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"without\"])(collapsedGroups, group._id)\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleGroup\", function (groupId) {\n _this.setState(function (_ref3) {\n var collapsedGroups = _ref3.collapsedGroups;\n\n if (collapsedGroups.indexOf(groupId) > -1) {\n collapsedGroups = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"without\"])(collapsedGroups, groupId);\n } else {\n collapsedGroups = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(collapsedGroups).concat([groupId]);\n }\n\n return {\n collapsedGroups: collapsedGroups\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleAllGroups\", function () {\n var value = _this.props.value;\n\n _this.setState(function (_ref4) {\n var collapsedGroups = _ref4.collapsedGroups;\n\n if (collapsedGroups.length !== value.length) {\n collapsedGroups = value.map(function (group) {\n return group._id;\n });\n } else {\n collapsedGroups = [];\n }\n\n return {\n collapsedGroups: collapsedGroups\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleGroupSetup\", function (group, props) {\n var fields = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"get\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"find\"])(_this.props.field.groups, ['name', group._type]), 'fields', []);\n var values = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"omit\"])(group, ['_id', '_type']);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"assign\"])({}, props, {\n key: group._id,\n id: group._id,\n fields: fields,\n collapsed: _this.state.collapsedGroups.indexOf(group._id) > -1,\n context: 'block',\n values: values\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n var blockId = _this.props.blockId;\n var id = \"\".concat(_this.props.id, \"__\").concat(groupProps.id, \"__\").concat(field.base_name);\n var value = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"get\"])(groupProps, \"values.\".concat(field.base_name));\n return [_components_field__WEBPACK_IMPORTED_MODULE_14__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"assign\"])({}, props, {\n key: id,\n id: id,\n name: field.base_name,\n blockId: blockId,\n field: field,\n value: value,\n onChange: _this.handleGroupFieldChange\n })];\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleGroupFieldChange\", function (fieldId, fieldValue) {\n var _this$props4 = _this.props,\n id = _this$props4.id,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n var path = fieldId.split('__');\n var fieldName = path.pop();\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"find\"])(draft, ['_id', path.pop()]);\n Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"set\"])(group, fieldName, fieldValue);\n }));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexField, [{\n key: \"getGroupValues\",\n\n /**\n * Returns a list of group values.\n *\n * @return {Array}\n */\n value: function getGroupValues() {\n return this.props.value.map(function (group) {\n var values = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"mapKeys\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"omit\"])(group, ['_id', '_type']), function (value, key) {\n return key.replace(/\\-/g, '_');\n });\n return [group._type, values];\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} group\n * @param {Function} callback\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props5 = this.props,\n value = _this$props5.value,\n children = _this$props5.children;\n var groupValues = this.getGroupValues();\n var allGroupsAreCollapsed = this.state.collapsedGroups.length === value.length;\n return children({\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.block', 'carbon-fields/blocks', function (OriginalComplexField) {\n return function (props) {\n var id = props.id,\n name = props.name,\n value = props.value,\n error = props.error,\n field = props.field;\n return wp.element.createElement(ComplexField, props, function (_ref5) {\n var groupValues = _ref5.groupValues,\n allGroupsAreCollapsed = _ref5.allGroupsAreCollapsed,\n handleGroupSetup = _ref5.handleGroupSetup,\n handleGroupFieldSetup = _ref5.handleGroupFieldSetup,\n handleAddGroup = _ref5.handleAddGroup,\n handleCloneGroup = _ref5.handleCloneGroup,\n handleRemoveGroup = _ref5.handleRemoveGroup,\n handleToggleGroup = _ref5.handleToggleGroup,\n handleToggleAllGroups = _ref5.handleToggleAllGroups;\n return wp.element.createElement(OriginalComplexField, {\n groupIdKey: \"_id\",\n groupFilterKey: \"_type\",\n id: id,\n name: name,\n value: value,\n error: error,\n field: field,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n };\n});\n\n//# sourceURL=webpack:///./packages/blocks/fields/complex/index.js?"); /***/ }), @@ -577,18 +577,6 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ }), -/***/ "./packages/blocks/fields/date/index.js": -/*!**********************************************!*\ - !*** ./packages/blocks/fields/date/index.js ***! - \**********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.date.block', 'carbon-fields/blocks', function (OriginalDatetimeField) {\n return function (props) {\n return wp.element.createElement(OriginalDatetimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Date', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack:///./packages/blocks/fields/date/index.js?"); - -/***/ }), - /***/ "./packages/blocks/fields/datetime/index.js": /*!**************************************************!*\ !*** ./packages/blocks/fields/datetime/index.js ***! @@ -691,7 +679,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/blocks/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./association */ \"./packages/blocks/fields/association/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./complex */ \"./packages/blocks/fields/complex/index.js\");\n/* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./date */ \"./packages/blocks/fields/date/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./datetime */ \"./packages/blocks/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./file */ \"./packages/blocks/fields/file/index.js\");\n/* harmony import */ var _footer_scripts__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./footer-scripts */ \"./packages/blocks/fields/footer-scripts/index.js\");\n/* harmony import */ var _header_scripts__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./header-scripts */ \"./packages/blocks/fields/header-scripts/index.js\");\n/* harmony import */ var _hidden__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./hidden */ \"./packages/blocks/fields/hidden/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./image */ \"./packages/blocks/fields/image/index.js\");\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./map */ \"./packages/blocks/fields/map/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./media-gallery */ \"./packages/blocks/fields/media-gallery/index.js\");\n/* harmony import */ var _oembed__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./oembed */ \"./packages/blocks/fields/oembed/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./radio */ \"./packages/blocks/fields/radio/index.js\");\n/* harmony import */ var _radio_image__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./radio-image */ \"./packages/blocks/fields/radio-image/index.js\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./select */ \"./packages/blocks/fields/select/index.js\");\n/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./set */ \"./packages/blocks/fields/set/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./sidebar */ \"./packages/blocks/fields/sidebar/index.js\");\n/* harmony import */ var _separator__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./separator */ \"./packages/blocks/fields/separator/index.js\");\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./text */ \"./packages/blocks/fields/text/index.js\");\n/* harmony import */ var _textarea__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./textarea */ \"./packages/blocks/fields/textarea/index.js\");\n/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./time */ \"./packages/blocks/fields/time/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.block', 'carbon-fields/blocks', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_4__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/blocks/fields/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/blocks/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./association */ \"./packages/blocks/fields/association/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./complex */ \"./packages/blocks/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./datetime */ \"./packages/blocks/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./file */ \"./packages/blocks/fields/file/index.js\");\n/* harmony import */ var _footer_scripts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./footer-scripts */ \"./packages/blocks/fields/footer-scripts/index.js\");\n/* harmony import */ var _header_scripts__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./header-scripts */ \"./packages/blocks/fields/header-scripts/index.js\");\n/* harmony import */ var _hidden__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hidden */ \"./packages/blocks/fields/hidden/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./image */ \"./packages/blocks/fields/image/index.js\");\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./map */ \"./packages/blocks/fields/map/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./multiselect */ \"./packages/blocks/fields/multiselect/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./media-gallery */ \"./packages/blocks/fields/media-gallery/index.js\");\n/* harmony import */ var _oembed__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./oembed */ \"./packages/blocks/fields/oembed/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./radio */ \"./packages/blocks/fields/radio/index.js\");\n/* harmony import */ var _radio_image__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./radio-image */ \"./packages/blocks/fields/radio-image/index.js\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./select */ \"./packages/blocks/fields/select/index.js\");\n/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./set */ \"./packages/blocks/fields/set/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./sidebar */ \"./packages/blocks/fields/sidebar/index.js\");\n/* harmony import */ var _separator__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./separator */ \"./packages/blocks/fields/separator/index.js\");\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./text */ \"./packages/blocks/fields/text/index.js\");\n/* harmony import */ var _textarea__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./textarea */ \"./packages/blocks/fields/textarea/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.block', 'carbon-fields/blocks', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_4__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/blocks/fields/index.js?"); /***/ }), @@ -741,6 +729,29 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ }), +/***/ "./packages/blocks/fields/multiselect/index.js": +/*!*****************************************************!*\ + !*** ./packages/blocks/fields/multiselect/index.js ***! + \*****************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/fields/multiselect/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/blocks/fields/multiselect/index.js?"); + +/***/ }), + +/***/ "./packages/blocks/fields/multiselect/style.scss": +/*!*******************************************************!*\ + !*** ./packages/blocks/fields/multiselect/style.scss ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/blocks/fields/multiselect/style.scss?"); + +/***/ }), + /***/ "./packages/blocks/fields/oembed/index.js": /*!************************************************!*\ !*** ./packages/blocks/fields/oembed/index.js ***! @@ -937,18 +948,6 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ }), -/***/ "./packages/blocks/fields/time/index.js": -/*!**********************************************!*\ - !*** ./packages/blocks/fields/time/index.js ***! - \**********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.time.block', 'carbon-fields/blocks', function (OriginalDateTimeField) {\n return function (props) {\n return wp.element.createElement(OriginalDateTimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n icon: \"clock\",\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Time', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack:///./packages/blocks/fields/time/index.js?"); - -/***/ }), - /***/ "./packages/blocks/hocs/with-conditional-logic/index.js": /*!**************************************************************!*\ !*** ./packages/blocks/hocs/with-conditional-logic/index.js ***! diff --git a/build/gutenberg/blocks.min.css b/build/gutenberg/blocks.min.css index f9ec1b2f8..1c9eea708 100644 --- a/build/gutenberg/blocks.min.css +++ b/build/gutenberg/blocks.min.css @@ -1 +1 @@ -.block-editor .cf-association__cols{border-top-width:1px;margin-top:4px}.edit-post-sidebar .cf-association__cols{border-color:#8d96a0}.edit-post-sidebar .cf-association__cols:before{background-color:#8d96a0}.edit-post-sidebar .cf-association__counter{display:none}.edit-post-sidebar .cf-association__option{height:40px}.edit-post-sidebar .cf-association__option+.cf-association__option{border-top-color:#8d96a0}.edit-post-sidebar .cf-association__option-thumb{display:none}.edit-post-sidebar .cf-association__option-content{align-items:flex-start;flex-direction:column;min-width:0}.edit-post-sidebar .cf-association__option-title{width:100%}.edit-post-sidebar .cf-association__col:first-child .cf-association__option-actions{min-width:0}.edit-post-sidebar .cf-association__option-actions{margin-left:auto}.edit-post-sidebar .cf-association__option-action--edit{display:none}.block-editor .cf-complex__placeholder-label{font-size:13px;line-height:1.4}.block-editor .cf-complex__inserter-menu{z-index:10;list-style:none outside none;border:1px solid #e2e4e7;box-shadow:0 3px 30px rgba(25,30,35,.1);background-color:#fff}.block-editor .cf-complex__inserter-menu:after,.block-editor .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-width:8px 8px 8px 0;border-style:solid;margin-top:-8px;content:""}.block-editor .cf-complex__inserter-menu:before{border-color:transparent #e2e4e7;margin-right:1px}.block-editor .cf-complex__inserter-menu:after{border-color:transparent #fff}.block-editor .cf-complex__inserter-item{color:#40464d}.block-editor .cf-complex__inserter-item:hover{color:#191e23}.edit-post-sidebar .cf-complex__tabs .cf-complex__inserter-button{border-color:#8d96a0}.block-editor .cf-complex__tabs-item{color:#555d66}.block-editor .cf-complex__tabs-item--current{color:#191e23}.edit-post-sidebar .cf-complex__group-actions--tabbed,.edit-post-sidebar .cf-complex__group-body,.edit-post-sidebar .cf-complex__group-head,.edit-post-sidebar .cf-complex__tabs-item{border-color:#8d96a0}.block-editor .cf-field{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4;color:#555d66;padding:8px;min-width:0}.edit-post-sidebar .cf-block__fields>.cf-field{padding:4px 0 0}.block-editor .cf-complex .cf-field{border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.edit-post-sidebar .cf-complex .cf-field{border-color:#8d96a0}.block-editor .cf-field__label{margin-bottom:4px}.edit-post-sidebar .cf-datetime__inner{position:relative}.edit-post-sidebar .cf-datetime__inner:before{position:absolute;top:50%;left:9px;display:inline-block;margin-top:-10px}.wp-block .cf-field .cf-datetime__input{min-width:0;border-color:#e2e4e7;border-radius:0}.wp-block .cf-field .cf-datetime__input:focus{box-shadow:none}.edit-post-sidebar .cf-field .cf-datetime__input{padding-left:35px}.wp-block .cf-datetime__button{height:auto;border-color:#e2e4e7}.edit-post-sidebar .cf-datetime__button{display:none}.edit-post-sidebar .cf-file__content,.edit-post-sidebar .cf-file__inner,.edit-post-sidebar .cf-file__name{border-color:#8d96a0}.edit-post-sidebar .cf-map__canvas{border-color:#8d96a0;border-top-width:1px;margin-top:4px}.block-editor .cf-map__search[focus-within]~.cf-map__canvas{border-color:#00a0d2}.block-editor .cf-map__search:focus-within~.cf-map__canvas{border-color:#00a0d2}@media (min-width:1440px){.block-editor .cf-media-gallery__item{flex-basis:16.6667%}}@media (min-width:1680px){.block-editor .cf-media-gallery__item{flex-basis:16.6667%}}.edit-post-sidebar .cf-media-gallery__item{flex-basis:50%}.wp-block .cf-media-gallery__inner{border:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__inner{border:1px solid #8d96a0}.wp-block .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__actions{border-top:1px solid #8d96a0}.wp-block .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__item-inner{border:1px solid #8d96a0}.block-editor .cf-media-gallery__item-name,.block-editor .cf-media-gallery__item-preview{background-color:#f3f4f5}.wp-block .cf-media-gallery__item-name{border-top:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__item-name{border-top:1px solid #8d96a0}.edit-post-sidebar .cf-oembed__preview{border-color:#8d96a0;border-top-width:1px;margin-top:4px}.block-editor .cf-oembed[focus-within] .cf-oembed__preview{border-color:#00a0d2}.block-editor .cf-oembed:focus-within .cf-oembed__preview{border-color:#00a0d2}.wp-block .cf-radio__list{list-style:none outside none}.block-editor .cf-radio__list-item{margin:0}@media (min-width:1440px){.wp-block .cf-radio-image .cf-radio__list-item{flex-basis:25%}}@media (min-width:1680px){.wp-block .cf-radio-image .cf-radio__list-item{flex-basis:25%}}.edit-post-sidebar .cf-radio-image .cf-radio__list-item{flex-basis:33.3333%}.wp-block .cf-radio-image__image{border:1px solid #e2e4e7}.edit-post-sidebar .cf-radio-image__image{border:1px solid #8d96a0}.block-editor .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.block-editor .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:2px solid #00a0d2}.wp-block .cf-field .cf-select__input{border-color:#e2e4e7;border-radius:0}.wp-block .cf-field .cf-select__input:focus{box-shadow:none}.wp-block .cf-set__list{list-style:none outside none}.block-editor .cf-separator h3{margin:0}.wp-block .cf-field .cf-text__input{border-color:#e2e4e7;border-radius:0}.wp-block .cf-field .cf-text__input:focus{box-shadow:none}.wp-block .cf-field .cf-textarea__input{border-color:#e2e4e7;border-radius:0;transition:border-color .1s linear}.wp-block .cf-field .cf-textarea__input:focus{border-color:#00a0d2;box-shadow:none}.cf-block__fields{display:flex;flex-wrap:wrap}.wp-block .cf-block__fields{margin:-8px}.cf-block__preview{min-height:100px} \ No newline at end of file +.block-editor .cf-association__cols{border-top-width:1px;margin-top:4px}.edit-post-sidebar .cf-association__cols{border-color:#8d96a0}.edit-post-sidebar .cf-association__cols:before{background-color:#8d96a0}.edit-post-sidebar .cf-association__counter{display:none}.edit-post-sidebar .cf-association__option{height:40px}.edit-post-sidebar .cf-association__option+.cf-association__option{border-top-color:#8d96a0}.edit-post-sidebar .cf-association__option-thumb{display:none}.edit-post-sidebar .cf-association__option-content{align-items:flex-start;flex-direction:column;min-width:0}.edit-post-sidebar .cf-association__option-title{width:100%}.edit-post-sidebar .cf-association__col:first-child .cf-association__option-actions{min-width:0}.edit-post-sidebar .cf-association__option-actions{margin-left:auto}.edit-post-sidebar .cf-association__option-action--edit{display:none}.block-editor .cf-complex__placeholder-label{font-size:13px;line-height:1.4}.block-editor .cf-complex__inserter-menu{z-index:10;list-style:none outside none;border:1px solid #e2e4e7;box-shadow:0 3px 30px rgba(25,30,35,.1);background-color:#fff}.block-editor .cf-complex__inserter-menu:after,.block-editor .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-width:8px 8px 8px 0;border-style:solid;margin-top:-8px;content:""}.block-editor .cf-complex__inserter-menu:before{border-color:transparent #e2e4e7;margin-right:1px}.block-editor .cf-complex__inserter-menu:after{border-color:transparent #fff}.block-editor .cf-complex__inserter-item{color:#40464d}.block-editor .cf-complex__inserter-item:hover{color:#191e23}.edit-post-sidebar .cf-complex__tabs .cf-complex__inserter-button{border-color:#8d96a0}.block-editor .cf-complex__tabs-item{color:#555d66}.block-editor .cf-complex__tabs-item--current{color:#191e23}.edit-post-sidebar .cf-complex__group-actions--tabbed,.edit-post-sidebar .cf-complex__group-body,.edit-post-sidebar .cf-complex__group-head,.edit-post-sidebar .cf-complex__tabs-item{border-color:#8d96a0}.block-editor .cf-field{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4;color:#555d66;padding:8px;min-width:0}.edit-post-sidebar .cf-block__fields>.cf-field{padding:4px 0 0}.block-editor .cf-complex .cf-field{border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.edit-post-sidebar .cf-complex .cf-field{border-color:#8d96a0}.block-editor .cf-field__label{margin-bottom:4px}.edit-post-sidebar .cf-datetime__inner{position:relative}.edit-post-sidebar .cf-datetime__inner:before{position:absolute;top:50%;left:9px;display:inline-block;margin-top:-10px}.wp-block .cf-field .cf-datetime__input{min-width:0;border-color:#e2e4e7;border-radius:0}.wp-block .cf-field .cf-datetime__input:focus{box-shadow:none}.edit-post-sidebar .cf-field .cf-datetime__input{padding-left:35px}.wp-block .cf-datetime__button{height:auto;border-color:#e2e4e7}.edit-post-sidebar .cf-datetime__button{display:none}.edit-post-sidebar .cf-file__content,.edit-post-sidebar .cf-file__inner,.edit-post-sidebar .cf-file__name{border-color:#8d96a0}.edit-post-sidebar .cf-map__canvas{border-color:#8d96a0;border-top-width:1px;margin-top:4px}.block-editor .cf-map__search[focus-within]~.cf-map__canvas{border-color:#00a0d2}.block-editor .cf-map__search:focus-within~.cf-map__canvas{border-color:#00a0d2}.wp-block .cf-multiselect__control{border-radius:0}.edit-post-sidebar .cf-multiselect__control,.edit-post-sidebar .cf-multiselect__control:hover{border-color:#8d96a0}.edit-post-sidebar .cf-multiselect__control--is-focused,.edit-post-sidebar .cf-multiselect__control--is-focused:hover{border-color:#00a0d2;box-shadow:0 0 0 1px #00a0d2}@media (min-width:1440px){.block-editor .cf-media-gallery__item{flex-basis:16.6667%}}@media (min-width:1680px){.block-editor .cf-media-gallery__item{flex-basis:16.6667%}}.edit-post-sidebar .cf-media-gallery__item{flex-basis:50%}.wp-block .cf-media-gallery__inner{border:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__inner{border:1px solid #8d96a0}.wp-block .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__actions{border-top:1px solid #8d96a0}.wp-block .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__item-inner{border:1px solid #8d96a0}.block-editor .cf-media-gallery__item-name,.block-editor .cf-media-gallery__item-preview{background-color:#f3f4f5}.wp-block .cf-media-gallery__item-name{border-top:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__item-name{border-top:1px solid #8d96a0}.edit-post-sidebar .cf-oembed__preview{border-color:#8d96a0;border-top-width:1px;margin-top:4px}.block-editor .cf-oembed[focus-within] .cf-oembed__preview{border-color:#00a0d2}.block-editor .cf-oembed:focus-within .cf-oembed__preview{border-color:#00a0d2}.wp-block .cf-radio__list{list-style:none outside none}.block-editor .cf-radio__list-item{margin:0}@media (min-width:1440px){.wp-block .cf-radio-image .cf-radio__list-item{flex-basis:25%}}@media (min-width:1680px){.wp-block .cf-radio-image .cf-radio__list-item{flex-basis:25%}}.edit-post-sidebar .cf-radio-image .cf-radio__list-item{flex-basis:33.3333%}.wp-block .cf-radio-image__image{border:1px solid #e2e4e7}.edit-post-sidebar .cf-radio-image__image{border:1px solid #8d96a0}.block-editor .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.block-editor .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:2px solid #00a0d2}.wp-block .cf-field .cf-select__input{border-color:#e2e4e7;border-radius:0}.wp-block .cf-field .cf-select__input:focus{box-shadow:none}.wp-block .cf-set__list{list-style:none outside none}.block-editor .cf-separator h3{margin:0}.wp-block .cf-field .cf-text__input{border-color:#e2e4e7;border-radius:0}.wp-block .cf-field .cf-text__input:focus{box-shadow:none}.wp-block .cf-field .cf-textarea__input{border-color:#e2e4e7;border-radius:0;transition:border-color .1s linear}.wp-block .cf-field .cf-textarea__input:focus{border-color:#00a0d2;box-shadow:none}.cf-block__fields{display:flex;flex-wrap:wrap}.wp-block .cf-block__fields{margin:-8px}.cf-block__preview{min-height:100px} \ No newline at end of file diff --git a/build/gutenberg/blocks.min.js b/build/gutenberg/blocks.min.js index 7c90d0779..ca0416841 100644 --- a/build/gutenberg/blocks.min.js +++ b/build/gutenberg/blocks.min.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=60)}([function(e,t){e.exports=lodash},function(e,t){e.exports=wp.i18n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=wp.hooks},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=cf.core},function(e,t){e.exports=wp.data},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;tt=>{let n;t(0,(t,r)=>{0===t&&(n=r),1===t&&e(r),1!==t&&0!==t||n(1)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;let r;n(0,e=>{2===e&&r&&(r.unsubscribe?r.unsubscribe():r())}),r=e.subscribe({next:e=>n(1,e),error:e=>n(2,e),complete:()=>n(2)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;const r="undefined"!=typeof Symbol&&e[Symbol.iterator]?e[Symbol.iterator]():e;let o,i=!1,c=!1;n(0,e=>{1===e&&(c=!0,i||o&&o.done||function(){for(i=!0;c;)c=!1,(o=r.next()).done?n(2):n(1,o.value);i=!1}())})})},function(e,t){e.exports=((e,t)=>(n,r)=>{if(0!==n)return;const o=e=>r(1,e);r(0,n=>{2===n&&e.removeEventListener(t,o)}),e.addEventListener(t,o)})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;let r=!1;e.then(e=>{r||(n(1,e),n(2))},e=>{r||n(2,e)}),n(0,e=>{2===e&&(r=!0)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;let r=0;const o=setInterval(()=>{n(1,r++)},e);n(0,e=>{2===e&&clearInterval(o)})})},function(e,t){e.exports=(e=>t=>(n,r)=>{0===n&&t(0,(t,n)=>{r(t,1===t?e(n):n)})})},function(e,t){e.exports=function(e,t){let n=2===arguments.length;return r=>(o,i)=>{if(0!==o)return;let c=t;r(0,(t,r)=>{1===t?(c=n?e(c,r):(n=!0,r),i(1,c)):i(t,r)})}}},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;const r=e=>void 0!==e,o=e=>void 0===e,i=()=>{};let c,l,u=!1;function a(e){1===e&&(l||c||i)(1),2===e&&(l&&l(2),c&&c(2))}e(0,(e,t)=>{if(0===e)c=t,n(0,a);else if(1===e){const e=t;l&&l(2),e(0,(e,t)=>{0===e?(l=t)(1):1===e?n(1,t):2===e&&o(t)?u?n(2):(l=void 0,c(1)):2===e&&r(t)&&n(2,t)})}else 2===e&&o(t)?l?u=!0:n(2):2===e&&r(t)&&n(2,t)})})},function(e,t){e.exports=(e=>t=>(n,r)=>{if(0!==n)return;let o,i=0;function c(t,n){i{0===t?(o=n,r(0,c)):1===t?it=>(n,r)=>{if(0!==n)return;let o,i=0;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t&&it=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=function(...e){return(t,n)=>{if(0!==t)return;const r=e.length,o=new Array(r);let i=0,c=0;const l=e=>{if(0!==e)for(let t=0;t{0===e?(o[t]=u,1==++i&&n(0,l)):2===e?(o[t]=void 0,++c===r&&n(2)):n(e,u)})}}},function(e,t){e.exports=((...e)=>(t,n)=>{if(0!==t)return;const r=e.length;if(0===r)return n(0,()=>{}),void n(2);let o,i=0;const c=(e,t)=>{1!==e&&2!==e||o(e,t)};!function t(){i!==r?e[i](0,(e,r)=>{0===e?(o=r,0===i?n(0,c):o(1)):1===e?n(1,r):2===e&&(i++,t())}):n(2)}()})},function(e,t){const n={};e.exports=((...e)=>(t,r)=>{if(0!==t)return;const o=e.length;if(0===o)return r(0,()=>{}),r(1,[]),void r(2);let i=o,c=o,l=o;const u=new Array(o),a=new Array(o),s=(e,t)=>{if(2===e)for(let e=0;e{u[t]=n,e(0,(e,f)=>{if(0===e)a[t]=f,0==--i&&r(0,s);else if(1===e){const e=c?u[t]===n?--c:c:0;if(u[t]=f,0===e){const e=new Array(o);for(let t=0;t{let t,n=[];return function(r,o){if(0!==r)return;n.push(o);const i=(e,r)=>{if(0!==e)if(2===e){const e=n.indexOf(o);e>-1&&n.splice(e,1),n.length||t(2)}else t(e,r)};1!==n.length?o(0,i):e(0,(e,r)=>{if(0===e)t=r,o(0,i);else for(let t of n.slice(0))t(e,r);2===e&&(n=[])})}})},function(e,t){e.exports=function(...e){let t=e[0];for(let n=1,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:0;return Object(l.mapKeys)(e,function(e,n){return"".concat(Object(l.repeat)("parent.",t)).concat(n)})}function v(e){return Object(l.startsWith)(e,"cf-")}var y=Object(p.withConditionalLogic)(function(e){return Object(m.pipe)(Object(p.fromSelector)(Object(u.select)("core/editor").getBlock,e.blockId),function(e){return void 0===e&&(e=b),function(t){return function(n,r){if(0===n){var o,i,c=!1;t(0,function(t,n){0===t&&(i=n),1===t?c&&e(o,n)?i(1):(c=!0,o=n,r(1,n)):r(t,n)})}}}}(),Object(m.map)(function(e){return e.attributes.data}))},function(e,t){var n={};if(Object(l.has)(t,e.field.base_name))n=h(Object(l.omit)(t,[e.field.base_name]));else{var r=e.id.split("__");r.shift();var o=r.shift();r.pop();var i=r.reduce(function(e,t){return v(t)?e:e+1},0);n=h(n=Object(l.omit)(t,[o]),i+1);for(var c=o;r.length>0;){var u=r.shift(),a=v(u),s=!a;if(a){var f=Object(l.findIndex)(Object(l.get)(t,c),["_id",u]);c="".concat(c,".").concat(f);var d=Object(l.get)(t,c);d=h(d=Object(l.omit)(d,["_id","_type",e.field.base_name]),i),Object(l.assign)(n,d)}s&&(c="".concat(c,".").concat(u),i--)}}return n}),g=(n(39),n(21)),O=n.n(g),_=n(10),j=n.n(_),w=n(11),k=n.n(w),x=n(12),S=n.n(x),G=n(13),E=n.n(G),F=n(14),I=n.n(F),C=n(2),T=n.n(C),A=n(4),P=n.n(A),L=n(15),B=n.n(L),D=n(8),M=(n(45),n(46),Object(p.withFilters)("carbon-fields.field-wrapper.block")(p.Field)),N=function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1?Object(l.without)(n,e):O()(n).concat([e])}})}),P()(T()(T()(n)),"handleToggleAllGroups",function(){var e=n.props.value;n.setState(function(t){var n=t.collapsedGroups;return{collapsedGroups:n=n.length!==e.length?e.map(function(e){return e._id}):[]}})}),P()(T()(T()(n)),"handleGroupSetup",function(e,t){var r=Object(l.get)(Object(l.find)(n.props.field.groups,["name",e._type]),"fields",[]),o=Object(l.omit)(e,["_id","_type"]);return Object(l.assign)({},t,{key:e._id,id:e._id,fields:r,collapsed:n.state.collapsedGroups.indexOf(e._id)>-1,context:"block",values:o})}),P()(T()(T()(n)),"handleGroupFieldSetup",function(e,t,r){var o=n.props.blockId,i="".concat(n.props.id,"__").concat(r.id,"__").concat(e.base_name),c=Object(l.get)(r,"values.".concat(e.base_name));return[M,Object(l.assign)({},t,{key:i,id:i,blockId:o,field:e,value:c,onChange:n.handleGroupFieldChange})]}),P()(T()(T()(n)),"handleGroupFieldChange",function(e,t){var r=n.props,o=r.id,i=r.value;(0,r.onChange)(o,B()(i,function(n){var r=e.split("__"),o=r.pop(),i=Object(l.find)(n,["_id",r.pop()]);Object(l.set)(i,o,t)}))}),n}return I()(t,e),k()(t,[{key:"getGroupValues",value:function(){return this.props.value.map(function(e){var t=Object(l.mapKeys)(Object(l.omit)(e,["_id","_type"]),function(e,t){return t.replace(/\-/g,"_")});return[e._type,t]})}},{key:"render",value:function(){var e=this.handleGroupSetup,t=this.handleGroupFieldSetup,n=this.handleAddGroup,r=this.handleCloneGroup,o=this.handleRemoveGroup,i=this.handleToggleGroup,c=this.handleToggleAllGroups,l=this.props,u=l.value;return(0,l.children)({groupValues:this.getGroupValues(),allGroupsAreCollapsed:this.state.collapsedGroups.length===u.length,handleGroupSetup:e,handleGroupFieldSetup:t,handleAddGroup:n,handleCloneGroup:r,handleRemoveGroup:o,handleToggleGroup:i,handleToggleAllGroups:c})}}]),t}(D.Component);Object(d.addFilter)("carbon-fields.complex.block","carbon-fields/blocks",function(e){return function(t){var n=t.id,r=t.name,o=t.value,i=t.error,c=t.field;return wp.element.createElement(N,t,function(l){var u=l.groupValues,a=l.allGroupsAreCollapsed,s=l.handleGroupSetup,f=l.handleGroupFieldSetup,d=l.handleAddGroup,p=l.handleCloneGroup,b=l.handleRemoveGroup,m=l.handleToggleGroup,h=l.handleToggleAllGroups;return wp.element.createElement(e,{groupIdKey:"_id",groupFilterKey:"_type",id:n,name:r,value:o,error:i,field:c,groupValues:u,allGroupsAreCollapsed:a,onGroupSetup:s,onGroupFieldSetup:f,onAddGroup:d,onCloneGroup:p,onRemoveGroup:b,onToggleGroup:m,onToggleAllGroups:h,onChange:t.onChange})})}});var R=n(7),V=n.n(R);Object(d.addFilter)("carbon-fields.date.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonText:Object(s.__)("Select Date","carbon-fields-ui")},t))}}),n(47),Object(d.addFilter)("carbon-fields.date_time.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonText:Object(s.__)("Select Date","carbon-fields-ui")},t))}}),n(48),Object(d.addFilter)("carbon-fields.file.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonLabel:Object(s.__)("Select File","carbon-fields-ui"),mediaLibraryButtonLabel:Object(s.__)("Use File","carbon-fields-ui"),mediaLibraryTitle:Object(s.__)("Select File","carbon-fields-ui")},t))}});var U=function(e){var t=e.type;return wp.element.createElement("em",null,Object(s.sprintf)(Object(s.__)("Field of type '%s' is not supported in Gutenberg.","carbon-fields-ui"),[t]))};Object(d.addFilter)("carbon-fields.footer_scripts.block","carbon-fields/blocks",function(){return function(e){return wp.element.createElement(U,{type:e.field.type})}}),Object(d.addFilter)("carbon-fields.header_scripts.block","carbon-fields/blocks",function(){return function(e){return wp.element.createElement(U,{type:e.field.type})}}),Object(d.addFilter)("carbon-fields.hidden.block","carbon-fields/blocks",function(){return function(e){return wp.element.createElement(U,{type:e.field.type})}}),Object(d.addFilter)("carbon-fields.image.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonLabel:Object(s.__)("Select Image","carbon-fields-ui"),mediaLibraryButtonLabel:Object(s.__)("Use Image","carbon-fields-ui"),mediaLibraryTitle:Object(s.__)("Select Image","carbon-fields-ui")},t))}}),n(49),n(50),Object(d.addFilter)("carbon-fields.media_gallery.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonLabel:Object(s.__)("Select Attachments","carbon-fields-ui"),mediaLibraryButtonLabel:Object(s.__)("Use Attachments","carbon-fields-ui"),mediaLibraryTitle:Object(s.__)("Select Attachments","carbon-fields-ui")},t))}}),n(51),n(52),n(53),n(54),n(55),Object(d.addFilter)("carbon-fields.sidebar.block","carbon-fields/blocks",function(){return function(e){return wp.element.createElement(U,{type:e.field.type})}}),n(56),n(57),n(58),Object(d.addFilter)("carbon-fields.time.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({icon:"clock",buttonText:Object(s.__)("Select Time","carbon-fields-ui")},t))}}),Object(d.addFilter)("carbon-fields.field-edit.block","carbon-fields/blocks",Object(f.compose)(y,Object(u.withDispatch)(function(e){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}),p.withValidation));var K=Object(u.combineReducers)({fieldDefinitionsByBlockName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_FIELD_DEFINITIONS":return t.payload.definitions;default:return e}}});function q(e){return{type:"SETUP_FIELD_DEFINITIONS",payload:{definitions:e}}}function W(e,t){return e.fieldDefinitionsByBlockName[t.replace("carbon-fields/","")]||[]}Object(u.registerStore)("carbon-fields/blocks",{reducer:K,actions:r,selectors:o});var $=n(16),H=n(18),z=(n(59),function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i1&&void 0!==arguments[1]?arguments[1]:null;return Object(l.get)(e,"settings.".concat(t),n)};X[t]=e.fields.map(function(t){return c()({},t,{container_id:e.id})}),Object(a.registerBlockType)("carbon-fields/".concat(t),{id:e.id,title:e.title,icon:r("icon"),category:r("category.slug"),keywords:r("keywords",[]),description:r("description",""),attributes:{data:{type:"object",default:n}},supports:{preview:r("preview"),alignWide:!1,anchor:!1,html:!1},edit:J,save:Q})}),Object(u.dispatch)("carbon-fields/blocks").setupFieldDefinitions(X)}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=61)}([function(e,t){e.exports=lodash},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=wp.i18n},function(e,t){e.exports=wp.hooks},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=cf.core},function(e,t){e.exports=wp.data},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;tt=>{let n;t(0,(t,r)=>{0===t&&(n=r),1===t&&e(r),1!==t&&0!==t||n(1)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;let r;n(0,e=>{2===e&&r&&(r.unsubscribe?r.unsubscribe():r())}),r=e.subscribe({next:e=>n(1,e),error:e=>n(2,e),complete:()=>n(2)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;const r="undefined"!=typeof Symbol&&e[Symbol.iterator]?e[Symbol.iterator]():e;let o,i=!1,c=!1;n(0,e=>{1===e&&(c=!0,i||o&&o.done||function(){for(i=!0;c;)c=!1,(o=r.next()).done?n(2):n(1,o.value);i=!1}())})})},function(e,t){e.exports=((e,t)=>(n,r)=>{if(0!==n)return;const o=e=>r(1,e);r(0,n=>{2===n&&e.removeEventListener(t,o)}),e.addEventListener(t,o)})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;let r=!1;e.then(e=>{r||(n(1,e),n(2))},e=>{r||n(2,e)}),n(0,e=>{2===e&&(r=!0)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;let r=0;const o=setInterval(()=>{n(1,r++)},e);n(0,e=>{2===e&&clearInterval(o)})})},function(e,t){e.exports=(e=>t=>(n,r)=>{0===n&&t(0,(t,n)=>{r(t,1===t?e(n):n)})})},function(e,t){e.exports=function(e,t){let n=2===arguments.length;return r=>(o,i)=>{if(0!==o)return;let c=t;r(0,(t,r)=>{1===t?(c=n?e(c,r):(n=!0,r),i(1,c)):i(t,r)})}}},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;const r=e=>void 0!==e,o=e=>void 0===e,i=()=>{};let c,l,u=!1;function a(e){1===e&&(l||c||i)(1),2===e&&(l&&l(2),c&&c(2))}e(0,(e,t)=>{if(0===e)c=t,n(0,a);else if(1===e){const e=t;l&&l(2),e(0,(e,t)=>{0===e?(l=t)(1):1===e?n(1,t):2===e&&o(t)?u?n(2):(l=void 0,c(1)):2===e&&r(t)&&n(2,t)})}else 2===e&&o(t)?l?u=!0:n(2):2===e&&r(t)&&n(2,t)})})},function(e,t){e.exports=(e=>t=>(n,r)=>{if(0!==n)return;let o,i=0;function c(t,n){i{0===t?(o=n,r(0,c)):1===t?it=>(n,r)=>{if(0!==n)return;let o,i=0;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t&&it=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=function(...e){return(t,n)=>{if(0!==t)return;const r=e.length,o=new Array(r);let i=0,c=0;const l=e=>{if(0!==e)for(let t=0;t{0===e?(o[t]=u,1==++i&&n(0,l)):2===e?(o[t]=void 0,++c===r&&n(2)):n(e,u)})}}},function(e,t){e.exports=((...e)=>(t,n)=>{if(0!==t)return;const r=e.length;if(0===r)return n(0,()=>{}),void n(2);let o,i=0;const c=(e,t)=>{1!==e&&2!==e||o(e,t)};!function t(){i!==r?e[i](0,(e,r)=>{0===e?(o=r,0===i?n(0,c):o(1)):1===e?n(1,r):2===e&&(i++,t())}):n(2)}()})},function(e,t){const n={};e.exports=((...e)=>(t,r)=>{if(0!==t)return;const o=e.length;if(0===o)return r(0,()=>{}),r(1,[]),void r(2);let i=o,c=o,l=o;const u=new Array(o),a=new Array(o),s=(e,t)=>{if(2===e)for(let e=0;e{u[t]=n,e(0,(e,f)=>{if(0===e)a[t]=f,0==--i&&r(0,s);else if(1===e){const e=c?u[t]===n?--c:c:0;if(u[t]=f,0===e){const e=new Array(o);for(let t=0;t{let t,n=[];return function(r,o){if(0!==r)return;n.push(o);const i=(e,r)=>{if(0!==e)if(2===e){const e=n.indexOf(o);e>-1&&n.splice(e,1),n.length||t(2)}else t(e,r)};1!==n.length?o(0,i):e(0,(e,r)=>{if(0===e)t=r,o(0,i);else for(let t of n.slice(0))t(e,r);2===e&&(n=[])})}})},function(e,t){e.exports=function(...e){let t=e[0];for(let n=1,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:0;return Object(l.mapKeys)(e,function(e,n){return"".concat(Object(l.repeat)("parent.",t)).concat(n)})}function v(e){return Object(l.startsWith)(e,"cf-")}var y=Object(d.withConditionalLogic)(function(e){return Object(m.pipe)(Object(d.fromSelector)(Object(u.select)("core/editor").getBlock,e.blockId),function(e){return void 0===e&&(e=b),function(t){return function(n,r){if(0===n){var o,i,c=!1;t(0,function(t,n){0===t&&(i=n),1===t?c&&e(o,n)?i(1):(c=!0,o=n,r(1,n)):r(t,n)})}}}}(),Object(m.map)(function(e){return e.attributes.data}))},function(e,t){var n={};if(Object(l.has)(t,e.field.base_name))n=h(Object(l.omit)(t,[e.field.base_name]));else{var r=e.id.split("__");r.shift();var o=r.shift();r.pop();var i=r.reduce(function(e,t){return v(t)?e:e+1},0);n=h(n=Object(l.omit)(t,[o]),i+1);for(var c=o;r.length>0;){var u=r.shift(),a=v(u),s=!a;if(a){var f=Object(l.findIndex)(Object(l.get)(t,c),["_id",u]);c="".concat(c,".").concat(f);var p=Object(l.get)(t,c);p=h(p=Object(l.omit)(p,["_id","_type",e.field.base_name]),i),Object(l.assign)(n,p)}s&&(c="".concat(c,".").concat(u),i--)}}return n}),g=(n(39),n(21)),O=n.n(g),_=n(10),j=n.n(_),w=n(11),k=n.n(w),x=n(12),S=n.n(x),G=n(13),E=n.n(G),F=n(14),I=n.n(F),C=n(1),A=n.n(C),P=n(4),T=n.n(P),L=n(15),B=n.n(L),D=n(8),M=(n(45),n(46),Object(d.withFilters)("carbon-fields.field-wrapper.block")(d.Field)),N=function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1?Object(l.without)(n,e):O()(n).concat([e])}})}),T()(A()(A()(n)),"handleToggleAllGroups",function(){var e=n.props.value;n.setState(function(t){var n=t.collapsedGroups;return{collapsedGroups:n=n.length!==e.length?e.map(function(e){return e._id}):[]}})}),T()(A()(A()(n)),"handleGroupSetup",function(e,t){var r=Object(l.get)(Object(l.find)(n.props.field.groups,["name",e._type]),"fields",[]),o=Object(l.omit)(e,["_id","_type"]);return Object(l.assign)({},t,{key:e._id,id:e._id,fields:r,collapsed:n.state.collapsedGroups.indexOf(e._id)>-1,context:"block",values:o})}),T()(A()(A()(n)),"handleGroupFieldSetup",function(e,t,r){var o=n.props.blockId,i="".concat(n.props.id,"__").concat(r.id,"__").concat(e.base_name),c=Object(l.get)(r,"values.".concat(e.base_name));return[M,Object(l.assign)({},t,{key:i,id:i,name:e.base_name,blockId:o,field:e,value:c,onChange:n.handleGroupFieldChange})]}),T()(A()(A()(n)),"handleGroupFieldChange",function(e,t){var r=n.props,o=r.id,i=r.value;(0,r.onChange)(o,B()(i,function(n){var r=e.split("__"),o=r.pop(),i=Object(l.find)(n,["_id",r.pop()]);Object(l.set)(i,o,t)}))}),n}return I()(t,e),k()(t,[{key:"getGroupValues",value:function(){return this.props.value.map(function(e){var t=Object(l.mapKeys)(Object(l.omit)(e,["_id","_type"]),function(e,t){return t.replace(/\-/g,"_")});return[e._type,t]})}},{key:"render",value:function(){var e=this.handleGroupSetup,t=this.handleGroupFieldSetup,n=this.handleAddGroup,r=this.handleCloneGroup,o=this.handleRemoveGroup,i=this.handleToggleGroup,c=this.handleToggleAllGroups,l=this.props,u=l.value;return(0,l.children)({groupValues:this.getGroupValues(),allGroupsAreCollapsed:this.state.collapsedGroups.length===u.length,handleGroupSetup:e,handleGroupFieldSetup:t,handleAddGroup:n,handleCloneGroup:r,handleRemoveGroup:o,handleToggleGroup:i,handleToggleAllGroups:c})}}]),t}(D.Component);Object(p.addFilter)("carbon-fields.complex.block","carbon-fields/blocks",function(e){return function(t){var n=t.id,r=t.name,o=t.value,i=t.error,c=t.field;return wp.element.createElement(N,t,function(l){var u=l.groupValues,a=l.allGroupsAreCollapsed,s=l.handleGroupSetup,f=l.handleGroupFieldSetup,p=l.handleAddGroup,d=l.handleCloneGroup,b=l.handleRemoveGroup,m=l.handleToggleGroup,h=l.handleToggleAllGroups;return wp.element.createElement(e,{groupIdKey:"_id",groupFilterKey:"_type",id:n,name:r,value:o,error:i,field:c,groupValues:u,allGroupsAreCollapsed:a,onGroupSetup:s,onGroupFieldSetup:f,onAddGroup:p,onCloneGroup:d,onRemoveGroup:b,onToggleGroup:m,onToggleAllGroups:h,onChange:t.onChange})})}});var R=n(7),V=n.n(R);n(47),Object(p.addFilter)("carbon-fields.date_time.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonText:Object(s.__)("Select Date","carbon-fields-ui")},t))}}),n(48),Object(p.addFilter)("carbon-fields.file.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonLabel:Object(s.__)("Select File","carbon-fields-ui"),mediaLibraryButtonLabel:Object(s.__)("Use File","carbon-fields-ui"),mediaLibraryTitle:Object(s.__)("Select File","carbon-fields-ui")},t))}});var U=function(e){var t=e.type;return wp.element.createElement("em",null,Object(s.sprintf)(Object(s.__)("Field of type '%s' is not supported in Gutenberg.","carbon-fields-ui"),[t]))};Object(p.addFilter)("carbon-fields.footer_scripts.block","carbon-fields/blocks",function(){return function(e){return wp.element.createElement(U,{type:e.field.type})}}),Object(p.addFilter)("carbon-fields.header_scripts.block","carbon-fields/blocks",function(){return function(e){return wp.element.createElement(U,{type:e.field.type})}}),Object(p.addFilter)("carbon-fields.hidden.block","carbon-fields/blocks",function(){return function(e){return wp.element.createElement(U,{type:e.field.type})}}),Object(p.addFilter)("carbon-fields.image.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonLabel:Object(s.__)("Select Image","carbon-fields-ui"),mediaLibraryButtonLabel:Object(s.__)("Use Image","carbon-fields-ui"),mediaLibraryTitle:Object(s.__)("Select Image","carbon-fields-ui")},t))}}),n(49),n(50),n(51),Object(p.addFilter)("carbon-fields.media_gallery.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonLabel:Object(s.__)("Select Attachments","carbon-fields-ui"),mediaLibraryButtonLabel:Object(s.__)("Use Attachments","carbon-fields-ui"),mediaLibraryTitle:Object(s.__)("Select Attachments","carbon-fields-ui")},t))}}),n(52),n(53),n(54),n(55),n(56),Object(p.addFilter)("carbon-fields.sidebar.block","carbon-fields/blocks",function(){return function(e){return wp.element.createElement(U,{type:e.field.type})}}),n(57),n(58),n(59),Object(p.addFilter)("carbon-fields.field-edit.block","carbon-fields/blocks",Object(f.compose)(y,Object(u.withDispatch)(function(e){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}),d.withValidation));var K=Object(u.combineReducers)({fieldDefinitionsByBlockName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_FIELD_DEFINITIONS":return t.payload.definitions;default:return e}}});function q(e){return{type:"SETUP_FIELD_DEFINITIONS",payload:{definitions:e}}}function W(e,t){return e.fieldDefinitionsByBlockName[t.replace("carbon-fields/","")]||[]}Object(u.registerStore)("carbon-fields/blocks",{reducer:K,actions:r,selectors:o});var $=n(16),H=n(18),z=(n(60),function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i1&&void 0!==arguments[1]?arguments[1]:null;return Object(l.get)(e,"settings.".concat(t),n)};X[t]=e.fields.map(function(t){return c()({},t,{container_id:e.id})}),Object(a.registerBlockType)("carbon-fields/".concat(t),{id:e.id,title:e.title,icon:r("icon"),category:r("category.slug"),keywords:r("keywords",[]),description:r("description",""),attributes:{data:{type:"object",default:n}},supports:{preview:r("preview"),alignWide:!1,anchor:!1,html:!1},edit:J,save:Q})}),Object(u.dispatch)("carbon-fields/blocks").setupFieldDefinitions(X)}]); \ No newline at end of file diff --git a/build/gutenberg/core.css b/build/gutenberg/core.css index c69eaffa1..94f095fe3 100644 --- a/build/gutenberg/core.css +++ b/build/gutenberg/core.css @@ -85,6 +85,7 @@ align-items: center; justify-content: space-between; flex: 1; + min-width: 0; margin-right: 8px; } .cf-association__option-title { @@ -93,7 +94,8 @@ line-height: 1.4; color: #32373c; white-space: nowrap; - text-overflow: ellipsis; } + text-overflow: ellipsis; + margin-right: 4px; } .cf-association__option--selected .cf-association__option-title { color: #82878c; } @@ -295,11 +297,27 @@ .cf-complex--tabbed-vertical .cf-complex__groups { flex: 0 0 80%; } -.cf-complex--grid .cf-complex__group { - position: relative; - margin-bottom: 12px; } - .cf-complex--grid .cf-complex__group:last-child { - margin-bottom: 0; } +.cf-complex__group { + box-sizing: border-box; } + .cf-complex--grid .cf-complex__group { + position: relative; + margin-bottom: 12px; } + .cf-complex--grid .cf-complex__group:last-child { + margin-bottom: 0; } + +.cf-complex__group-placeholder { + position: relative; } + .cf-complex__group-placeholder:not(:last-child) { + margin-bottom: 12px; } + .cf-complex__group-placeholder::before { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + border: 1px dashed #e2e4e7; + box-sizing: border-box; + content: ''; } /** * Head @@ -340,7 +358,8 @@ flex-wrap: wrap; border-width: 0 0 1px 1px; border-style: solid; - border-color: #e2e4e7; } + border-color: #e2e4e7; + background-color: #fff; } .cf-complex__group-body[hidden] { display: none; } .cf-complex--grid .cf-complex__group-body { @@ -1485,6 +1504,75 @@ span.flatpickr-weekday { .cf-media-gallery__item-remove:hover::before { color: #b5bcc2; } +/* ========================================================================== + Colors + ========================================================================== */ +/* ========================================================================== + WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ + ========================================================================== */ +/* ========================================================================== + Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss + ========================================================================== */ +/* ========================================================================== + Fonts + ========================================================================== */ +/* ========================================================================== + Variables + ========================================================================== */ +/* ========================================================================== + WordPress Variables + ========================================================================== */ +/* ========================================================================== + Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss + ========================================================================== */ +/* ========================================================================== + Multiselect + ========================================================================== */ +.cf-multiselect__control { + height: 30px; + min-height: 0; + border-color: #e2e4e7; } + .cf-multiselect__control:hover { + border-color: #e2e4e7; } + .cf-multiselect__control--is-focused, .cf-multiselect__control--is-focused:hover { + border-color: #00a0d2 !important; + box-shadow: none; } + +.cf-multiselect__placeholder { + color: #b5bcc2; } + +.cf-multiselect__value-container { + padding-left: 4px; + padding-right: 4px; } + +.cf-multiselect__multi-value { + align-items: center; + margin: 0; + background-color: transparent; } + +.cf-multiselect__multi-value__label { + padding-left: 3px; + font-size: 12px; + line-height: 1; } + +.cf-multiselect__multi-value__remove { + padding: 0; } + .cf-multiselect__multi-value__remove:hover { + background-color: transparent; } + +.cf-multiselect__input input[id], +.cf-multiselect__input input[id]:focus { + box-shadow: none; } + +.cf-multiselect__menu { + z-index: 9999; } + +.cf-multiselect__option { + padding: 4px; } + .cf-multiselect__option--is-focused { + background-color: #00a0d2; + color: #fff; } + /* ========================================================================== Colors ========================================================================== */ @@ -1559,6 +1647,9 @@ span.flatpickr-weekday { position: relative; padding: 4px; } +.cf-container-term-meta .cf-radio__label { + display: inline; } + .cf-radio-image .cf-radio__label { display: inline-block; } @@ -1678,6 +1769,10 @@ span.flatpickr-weekday { .cf-container-term-meta .cf-separator .cf-field__head { display: none; } +.cf-container-term-meta .cf-separator .cf-field__body { + position: absolute; + left: 0; } + /* ========================================================================== Colors ========================================================================== */ @@ -1711,6 +1806,9 @@ span.flatpickr-weekday { .cf-field .cf-set__input { margin-top: 0; } +.cf-container-term-meta .cf-set__label { + display: inline; } + /* ========================================================================== Colors ========================================================================== */ @@ -1799,6 +1897,10 @@ span.flatpickr-weekday { box-sizing: border-box; flex: 1 1 100%; } +@media (max-width: 1024px) { + .cf-field { + flex-basis: 100% !important; } } + .cf-rich-text .cf-field__body { box-sizing: content-box; } diff --git a/build/gutenberg/core.js b/build/gutenberg/core.js index e62227509..d10fadbf6 100644 --- a/build/gutenberg/core.js +++ b/build/gutenberg/core.js @@ -3200,7 +3200,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../registry/fields */ \"./packages/core/registry/fields.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar ComplexGroup =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexGroup, _Component);\n\n function ComplexGroup() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexGroup);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexGroup)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleClick\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onToggle = _this$props.onToggle;\n onToggle(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneClick\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n onClone = _this$props2.onClone;\n onClone(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveClick\", function () {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n onRemove = _this$props3.onRemove;\n onRemove(id);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexGroup, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n index = _this$props4.index,\n label = _this$props4.label,\n name = _this$props4.name,\n prefix = _this$props4.prefix,\n tabbed = _this$props4.tabbed,\n hidden = _this$props4.hidden,\n collapsed = _this$props4.collapsed,\n allowClone = _this$props4.allowClone,\n fields = _this$props4.fields,\n context = _this$props4.context,\n onFieldSetup = _this$props4.onFieldSetup;\n var groupClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group', {\n 'cf-complex__group--collapsed': collapsed\n });\n var toggleClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('dashicons-before', 'cf-complex__group-action-icon', {\n 'dashicons-arrow-up': !collapsed,\n 'dashicons-arrow-down': collapsed\n });\n var actionsClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group-actions', {\n 'cf-complex__group-actions--tabbed': tabbed\n });\n return wp.element.createElement(\"div\", {\n className: groupClasses,\n hidden: hidden\n }, name && wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(prefix, \"[value]\"),\n value: name\n }), !tabbed && wp.element.createElement(\"div\", {\n className: \"cf-complex__group-head\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-complex__group-index\"\n }, index + 1), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-title\"\n }, label)), wp.element.createElement(\"div\", {\n className: \"cf-complex__group-body\",\n hidden: collapsed\n }, fields.map(function (field) {\n var FieldEdit = Object(_registry_fields__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, context);\n\n if (!FieldEdit) {\n return null;\n }\n\n var _onFieldSetup = onFieldSetup(field, {}, _this2.props),\n _onFieldSetup2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_onFieldSetup, 2),\n Field = _onFieldSetup2[0],\n props = _onFieldSetup2[1];\n\n return (// The `key` will be assigned via `onFieldSetup`.\n // eslint-disable-next-line react/jsx-key\n wp.element.createElement(Field, props, wp.element.createElement(FieldEdit, props))\n );\n })), wp.element.createElement(\"div\", {\n className: actionsClasses\n }, allowClone && wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleCloneClick\n }, wp.element.createElement(\"span\", {\n className: \"dashicons-before dashicons-admin-page cf-complex__group-action-icon\"\n }), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Duplicate', 'carbon-fields-ui'))), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleRemoveClick\n }, wp.element.createElement(\"span\", {\n className: \"dashicons-before dashicons-trash cf-complex__group-action-icon\"\n }), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Remove', 'carbon-fields-ui'))), !tabbed && wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleToggleClick\n }, wp.element.createElement(\"span\", {\n className: toggleClasses\n }), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Collapse', 'carbon-fields-ui')))));\n }\n }]);\n\n return ComplexGroup;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexGroup);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/group.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../registry/fields */ \"./packages/core/registry/fields.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar ComplexGroup =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexGroup, _Component);\n\n function ComplexGroup() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexGroup);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexGroup)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleClick\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onToggle = _this$props.onToggle;\n onToggle(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneClick\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n onClone = _this$props2.onClone;\n onClone(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveClick\", function () {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n onRemove = _this$props3.onRemove;\n onRemove(id);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexGroup, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n index = _this$props4.index,\n label = _this$props4.label,\n name = _this$props4.name,\n prefix = _this$props4.prefix,\n tabbed = _this$props4.tabbed,\n hidden = _this$props4.hidden,\n collapsed = _this$props4.collapsed,\n allowClone = _this$props4.allowClone,\n fields = _this$props4.fields,\n context = _this$props4.context,\n onFieldSetup = _this$props4.onFieldSetup;\n var groupClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group', {\n 'cf-complex__group--collapsed': collapsed\n });\n var toggleClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('dashicons-before', 'cf-complex__group-action-icon', {\n 'dashicons-arrow-up': !collapsed,\n 'dashicons-arrow-down': collapsed\n });\n var actionsClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group-actions', {\n 'cf-complex__group-actions--tabbed': tabbed\n });\n return wp.element.createElement(\"div\", {\n className: groupClasses,\n hidden: hidden\n }, name && wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(prefix, \"[value]\"),\n value: name\n }), !tabbed && wp.element.createElement(\"div\", {\n className: \"cf-complex__group-head\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-complex__group-index\"\n }, index + 1), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-title\"\n }, label)), wp.element.createElement(\"div\", {\n className: \"cf-complex__group-body\",\n hidden: !tabbed && collapsed\n }, fields.map(function (field) {\n var FieldEdit = Object(_registry_fields__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, context);\n\n if (!FieldEdit) {\n return null;\n }\n\n var _onFieldSetup = onFieldSetup(field, {}, _this2.props),\n _onFieldSetup2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_onFieldSetup, 2),\n Field = _onFieldSetup2[0],\n props = _onFieldSetup2[1];\n\n return (// The `key` will be assigned via `onFieldSetup`.\n // eslint-disable-next-line react/jsx-key\n wp.element.createElement(Field, props, wp.element.createElement(FieldEdit, props))\n );\n })), wp.element.createElement(\"div\", {\n className: actionsClasses\n }, allowClone && wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleCloneClick\n }, wp.element.createElement(\"span\", {\n className: \"dashicons-before dashicons-admin-page cf-complex__group-action-icon\"\n }), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Duplicate', 'carbon-fields-ui'))), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleRemoveClick\n }, wp.element.createElement(\"span\", {\n className: \"dashicons-before dashicons-trash cf-complex__group-action-icon\"\n }), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Remove', 'carbon-fields-ui'))), !tabbed && wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleToggleClick\n }, wp.element.createElement(\"span\", {\n className: toggleClasses\n }), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Collapse', 'carbon-fields-ui')))));\n }\n }]);\n\n return ComplexGroup;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexGroup);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/group.js?"); /***/ }), @@ -3212,7 +3212,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./tabs */ \"./packages/core/fields/complex/tabs.js\");\n/* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./inserter */ \"./packages/core/fields/complex/inserter.js\");\n/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./group */ \"./packages/core/fields/complex/group.js\");\n/* harmony import */ var _placeholder__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./placeholder */ \"./packages/core/fields/complex/placeholder.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"groupsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"tabsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"state\", {\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(_this.props.value, \"0.\".concat(_this.props.groupIdKey), null)\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddGroup\", function (selection) {\n var _this$props = _this.props,\n groupIdKey = _this$props.groupIdKey,\n onAddGroup = _this$props.onAddGroup;\n onAddGroup(selection, function (group) {\n if (_this.isTabbed) {\n _this.handleTabsChange(group[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleCloneGroup\", function (groupId) {\n var _this$props2 = _this.props,\n groupIdKey = _this$props2.groupIdKey,\n onCloneGroup = _this$props2.onCloneGroup;\n\n var group = _this.findGroup(groupId);\n\n onCloneGroup(group, function (clonedGroup) {\n if (_this.isTabbed) {\n _this.handleTabsChange(clonedGroup[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveGroup\", function (groupId) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n groupIdKey = _this$props3.groupIdKey,\n onRemoveGroup = _this$props3.onRemoveGroup;\n\n var group = _this.findGroup(groupId);\n\n if (_this.isTabbed) {\n var currentIndex = value.indexOf(group);\n var nextIndex = currentIndex > 0 ? currentIndex - 1 : 1;\n\n _this.setState({\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(value, \"\".concat(nextIndex, \".\").concat(groupIdKey), null)\n });\n }\n\n onRemoveGroup(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleToggleAllClick\", function () {\n var _this$props4 = _this.props,\n allGroupsAreCollapsed = _this$props4.allGroupsAreCollapsed,\n onToggleAllGroups = _this$props4.onToggleAllGroups;\n onToggleAllGroups(!allGroupsAreCollapsed);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSortGroups\", function (groups) {\n var _this$props5 = _this.props,\n id = _this$props5.id,\n onChange = _this$props5.onChange;\n onChange(id, groups);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleTabsChange\", function (groupId) {\n _this.setState({\n currentTab: groupId\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, [{\n key: \"findGroup\",\n\n /**\n * Finds a group.\n *\n * @param {string} groupId\n * @return {?Object}\n */\n value: function findGroup(groupId) {\n var _this$props6 = this.props,\n value = _this$props6.value,\n groupIdKey = _this$props6.groupIdKey;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(value, [groupIdKey, groupId]);\n }\n /**\n * Returns a list of groups that can be added if the field\n * doesn't allow duplicating of groups.\n *\n * @param {string} key\n * @return {Object[]}\n */\n\n }, {\n key: \"getAvailableGroups\",\n value: function getAvailableGroups(key) {\n var _this$props7 = this.props,\n field = _this$props7.field,\n value = _this$props7.value;\n\n if (field.duplicate_groups_allowed) {\n return field.groups;\n }\n\n var existingGroupNames = value.map(function (group) {\n return group[key];\n });\n return field.groups.filter(function (_ref) {\n var name = _ref.name;\n return existingGroupNames.indexOf(name) === -1;\n });\n }\n /**\n * Returns a list of labels of existing groups.\n *\n * @return {string[]}\n */\n\n }, {\n key: \"getGroupLabels\",\n value: function getGroupLabels() {\n var _this$props8 = this.props,\n field = _this$props8.field,\n groupValues = _this$props8.groupValues;\n return groupValues.map(function (_ref2, index) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_ref2, 2),\n name = _ref3[0],\n values = _ref3[1];\n\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(field.groups, ['name', name]);\n\n if (!group) {\n return 'N/A';\n }\n\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isString\"])(group.label_template)) {\n return group.label;\n }\n\n try {\n var label = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"template\"])(group.label_template)(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({\n $_index: index\n }, values));\n return label || group.label;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Couldn't create the label of group - \".concat(e.message));\n return 'N/A';\n }\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} selection\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var _this$props9 = this.props,\n value = _this$props9.value,\n field = _this$props9.field,\n groupIdKey = _this$props9.groupIdKey,\n groupFilterKey = _this$props9.groupFilterKey,\n allGroupsAreCollapsed = _this$props9.allGroupsAreCollapsed,\n onGroupSetup = _this$props9.onGroupSetup,\n onGroupFieldSetup = _this$props9.onGroupFieldSetup,\n onToggleGroup = _this$props9.onToggleGroup;\n var availableGroups = this.getAvailableGroups(groupFilterKey);\n var groupLabels = this.getGroupLabels(); // TODO: Move this to a memoized function.\n\n var tabs = value.map(function (group, index) {\n var id = group[groupIdKey];\n var label = groupLabels[index];\n return {\n id: id,\n label: label\n };\n });\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Fragment\"], null, this.isTabbed && !!value.length && wp.element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n forwardedRef: this.tabsList,\n options: {\n axis: field.layout === 'tabbed-vertical' ? 'y' : 'x',\n forcePlaceholderSize: true\n },\n onUpdate: this.handleSortGroups\n }, wp.element.createElement(_tabs__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n ref: this.tabsList,\n items: tabs,\n current: currentTab,\n onChange: this.handleTabsChange\n }, !!availableGroups.length && !this.isMaximumReached && wp.element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: \"+\",\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }))), !value.length && wp.element.createElement(_placeholder__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n label: \"There are no entries yet.\"\n }, wp.element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n })), !!value.length && wp.element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n options: {\n handle: '.cf-complex__group-head'\n },\n forwardedRef: this.groupsList,\n onUpdate: this.handleSortGroups\n }, wp.element.createElement(\"div\", {\n className: \"cf-complex__groups\",\n ref: this.groupsList\n }, value.map(function (group, index) {\n return (// The `key` will be assigned via `onGroupSetup`.\n // eslint-disable-next-line react/jsx-key\n wp.element.createElement(_group__WEBPACK_IMPORTED_MODULE_18__[\"default\"], onGroupSetup(group, {\n index: index,\n label: groupLabels[index],\n tabbed: _this2.isTabbed,\n hidden: _this2.isTabbed && group[groupIdKey] !== currentTab,\n allowClone: field.duplicate_groups_allowed && !_this2.isMaximumReached,\n onFieldSetup: onGroupFieldSetup,\n onClone: _this2.handleCloneGroup,\n onRemove: _this2.handleRemoveGroup,\n onToggle: onToggleGroup\n }))\n );\n }))), !this.isTabbed && !!value.length && wp.element.createElement(\"div\", {\n className: \"cf-complex__actions\"\n }, !!availableGroups.length && !this.isMaximumReached && wp.element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-complex__toggler\",\n onClick: this.handleToggleAllClick\n }, allGroupsAreCollapsed ? 'Expand All' : 'Collapse All')));\n }\n }, {\n key: \"isTabbed\",\n\n /**\n * Returns true if the field is using tabs for the layout.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.props.field.layout.indexOf('tabbed') > -1;\n }\n /**\n * Returns true if the maximum number of entries is reached.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isMaximumReached\",\n get: function get() {\n var _this$props10 = this.props,\n field = _this$props10.field,\n value = _this$props10.value;\n return field.max > 0 && value.length >= field.max;\n }\n /**\n * Returns the text used in \"Add Entry\" button.\n *\n * @return {string}\n */\n\n }, {\n key: \"inserterButtonText\",\n get: function get() {\n var field = this.props.field;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Add %s', 'carbon-fields-ui'), field.labels.singular_name);\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.field-wrapper', 'carbon-fields/core', function (OriginalField) {\n return function (props) {\n var field = props.field;\n\n if (field.type !== 'complex') {\n return wp.element.createElement(OriginalField, props);\n }\n\n return wp.element.createElement(OriginalField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n className: \"cf-complex--\".concat(field.layout)\n }, props));\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n labels = field.labels,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n var label = min === 1 ? labels.singular_name : labels.plural_name;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Minimum number of rows not reached (%1$d %2$s)', 'carbon-fields-ui'), Number(min), label.toLowerCase());\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./tabs */ \"./packages/core/fields/complex/tabs.js\");\n/* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./inserter */ \"./packages/core/fields/complex/inserter.js\");\n/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./group */ \"./packages/core/fields/complex/group.js\");\n/* harmony import */ var _placeholder__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./placeholder */ \"./packages/core/fields/complex/placeholder.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"groupsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"tabsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"state\", {\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(_this.props.value, \"0.\".concat(_this.props.groupIdKey), null)\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddGroup\", function (selection) {\n var _this$props = _this.props,\n groupIdKey = _this$props.groupIdKey,\n onAddGroup = _this$props.onAddGroup;\n onAddGroup(selection, function (group) {\n if (_this.isTabbed) {\n _this.handleTabsChange(group[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleCloneGroup\", function (groupId) {\n var _this$props2 = _this.props,\n groupIdKey = _this$props2.groupIdKey,\n onCloneGroup = _this$props2.onCloneGroup;\n\n var group = _this.findGroup(groupId);\n\n onCloneGroup(group, function (clonedGroup) {\n if (_this.isTabbed) {\n _this.handleTabsChange(clonedGroup[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveGroup\", function (groupId) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n groupIdKey = _this$props3.groupIdKey,\n onRemoveGroup = _this$props3.onRemoveGroup;\n\n var group = _this.findGroup(groupId);\n\n if (_this.isTabbed) {\n var currentIndex = value.indexOf(group);\n var nextIndex = currentIndex > 0 ? currentIndex - 1 : 1;\n\n _this.setState({\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(value, \"\".concat(nextIndex, \".\").concat(groupIdKey), null)\n });\n }\n\n onRemoveGroup(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleToggleAllClick\", function () {\n var _this$props4 = _this.props,\n allGroupsAreCollapsed = _this$props4.allGroupsAreCollapsed,\n onToggleAllGroups = _this$props4.onToggleAllGroups;\n onToggleAllGroups(!allGroupsAreCollapsed);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSortGroups\", function (groups) {\n var _this$props5 = _this.props,\n id = _this$props5.id,\n onChange = _this$props5.onChange;\n onChange(id, groups);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleTabsChange\", function (groupId) {\n _this.setState({\n currentTab: groupId\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, [{\n key: \"findGroup\",\n\n /**\n * Finds a group.\n *\n * @param {string} groupId\n * @return {?Object}\n */\n value: function findGroup(groupId) {\n var _this$props6 = this.props,\n value = _this$props6.value,\n groupIdKey = _this$props6.groupIdKey;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(value, [groupIdKey, groupId]);\n }\n /**\n * Returns a list of groups that can be added if the field\n * doesn't allow duplicating of groups.\n *\n * @param {string} key\n * @return {Object[]}\n */\n\n }, {\n key: \"getAvailableGroups\",\n value: function getAvailableGroups(key) {\n var _this$props7 = this.props,\n field = _this$props7.field,\n value = _this$props7.value;\n\n if (field.duplicate_groups_allowed) {\n return field.groups;\n }\n\n var existingGroupNames = value.map(function (group) {\n return group[key];\n });\n return field.groups.filter(function (_ref) {\n var name = _ref.name;\n return existingGroupNames.indexOf(name) === -1;\n });\n }\n /**\n * Returns a list of labels of existing groups.\n *\n * @return {string[]}\n */\n\n }, {\n key: \"getGroupLabels\",\n value: function getGroupLabels() {\n var _this$props8 = this.props,\n field = _this$props8.field,\n groupValues = _this$props8.groupValues;\n return groupValues.map(function (_ref2, index) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_ref2, 2),\n name = _ref3[0],\n values = _ref3[1];\n\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(field.groups, ['name', name]);\n\n if (!group) {\n return 'N/A';\n }\n\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isString\"])(group.label_template)) {\n return group.label;\n }\n\n try {\n var label = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"template\"])(group.label_template)(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({\n $_index: index\n }, values));\n return label || group.label;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Couldn't create the label of group - \".concat(e.message));\n return 'N/A';\n }\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} selection\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var _this$props9 = this.props,\n value = _this$props9.value,\n field = _this$props9.field,\n groupIdKey = _this$props9.groupIdKey,\n groupFilterKey = _this$props9.groupFilterKey,\n allGroupsAreCollapsed = _this$props9.allGroupsAreCollapsed,\n onGroupSetup = _this$props9.onGroupSetup,\n onGroupFieldSetup = _this$props9.onGroupFieldSetup,\n onToggleGroup = _this$props9.onToggleGroup;\n var availableGroups = this.getAvailableGroups(groupFilterKey);\n var groupLabels = this.getGroupLabels(); // TODO: Move this to a memoized function.\n\n var tabs = value.map(function (group, index) {\n var id = group[groupIdKey];\n var label = groupLabels[index];\n return {\n id: id,\n label: label\n };\n });\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Fragment\"], null, this.isTabbed && !!value.length && wp.element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n forwardedRef: this.tabsList,\n options: {\n axis: field.layout === 'tabbed-vertical' ? 'y' : 'x',\n forcePlaceholderSize: true\n },\n onUpdate: this.handleSortGroups\n }, wp.element.createElement(_tabs__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n ref: this.tabsList,\n items: tabs,\n current: currentTab,\n onChange: this.handleTabsChange\n }, !!availableGroups.length && !this.isMaximumReached && wp.element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: \"+\",\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }))), !value.length && wp.element.createElement(_placeholder__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n label: \"There are no entries yet.\"\n }, wp.element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n })), !!value.length && wp.element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n options: {\n axis: 'y',\n handle: '.cf-complex__group-head',\n placeholder: 'cf-complex__group-placeholder',\n forcePlaceholderSize: true\n },\n forwardedRef: this.groupsList,\n onUpdate: this.handleSortGroups\n }, wp.element.createElement(\"div\", {\n className: \"cf-complex__groups\",\n ref: this.groupsList\n }, value.map(function (group, index) {\n return (// The `key` will be assigned via `onGroupSetup`.\n // eslint-disable-next-line react/jsx-key\n wp.element.createElement(_group__WEBPACK_IMPORTED_MODULE_18__[\"default\"], onGroupSetup(group, {\n index: index,\n label: groupLabels[index],\n tabbed: _this2.isTabbed,\n hidden: _this2.isTabbed && group[groupIdKey] !== currentTab,\n allowClone: field.duplicate_groups_allowed && !_this2.isMaximumReached,\n onFieldSetup: onGroupFieldSetup,\n onClone: _this2.handleCloneGroup,\n onRemove: _this2.handleRemoveGroup,\n onToggle: onToggleGroup\n }))\n );\n }))), !this.isTabbed && !!value.length && wp.element.createElement(\"div\", {\n className: \"cf-complex__actions\"\n }, !!availableGroups.length && !this.isMaximumReached && wp.element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-complex__toggler\",\n onClick: this.handleToggleAllClick\n }, allGroupsAreCollapsed ? 'Expand All' : 'Collapse All')));\n }\n }, {\n key: \"isTabbed\",\n\n /**\n * Returns true if the field is using tabs for the layout.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.props.field.layout.indexOf('tabbed') > -1;\n }\n /**\n * Returns true if the maximum number of entries is reached.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isMaximumReached\",\n get: function get() {\n var _this$props10 = this.props,\n field = _this$props10.field,\n value = _this$props10.value;\n return field.max > 0 && value.length >= field.max;\n }\n /**\n * Returns the text used in \"Add Entry\" button.\n *\n * @return {string}\n */\n\n }, {\n key: \"inserterButtonText\",\n get: function get() {\n var field = this.props.field;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Add %s', 'carbon-fields-ui'), field.labels.singular_name);\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.field-wrapper', 'carbon-fields/core', function (OriginalField) {\n return function (props) {\n var field = props.field;\n\n if (field.type !== 'complex') {\n return wp.element.createElement(OriginalField, props);\n }\n\n return wp.element.createElement(OriginalField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n className: \"cf-complex--\".concat(field.layout)\n }, props));\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n labels = field.labels,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n var label = min === 1 ? labels.singular_name : labels.plural_name;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Minimum number of rows not reached (%1$d %2$s)', 'carbon-fields-ui'), Number(min), label.toLowerCase());\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/index.js?"); /***/ }), @@ -3259,7 +3259,19 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Renders the tabs navigation.\n *\n * @param {Object} props\n * @param {Object[]} props.items\n * @param {string} props.current\n * @param {mixed} props.children\n * @param {Function} props.onChange\n * @param {Object} ref\n * @return {void}\n */\n\nfunction ComplexTabs(_ref, ref) {\n var items = _ref.items,\n current = _ref.current,\n children = _ref.children,\n onChange = _ref.onChange;\n return wp.element.createElement(\"div\", {\n className: \"cf-complex__tabs\"\n }, wp.element.createElement(\"ul\", {\n className: \"cf-complex__tabs-list\",\n ref: ref\n }, items.map(function (item, index) {\n var classes = classnames__WEBPACK_IMPORTED_MODULE_0___default()('cf-complex__tabs-item', {\n 'cf-complex__tabs-item--current': item.id === current\n });\n return wp.element.createElement(\"li\", {\n key: item.id,\n className: classes,\n onClick: function onClick() {\n return onChange(item.id);\n }\n }, item.label ? wp.element.createElement(\"span\", {\n className: \"cf-complex__tabs-title\",\n dangerouslySetInnerHTML: {\n __html: item.label\n }\n }) : null, wp.element.createElement(\"span\", {\n className: \"cf-complex__tabs-index\"\n }, index + 1));\n })), children);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"])(ComplexTabs));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/tabs.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Renders the tabs navigation.\n *\n * @param {Object} props\n * @param {Object[]} props.items\n * @param {string} props.current\n * @param {mixed} props.children\n * @param {Function} props.onChange\n * @param {Object} ref\n * @return {void}\n */\n\nfunction ComplexTabs(_ref, ref) {\n var items = _ref.items,\n current = _ref.current,\n children = _ref.children,\n onChange = _ref.onChange;\n return wp.element.createElement(\"div\", {\n className: \"cf-complex__tabs\"\n }, wp.element.createElement(\"ul\", {\n className: \"cf-complex__tabs-list\",\n ref: ref\n }, items.map(function (item, index) {\n var classes = classnames__WEBPACK_IMPORTED_MODULE_0___default()('cf-complex__tabs-item', {\n 'cf-complex__tabs-item--current': item.id === current\n });\n return wp.element.createElement(\"li\", {\n key: item.id,\n className: classes,\n onClick: function onClick() {\n return onChange(item.id);\n }\n }, item.label ? wp.element.createElement(\"span\", {\n className: \"cf-complex__tabs-title\",\n dangerouslySetInnerHTML: {\n __html: item.label\n }\n }) : wp.element.createElement(\"span\", {\n className: \"cf-complex__tabs-index\"\n }, index + 1));\n })), children);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"])(ComplexTabs));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/tabs.js?"); + +/***/ }), + +/***/ "./packages/core/fields/date/index.js": +/*!********************************************!*\ + !*** ./packages/core/fields/date/index.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _hocs_with_props__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../hocs/with-props */ \"./packages/core/hocs/with-props/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../datetime */ \"./packages/core/fields/datetime/index.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_hocs_with_props__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function (props) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Select Date', 'carbon-fields-ui')\n });\n})(_datetime__WEBPACK_IMPORTED_MODULE_3__[\"default\"]));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/date/index.js?"); /***/ }), @@ -3341,7 +3353,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hocs/with-filters */ \"./packages/core/hocs/with-filters/index.js\");\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../registry/fields */ \"./packages/core/registry/fields.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./association */ \"./packages/core/fields/association/index.js\");\n/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./checkbox */ \"./packages/core/fields/checkbox/index.js\");\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./color */ \"./packages/core/fields/color/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./complex */ \"./packages/core/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./datetime */ \"./packages/core/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./file */ \"./packages/core/fields/file/index.js\");\n/* harmony import */ var _hidden__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hidden */ \"./packages/core/fields/hidden/index.js\");\n/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./html */ \"./packages/core/fields/html/index.js\");\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./map */ \"./packages/core/fields/map/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./media-gallery */ \"./packages/core/fields/media-gallery/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./multiselect */ \"./packages/core/fields/multiselect/index.js\");\n/* harmony import */ var _oembed__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./oembed */ \"./packages/core/fields/oembed/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./radio */ \"./packages/core/fields/radio/index.js\");\n/* harmony import */ var _radio_image__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./radio-image */ \"./packages/core/fields/radio-image/index.js\");\n/* harmony import */ var _rich_text__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./rich-text */ \"./packages/core/fields/rich-text/index.js\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./select */ \"./packages/core/fields/select/index.js\");\n/* harmony import */ var _separator__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./separator */ \"./packages/core/fields/separator/index.js\");\n/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./set */ \"./packages/core/fields/set/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sidebar */ \"./packages/core/fields/sidebar/index.js\");\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./text */ \"./packages/core/fields/text/index.js\");\n/* harmony import */ var _textarea__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./textarea */ \"./packages/core/fields/textarea/index.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Extends the fields with necessary hooks.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.register-field-type', 'carbon-fields/core', function (type, context, component) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"compose\"])(Object(_hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\"carbon-fields.field-edit.\".concat(context)), Object(_hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\"carbon-fields.\".concat(type, \".\").concat(context)))(component);\n});\n/**\n * Registers the fields.\n */\n\n[['association', _association__WEBPACK_IMPORTED_MODULE_5__[\"default\"]], ['checkbox', _checkbox__WEBPACK_IMPORTED_MODULE_6__[\"default\"]], ['color', _color__WEBPACK_IMPORTED_MODULE_7__[\"default\"]], ['complex', _complex__WEBPACK_IMPORTED_MODULE_8__[\"default\"]], ['date', _datetime__WEBPACK_IMPORTED_MODULE_9__[\"default\"]], ['date_time', _datetime__WEBPACK_IMPORTED_MODULE_9__[\"default\"]], ['file', _file__WEBPACK_IMPORTED_MODULE_10__[\"default\"]], ['footer_scripts', _textarea__WEBPACK_IMPORTED_MODULE_25__[\"default\"]], ['gravity_form', _select__WEBPACK_IMPORTED_MODULE_20__[\"default\"]], ['header_scripts', _textarea__WEBPACK_IMPORTED_MODULE_25__[\"default\"]], ['hidden', _hidden__WEBPACK_IMPORTED_MODULE_11__[\"default\"]], ['html', _html__WEBPACK_IMPORTED_MODULE_12__[\"default\"]], ['image', _file__WEBPACK_IMPORTED_MODULE_10__[\"default\"]], ['map', _map__WEBPACK_IMPORTED_MODULE_13__[\"default\"]], ['multiselect', _multiselect__WEBPACK_IMPORTED_MODULE_15__[\"default\"]], ['media_gallery', _media_gallery__WEBPACK_IMPORTED_MODULE_14__[\"default\"]], ['oembed', _oembed__WEBPACK_IMPORTED_MODULE_16__[\"default\"]], ['radio', _radio__WEBPACK_IMPORTED_MODULE_17__[\"default\"]], ['radio_image', _radio_image__WEBPACK_IMPORTED_MODULE_18__[\"default\"]], ['rich_text', _rich_text__WEBPACK_IMPORTED_MODULE_19__[\"default\"]], ['select', _select__WEBPACK_IMPORTED_MODULE_20__[\"default\"]], ['separator', _separator__WEBPACK_IMPORTED_MODULE_21__[\"default\"]], ['set', _set__WEBPACK_IMPORTED_MODULE_22__[\"default\"]], ['sidebar', _sidebar__WEBPACK_IMPORTED_MODULE_23__[\"default\"]], ['text', _text__WEBPACK_IMPORTED_MODULE_24__[\"default\"]], ['textarea', _textarea__WEBPACK_IMPORTED_MODULE_25__[\"default\"]], ['time', _datetime__WEBPACK_IMPORTED_MODULE_9__[\"default\"]]].forEach(function (field) {\n return _registry_fields__WEBPACK_IMPORTED_MODULE_4__[\"registerFieldType\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(field));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hocs/with-filters */ \"./packages/core/hocs/with-filters/index.js\");\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../registry/fields */ \"./packages/core/registry/fields.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./association */ \"./packages/core/fields/association/index.js\");\n/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./checkbox */ \"./packages/core/fields/checkbox/index.js\");\n/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./color */ \"./packages/core/fields/color/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./complex */ \"./packages/core/fields/complex/index.js\");\n/* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./date */ \"./packages/core/fields/date/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./datetime */ \"./packages/core/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./file */ \"./packages/core/fields/file/index.js\");\n/* harmony import */ var _hidden__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./hidden */ \"./packages/core/fields/hidden/index.js\");\n/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./html */ \"./packages/core/fields/html/index.js\");\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./map */ \"./packages/core/fields/map/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./media-gallery */ \"./packages/core/fields/media-gallery/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./multiselect */ \"./packages/core/fields/multiselect/index.js\");\n/* harmony import */ var _oembed__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./oembed */ \"./packages/core/fields/oembed/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./radio */ \"./packages/core/fields/radio/index.js\");\n/* harmony import */ var _radio_image__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./radio-image */ \"./packages/core/fields/radio-image/index.js\");\n/* harmony import */ var _rich_text__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./rich-text */ \"./packages/core/fields/rich-text/index.js\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./select */ \"./packages/core/fields/select/index.js\");\n/* harmony import */ var _separator__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./separator */ \"./packages/core/fields/separator/index.js\");\n/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./set */ \"./packages/core/fields/set/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./sidebar */ \"./packages/core/fields/sidebar/index.js\");\n/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./text */ \"./packages/core/fields/text/index.js\");\n/* harmony import */ var _textarea__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./textarea */ \"./packages/core/fields/textarea/index.js\");\n/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./time */ \"./packages/core/fields/time/index.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Extends the fields with necessary hooks.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.register-field-type', 'carbon-fields/core', function (type, context, component) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"compose\"])(Object(_hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\"carbon-fields.field-edit.\".concat(context)), Object(_hocs_with_filters__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\"carbon-fields.\".concat(type, \".\").concat(context)))(component);\n});\n/**\n * Registers the fields.\n */\n\n[['association', _association__WEBPACK_IMPORTED_MODULE_5__[\"default\"]], ['checkbox', _checkbox__WEBPACK_IMPORTED_MODULE_6__[\"default\"]], ['color', _color__WEBPACK_IMPORTED_MODULE_7__[\"default\"]], ['complex', _complex__WEBPACK_IMPORTED_MODULE_8__[\"default\"]], ['date', _date__WEBPACK_IMPORTED_MODULE_9__[\"default\"]], ['date_time', _datetime__WEBPACK_IMPORTED_MODULE_10__[\"default\"]], ['file', _file__WEBPACK_IMPORTED_MODULE_11__[\"default\"]], ['footer_scripts', _textarea__WEBPACK_IMPORTED_MODULE_26__[\"default\"]], ['gravity_form', _select__WEBPACK_IMPORTED_MODULE_21__[\"default\"]], ['header_scripts', _textarea__WEBPACK_IMPORTED_MODULE_26__[\"default\"]], ['hidden', _hidden__WEBPACK_IMPORTED_MODULE_12__[\"default\"]], ['html', _html__WEBPACK_IMPORTED_MODULE_13__[\"default\"]], ['image', _file__WEBPACK_IMPORTED_MODULE_11__[\"default\"]], ['map', _map__WEBPACK_IMPORTED_MODULE_14__[\"default\"]], ['multiselect', _multiselect__WEBPACK_IMPORTED_MODULE_16__[\"default\"]], ['media_gallery', _media_gallery__WEBPACK_IMPORTED_MODULE_15__[\"default\"]], ['oembed', _oembed__WEBPACK_IMPORTED_MODULE_17__[\"default\"]], ['radio', _radio__WEBPACK_IMPORTED_MODULE_18__[\"default\"]], ['radio_image', _radio_image__WEBPACK_IMPORTED_MODULE_19__[\"default\"]], ['rich_text', _rich_text__WEBPACK_IMPORTED_MODULE_20__[\"default\"]], ['select', _select__WEBPACK_IMPORTED_MODULE_21__[\"default\"]], ['separator', _separator__WEBPACK_IMPORTED_MODULE_22__[\"default\"]], ['set', _set__WEBPACK_IMPORTED_MODULE_23__[\"default\"]], ['sidebar', _sidebar__WEBPACK_IMPORTED_MODULE_24__[\"default\"]], ['text', _text__WEBPACK_IMPORTED_MODULE_25__[\"default\"]], ['textarea', _textarea__WEBPACK_IMPORTED_MODULE_26__[\"default\"]], ['time', _time__WEBPACK_IMPORTED_MODULE_27__[\"default\"]]].forEach(function (field) {\n return _registry_fields__WEBPACK_IMPORTED_MODULE_4__[\"registerFieldType\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(field));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/index.js?"); /***/ }), @@ -3353,7 +3365,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var observe_resize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! observe-resize */ \"./node_modules/observe-resize/index.js\");\n/* harmony import */ var observe_resize__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(observe_resize__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\nvar GoogleMap =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(GoogleMap, _Component);\n\n function GoogleMap() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, GoogleMap);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(GoogleMap)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"node\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"createRef\"])());\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(GoogleMap, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this2 = this;\n\n // Google Maps SDK isn't loaded at this moment.\n // TODO: Delay initialization of metaboxes & blocks.\n var interval = setInterval(function () {\n if (window.google) {\n clearInterval(interval);\n\n _this2.setupMap();\n\n _this2.setupMapEvents();\n\n _this2.updateMap(_this2.props);\n\n _this2.cancelResizeObserver = observe_resize__WEBPACK_IMPORTED_MODULE_7___default()(_this2.node.current, function () {\n _this2.updateMap(_this2.props);\n });\n }\n }, 100);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var _this$props = this.props,\n lat = _this$props.lat,\n lng = _this$props.lng,\n zoom = _this$props.zoom;\n\n if (this.marker) {\n var markerLat = this.marker.getPosition().lat();\n var markerLng = this.marker.getPosition().lng();\n var mapZoom = this.map.getZoom();\n\n if (lat !== markerLat || lng !== markerLng) {\n var location = new window.google.maps.LatLng(lat, lng);\n this.marker.setPosition(location);\n this.map.setCenter(location);\n }\n\n if (zoom !== mapZoom) {\n this.map.setZoom(zoom);\n }\n }\n\n this.updateMap(this.props);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelResizeObserver();\n window.google.maps.event.clearInstanceListeners(this.map);\n }\n /**\n * Initializes the map into placeholder element.\n *\n * @return {void}\n */\n\n }, {\n key: \"setupMap\",\n value: function setupMap() {\n var _this$props2 = this.props,\n lat = _this$props2.lat,\n lng = _this$props2.lng,\n zoom = _this$props2.zoom;\n var position = new window.google.maps.LatLng(lat, lng);\n this.map = new window.google.maps.Map(this.node.current, {\n zoom: zoom,\n center: position,\n mapTypeId: window.google.maps.MapTypeId.ROADMAP,\n scrollwheel: false\n });\n this.marker = new window.google.maps.Marker({\n position: position,\n map: this.map,\n draggable: true\n });\n }\n /**\n * Adds the listeners for the map's events.\n *\n * @return {void}\n */\n\n }, {\n key: \"setupMapEvents\",\n value: function setupMapEvents() {\n var _this3 = this;\n\n var enableScrollZoom = function enableScrollZoom() {\n _this3.map.setOptions({\n scrollwheel: true\n });\n };\n\n window.google.maps.event.addListenerOnce(this.map, 'click', enableScrollZoom);\n window.google.maps.event.addListenerOnce(this.map, 'dragend', enableScrollZoom); // Update the zoom when the map is changed.\n\n window.google.maps.event.addListener(this.map, 'zoom_changed', function () {\n _this3.props.onChange({\n zoom: _this3.map.getZoom()\n });\n }); // Update the position when the marker is moved.\n\n window.google.maps.event.addListener(this.marker, 'dragend', function () {\n _this3.props.onChange({\n lat: _this3.marker.getPosition().lat(),\n lng: _this3.marker.getPosition().lng()\n });\n });\n }\n /**\n * Re-draws the map.\n *\n * @param {Object} props\n * @return {void}\n */\n\n }, {\n key: \"updateMap\",\n value: function updateMap(props) {\n var _this4 = this;\n\n var lat = props.lat,\n lng = props.lng;\n var location = new window.google.maps.LatLng(lat, lng);\n setTimeout(function () {\n window.google.maps.event.trigger(_this4.map, 'resize');\n\n _this4.map.setCenter(location);\n }, 10);\n }\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n return wp.element.createElement(\"div\", {\n ref: this.node,\n className: this.props.className\n });\n }\n }]);\n\n return GoogleMap;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (GoogleMap);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/map/google-map.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var observe_resize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! observe-resize */ \"./node_modules/observe-resize/index.js\");\n/* harmony import */ var observe_resize__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(observe_resize__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\nvar GoogleMap =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(GoogleMap, _Component);\n\n function GoogleMap() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, GoogleMap);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(GoogleMap)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"node\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"createRef\"])());\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(GoogleMap, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this2 = this;\n\n this.setupMap();\n this.setupMapEvents();\n this.updateMap(this.props);\n this.cancelResizeObserver = observe_resize__WEBPACK_IMPORTED_MODULE_7___default()(this.node.current, function () {\n _this2.updateMap(_this2.props);\n });\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var _this$props = this.props,\n lat = _this$props.lat,\n lng = _this$props.lng,\n zoom = _this$props.zoom;\n\n if (this.marker) {\n var markerLat = this.marker.getPosition().lat();\n var markerLng = this.marker.getPosition().lng();\n var mapZoom = this.map.getZoom();\n\n if (lat !== markerLat || lng !== markerLng) {\n var location = new window.google.maps.LatLng(lat, lng);\n this.marker.setPosition(location);\n this.map.setCenter(location);\n }\n\n if (zoom !== mapZoom) {\n this.map.setZoom(zoom);\n }\n }\n\n this.updateMap(this.props);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelResizeObserver();\n window.google.maps.event.clearInstanceListeners(this.map);\n }\n /**\n * Initializes the map into placeholder element.\n *\n * @return {void}\n */\n\n }, {\n key: \"setupMap\",\n value: function setupMap() {\n var _this$props2 = this.props,\n lat = _this$props2.lat,\n lng = _this$props2.lng,\n zoom = _this$props2.zoom;\n var position = new window.google.maps.LatLng(lat, lng);\n this.map = new window.google.maps.Map(this.node.current, {\n zoom: zoom,\n center: position,\n mapTypeId: window.google.maps.MapTypeId.ROADMAP,\n scrollwheel: false\n });\n this.marker = new window.google.maps.Marker({\n position: position,\n map: this.map,\n draggable: true\n });\n }\n /**\n * Adds the listeners for the map's events.\n *\n * @return {void}\n */\n\n }, {\n key: \"setupMapEvents\",\n value: function setupMapEvents() {\n var _this3 = this;\n\n var enableScrollZoom = function enableScrollZoom() {\n _this3.map.setOptions({\n scrollwheel: true\n });\n };\n\n window.google.maps.event.addListenerOnce(this.map, 'click', enableScrollZoom);\n window.google.maps.event.addListenerOnce(this.map, 'dragend', enableScrollZoom); // Update the zoom when the map is changed.\n\n window.google.maps.event.addListener(this.map, 'zoom_changed', function () {\n _this3.props.onChange({\n zoom: _this3.map.getZoom()\n });\n }); // Update the position when the marker is moved.\n\n window.google.maps.event.addListener(this.marker, 'dragend', function () {\n _this3.props.onChange({\n lat: _this3.marker.getPosition().lat(),\n lng: _this3.marker.getPosition().lng()\n });\n });\n }\n /**\n * Re-draws the map.\n *\n * @param {Object} props\n * @return {void}\n */\n\n }, {\n key: \"updateMap\",\n value: function updateMap(props) {\n var _this4 = this;\n\n var lat = props.lat,\n lng = props.lng;\n var location = new window.google.maps.LatLng(lat, lng);\n setTimeout(function () {\n window.google.maps.event.trigger(_this4.map, 'resize');\n\n _this4.map.setCenter(location);\n }, 10);\n }\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n return wp.element.createElement(\"div\", {\n ref: this.node,\n className: this.props.className\n });\n }\n }]);\n\n return GoogleMap;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (GoogleMap);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/map/google-map.js?"); /***/ }), @@ -3411,7 +3423,18 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var react_select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-select */ \"./node_modules/react-select/dist/react-select.esm.js\");\n/* harmony import */ var _components_no_options__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/no-options */ \"./packages/core/components/no-options/index.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * The internal dependencies.\n */\n\n\n\nvar MultiselectField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(MultiselectField, _Component);\n\n function MultiselectField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, MultiselectField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(MultiselectField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleChange\", function (selected) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, selected.map(function (item) {\n return item.value;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"filterValues\", function (values) {\n var field = _this.props.field;\n return field.options.filter(function (option) {\n return values.indexOf(option.value) > -1;\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(MultiselectField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return field.options.length > 0 ? wp.element.createElement(react_select__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n id: id,\n name: name,\n value: this.filterValues(value),\n options: field.options,\n delimiter: field.valueDelimiter,\n onChange: this.handleChange,\n className: \"cf-multiselect__select\",\n classNamePrefix: \"cf-multiselect\",\n isMulti: true\n }) : wp.element.createElement(_components_no_options__WEBPACK_IMPORTED_MODULE_9__[\"default\"], null);\n }\n }]);\n\n return MultiselectField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (MultiselectField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/multiselect/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var react_select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-select */ \"./node_modules/react-select/dist/react-select.esm.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/multiselect/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _components_no_options__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/no-options */ \"./packages/core/components/no-options/index.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\nvar MultiselectField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(MultiselectField, _Component);\n\n function MultiselectField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, MultiselectField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(MultiselectField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleChange\", function (selected) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, selected.map(function (item) {\n return item.value;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"filterValues\", function (values) {\n var field = _this.props.field;\n return field.options.filter(function (option) {\n return values.indexOf(option.value) > -1;\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(MultiselectField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return field.options.length > 0 ? wp.element.createElement(react_select__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n id: id,\n name: name,\n value: this.filterValues(value),\n options: field.options,\n delimiter: field.valueDelimiter,\n onChange: this.handleChange,\n className: \"cf-multiselect__select\",\n classNamePrefix: \"cf-multiselect\",\n isMulti: true\n }) : wp.element.createElement(_components_no_options__WEBPACK_IMPORTED_MODULE_10__[\"default\"], null);\n }\n }]);\n\n return MultiselectField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (MultiselectField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/multiselect/index.js?"); + +/***/ }), + +/***/ "./packages/core/fields/multiselect/style.scss": +/*!*****************************************************!*\ + !*** ./packages/core/fields/multiselect/style.scss ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/multiselect/style.scss?"); /***/ }), @@ -3635,6 +3658,18 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ }), +/***/ "./packages/core/fields/time/index.js": +/*!********************************************!*\ + !*** ./packages/core/fields/time/index.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _hocs_with_props__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../hocs/with-props */ \"./packages/core/hocs/with-props/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../datetime */ \"./packages/core/fields/datetime/index.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_hocs_with_props__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function (props) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n icon: 'clock',\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Select Time', 'carbon-fields-ui')\n });\n})(_datetime__WEBPACK_IMPORTED_MODULE_3__[\"default\"]));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/time/index.js?"); + +/***/ }), + /***/ "./packages/core/hocs/with-conditional-logic/compare.js": /*!**************************************************************!*\ !*** ./packages/core/hocs/with-conditional-logic/compare.js ***! diff --git a/build/gutenberg/core.min.css b/build/gutenberg/core.min.css index fcd076334..a33c63153 100644 --- a/build/gutenberg/core.min.css +++ b/build/gutenberg/core.min.css @@ -1 +1 @@ -.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{position:relative;z-index:0}.cf-complex--tabbed-vertical .cf-complex__groups{flex:0 0 80%}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px}.cf-complex__group-body[hidden]{display:none}.cf-complex--grid .cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex--grid .cf-complex__group-actions{position:absolute;top:12px;right:12px}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex--tabbed-horizontal .cf-complex__tabs{display:inline-flex;margin-bottom:-5px}.cf-complex--tabbed-vertical .cf-complex__tabs{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex--tabbed-horizontal .cf-complex__tabs-item{margin:0 4px 4px 0}.cf-complex--tabbed-vertical .cf-complex__tabs-item~.cf-complex__tabs-item{border-top-width:0}.cf-complex__tabs-item--current,.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex--tabbed-horizontal .cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex--tabbed-vertical .cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label{margin:8px 0 12px}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-text__input{display:block;width:100%;margin:0}.cf-textarea__input{display:block;width:100%;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file +.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{position:relative;z-index:0}.cf-complex--tabbed-vertical .cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex--grid .cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex--grid .cf-complex__group-actions{position:absolute;top:12px;right:12px}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex--tabbed-horizontal .cf-complex__tabs{display:inline-flex;margin-bottom:-5px}.cf-complex--tabbed-vertical .cf-complex__tabs{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex--tabbed-horizontal .cf-complex__tabs-item{margin:0 4px 4px 0}.cf-complex--tabbed-vertical .cf-complex__tabs-item~.cf-complex__tabs-item{border-top-width:0}.cf-complex__tabs-item--current,.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex--tabbed-horizontal .cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex--tabbed-vertical .cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label{margin:8px 0 12px}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%;margin:0}.cf-textarea__input{display:block;width:100%;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file diff --git a/build/gutenberg/core.min.js b/build/gutenberg/core.min.js index f64a47a41..d1ab43909 100644 --- a/build/gutenberg/core.min.js +++ b/build/gutenberg/core.min.js @@ -1,10 +1,10 @@ -this.cf=this.cf||{},this.cf.core=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=277)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.cf.vendor.react}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n1?t-1:0),i=1;i-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(61),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(48)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(67)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(36),o=n(145),a=n(146),i=n(147),u=n(148),s=n(149);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(30)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(154),o=n(161),a=n(163),i=n(164),u=n(165);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&ec))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=c}function w(){var e=o();if(y(e))return E(e);f=setTimeout(w,function(e){var n=t-(e-d);return g?u(n,c-(e-h)):n}(e))}function E(e){return f=void 0,v&&s?b(e):(s=l=void 0,p)}function x(){var e=o(),n=y(e);if(s=arguments,l=this,d=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,t),m?b(e):p}(d);if(g)return f=setTimeout(w,t),b(d)}return void 0===f&&(f=setTimeout(w,t)),p}return t=a(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?i(a(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=d=l=f=void 0},x.flush=function(){return void 0===f?p:E(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(239)),o=a(n(241));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],c=!1,p=-1;function f(){c&&s&&(c=!1,s.length?l=s.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=u(f);c=!0;for(var t=l.length;t;){for(s=l,l=[];++p1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,i.polyfill)(f);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(95),i=n(265);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,a.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){var r=n(116);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(120))&&r.__esModule?r:{default:r};t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===c.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);c.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return c.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();p.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},p.defaultProps={options:{}},t.default=p},function(e,t,n){var r=n(251),o=n(252),a=n(256);r(".__observe-resize__ { position: absolute; left: 0; top: -100%; width: 100%; height: 100%; margin: 1px 0 0; border: none; opacity: 0; visibility: hidden; pointer-events: none; }"),e.exports=function(e,t){if(o.ok(a(e),"observe-resize: el should be a valid DOM element"),o.equal(typeof t,"function","observe-resize: cb should be type function"),"object"==typeof window){var n=!1,r=document.createElement("iframe");return r.setAttribute("class","__observe-resize__"),e.appendChild(r),o.ok(r.contentWindow,"observe-resize: no contentWindow detected - cannot start observing"),r.contentWindow.onresize=function(){n||(n=!0,window.requestAnimationFrame(function(){n=!1,t(e)}))},function(){r.parentNode&&r.parentNode.removeChild(r)}}}},function(e,t,n){(function(t){for(var r=n(258),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],l=0;!u&&l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){var r=n(275),o=n(276);e.exports=function(e,t){return o(r,e,t)}},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var u=0;for(e=0===i?"":e[0]+" ";ur&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===p.inserted[v]&&(n="",h(e,t),p.inserted[v]=n)}var O=function(){var e=E.apply(this,arguments),t=a+"-"+v;return void 0===p.registered[t]&&(p.registered[t]=b),x("."+t,e),t};function C(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):n+=t+" "}),n}function _(e,t){var n=[],r=C(n,e);return n.length<2?e:r+O(n,t)}function k(e){p.inserted[e]=!0}if(c){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var D={flush:function(){c&&(d.flush(),d.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=l(n(1)),o=l(n(21)),a=l(n(25)),i=n(44),u=l(n(244)),s=l(n(245));function l(e){return e&&e.__esModule?e:{default:e}}var c=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,l=e.hsv,c=e.hsl,p=e.onChange,f=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:c,hsv:l,onChange:p})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:c,onChange:p})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:c,renderers:m,onChange:p}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:c,hex:o,onChange:p,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:p,onSwatchHover:f}))};c.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},c.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(c)},function(e,t,n){"use strict";var r=n(122);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(124)),o=u(n(46)),a=u(n(135)),i=u(n(136));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(29),o=n(23),a=n(26);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(33),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(128)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(37);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(36);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(36),o=n(56),a=n(57);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(68),o=n(151),a=n(27),i=n(72),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,p=l.hasOwnProperty,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:u).test(i(e))}},function(e,t,n){var r,o=n(152),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(155),o=n(36),a=n(56);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(156),o=n(157),a=n(158),i=n(159),u=n(160);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(199);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(54),o=n(85),a=n(86),i=n(201),u=n(202),s=n(205),l=n(206),c=n(207),p=n(208),f=n(76),d=n(209),h=n(40),m=n(210),g=n(211),v=n(216),b=n(23),y=n(47),w=n(218),E=n(27),x=n(220),O=n(34),C="[object Arguments]",_="[object Function]",k="[object Object]",S={};S[C]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[_]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,D,A,j,M){var F,T=1&n,P=2&n,N=4&n;if(D&&(F=j?D(t,A,j,M):D(t)),void 0!==F)return F;if(!E(t))return t;var I=b(t);if(I){if(F=m(t),!T)return l(t,F)}else{var R=h(t),L=R==_||"[object GeneratorFunction]"==R;if(y(t))return s(t,T);if(R==k||R==C||L&&!j){if(F=P||L?{}:v(t),!T)return P?p(t,u(F,t)):c(t,i(F,t))}else{if(!S[R])return j?t:{};F=g(t,R,T)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,F),x(t))return t.forEach(function(r){F.add(e(r,n,D,r,t,M))}),F;if(w(t))return t.forEach(function(r,o){F.set(o,e(r,n,D,o,t,M))}),F;var B=N?P?d:f:P?keysIn:O,V=I?void 0:B(t);return o(V||t,function(r,o){V&&(r=t[o=r]),a(F,o,e(r,n,D,o,t,M))}),F}},function(e,t,n){var r=n(30),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(43),o=n(34);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(43),o=n(88);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(27),o=n(52),a=n(204),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(48)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*l/a)/100,n.hsl.a!==c)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:c,source:"rgb"}}else{var p;if(p=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==p)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:p,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*l/a+100)/100,n.hsl.h!==c)return{h:c,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var p=void 0;if(p=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==p)return{h:p,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?l=a:c<0?c=0:c>i&&(c=i);var p=100*l/a,f=-100*c/i+100;return{h:n.hsl.h,s:p,v:f,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=T(e,360),t=T(t,100),n=T(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,p,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=F(s),{ok:h,format:e.format||m,r:l(255,c(u.r,0)),g:l(255,c(u.g,0)),b:l(255,c(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r,o,a=c(e,t,n),i=l(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(f(r));return a}function A(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(f({h:r,s:o,v:a})),a=(a+u)%1;return i}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(L(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*T(this._r,255))+"%",g:s(100*T(this._g,255))+"%",b:s(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%)":"rgba("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:R(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:p(),g:p(),b:p()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),a=n/100;return f({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,a=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},f.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var l=0;ls&&(s=r,u=f(t[l]));return f.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var j=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(j);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return l(1,c(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function L(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var B,V,U,z=(V="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",U="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+V),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+V),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+V),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:c.fields,className:"flexbox-fix"},r.default.createElement("div",{style:c.double},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:s.replace("#",""),onChange:p})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.alpha},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:p,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t1?t-1:0),a=1;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(61),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,u=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=u}).call(this,n(48)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(67)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(36),o=n(145),i=n(146),a=n(147),u=n(148),s=n(149);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(30)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(154),o=n(161),i=n(163),a=n(164),u=n(165);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&ec))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=c}function w(){var e=o();if(y(e))return E(e);f=setTimeout(w,function(e){var n=t-(e-d);return g?u(n,c-(e-h)):n}(e))}function E(e){return f=void 0,v&&s?b(e):(s=l=void 0,p)}function x(){var e=o(),n=y(e);if(s=arguments,l=this,d=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,t),m?b(e):p}(d);if(g)return f=setTimeout(w,t),b(d)}return void 0===f&&(f=setTimeout(w,t)),p}return t=i(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?a(i(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=d=l=f=void 0},x.flush=function(){return void 0===f?p:E(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=i(n(239)),o=i(n(241));function i(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),i=n.toHsv(),a=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,i.h=t||0),{hsl:r,hex:"000000"===u&&0===a.a?"transparent":"#"+u,rgb:a,hsv:i,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,l=[],c=!1,p=-1;function f(){c&&s&&(c=!1,s.length?l=s.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=u(f);c=!0;for(var t=l.length;t;){for(s=l,l=[];++p1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var i=o.default.Children.only(n);return o.default.cloneElement(i,r)},r}(o.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,a.polyfill)(f);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==u){var s=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},i=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=i;var a=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),i=n(95),a=n(266);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),i=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?i:o.default.createElement(t,r,i)},r}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,i.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){var r=n(116);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(120))&&r.__esModule?r:{default:r};t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0;i--){var a=o[i],u=n[a];u!==r[a]&&(-1===c.indexOf(a)||Array.isArray(u)||(u=[u]),this.flatpickr.set(a,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);c.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,i=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return c.forEach(function(e){delete u[e]}),n.wrap?a.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),i):a.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();p.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},p.defaultProps={options:{}},t.default=p},function(e,t,n){var r=n(251),o=n(252),i=n(256);r(".__observe-resize__ { position: absolute; left: 0; top: -100%; width: 100%; height: 100%; margin: 1px 0 0; border: none; opacity: 0; visibility: hidden; pointer-events: none; }"),e.exports=function(e,t){if(o.ok(i(e),"observe-resize: el should be a valid DOM element"),o.equal(typeof t,"function","observe-resize: cb should be type function"),"object"==typeof window){var n=!1,r=document.createElement("iframe");return r.setAttribute("class","__observe-resize__"),e.appendChild(r),o.ok(r.contentWindow,"observe-resize: no contentWindow detected - cannot start observing"),r.contentWindow.onresize=function(){n||(n=!0,window.requestAnimationFrame(function(){n=!1,t(e)}))},function(){r.parentNode&&r.parentNode.removeChild(r)}}}},function(e,t,n){(function(t){for(var r=n(259),o="undefined"==typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",u=o["request"+a],s=o["cancel"+a]||o["cancelRequest"+a],l=0;!u&&l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},o,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){var r=n(276),o=n(277);e.exports=function(e,t){return o(r,e,t)}},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var u=0;for(e=0===a?"":e[0]+" ";ur&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),a=1;a=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===p.inserted[v]&&(n="",h(e,t),p.inserted[v]=n)}var O=function(){var e=E.apply(this,arguments),t=i+"-"+v;return void 0===p.registered[t]&&(p.registered[t]=b),x("."+t,e),t};function C(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):n+=t+" "}),n}function _(e,t){var n=[],r=C(n,e);return n.length<2?e:r+O(n,t)}function k(e){p.inserted[e]=!0}if(c){var S=document.querySelectorAll("[data-emotion-"+i+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+i).split(" ").forEach(k)})}var D={flush:function(){c&&(d.flush(),d.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=l(n(1)),o=l(n(21)),i=l(n(25)),a=n(44),u=l(n(244)),s=l(n(245));function l(e){return e&&e.__esModule?e:{default:e}}var c=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,l=e.hsv,c=e.hsl,p=e.onChange,f=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,i.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(a.Saturation,{style:b.Saturation,hsl:c,hsv:l,onChange:p})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(a.Hue,{style:b.Hue,hsl:c,onChange:p})),r.default.createElement("div",{style:b.alpha},r.default.createElement(a.Alpha,{style:b.Alpha,rgb:n,hsl:c,renderers:m,onChange:p}))),r.default.createElement("div",{style:b.color},r.default.createElement(a.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:c,hex:o,onChange:p,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:p,onSwatchHover:f}))};c.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},c.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,a.ColorWrap)(c)},function(e,t,n){"use strict";var r=n(122);function o(){}e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(124)),o=u(n(46)),i=u(n(135)),a=u(n(136));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,a.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,i.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(29),o=n(23),i=n(26);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(33),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(128)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),u=a.length;u--;){var s=a[e?u:++o];if(!1===n(i[s],s,i))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(37);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(36);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(36),o=n(56),i=n(57);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(68),o=n(151),i=n(27),a=n(72),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,p=l.hasOwnProperty,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?f:u).test(a(e))}},function(e,t,n){var r,o=n(152),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(155),o=n(36),i=n(56);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(156),o=n(157),i=n(158),a=n(159),u=n(160);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=i({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(199);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(54),o=n(85),i=n(86),a=n(201),u=n(202),s=n(205),l=n(206),c=n(207),p=n(208),f=n(76),d=n(209),h=n(40),m=n(210),g=n(211),v=n(216),b=n(23),y=n(47),w=n(218),E=n(27),x=n(220),O=n(34),C="[object Arguments]",_="[object Function]",k="[object Object]",S={};S[C]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[_]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,D,j,A,M){var F,T=1&n,P=2&n,N=4&n;if(D&&(F=A?D(t,j,A,M):D(t)),void 0!==F)return F;if(!E(t))return t;var I=b(t);if(I){if(F=m(t),!T)return l(t,F)}else{var R=h(t),L=R==_||"[object GeneratorFunction]"==R;if(y(t))return s(t,T);if(R==k||R==C||L&&!A){if(F=P||L?{}:v(t),!T)return P?p(t,u(F,t)):c(t,a(F,t))}else{if(!S[R])return A?t:{};F=g(t,R,T)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,F),x(t))return t.forEach(function(r){F.add(e(r,n,D,r,t,M))}),F;if(w(t))return t.forEach(function(r,o){F.set(o,e(r,n,D,o,t,M))}),F;var B=N?P?d:f:P?keysIn:O,V=I?void 0:B(t);return o(V||t,function(r,o){V&&(r=t[o=r]),i(F,o,e(r,n,D,o,t,M))}),F}},function(e,t,n){var r=n(30),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(43),o=n(34);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(43),o=n(88);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(27),o=n(52),i=n(204),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&a.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(48)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ti?1:Math.round(100*l/i)/100,n.hsl.a!==c)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:c,source:"rgb"}}else{var p;if(p=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==p)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:p,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var i=o.getContext("2d");return i?(i.fillStyle=e,i.fillRect(0,0,o.width,o.height),i.fillStyle=t,i.fillRect(0,0,n,n),i.translate(n,n),i.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,i){var a=e+"-"+t+"-"+n+(i?"-server":""),u=o(e,t,n,i);return r[a]?r[a]:(r[a]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var i=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+i),e):n.props.onChange&&n.props.onChange(o+i,e),r?n.setState({value:o+i+"%"}):n.setState({value:o+i})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-i),e):n.props.onChange&&n.props.onChange(o-i,e),r?n.setState({value:o-i+"%"}):n.setState({value:o-i}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,a.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return i.default.createElement("div",{style:t.wrap},i.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?i.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;ni?0:360*(-100*l/i+100)/100,n.hsl.h!==c)return{h:c,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var p=void 0;if(p=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==p)return{h:p,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=a(n(1)),o=a(n(21)),i=a(n(25));function a(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,a=e.children,u=(0,i.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},a))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;ni?l=i:c<0?c=0:c>a&&(c=a);var p=100*l/i,f=-100*c/a+100;return{h:n.hsl.h,s:p,v:f,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=T(e,360),t=T(t,100),n=T(n,100),0===t)r=o=i=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=a(s,u,e+1/3),o=a(s,u,e),i=a(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,p,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=F(s),{ok:h,format:e.format||m,r:l(255,c(u.r,0)),g:l(255,c(u.g,0)),b:l(255,c(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r,o,i=c(e,t,n),a=l(e,t,n),u=(i+a)/2;if(i==a)r=o=0;else{var s=i-a;switch(o=u>.5?s/(2-i-a):s/(i+a),i){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(f(r));return i}function j(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],u=1/t;t--;)a.push(f({h:r,s:o,v:i})),i=(i+u)%1;return a}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(L(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*T(this._r,255))+"%",g:s(100*T(this._g,255))+"%",b:s(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%)":"rgba("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(j,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:R(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:p(),g:p(),b:p()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),i=n/100;return f({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,i=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},f.mostReadable=function(e,t,n){var r,o,i,a,u=null,s=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var l=0;ls&&(s=r,u=f(t[l]));return f.isReadable(e,u,{level:i,size:a})||!o?u:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var A=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return l(1,c(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function L(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var B,V,U,z=(V="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",U="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+V),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+V),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+V),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,i=Array(o),a=0;a100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:c.fields,className:"flexbox-fix"},r.default.createElement("div",{style:c.double},r.default.createElement(a.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:s.replace("#",""),onChange:p})),r.default.createElement("div",{style:c.single},r.default.createElement(a.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(a.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(a.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.alpha},r.default.createElement(a.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:p,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},c=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},p=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r,a){if(0===e||e){var s,l=a||o,c=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var p=t||(n||g).dateFormat,f=String(e).trim();if("today"===f)s=new Date,r=!0;else if(/Z$/.test(f)||/GMT$/.test(f))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,p);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function w(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(c=o===s.hourElement?c-i-t(!s.amPM):a,f&&N(void 0,1,s.hourElement)),s.amPM&&p&&(1===u?c+l===23:Math.abs(c-l)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(c)}}(n);var r=s._input.value;_(),ge(),s._input.value!==r&&s._debouncedChange()}}function _(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var l=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,l.getHours()))===l.getHours()&&(o=Math.max(o,l.getMinutes())),o===l.getMinutes()&&(a=Math.max(a,l.getSeconds()))}D(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&D(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}D(e,t,n)}function D(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function A(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function j(e,t,n,r){return t instanceof Array?t.forEach(function(t){return j(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return j(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function F(){pe("onChange")}function T(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function R(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===f(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===f(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===f(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&f(e,s.selectedDates[0])>=0&&f(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),pe("onDayCreate",a),a}function L(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var l=o.children[u];if(-1===l.className.indexOf("hidden")&&J(l.dateObj))return l}}function B(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,l=i.children.length,c=u;c>=0&&c0?l:-1);c+=o){var p=i.children[c];if(-1===p.className.indexOf("hidden")&&J(p.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return L(p)}s.changeMonth(o),B(H(o),0)}(r,t):L(r)}function V(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",l=i?"nextMonthDay hidden":"nextMonthDay",c=r+1-n,p=0;c<=r;c++,p++)a.appendChild(R(u,new Date(e,t-1,c),c,p));for(c=1;c<=o;c++,p++)a.appendChild(R("",new Date(e,t,c),c,p));for(var f=o+1;f<=42-n&&(1===s.config.showMonths||p%7!=0);f++,p++)a.appendChild(R(l,new Date(e,t+1,f%o),f,p));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,pe("onYearChange")),U(),pe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),pe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&f(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&f(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),B(H(1),0)):B(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),B(H(1),0)):a||B(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var l=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),c=l.indexOf(e.target);if(-1!==c){var p=l[c+(e.shiftKey?-1:1)];void 0!==p?(e.preventDefault(),p.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],_(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],_(),ge()}pe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,l=0,c=r;cr&&cu)?u=c:c>n&&(!l||c0&&c0&&c>l;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=c||(nt&&c===n&&a.classList.add("endRange"),c>=u&&(0===l||c<=l)&&d(c,n,t)&&a.classList.add("inRange")))))},v=0,b=f.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===C.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},C.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?C.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=c(s),s.parseDate=p({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){pe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),l=window.innerHeight-u.bottom,c="above"===a||"below"!==a&&ln,p=window.pageYOffset+u.top+(c?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!c),v(s.calendarContainer,"arrowBottom",c),!s.config.inline){var f=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=f+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=p+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=f+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==f(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(_(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&pe("onYearChange"),pe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():L(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,l="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||l)&&ie()}F()}}s.parseDate=p({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=j,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&pe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),pe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&pe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=T,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void pe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),pe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),T(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);le(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),T(),k(),ge(t),t&&pe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function le(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ce(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function pe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&pe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=ce(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=ce(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):C.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):C.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var l=0;l-1?s.config[f]=r(p[f]).map(g).concat(s.config[f]):void 0===t[f]&&(s.config[f]=p[f])}pe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&le(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return j(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}j(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),pe("onChange"),pe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(F,E),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&j(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),j(window.document.body,"keydown",Q),s.config.static||j(s._input,"keydown",Q),s.config.inline||s.config.static||j(window,"resize",e),void 0!==window.ontouchstart?j(window.document,"click",K):j(window.document,"mousedown",M(K)),j(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(j(s._input,"focus",s.open),j(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(j(s.monthNav,"mousedown",M(ve)),j(s.monthNav,["keyup","increment"],A),j(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(j(s.timeContainer,["increment"],O),j(s.timeContainer,"blur",O,{capture:!0}),j(s.timeContainer,"mousedown",M(P)),j([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&j(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&j(s.amPM,"mousedown",M(function(e){O(e),F()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),pe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o11)]},M:function(e,t){return i(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},c=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r){var i=r||o;return void 0!==n.formatDate?n.formatDate(e,t,i):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,i,n):"\\"!==t?t:""}).join("")}},p=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r,i){if(0===e||e){var s,l=i||o,c=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var p=t||(n||g).dateFormat,f=String(e).trim();if("today"===f)s=new Date,r=!0;else if(/Z$/.test(f)||/GMT$/.test(f))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,p);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function w(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),i=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(o),n.appendChild(i),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ra&&(c=o===s.hourElement?c-a-t(!s.amPM):i,f&&N(void 0,1,s.hourElement)),s.amPM&&p&&(1===u?c+l===23:Math.abs(c-l)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(c)}}(n);var r=s._input.value;_(),ge(),s._input.value!==r&&s._debouncedChange()}}function _(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,i=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var a=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(i=Math.min(i,u.getSeconds()))}if(a){var l=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,l.getHours()))===l.getHours()&&(o=Math.max(o,l.getMinutes())),o===l.getMinutes()&&(i=Math.max(i,l.getSeconds()))}D(r,o,i)}}function k(e){var t=e||s.latestSelectedDateObj;t&&D(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var i=s.config.maxDate.getHours(),a=s.config.maxDate.getMinutes();(e=Math.min(e,i))===i&&(t=Math.min(a,t)),e===i&&t===a&&(n=s.config.maxDate.getSeconds())}D(e,t,n)}function D(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function j(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function F(){pe("onChange")}function T(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var a=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!a&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function R(e,t,n,r){var o=J(t,!0),i=b("span","flatpickr-day "+e,t.getDate().toString());return i.dateObj=t,i.$i=r,i.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===f(t,s.now)&&(s.todayDateElem=i,i.classList.add("today"),i.setAttribute("aria-current","date")),o?(i.tabIndex=-1,de(t)&&(i.classList.add("selected"),s.selectedDateElem=i,"range"===s.config.mode&&(v(i,"startRange",s.selectedDates[0]&&0===f(t,s.selectedDates[0],!0)),v(i,"endRange",s.selectedDates[1]&&0===f(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&i.classList.add("inRange")))):i.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&f(e,s.selectedDates[0])>=0&&f(e,s.selectedDates[1])<=0}(t)&&!de(t)&&i.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),pe("onDayCreate",i),i}function L(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],i=e>0?0:o.children.length-1,a=e>0?o.children.length:-1,u=i;u!=a;u+=e){var l=o.children[u];if(-1===l.className.indexOf("hidden")&&J(l.dateObj))return l}}function B(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,i=n-s.currentMonth;i!=r;i+=o)for(var a=s.daysContainer.children[i],u=n-s.currentMonth===i?e.$i+t:t<0?a.children.length-1:0,l=a.children.length,c=u;c>=0&&c0?l:-1);c+=o){var p=a.children[c];if(-1===p.className.indexOf("hidden")&&J(p.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return L(p)}s.changeMonth(o),B(H(o),0)}(r,t):L(r)}function V(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),i=window.document.createDocumentFragment(),a=s.config.showMonths>1,u=a?"prevMonthDay hidden":"prevMonthDay",l=a?"nextMonthDay hidden":"nextMonthDay",c=r+1-n,p=0;c<=r;c++,p++)i.appendChild(R(u,new Date(e,t-1,c),c,p));for(c=1;c<=o;c++,p++)i.appendChild(R("",new Date(e,t,c),c,p));for(var f=o+1;f<=42-n&&(1===s.config.showMonths||p%7!=0);f++,p++)i.appendChild(R(l,new Date(e,t+1,f%o),f,p));var d=b("div","dayContainer");return d.appendChild(i),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,pe("onYearChange")),U(),pe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),pe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&f(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&f(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,i=o?s.config.enable:s.config.disable,a=0;a=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var i=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:i?O():ue(e);break;case 27:e.preventDefault(),ae();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(i)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var a=39===e.keyCode?1:-1;e.ctrlKey?(q(a),B(H(1),0)):B(void 0,a)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),B(H(1),0)):i||B(void 0,7*u):s.config.enableTime&&(!i&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!i){s.element.focus();break}var l=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),c=l.indexOf(e.target);if(-1!==c){var p=l[c+(e.shiftKey?-1:1)];void 0!==p?(e.preventDefault(),p.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],_(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],_(),ge()}pe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),i=s.daysContainer.lastChild.lastChild.dateObj.getTime(),a=!1,u=0,l=0,c=r;cr&&cu)?u=c:c>n&&(!l||c0&&c0&&c>l;return h?(i.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){i.classList.remove(e)}),"continue"):a&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){i.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=c||(nt&&c===n&&i.classList.add("endRange"),c>=u&&(0===l||c<=l)&&d(c,n,t)&&i.classList.add("inRange")))))},v=0,b=f.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ie(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===C.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},C.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?C.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=c(s),s.parseDate=p({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){pe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),i=o[0],a=o.length>1?o[1]:null,u=t.getBoundingClientRect(),l=window.innerHeight-u.bottom,c="above"===i||"below"!==i&&ln,p=window.pageYOffset+u.top+(c?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!c),v(s.calendarContainer,"arrowBottom",c),!s.config.inline){var f=window.pageXOffset+u.left-(null!=a&&"center"===a?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=f+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=p+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=f+"px",s.calendarContainer.style.right="auto"))}}}function ie(){s.config.noCalendar||s.isMobile||(he(),U())}function ae(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var i=de(r);i?s.selectedDates.splice(parseInt(i),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==f(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(_(),o){var a=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),a&&pe("onYearChange"),pe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():L(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,l="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||l)&&ae()}F()}}s.parseDate=p({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&pe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),pe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&pe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=T,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void pe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),pe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ie,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),T(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);le(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),T(),k(),ge(t),t&&pe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function le(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ce(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function pe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&pe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},a,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=ce(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=ce(e)}});var i="time"===t.mode;t.dateFormat||!t.enableTime&&!i||(n.dateFormat=t.noCalendar||i?"H:i"+(t.enableSeconds?":S":""):C.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||i)&&!t.altFormat&&(n.altFormat=t.noCalendar||i?"h:i"+(t.enableSeconds?":S K":" K"):C.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var l=0;l-1?s.config[f]=r(p[f]).map(g).concat(s.config[f]):void 0===t[f]&&(s.config[f]=p[f])}pe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&le(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),pe("onChange"),pe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(F,E),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],j),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),F()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),pe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o=0;l--)if(c[l]!==p[l])return!1;for(l=c.length-1;l>=0;l--)if(!b(e[s=c[l]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&w(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(p.AssertionError,Error),p.fail=g,p.ok=v,p.equal=function(e,t,n){e!=t&&g(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){E(!0,e,t,n)},p.doesNotThrow=function(e,t,n){E(!1,e,t,n)},p.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(31))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),c(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=c(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return p(n)}var l,w="",C=!1,_=["{","}"];return d(n)&&(C=!0,_=["[","]"]),O(n)&&(w=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),x(n)&&(w=" "+p(n)),0!==i.length||C&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=C?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,w,_)):_[0]+w+_[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?c(e,s.value,null):c(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===C(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===C(e)}function x(e){return w(e)&&("[object Error]"===C(e)||e instanceof Error)}function O(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=w,t.isDate=E,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(254);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[_((e=new Date).getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(255),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(31),n(93))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(93))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(260)),o=u(n(263)),a=u(n(1)),i=u(n(94));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var l=o in t,c=o in u,p=t[o],f=(0,r.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,r.isValidElement)(p)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:p.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(p.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return c()({},e,s()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(p.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function d(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function h(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function m(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function g(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function v(e,t){return e.validation[t]||null}function b(e,t){return-1===e.hiddenFields.indexOf(t)}Object(i.registerStore)("carbon-fields/core",{reducer:f,actions:r,selectors:o});var y=n(15),w=n.n(y),E=n(14),x=n(19),O=n(5),C=n.n(O),_=n(6),k=n.n(_),S=n(7),D=n.n(S),A=n(8),j=n.n(A),M=n(9),F=n.n(M),T=n(0),P=n.n(T),N=n(3),I=16;function R(e){return Object(E.createHigherOrderComponent)(function(t){return function(n){function r(n){var o;return C()(this,r),(o=D()(this,j()(r).call(this,n))).onHooksUpdated=o.onHooksUpdated.bind(P()(P()(o))),o.Component=Object(x.applyFilters)(e,t),o.namespace=Object(p.uniqueId)("core/with-filters/component-"),o.throttledForceUpdate=Object(p.debounce)(function(){o.Component=Object(x.applyFilters)(e,t),o.forceUpdate()},I),Object(x.addAction)("hookRemoved",o.namespace,o.onHooksUpdated),Object(x.addAction)("hookAdded",o.namespace,o.onHooksUpdated),o}return F()(r,n),k()(r,[{key:"componentWillUnmount",value:function(){this.throttledForceUpdate.cancel(),Object(x.removeAction)("hookRemoved",this.namespace),Object(x.removeAction)("hookAdded",this.namespace)}},{key:"onHooksUpdated",value:function(t){t===e&&this.throttledForceUpdate()}},{key:"render",value:function(){return wp.element.createElement(this.Component,this.props)}}]),r}(N.Component)},"withFilters")}function L(e,t){var n,r=Object(p.startCase)(e),o={};return n={},s()(n,"register".concat(r,"Type"),function(n,i){return Object(p.isString)(n)?o[n]?(console.error(Object(a.sprintf)(Object(a.__)("%1$s %2$s is already registered.","carbon-fields-ui"),r,n)),!1):i&&Object(p.isFunction)(i)?(o[n]=t.reduce(function(t,r){return c()({},t,s()({},r,Object(x.applyFilters)("carbon-fields.register-".concat(e,"-type"),n,r,i)))},{}),!0):(console.error(Object(a.__)('The "component" param must be a function.',"carbon-fields-ui")),!1):(console.error(Object(a.sprintf)(Object(a.__)("%1$s type must be a string.","carbon-fields-ui"),r)),!1)}),s()(n,"get".concat(r,"Type"),function(e,n){if(t.includes(n)){if(o[e])return o[e][n];console.error("".concat(r," ").concat(e," isn't registered."))}else console.error("The provided context isn't a valid one. Must be one of - ".concat(t.join(", ")," ."))}),n}var H=L("field",["metabox","block"]),B=H.registerFieldType,V=H.getFieldType,U=n(17),z=n.n(U),W=n(32),Y=n.n(W),G=n(18),q=n(20),K=n.n(q),X=n(11),J=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a.length>=r.max||(i(o,w()(a).concat([Object(p.pick)(e,"id","type","subtype")])),u({selectedOptions:w()(s).concat([e])}))}),s()(P()(P()(n)),"handleRemoveItem",function(e){var t=n.props,r=t.value,o=t.id,a=t.onChange,i=t.setState,u=t.selectedOptions;a(o,Object(p.without)(r,e)),i({selectedOptions:Object(p.without)(u,e)})}),s()(P()(P()(n)),"handleSort",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),n}return F()(t,e),k()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.value,o=t.field,i=t.totalOptionsCount,u=t.selectedOptions,s=t.queryTerm,l=this.props.options;return o.duplicates_allowed||(l=Y()(l,function(e){e.map(function(e){return e.disabled=!!Object(p.find)(r,function(t){return Object(p.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),wp.element.createElement(N.Fragment,null,wp.element.createElement("div",{className:"cf-association__bar"},wp.element.createElement(oe,{value:s,onChange:this.handleSearchChange}),wp.element.createElement("span",{className:"cf-association__counter"},Object(a.sprintf)(Object(a.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(l.length),Number(i)))),wp.element.createElement("div",{className:"cf-association__cols"},wp.element.createElement("div",{className:"cf-association__col"},l.map(function(t,n){return wp.element.createElement("div",{className:K()("cf-association__option",{"cf-association__option--selected":t.disabled}),key:n},t.thumbnail&&wp.element.createElement("img",{className:"cf-association__option-thumb",src:t.thumbnail}),wp.element.createElement("div",{className:"cf-association__option-content"},wp.element.createElement("span",{className:"cf-association__option-title"},t.title),wp.element.createElement("span",{className:"cf-association__option-type"},t.type)),wp.element.createElement("div",{className:"cf-association__option-actions"},wp.element.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:t.edit_link}),!t.disabled&&(o.max<0||r.length2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(t,r){var o=window.jQuery.ajax({url:e,type:"get",data:n});o.done(function(e){t(e)}),o.fail(function(){r(Object(a.__)("An error occured.","carbon-fields-ui"))})})}("".concat(window.wpApiSettings.root,"carbon-fields/v1/association/"),"get",c()({container_id:e.container_id,field_id:e.base_name},t))})(o,{options:e.value}).then(function(e){i({selectedOptions:w()(u).concat(w()(e))})})}}}});Object(x.addFilter)("carbon-fields.association.validate","carbon-fields/core",function(e,t){var n=e.min;return e.required&&Object(p.isEmpty)(t)?Object(a.__)("This field is required. ","carbon-fields-ui"):n>0&&t.length=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(de.createElement)(e,n)},a}(de.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r},ke=_e(function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a1?n.setState(function(e){return{menuVisible:!e.menuVisible}}):r(t[0])}),s()(P()(P()(n)),"handleItemClick",function(e){n.setState({menuVisible:!1}),n.props.onSelect(e)}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.buttonText,r=t.groups;return wp.element.createElement("div",{className:"cf-complex__inserter"},wp.element.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},n),r.length>1&&wp.element.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},r.map(function(t,n){return wp.element.createElement("li",{className:"cf-complex__inserter-item",key:n,onClick:function(){return e.handleItemClick(t)}},t.label)})))}}]),t}(N.Component)),Pe=function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;n.setState({currentTab:Object(p.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),s()(P()(P()(n)),"handleToggleAllClick",function(){var e=n.props,t=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!t)}),s()(P()(P()(n)),"handleSortGroups",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),s()(P()(P()(n)),"handleTabsChange",function(e){n.setState({currentTab:e})}),n}return F()(t,e),k()(t,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(p.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=z()(e,2),o=r[0],a=r[1],i=Object(p.find)(t.groups,["name",o]);if(!i)return"N/A";if(!Object(p.isString)(i.label_template))return i.label;try{return Object(p.template)(i.label_template)(c()({$_index:n},a))||i.label}catch(e){return console.error("Couldn't create the label of group - ".concat(e.message)),"N/A"}})}},{key:"render",value:function(){var e=this,t=this.state.currentTab,n=this.props,r=n.value,o=n.field,a=n.groupIdKey,i=n.groupFilterKey,u=n.allGroupsAreCollapsed,s=n.onGroupSetup,l=n.onGroupFieldSetup,c=n.onToggleGroup,p=this.getAvailableGroups(i),f=this.getGroupLabels(),d=r.map(function(e,t){return{id:e[a],label:f[t]}});return wp.element.createElement(N.Fragment,null,this.isTabbed&&!!r.length&&wp.element.createElement(ae,{items:r,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===o.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleSortGroups},wp.element.createElement(Fe,{ref:this.tabsList,items:d,current:t,onChange:this.handleTabsChange},!!p.length&&!this.isMaximumReached&&wp.element.createElement(Te,{buttonText:"+",groups:p,onSelect:this.handleAddGroup}))),!r.length&&wp.element.createElement(Ne,{label:"There are no entries yet."},wp.element.createElement(Te,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup})),!!r.length&&wp.element.createElement(ae,{items:r,options:{handle:".cf-complex__group-head"},forwardedRef:this.groupsList,onUpdate:this.handleSortGroups},wp.element.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},r.map(function(n,r){return wp.element.createElement(Pe,s(n,{index:r,label:f[r],tabbed:e.isTabbed,hidden:e.isTabbed&&n[a]!==t,allowClone:o.duplicate_groups_allowed&&!e.isMaximumReached,onFieldSetup:l,onClone:e.handleCloneGroup,onRemove:e.handleRemoveGroup,onToggle:c}))}))),!this.isTabbed&&!!r.length&&wp.element.createElement("div",{className:"cf-complex__actions"},!!p.length&&!this.isMaximumReached&&wp.element.createElement(Te,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup}),wp.element.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},u?"Expand All":"Collapse All")))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(a.sprintf)(Object(a.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),t}(N.Component);Object(x.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(e){return function(t){var n=t.field;return"complex"!==n.type?wp.element.createElement(e,t):wp.element.createElement(e,Q()({className:"cf-complex--".concat(n.layout)},t))}}),Object(x.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(p.isEmpty)(t))return Object(a.__)("This field is required. ","carbon-fields-ui");if(n>0&&t.length=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},yt=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},wt=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Et=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function kt(e){return _t(e)?window.pageYOffset:e.scrollTop}function St(e,t){_t(e)?window.scrollTo(0,t):e.scrollTop=t}function Dt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:xt,o=kt(e),a=t-o,i=0;!function t(){var u,s=a*((u=(u=i+=10)/n-1)*u*u+1)+o;St(e,s),i=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&Dt(s,C,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&E>=r)return a&&Dt(s,C,160),{placement:"bottom",maxHeight:i?E-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&w>=r)&&(k=i?w-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return St(s,C),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&Dt(s,_,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&w>=r){var S=t;return(!i&&x>=r||i&&w>=r)&&(S=i?w-y:x-y),a&&Dt(s,_,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!c,isFixedPosition:c,theme:s});l&&l(p),r.setState(p)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||jt(e);return gt({},r.props,{placement:t,maxHeight:r.state.maxHeight})},yt(r,n)}return vt(t,e),ht(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(de.Component);Mt.contextTypes={getPortalPlacement:it.a.func};var Ft=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},Tt=Ft,Pt=Ft,Nt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return he.a.createElement("div",gt({className:r(Object(ot.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};Nt.defaultProps={children:"No options"};var It=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return he.a.createElement("div",gt({className:r(Object(ot.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};It.defaultProps={children:"Loading..."};var Rt=function(e){function t(){var e,n,r;dt(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=c-p-l,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),f.scrollTop=c,m=!0,r.isBottom=!0):!d&&-t>l&&(i&&!r.isTop&&i(e),f.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},yt(r,n)}return vt(t,e),ht(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return he.a.createElement($t,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(de.Component),un=function(e){function t(){return dt(this,t),yt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return vt(t,e),ht(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=bt(e,["isEnabled"]);return t?he.a.createElement(an,n):this.props.children}}]),t}(de.Component);un.defaultProps={isEnabled:!0};var sn=function(e){function t(){return dt(this,t),yt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return vt(t,e),ht(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,i=e.hasValue;return he.a.createElement("div",{className:r(Object(ot.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i},n)},t)}}]),t}(de.Component),ln=function(e){var t=e.size,n=bt(e,["size"]);return he.a.createElement("svg",gt({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(ot.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},cn=function(e){return he.a.createElement(ln,gt({size:20},e),he.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},pn=function(e){return he.a.createElement(ln,gt({size:20},e),he.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},fn=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},dn=fn,hn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return he.a.createElement("div",gt({},a,{className:r(Object(ot.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};hn.defaultProps={children:he.a.createElement(pn,null)};var mn=fn,gn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return he.a.createElement("div",gt({},a,{className:r(Object(ot.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};gn.defaultProps={children:he.a.createElement(cn,null)};var vn=function(e){var t=e.color,n=e.delay,r=e.offset;return he.a.createElement("span",{className:Object(ot.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(ot.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var bn=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,i=e.isRtl,u=e.theme.colors,s=a?u.neutral80:u.neutral20;return he.a.createElement("div",gt({},o,{className:n(Object(ot.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),he.a.createElement(vn,{color:s,delay:0,offset:i}),he.a.createElement(vn,{color:s,delay:160,offset:!0}),he.a.createElement(vn,{color:s,delay:320,offset:!i}))};bn.defaultProps={size:4};var yn=function(e){var t=e.children,n=e.innerProps;return he.a.createElement("div",n,t)},wn=yn,En=yn,xn=function(e){function t(){return dt(this,t),yt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return vt(t,e),ht(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return he.a.createElement("div",n,t)}}]),t}(de.Component);xn.defaultProps={children:he.a.createElement(cn,{size:14})};var On=function(e){function t(){return dt(this,t),yt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return vt(t,e),ht(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,i=e.getStyles,u=e.innerProps,s=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove,h=gt({className:o(Object(ot.a)(i("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),m={className:o(Object(ot.a)(i("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=gt({className:o(Object(ot.a)(i("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return he.a.createElement(p,{data:a,innerProps:h,selectProps:c},he.a.createElement(f,{data:a,innerProps:m,selectProps:c},t),he.a.createElement(d,{data:a,innerProps:g,selectProps:c}))}}]),t}(de.Component);On.defaultProps={cropWithEllipsis:!0};var Cn={ClearIndicator:gn,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,i=e.isFocused,u=e.innerRef,s=e.innerProps;return he.a.createElement("div",gt({ref:u,className:n(Object(ot.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":i},o)},s),t)},DropdownIndicator:hn,DownChevron:pn,CrossIcon:cn,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,i=e.headingProps,u=e.label,s=e.theme;return he.a.createElement("div",{className:r(Object(ot.a)(o("group",e)),{group:!0},n)},he.a.createElement(a,gt({},i,{theme:s,getStyles:o,cx:r}),u),he.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=bt(e,["className","cx","getStyles","theme"]);return he.a.createElement("div",gt({className:n(Object(ot.a)(r("groupHeading",gt({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return he.a.createElement("div",{className:r(Object(ot.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return he.a.createElement("span",gt({},o,{className:n(Object(ot.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,i=e.isDisabled,u=e.theme,s=bt(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return he.a.createElement("div",{className:Object(ot.a)(r("input",gt({theme:u},s)))},he.a.createElement(st.a,gt({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:i},s)))},LoadingIndicator:bn,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,i=e.innerProps,u=r(Object(ot.a)(o("menu",e)),{menu:!0},n);return he.a.createElement("div",gt({className:u},i,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,i=e.innerRef;return he.a.createElement("div",{className:r(Object(ot.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:i},t)},MenuPortal:Rt,LoadingMessage:It,NoOptionsMessage:Nt,MultiValue:On,MultiValueContainer:wn,MultiValueLabel:En,MultiValueRemove:xn,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.isFocused,u=e.isSelected,s=e.innerRef,l=e.innerProps;return he.a.createElement("div",gt({ref:s,className:r(Object(ot.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":i,"option--is-selected":u},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return he.a.createElement("div",gt({className:r(Object(ot.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,i=e.isDisabled,u=e.isRtl;return he.a.createElement("div",gt({className:r(Object(ot.a)(o("container",e)),{"--is-disabled":i,"--is-rtl":u},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.innerProps;return he.a.createElement("div",gt({className:r(Object(ot.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},i),t)},ValueContainer:sn},_n=function(e){return gt({},Cn,e.components)},kn={clearIndicator:mn,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:dn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Pt,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return mt(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),mt(t,"backgroundColor",i.neutral0),mt(t,"borderRadius",o),mt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),mt(t,"marginBottom",a.menuGutter),mt(t,"marginTop",a.menuGutter),mt(t,"position","absolute"),mt(t,"width","100%"),mt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Tt,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Sn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Dn={backspaceRemovesValue:!0,blurInputOnSelect:At(),captureMenuScroll:!At(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=gt({ignoreCase:!0,ignoreAccents:!0,stringify:Yt,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?Wt(t):t,l=i?Wt(a(e)):a(e);return r&&(s=s.toLowerCase(),l=l.toLowerCase()),o&&(s=zt(s),l=zt(l)),"start"===u?l.substr(0,s.length)===s:l.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},An=1,jn=function(e){function t(e){dt(this,t);var n=yt(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Mn.call(n);var r=e.value;n.cacheComponents=ct(n.cacheComponents,Vt).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++An);var o=Ct(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return vt(t,e),ht(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=Ct(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,l=this.state.isFocused;(l&&!u&&e.isDisabled||l&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?St(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,l=-1;if(a.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Sn):gt({},Sn,this.props.theme):Sn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+Ot(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var l=a?void 0:function(){return n.onOptionHover(e)},c=a?void 0:function(){return n.selectOption(e)},p=n.getElementId("option")+"-"+r;return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:p,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,l=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:l({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=this.components.Input,u=this.state.inputIsHidden,s=r||this.getElementId("input");if(!n)return he.a.createElement(qt,{id:s,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:xt,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps,p=c.cx,f=c.theme;return he.a.createElement(i,gt({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:s,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:f,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,u=t.Placeholder,s=this.commonProps,l=this.props,c=l.controlShouldRenderValue,p=l.isDisabled,f=l.isMulti,d=l.inputValue,h=l.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue;if(!this.hasValue()||!c)return d?null:he.a.createElement(u,gt({},s,{key:"placeholder",isDisabled:p}),h);if(f)return g.map(function(t){var i=t===v;return he.a.createElement(n,gt({},s,{components:{Container:r,Label:o,Remove:a},isFocused:i,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(d)return null;var b=g[0];return he.a.createElement(i,gt({},s,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return he.a.createElement(e,gt({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?he.a.createElement(e,gt({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return he.a.createElement(n,gt({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return he.a.createElement(e,gt({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,u=t.LoadingMessage,s=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,f=p.focusedOption,d=p.menuOptions,h=this.props,m=h.captureMenuScroll,g=h.inputValue,v=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,E=h.menuIsOpen,x=h.menuPlacement,O=h.menuPosition,C=h.menuPortalTarget,_=h.menuShouldBlockScroll,k=h.menuShouldScrollIntoView,S=h.noOptionsMessage,D=h.onMenuScrollToTop,A=h.onMenuScrollToBottom;if(!E)return null;var j=function(t){var n=f===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,he.a.createElement(l,gt({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},M=void 0;if(this.hasOptions())M=d.render.map(function(t){if("group"===t.type){t.type;var o=bt(t,["type"]),a=t.key+"-heading";return he.a.createElement(n,gt({},c,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return j(e)}))}if("option"===t.type)return j(t)});else if(v){var F=b({inputValue:g});if(null===F)return null;M=he.a.createElement(u,c,F)}else{var T=S({inputValue:g});if(null===T)return null;M=he.a.createElement(s,c,T)}var P={minMenuHeight:y,maxMenuHeight:w,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:k},N=he.a.createElement(Mt,gt({},c,P),function(t){var n=t.ref,r=t.placerProps,i=r.placement,u=r.maxHeight;return he.a.createElement(o,gt({},c,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:i}),he.a.createElement(un,{isEnabled:m,onTopArrive:D,onBottomArrive:A},he.a.createElement(on,{isEnabled:_},he.a.createElement(a,gt({},c,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:u}),M))))});return C||"fixed"===O?he.a.createElement(i,gt({},c,{appendTo:C,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=this.state.selectValue;if(a&&!r){if(o){if(n){var u=i.map(function(t){return e.getOptionValue(t)}).join(n);return he.a.createElement("input",{name:a,type:"hidden",value:u})}var s=i.length>0?i.map(function(t,n){return he.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):he.a.createElement("input",{name:a,type:"hidden"});return he.a.createElement("div",null,s)}var l=i[0]?this.getOptionValue(i[0]):"";return he.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?he.a.createElement(Gt,{"aria-live":"assertive"},he.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),he.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,u=a.id,s=a.isDisabled,l=this.state.isFocused,c=this.commonProps=this.getCommonProps();return he.a.createElement(r,gt({},c,{className:i,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),he.a.createElement(t,gt({},c,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l}),he.a.createElement(o,gt({},c,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),he.a.createElement(n,gt({},c,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(de.Component);jn.defaultProps=Dn;var Mn=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=_n({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(Et(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=kn[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,gt({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&_t(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=wt(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=wt(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof c&&(c(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!l||!p||!m||f&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(l){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":l?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!l){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":l?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":l?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!l)return;e.focusOption("pageup");break;case"PageDown":if(!l)return;e.focusOption("pagedown");break;case"Home":if(!l)return;e.focusOption("first");break;case"End":if(!l)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Fn=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;dt(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o-1})}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.field;return o.options.length>0?wp.element.createElement(zn,{id:t,name:n,value:this.filterValues(r),options:o.options,delimiter:o.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):wp.element.createElement(Wn,null)}}]),t}(N.Component),Gn=(n(266),function(e){function t(){var e;return C()(this,t),(e=D()(this,j()(t).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(P()(P()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(P()(P()(e))),e}return F()(t,e),k()(t,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,l=u.height;"resize"!==o||s===a&&l===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"cf-oembed__preview"},wp.element.createElement("iframe",{ref:function(t){return e.iframe=t},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var e="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",t="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(e,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),n=wp.element.createElement("html",{lang:document.documentElement.lang},wp.element.createElement("head",null,wp.element.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),wp.element.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),wp.element.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:t}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(N.renderToString)(n)),this.iframe.contentWindow.document.close()}}}]),t}(N.Component)),qn=function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.embedCode,a=e.embedType,i=e.provider;return wp.element.createElement("div",{ref:this.node},wp.element.createElement(oe,{id:t,value:r,onChange:this.handleChange}),o?wp.element.createElement(Gn,{html:o,type:a,provider:i}):null,wp.element.createElement("input",{type:"hidden",name:n,value:r,readOnly:!0}))}}]),t}(N.Component),$n=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),Kn=Object(G.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=z()(t,2),r=n[0],o=n[1],a=Object(X.pipe)(J({onFetchEmbedCode:o}),Object(X.map)(G.toProps)),i=Object(X.pipe)(r,Object(X.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(X.merge)(a,i)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(a.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(a.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}}),Xn=Object(E.compose)($n,Kn)(qn),Jn=(n(267),function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():wp.element.createElement(Wn,null)}}]),t}(N.Component));function Zn(e){return Object(E.createHigherOrderComponent)(function(t){return function(n){function r(){return C()(this,r),D()(this,j()(r).apply(this,arguments))}return F()(r,n),k()(r,[{key:"render",value:function(){return wp.element.createElement(t,Q()({},this.props,e(this.props)))}}]),r}(N.Component)},"withProps")}n(268);var Qn=Zn(function(e){return c()({},e,{field:c()({},e.field,{options:e.field.options.map(function(e){return c()({},e,{label:wp.element.createElement("img",{className:"cf-radio-image__image",src:e.label})})})})})})(Jn),er=function(e){function t(){var e;return C()(this,t),e=D()(this,j()(t).call(this)),s()(P()(P()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(p.isString)(t)?t:t.target.value)}),s()(P()(P()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=c()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=c()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return F()(t,e),k()(t,[{key:"componentDidMount",value:function(){setTimeout(this.initEditor,100)}},{key:"componentWillUnmount",value:function(){this.destroyEditor()}},{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,i=t.field,u=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":i.rich_editing},{"html-active":!i.rich_editing}],s=i.media_buttons?Object(p.template)(i.media_buttons)({id:n}):null;return wp.element.createElement("div",{id:"wp-".concat(n,"-wrap"),className:K()(u),ref:function(t){return e.editorNode=t}},i.media_buttons&&wp.element.createElement("div",{id:"wp-".concat(n,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:s}})),i.rich_editing&&wp.element.createElement("div",{className:"wp-editor-tabs"},wp.element.createElement("button",{type:"button",id:"".concat(n,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":n},Object(a.__)("Visual","carbon-fields-ui")),wp.element.createElement("button",{type:"button",id:"".concat(n,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":n},Object(a.__)("Text","carbon-fields-ui"))),wp.element.createElement("div",{id:"wp-".concat(n,"-editor-container"),className:"wp-editor-container"},wp.element.createElement("textarea",Q()({style:{width:"100%"},className:"regular-text",id:n,name:r,value:o,onChange:this.handleChange},i.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),t}(N.Component),tr=(n(269),function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?wp.element.createElement("select",{id:t,name:n,value:r||Object(p.get)(o.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},o.options.map(function(e){return wp.element.createElement("option",{key:e.value,value:e.value},e.label)})):wp.element.createElement(Wn,null)}}]),t}(N.Component)),nr=(n(270),function(e){function t(){return C()(this,t),D()(this,j()(t).apply(this,arguments))}return F()(t,e),k()(t,[{key:"render",value:function(){return wp.element.createElement("h3",null,this.props.field.label)}}]),t}(N.Component)),rr=(n(271),function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a-1}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?wp.element.createElement("ul",{className:"cf-set__list"},a.options.map(function(t,i){return wp.element.createElement("li",{className:"cf-set__list-item",key:i},wp.element.createElement("input",Q()({type:"checkbox",id:"".concat(n,"-").concat(t.value),name:"".concat(r,"[]"),checked:e.isChecked(o,t),value:t.value,className:"cf-set__input",onChange:e.handleChange},a.attributes)),wp.element.createElement("label",{className:"cf-set__label",htmlFor:"".concat(n,"-").concat(t.value)},t.label))})):wp.element.createElement(Wn,null)}}]),t}(N.Component)),or=function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(p.some)(n,function(t){return t==e});case"NOT IN":return Object(p.every)(n,function(t){return t!=e});case"INCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(i[t.field],t.compare,t.value);return e.concat(n)},[]),s=!1;switch(o){case"AND":s=Object(p.every)(u);break;case"OR":s=Object(p.some)(u)}s?e.showField(e.id):e.hideField(e.id)}}return Object(E.createHigherOrderComponent)(function(e){return Object(E.compose)(Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(i.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(G.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var wr=n(105),Er=n.n(wr),xr="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function Or(){return"cf-".concat(Er()(xr,21))}function Cr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;l--)if(c[l]!==p[l])return!1;for(l=c.length-1;l>=0;l--)if(!b(e[s=c[l]],t[s],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var a="string"==typeof r,u=!e&&o&&!n;if((!e&&i.isError(o)&&a&&w(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),i=r.indexOf("\n"+o);if(i>=0){var a=r.indexOf("\n",i+1);r=r.substring(a+1)}this.stack=r}}},i.inherits(p.AssertionError,Error),p.fail=g,p.ok=v,p.equal=function(e,t,n){e!=t&&g(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){E(!0,e,t,n)},p.doesNotThrow=function(e,t,n){E(!1,e,t,n)},p.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(31))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),c(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=c(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(i)return i;var a=Object.keys(n),u=function(e){var t={};return a.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),x(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(n);if(0===a.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return p(n)}var l,w="",C=!1,_=["{","}"];return d(n)&&(C=!0,_=["[","]"]),O(n)&&(w=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),x(n)&&(w=" "+p(n)),0!==a.length||C&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=C?function(e,t,n,r,o){for(var i=[],a=0,u=t.length;a60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,w,_)):_[0]+w+_[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,o,i){var a,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(a="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?c(e,s.value,null):c(e,s.value,n-1)).indexOf("\n")>-1&&(u=i?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return u;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===C(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===C(e)}function x(e){return w(e)&&("[object Error]"===C(e)||e instanceof Error)}function O(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(i)&&(i=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var n=r.pid;a[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else a[e]=function(){};return a[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=w,t.isDate=E,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(254);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[_((e=new Date).getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(255),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(31),n(93))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,i,a,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,i=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),a=i-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(93))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(261)),o=u(n(264)),i=u(n(1)),a=u(n(94));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),a=r.default.Children.toArray(t),u=a[0],s=a[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(i.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},a}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=i,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=i(t,u);return Object.keys(s).forEach(function(o){var i=s[o];if((0,r.isValidElement)(i)){var l=o in t,c=o in u,p=t[o],f=(0,r.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,r.isValidElement)(p)&&(s[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:p.props.in,exit:a(i,"exit",e),enter:a(i,"enter",e)})):s[o]=(0,r.cloneElement)(i,{in:!1}):s[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:a(i,"exit",e),enter:a(i,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function i(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(p.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return c()({},e,s()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(p.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function d(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function h(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function m(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function g(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function v(e,t){return e.validation[t]||null}function b(e,t){return-1===e.hiddenFields.indexOf(t)}Object(a.registerStore)("carbon-fields/core",{reducer:f,actions:r,selectors:o});var y=n(15),w=n.n(y),E=n(14),x=n(19),O=n(5),C=n.n(O),_=n(6),k=n.n(_),S=n(7),D=n.n(S),j=n(8),A=n.n(j),M=n(9),F=n.n(M),T=n(0),P=n.n(T),N=n(3),I=16;function R(e){return Object(E.createHigherOrderComponent)(function(t){return function(n){function r(n){var o;return C()(this,r),(o=D()(this,A()(r).call(this,n))).onHooksUpdated=o.onHooksUpdated.bind(P()(P()(o))),o.Component=Object(x.applyFilters)(e,t),o.namespace=Object(p.uniqueId)("core/with-filters/component-"),o.throttledForceUpdate=Object(p.debounce)(function(){o.Component=Object(x.applyFilters)(e,t),o.forceUpdate()},I),Object(x.addAction)("hookRemoved",o.namespace,o.onHooksUpdated),Object(x.addAction)("hookAdded",o.namespace,o.onHooksUpdated),o}return F()(r,n),k()(r,[{key:"componentWillUnmount",value:function(){this.throttledForceUpdate.cancel(),Object(x.removeAction)("hookRemoved",this.namespace),Object(x.removeAction)("hookAdded",this.namespace)}},{key:"onHooksUpdated",value:function(t){t===e&&this.throttledForceUpdate()}},{key:"render",value:function(){return wp.element.createElement(this.Component,this.props)}}]),r}(N.Component)},"withFilters")}function L(e,t){var n,r=Object(p.startCase)(e),o={};return n={},s()(n,"register".concat(r,"Type"),function(n,a){return Object(p.isString)(n)?o[n]?(console.error(Object(i.sprintf)(Object(i.__)("%1$s %2$s is already registered.","carbon-fields-ui"),r,n)),!1):a&&Object(p.isFunction)(a)?(o[n]=t.reduce(function(t,r){return c()({},t,s()({},r,Object(x.applyFilters)("carbon-fields.register-".concat(e,"-type"),n,r,a)))},{}),!0):(console.error(Object(i.__)('The "component" param must be a function.',"carbon-fields-ui")),!1):(console.error(Object(i.sprintf)(Object(i.__)("%1$s type must be a string.","carbon-fields-ui"),r)),!1)}),s()(n,"get".concat(r,"Type"),function(e,n){if(t.includes(n)){if(o[e])return o[e][n];console.error("".concat(r," ").concat(e," isn't registered."))}else console.error("The provided context isn't a valid one. Must be one of - ".concat(t.join(", ")," ."))}),n}var H=L("field",["metabox","block"]),B=H.registerFieldType,V=H.getFieldType,U=n(17),z=n.n(U),W=n(32),Y=n.n(W),G=n(18),q=n(20),K=n.n(q),X=n(11),J=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i.length>=r.max||(a(o,w()(i).concat([Object(p.pick)(e,"id","type","subtype")])),u({selectedOptions:w()(s).concat([e])}))}),s()(P()(P()(n)),"handleRemoveItem",function(e){var t=n.props,r=t.value,o=t.id,i=t.onChange,a=t.setState,u=t.selectedOptions;i(o,Object(p.without)(r,e)),a({selectedOptions:Object(p.without)(u,e)})}),s()(P()(P()(n)),"handleSort",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),n}return F()(t,e),k()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.value,o=t.field,a=t.totalOptionsCount,u=t.selectedOptions,s=t.queryTerm,l=this.props.options;return o.duplicates_allowed||(l=Y()(l,function(e){e.map(function(e){return e.disabled=!!Object(p.find)(r,function(t){return Object(p.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),wp.element.createElement(N.Fragment,null,wp.element.createElement("div",{className:"cf-association__bar"},wp.element.createElement(oe,{value:s,onChange:this.handleSearchChange}),wp.element.createElement("span",{className:"cf-association__counter"},Object(i.sprintf)(Object(i.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(l.length),Number(a)))),wp.element.createElement("div",{className:"cf-association__cols"},wp.element.createElement("div",{className:"cf-association__col"},l.map(function(t,n){return wp.element.createElement("div",{className:K()("cf-association__option",{"cf-association__option--selected":t.disabled}),key:n},t.thumbnail&&wp.element.createElement("img",{className:"cf-association__option-thumb",src:t.thumbnail}),wp.element.createElement("div",{className:"cf-association__option-content"},wp.element.createElement("span",{className:"cf-association__option-title"},t.title),wp.element.createElement("span",{className:"cf-association__option-type"},t.type)),wp.element.createElement("div",{className:"cf-association__option-actions"},wp.element.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:t.edit_link}),!t.disabled&&(o.max<0||r.length2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(t,r){var o=window.jQuery.ajax({url:e,type:"get",data:n});o.done(function(e){t(e)}),o.fail(function(){r(Object(i.__)("An error occured.","carbon-fields-ui"))})})}("".concat(window.wpApiSettings.root,"carbon-fields/v1/association/"),"get",c()({container_id:e.container_id,field_id:e.base_name},t))})(o,{options:e.value}).then(function(e){a({selectedOptions:w()(u).concat(w()(e))})})}}}});Object(x.addFilter)("carbon-fields.association.validate","carbon-fields/core",function(e,t){var n=e.min;return e.required&&Object(p.isEmpty)(t)?Object(i.__)("This field is required. ","carbon-fields-ui"):n>0&&t.length=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(de.createElement)(e,n)},i}(de.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r},ke=_e(function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i1?n.setState(function(e){return{menuVisible:!e.menuVisible}}):r(t[0])}),s()(P()(P()(n)),"handleItemClick",function(e){n.setState({menuVisible:!1}),n.props.onSelect(e)}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.buttonText,r=t.groups;return wp.element.createElement("div",{className:"cf-complex__inserter"},wp.element.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},n),r.length>1&&wp.element.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},r.map(function(t,n){return wp.element.createElement("li",{className:"cf-complex__inserter-item",key:n,onClick:function(){return e.handleItemClick(t)}},t.label)})))}}]),t}(N.Component)),Pe=function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0?u-1:1;n.setState({currentTab:Object(p.get)(r,"".concat(s,".").concat(o),null)})}i(a)}),s()(P()(P()(n)),"handleToggleAllClick",function(){var e=n.props,t=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!t)}),s()(P()(P()(n)),"handleSortGroups",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),s()(P()(P()(n)),"handleTabsChange",function(e){n.setState({currentTab:e})}),n}return F()(t,e),k()(t,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(p.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=z()(e,2),o=r[0],i=r[1],a=Object(p.find)(t.groups,["name",o]);if(!a)return"N/A";if(!Object(p.isString)(a.label_template))return a.label;try{return Object(p.template)(a.label_template)(c()({$_index:n},i))||a.label}catch(e){return console.error("Couldn't create the label of group - ".concat(e.message)),"N/A"}})}},{key:"render",value:function(){var e=this,t=this.state.currentTab,n=this.props,r=n.value,o=n.field,i=n.groupIdKey,a=n.groupFilterKey,u=n.allGroupsAreCollapsed,s=n.onGroupSetup,l=n.onGroupFieldSetup,c=n.onToggleGroup,p=this.getAvailableGroups(a),f=this.getGroupLabels(),d=r.map(function(e,t){return{id:e[i],label:f[t]}});return wp.element.createElement(N.Fragment,null,this.isTabbed&&!!r.length&&wp.element.createElement(ie,{items:r,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===o.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleSortGroups},wp.element.createElement(Fe,{ref:this.tabsList,items:d,current:t,onChange:this.handleTabsChange},!!p.length&&!this.isMaximumReached&&wp.element.createElement(Te,{buttonText:"+",groups:p,onSelect:this.handleAddGroup}))),!r.length&&wp.element.createElement(Ne,{label:"There are no entries yet."},wp.element.createElement(Te,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup})),!!r.length&&wp.element.createElement(ie,{items:r,options:{axis:"y",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forcePlaceholderSize:!0},forwardedRef:this.groupsList,onUpdate:this.handleSortGroups},wp.element.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},r.map(function(n,r){return wp.element.createElement(Pe,s(n,{index:r,label:f[r],tabbed:e.isTabbed,hidden:e.isTabbed&&n[i]!==t,allowClone:o.duplicate_groups_allowed&&!e.isMaximumReached,onFieldSetup:l,onClone:e.handleCloneGroup,onRemove:e.handleRemoveGroup,onToggle:c}))}))),!this.isTabbed&&!!r.length&&wp.element.createElement("div",{className:"cf-complex__actions"},!!p.length&&!this.isMaximumReached&&wp.element.createElement(Te,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup}),wp.element.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},u?"Expand All":"Collapse All")))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(i.sprintf)(Object(i.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),t}(N.Component);Object(x.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(e){return function(t){var n=t.field;return"complex"!==n.type?wp.element.createElement(e,t):wp.element.createElement(e,Q()({className:"cf-complex--".concat(n.layout)},t))}}),Object(x.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(p.isEmpty)(t))return Object(i.__)("This field is required. ","carbon-fields-ui");if(n>0&&t.length=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Et=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},xt=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Ot=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function Dt(e){return St(e)?window.pageYOffset:e.scrollTop}function jt(e,t){St(e)?window.scrollTo(0,t):e.scrollTop=t}function At(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ct,o=Dt(e),i=t-o,a=0;!function t(){var u,s=i*((u=(u=a+=10)/n-1)*u*u+1)+o;jt(e,s),a=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!a)return i&&At(s,C,160),{placement:"bottom",maxHeight:t};if(!a&&O>=r||a&&E>=r)return i&&At(s,C,160),{placement:"bottom",maxHeight:a?E-b:O-b};if("auto"===o||a){var k=t;return(!a&&x>=r||a&&w>=r)&&(k=a?w-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return jt(s,C),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(x>=d&&!a)return i&&At(s,_,160),{placement:"top",maxHeight:t};if(!a&&x>=r||a&&w>=r){var S=t;return(!a&&x>=r||a&&w>=r)&&(S=a?w-y:x-y),i&&At(s,_,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:i,shouldScroll:u&&!c,isFixedPosition:c,theme:s});l&&l(p),r.setState(p)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||Ft(e);return bt({},r.props,{placement:t,maxHeight:r.state.maxHeight})},Et(r,n)}return yt(t,e),gt(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(de.Component);Tt.contextTypes={getPortalPlacement:st.a.func};var Pt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},Nt=Pt,It=Pt,Rt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return he.a.createElement("div",bt({className:r(Object(at.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};Rt.defaultProps={children:"No options"};var Lt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return he.a.createElement("div",bt({className:r(Object(at.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};Lt.defaultProps={children:"Loading..."};var Ht=function(e){function t(){var e,n,r;mt(this,t);for(var o=arguments.length,i=Array(o),a=0;a0,h=c-p-l,m=!1;h>t&&r.isBottom&&(i&&i(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),f.scrollTop=c,m=!0,r.isBottom=!0):!d&&-t>l&&(a&&!r.isTop&&a(e),f.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},Et(r,n)}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return he.a.createElement(Xt,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(de.Component),ln=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=wt(e,["isEnabled"]);return t?he.a.createElement(sn,n):this.props.children}}]),t}(de.Component);ln.defaultProps={isEnabled:!0};var cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,i=e.getStyles,a=e.hasValue;return he.a.createElement("div",{className:r(Object(at.a)(i("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},t)}}]),t}(de.Component),pn=function(e){var t=e.size,n=wt(e,["size"]);return he.a.createElement("svg",bt({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(at.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},fn=function(e){return he.a.createElement(pn,bt({size:20},e),he.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},dn=function(e){return he.a.createElement(pn,bt({size:20},e),he.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},hn=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},mn=hn,gn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return he.a.createElement("div",bt({},i,{className:r(Object(at.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};gn.defaultProps={children:he.a.createElement(dn,null)};var vn=hn,bn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return he.a.createElement("div",bt({},i,{className:r(Object(at.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};bn.defaultProps={children:he.a.createElement(fn,null)};var yn=function(e){var t=e.color,n=e.delay,r=e.offset;return he.a.createElement("span",{className:Object(at.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(at.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var wn=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,i=e.isFocused,a=e.isRtl,u=e.theme.colors,s=i?u.neutral80:u.neutral20;return he.a.createElement("div",bt({},o,{className:n(Object(at.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),he.a.createElement(yn,{color:s,delay:0,offset:a}),he.a.createElement(yn,{color:s,delay:160,offset:!0}),he.a.createElement(yn,{color:s,delay:320,offset:!a}))};wn.defaultProps={size:4};var En=function(e){var t=e.children,n=e.innerProps;return he.a.createElement("div",n,t)},xn=En,On=En,Cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return he.a.createElement("div",n,t)}}]),t}(de.Component);Cn.defaultProps={children:he.a.createElement(fn,{size:14})};var _n=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,u=e.innerProps,s=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove,h=bt({className:o(Object(at.a)(a("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),m={className:o(Object(at.a)(a("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=bt({className:o(Object(at.a)(a("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return he.a.createElement(p,{data:i,innerProps:h,selectProps:c},he.a.createElement(f,{data:i,innerProps:m,selectProps:c},t),he.a.createElement(d,{data:i,innerProps:g,selectProps:c}))}}]),t}(de.Component);_n.defaultProps={cropWithEllipsis:!0};var kn={ClearIndicator:bn,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,u=e.innerRef,s=e.innerProps;return he.a.createElement("div",bt({ref:u,className:n(Object(at.a)(r("control",e)),{control:!0,"control--is-disabled":i,"control--is-focused":a},o)},s),t)},DropdownIndicator:gn,DownChevron:dn,CrossIcon:fn,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.headingProps,u=e.label,s=e.theme;return he.a.createElement("div",{className:r(Object(at.a)(o("group",e)),{group:!0},n)},he.a.createElement(i,bt({},a,{theme:s,getStyles:o,cx:r}),u),he.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,i=wt(e,["className","cx","getStyles","theme"]);return he.a.createElement("div",bt({className:n(Object(at.a)(r("groupHeading",bt({theme:o},i))),{"group-heading":!0},t)},i))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return he.a.createElement("div",{className:r(Object(at.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return he.a.createElement("span",bt({},o,{className:n(Object(at.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,i=e.isHidden,a=e.isDisabled,u=e.theme,s=wt(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return he.a.createElement("div",{className:Object(at.a)(r("input",bt({theme:u},s)))},he.a.createElement(ct.a,bt({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:i?0:1,outline:0,padding:0,color:"inherit"},disabled:a},s)))},LoadingIndicator:wn,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerRef,a=e.innerProps,u=r(Object(at.a)(o("menu",e)),{menu:!0},n);return he.a.createElement("div",bt({className:u},a,{ref:i}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isMulti,a=e.innerRef;return he.a.createElement("div",{className:r(Object(at.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":i},n),ref:a},t)},MenuPortal:Ht,LoadingMessage:Lt,NoOptionsMessage:Rt,MultiValue:_n,MultiValueContainer:xn,MultiValueLabel:On,MultiValueRemove:Cn,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,u=e.isSelected,s=e.innerRef,l=e.innerProps;return he.a.createElement("div",bt({ref:s,className:r(Object(at.a)(o("option",e)),{option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":u},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return he.a.createElement("div",bt({className:r(Object(at.a)(o("placeholder",e)),{placeholder:!0},n)},i),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isDisabled,u=e.isRtl;return he.a.createElement("div",bt({className:r(Object(at.a)(o("container",e)),{"--is-disabled":a,"--is-rtl":u},n)},i),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.innerProps;return he.a.createElement("div",bt({className:r(Object(at.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":i},n)},a),t)},ValueContainer:cn},Sn=function(e){return bt({},kn,e.components)},Dn={clearIndicator:vn,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:mn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:It,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return vt(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),vt(t,"backgroundColor",a.neutral0),vt(t,"borderRadius",o),vt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),vt(t,"marginBottom",i.menuGutter),vt(t,"marginTop",i.menuGutter),vt(t,"position","absolute"),vt(t,"width","100%"),vt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Nt,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*i.baseUnit+"px "+3*i.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?a.primary:a.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},jn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},An={backspaceRemovesValue:!0,blurInputOnSelect:Mt(),captureMenuScroll:!Mt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=bt({ignoreCase:!0,ignoreAccents:!0,stringify:qt,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,u=n.matchFrom,s=a?Gt(t):t,l=a?Gt(i(e)):i(e);return r&&(s=s.toLowerCase(),l=l.toLowerCase()),o&&(s=Yt(s),l=Yt(l)),"start"===u?l.substr(0,s.length)===s:l.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Mn=1,Fn=function(e){function t(e){mt(this,t);var n=Et(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Tn.call(n);var r=e.value;n.cacheComponents=ft(n.cacheComponents,zt).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Mn);var o=kt(r),i=n.buildMenuOptions(e,o);return n.state.menuOptions=i,n.state.selectValue=o,n}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var i=kt(e.value),a=this.buildMenuOptions(e,i),u=this.getNextFocusedValue(i),s=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:i,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,i,a=this.props,u=a.isDisabled,s=a.menuIsOpen,l=this.state.isFocused;(l&&!u&&e.isDisabled||l&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),i=n.offsetHeight/3,o.bottom+i>r.bottom?jt(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+i,t.scrollHeight)):o.top-i-1&&(i=a)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[i]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var u=i.indexOf(a);a||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=i.length-1,l=-1;if(i.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var i=0,a=o.indexOf(r);r||(a=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?i=a>0?a-1:o.length-1:"down"===e?i=(a+1)%o.length:"pageup"===e?(i=a-t)<0&&(i=0):"pagedown"===e?(i=a+t)>o.length-1&&(i=o.length-1):"last"===e&&(i=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[i],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(jn):bt({},jn,this.props.theme):jn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,i=o.classNamePrefix,a=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var i in n)n.hasOwnProperty(i)&&n[i]&&o.push(""+_t(e,i));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,i),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:a,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,i=e.options,a=function(e,r){var i=n.isOptionDisabled(e,t),a=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&a||!n.filterOption({label:u,value:s,data:e},o))){var l=i?void 0:function(){return n.onOptionHover(e)},c=i?void 0:function(){return n.selectOption(e)},p=n.getElementId("option")+"-"+r;return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,role:"option",tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:p,label:u,type:"option",value:s}}};return i.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=a(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var i=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:i,data:t,options:o})}}else{var u=a(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,u=i.menuIsOpen,s=i.inputValue,l=i.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:l({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=this.components.Input,u=this.state.inputIsHidden,s=r||this.getElementId("input");if(!n)return he.a.createElement(Kt,{id:s,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ct,onFocus:this.onInputFocus,readOnly:!0,tabIndex:i,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps,p=c.cx,f=c.theme;return he.a.createElement(a,bt({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:s,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,theme:f,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,u=t.Placeholder,s=this.commonProps,l=this.props,c=l.controlShouldRenderValue,p=l.isDisabled,f=l.isMulti,d=l.inputValue,h=l.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue;if(!this.hasValue()||!c)return d?null:he.a.createElement(u,bt({},s,{key:"placeholder",isDisabled:p}),h);if(f)return g.map(function(t){var a=t===v;return he.a.createElement(n,bt({},s,{components:{Container:r,Label:o,Remove:i},isFocused:a,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(d)return null;var b=g[0];return he.a.createElement(a,bt({},s,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return he.a.createElement(e,bt({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;return e&&o?he.a.createElement(e,bt({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return he.a.createElement(n,bt({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return he.a.createElement(e,bt({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,u=t.LoadingMessage,s=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,f=p.focusedOption,d=p.menuOptions,h=this.props,m=h.captureMenuScroll,g=h.inputValue,v=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,E=h.menuIsOpen,x=h.menuPlacement,O=h.menuPosition,C=h.menuPortalTarget,_=h.menuShouldBlockScroll,k=h.menuShouldScrollIntoView,S=h.noOptionsMessage,D=h.onMenuScrollToTop,j=h.onMenuScrollToBottom;if(!E)return null;var A=function(t){var n=f===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,he.a.createElement(l,bt({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},M=void 0;if(this.hasOptions())M=d.render.map(function(t){if("group"===t.type){t.type;var o=wt(t,["type"]),i=t.key+"-heading";return he.a.createElement(n,bt({},c,o,{Heading:r,headingProps:{id:i},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return A(e)}))}if("option"===t.type)return A(t)});else if(v){var F=b({inputValue:g});if(null===F)return null;M=he.a.createElement(u,c,F)}else{var T=S({inputValue:g});if(null===T)return null;M=he.a.createElement(s,c,T)}var P={minMenuHeight:y,maxMenuHeight:w,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:k},N=he.a.createElement(Tt,bt({},c,P),function(t){var n=t.ref,r=t.placerProps,a=r.placement,u=r.maxHeight;return he.a.createElement(o,bt({},c,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:a}),he.a.createElement(ln,{isEnabled:m,onTopArrive:D,onBottomArrive:j},he.a.createElement(un,{isEnabled:_},he.a.createElement(i,bt({},c,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:u}),M))))});return C||"fixed"===O?he.a.createElement(a,bt({},c,{appendTo:C,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var u=a.map(function(t){return e.getOptionValue(t)}).join(n);return he.a.createElement("input",{name:i,type:"hidden",value:u})}var s=a.length>0?a.map(function(t,n){return he.a.createElement("input",{key:"i-"+n,name:i,type:"hidden",value:e.getOptionValue(t)})}):he.a.createElement("input",{name:i,type:"hidden"});return he.a.createElement("div",null,s)}var l=a[0]?this.getOptionValue(a[0]):"";return he.a.createElement("input",{name:i,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?he.a.createElement($t,{"aria-live":"assertive"},he.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),he.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,u=i.id,s=i.isDisabled,l=this.state.isFocused,c=this.commonProps=this.getCommonProps();return he.a.createElement(r,bt({},c,{className:a,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),he.a.createElement(t,bt({},c,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l}),he.a.createElement(o,bt({},c,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),he.a.createElement(n,bt({},c,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(de.Component);Fn.defaultProps=An;var Tn=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=Sn({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,i=o.closeMenuOnSelect,a=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),i&&(e.inputIsHiddenAfterUpdate=!a,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var i=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==i}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(Ot(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=Dn[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var i=r.focusable.indexOf(o),a=r.render[i];return a&&a.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,bt({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&St(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=xt(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=xt(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,u=n.isClearable,s=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof c&&(c(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||a)return;e.focusValue("previous");break;case"ArrowRight":if(!r||a)return;e.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!l||!p||!m||f&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(l){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":l?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&i&&e.clearValue();break;case" ":if(a)return;if(!l){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":l?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":l?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!l)return;e.focusOption("pageup");break;case"PageDown":if(!l)return;e.focusOption("pagedown");break;case"Home":if(!l)return;e.focusOption("first");break;case"End":if(!l)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Pn=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;mt(this,n);for(var o=arguments.length,i=Array(o),a=0;a1?n-1:0),o=1;o-1})}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.field;return o.options.length>0?wp.element.createElement(Yn,{id:t,name:n,value:this.filterValues(r),options:o.options,delimiter:o.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):wp.element.createElement(Gn,null)}}]),t}(N.Component),$n=(n(267),function(e){function t(){var e;return C()(this,t),(e=D()(this,A()(t).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(P()(P()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(P()(P()(e))),e}return F()(t,e),k()(t,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,i=r.width,a=r.height,u=this.state,s=u.width,l=u.height;"resize"!==o||s===i&&l===a||this.setState({width:i,height:a})}}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"cf-oembed__preview"},wp.element.createElement("iframe",{ref:function(t){return e.iframe=t},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var e="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",t="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(e,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),n=wp.element.createElement("html",{lang:document.documentElement.lang},wp.element.createElement("head",null,wp.element.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),wp.element.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),wp.element.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:t}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(N.renderToString)(n)),this.iframe.contentWindow.document.close()}}}]),t}(N.Component)),Kn=function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.embedCode,i=e.embedType,a=e.provider;return wp.element.createElement("div",{ref:this.node},wp.element.createElement(oe,{id:t,value:r,onChange:this.handleChange}),o?wp.element.createElement($n,{html:o,type:i,provider:a}):null,wp.element.createElement("input",{type:"hidden",name:n,value:r,readOnly:!0}))}}]),t}(N.Component),Xn=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),Jn=Object(G.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=z()(t,2),r=n[0],o=n[1],i=Object(X.pipe)(J({onFetchEmbedCode:o}),Object(X.map)(G.toProps)),a=Object(X.pipe)(r,Object(X.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(X.merge)(i,a)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(i.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(i.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}}),Zn=Object(E.compose)(Xn,Jn)(Kn),Qn=(n(268),function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0?this.renderOptions():wp.element.createElement(Gn,null)}}]),t}(N.Component)),er=(n(269),Le(function(e){return c()({},e,{field:c()({},e.field,{options:e.field.options.map(function(e){return c()({},e,{label:wp.element.createElement("img",{className:"cf-radio-image__image",src:e.label})})})})})})(Qn)),tr=function(e){function t(){var e;return C()(this,t),e=D()(this,A()(t).call(this)),s()(P()(P()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(p.isString)(t)?t:t.target.value)}),s()(P()(P()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=c()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=c()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return F()(t,e),k()(t,[{key:"componentDidMount",value:function(){setTimeout(this.initEditor,100)}},{key:"componentWillUnmount",value:function(){this.destroyEditor()}},{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,a=t.field,u=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":a.rich_editing},{"html-active":!a.rich_editing}],s=a.media_buttons?Object(p.template)(a.media_buttons)({id:n}):null;return wp.element.createElement("div",{id:"wp-".concat(n,"-wrap"),className:K()(u),ref:function(t){return e.editorNode=t}},a.media_buttons&&wp.element.createElement("div",{id:"wp-".concat(n,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:s}})),a.rich_editing&&wp.element.createElement("div",{className:"wp-editor-tabs"},wp.element.createElement("button",{type:"button",id:"".concat(n,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":n},Object(i.__)("Visual","carbon-fields-ui")),wp.element.createElement("button",{type:"button",id:"".concat(n,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":n},Object(i.__)("Text","carbon-fields-ui"))),wp.element.createElement("div",{id:"wp-".concat(n,"-editor-container"),className:"wp-editor-container"},wp.element.createElement("textarea",Q()({style:{width:"100%"},className:"regular-text",id:n,name:r,value:o,onChange:this.handleChange},a.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),t}(N.Component),nr=(n(270),function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0?wp.element.createElement("select",{id:t,name:n,value:r||Object(p.get)(o.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},o.options.map(function(e){return wp.element.createElement("option",{key:e.value,value:e.value},e.label)})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),rr=(n(271),function(e){function t(){return C()(this,t),D()(this,A()(t).apply(this,arguments))}return F()(t,e),k()(t,[{key:"render",value:function(){return wp.element.createElement("h3",null,this.props.field.label)}}]),t}(N.Component)),or=(n(272),function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,i=t.field;return i.options.length>0?wp.element.createElement("ul",{className:"cf-set__list"},i.options.map(function(t,a){return wp.element.createElement("li",{className:"cf-set__list-item",key:a},wp.element.createElement("input",Q()({type:"checkbox",id:"".concat(n,"-").concat(t.value),name:"".concat(r,"[]"),checked:e.isChecked(o,t),value:t.value,className:"cf-set__input",onChange:e.handleChange},i.attributes)),wp.element.createElement("label",{className:"cf-set__label",htmlFor:"".concat(n,"-").concat(t.value)},t.label))})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),ir=function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(p.some)(n,function(t){return t==e});case"NOT IN":return Object(p.every)(n,function(t){return t!=e});case"INCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(a[t.field],t.compare,t.value);return e.concat(n)},[]),s=!1;switch(o){case"AND":s=Object(p.every)(u);break;case"OR":s=Object(p.some)(u)}s?e.showField(e.id):e.hideField(e.id)}}return Object(E.createHigherOrderComponent)(function(e){return Object(E.compose)(Object(a.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(a.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(G.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var xr=n(105),Or=n.n(xr),Cr="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function _r(){return"cf-".concat(Or()(Cr,21))}function kr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r (start, sink) => {\n if (start !== 0) return;\n i /***/ }), -/***/ "./node_modules/callbag-debounce/es/debounce.js": -/*!******************************************************!*\ - !*** ./node_modules/callbag-debounce/es/debounce.js ***! - \******************************************************/ -/*! exports provided: debounce */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"debounce\", function() { return debounce; });\n/**\n * Debounces the given listenable source\n *\n * @param {number} wait - The number of ms to wait before letting a value pass\n * @returns {Function}\n */\nfunction debounce(wait) {\n return function (source) { return function (start, sink) {\n if (start !== 0)\n return;\n var timeout;\n source(0, function (t, d) {\n if (t === 1 || (t === 2 && d === undefined)) {\n // t === 1 means the source is emitting a value\n // t === 2 and d === undefined means the source emits a completion\n if (!timeout && t === 2) {\n return sink(t, d);\n }\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(function () {\n sink(t, d);\n timeout = undefined;\n }, wait);\n }\n else\n sink(t, d);\n });\n }; };\n}\n//# sourceMappingURL=debounce.js.map\n\n//# sourceURL=webpack:///./node_modules/callbag-debounce/es/debounce.js?"); - -/***/ }), - /***/ "./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js": /*!***********************************************************************************************!*\ !*** ./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js ***! @@ -455,7 +443,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderContainer\", function() { return renderContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeContainers; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks */ \"./packages/metaboxes/containers/hooks.js\");\n/* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./widget */ \"./packages/metaboxes/containers/widget/index.js\");\n/* harmony import */ var _term_meta__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./term-meta */ \"./packages/metaboxes/containers/term-meta/index.js\");\n/* harmony import */ var _theme_options__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-options */ \"./packages/metaboxes/containers/theme-options/index.js\");\n/* harmony import */ var _components_container__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../components/container */ \"./packages/metaboxes/components/container/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./registry */ \"./packages/metaboxes/containers/registry.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Registers the containers.\n */\n\n['post_meta', 'term_meta', 'user_meta', 'comment_meta', 'network', 'theme_options', 'nav_menu_item', 'widget'].forEach(function (type) {\n return Object(_registry__WEBPACK_IMPORTED_MODULE_9__[\"registerContainerType\"])(type, _components_container__WEBPACK_IMPORTED_MODULE_8__[\"default\"]);\n});\n/**\n * Renders the given container.\n *\n * @param {Object} container\n * @param {string} context\n * @return {void}\n */\n\nfunction renderContainer(container, context) {\n var node = document.querySelector(\".container-\".concat(container.id));\n var Component = Object(_registry__WEBPACK_IMPORTED_MODULE_9__[\"getContainerType\"])(container.type, context);\n\n if (node) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(wp.element.createElement(Component, {\n id: container.id\n }), node);\n } else {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Could not find DOM element for container \"%1$s\".', 'carbon-fields-ui'), container.id));\n }\n}\n/**\n * Initializes the containers.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeContainers(context) {\n var containers = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getContainers();\n Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"forEach\"])(containers, function (container) {\n renderContainer(container, context);\n });\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderContainer\", function() { return renderContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeContainers; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks */ \"./packages/metaboxes/containers/hooks.js\");\n/* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./widget */ \"./packages/metaboxes/containers/widget/index.js\");\n/* harmony import */ var _term_meta__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./term-meta */ \"./packages/metaboxes/containers/term-meta/index.js\");\n/* harmony import */ var _theme_options__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-options */ \"./packages/metaboxes/containers/theme-options/index.js\");\n/* harmony import */ var _user_meta__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./user-meta */ \"./packages/metaboxes/containers/user-meta/index.js\");\n/* harmony import */ var _components_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/container */ \"./packages/metaboxes/components/container/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./registry */ \"./packages/metaboxes/containers/registry.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n/**\n * Registers the containers.\n */\n\n['post_meta', 'term_meta', 'user_meta', 'comment_meta', 'network', 'theme_options', 'nav_menu_item', 'widget'].forEach(function (type) {\n return Object(_registry__WEBPACK_IMPORTED_MODULE_10__[\"registerContainerType\"])(type, _components_container__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\n});\n/**\n * Renders the given container.\n *\n * @param {Object} container\n * @param {string} context\n * @return {void}\n */\n\nfunction renderContainer(container, context) {\n var node = document.querySelector(\".container-\".concat(container.id));\n var Component = Object(_registry__WEBPACK_IMPORTED_MODULE_10__[\"getContainerType\"])(container.type, context);\n\n if (node) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(wp.element.createElement(Component, {\n id: container.id\n }), node);\n } else {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Could not find DOM element for container \"%1$s\".', 'carbon-fields-ui'), container.id));\n }\n}\n/**\n * Initializes the containers.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeContainers(context) {\n var containers = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getContainers();\n Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"forEach\"])(containers, function (container) {\n renderContainer(container, context);\n });\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/index.js?"); /***/ }), @@ -517,6 +505,29 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ }), +/***/ "./packages/metaboxes/containers/user-meta/index.js": +/*!**********************************************************!*\ + !*** ./packages/metaboxes/containers/user-meta/index.js ***! + \**********************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/user-meta/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/user-meta/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/containers/user-meta/style.scss": +/*!************************************************************!*\ + !*** ./packages/metaboxes/containers/user-meta/style.scss ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/user-meta/style.scss?"); + +/***/ }), + /***/ "./packages/metaboxes/containers/widget/index.js": /*!*******************************************************!*\ !*** ./packages/metaboxes/containers/widget/index.js ***! @@ -563,18 +574,6 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ }), -/***/ "./packages/metaboxes/fields/date/index.js": -/*!*************************************************!*\ - !*** ./packages/metaboxes/fields/date/index.js ***! - \*************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.date-field.metabox', 'carbon-fields/metaboxes', function (OriginalDatetimeField) {\n return function (props) {\n return wp.element.createElement(OriginalDatetimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Date', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/date/index.js?"); - -/***/ }), - /***/ "./packages/metaboxes/fields/datetime/index.js": /*!*****************************************************!*\ !*** ./packages/metaboxes/fields/datetime/index.js ***! @@ -619,7 +618,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./date */ \"./packages/metaboxes/fields/date/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./time */ \"./packages/metaboxes/fields/time/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./multiselect */ \"./packages/metaboxes/fields/multiselect/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/index.js?"); /***/ }), @@ -646,6 +645,29 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ }), +/***/ "./packages/metaboxes/fields/multiselect/index.js": +/*!********************************************************!*\ + !*** ./packages/metaboxes/fields/multiselect/index.js ***! + \********************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/multiselect/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/multiselect/index.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/fields/multiselect/style.scss": +/*!**********************************************************!*\ + !*** ./packages/metaboxes/fields/multiselect/style.scss ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/multiselect/style.scss?"); + +/***/ }), + /***/ "./packages/metaboxes/fields/radio/index.js": /*!**************************************************!*\ !*** ./packages/metaboxes/fields/radio/index.js ***! @@ -681,18 +703,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ }), -/***/ "./packages/metaboxes/fields/time/index.js": -/*!*************************************************!*\ - !*** ./packages/metaboxes/fields/time/index.js ***! - \*************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.time.metabox', 'carbon-fields/metaboxes', function (OriginalDatetimeField) {\n return function (props) {\n return wp.element.createElement(OriginalDatetimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n icon: \"clock\",\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Time', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/time/index.js?"); - -/***/ }), - /***/ "./packages/metaboxes/hocs/with-conditional-logic/index.js": /*!*****************************************************************!*\ !*** ./packages/metaboxes/hocs/with-conditional-logic/index.js ***! @@ -701,7 +711,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_debounce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-debounce */ \"./node_modules/callbag-debounce/es/debounce.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.field.container_id)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(getFieldsByContainerId, props.field.container_id)), Object(callbag_debounce__WEBPACK_IMPORTED_MODULE_3__[\"debounce\"])(250), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_6__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.field.container_id);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"find\"])(fields, function (field) {\n return field.container_id === props.field.container_id && Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-conditional-logic/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.field.container_id)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"fromSelector\"])(getFieldsByContainerId, props.field.container_id)), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.field.container_id);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(fields, function (field) {\n return field.container_id === props.field.container_id && Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-conditional-logic/index.js?"); /***/ }), diff --git a/build/gutenberg/metaboxes.min.css b/build/gutenberg/metaboxes.min.css index 15a9607cc..d7aa7c483 100644 --- a/build/gutenberg/metaboxes.min.css +++ b/build/gutenberg/metaboxes.min.css @@ -1 +1 @@ -.postbox .cf-complex__inserter-menu{margin:0;border-radius:3px;background-color:#191e23}.postbox .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-color:transparent #191e23;border-style:solid;border-width:5px 5px 5px 0;margin-top:-5px;content:""}.postbox .cf-complex__inserter-item{font-weight:600;color:#fff;transition:color .1s linear}.postbox .cf-complex__inserter-item:hover{color:#00a0d2}.postbox .cf-complex__tabs-item,.postbox .cf-complex__tabs .cf-complex__inserter-button{font-weight:600;color:#23282d}.postbox .cf-field{flex:1 1 100%;padding:12px;border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.postbox .cf-field__label{padding-bottom:5px;font-weight:600;color:#23282d}.cf-field__help{display:inline-block;color:#666;margin-top:10px}.postbox .cf-media-gallery__inner{border:1px solid #e2e4e7}.postbox .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__actions{padding-left:0}.cf-container-term-meta .cf-media-gallery__list{margin:0 -8px;max-height:285px}.cf-container-term-meta .cf-media-gallery__item{flex-basis:20%}.cf-container-term-meta .cf-media-gallery__item-inner,.postbox .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__item-preview,.postbox .cf-media-gallery__item-preview{background-color:#f3f4f5}.cf-container-term-meta .cf-media-gallery__item-name,.postbox .cf-media-gallery__item-name{border-top:1px solid #e2e4e7;background-color:#f3f4f5}.inside .cf-radio-image .cf-radio__input:focus~.cf-radio__label{box-shadow:0 0 2px rgba(0,160,210,.8)}.inside .cf-radio-image__image{border:1px solid #b5bcc2}.inside .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.inside .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-container-widget .cf-field{margin:1em 0 .2em}.cf-container-term-meta{margin-bottom:13px}.carbon-table-row .cf-container-term-meta{margin-bottom:0}.cf-container-term-meta .cf-field{margin-top:13px}.cf-container-term-meta .cf-field:first-child{margin-top:0}.carbon-table-row .cf-field__head{position:absolute;left:0;font-weight:600}.carbon-table-row .cf-field__body{width:95%}.carbon-network #post-body.columns-2 #postbox-container-1.fixed,.carbon-theme-options #post-body.columns-2 #postbox-container-1.fixed{position:fixed;right:0;margin-right:20px}.carbon-box.hide-if-js:not([hidden]){display:block}#poststuff .carbon-box .inside,.carbon-box .inside{padding:0;margin:0}.cf-container__fields{display:flex;flex-wrap:wrap;margin:-1px -1px 0 0}.cf-container__fields[hidden]{display:none}.block-editor .cf-container__fields{border-left:1px solid #e2e4e7}.cf-container__tabs{position:relative;z-index:1;padding:12px 12px 0;border-bottom:1px solid #e2e4e7;background-color:#fbfbfc}.cf-container__tabs-list{display:flex;flex-wrap:wrap;margin:0 0 -1px}.cf-container__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0 8px 0 0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-container__tabs-item:hover{background-color:#fff}.cf-container__tabs-item--current{background-color:#fff;border-bottom-color:#fff} \ No newline at end of file +.postbox .cf-complex__inserter-menu{margin:0;border-radius:3px;background-color:#191e23}.postbox .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-color:transparent #191e23;border-style:solid;border-width:5px 5px 5px 0;margin-top:-5px;content:""}.postbox .cf-complex__inserter-item{font-weight:600;color:#fff;transition:color .1s linear}.postbox .cf-complex__inserter-item:hover{color:#00a0d2}.postbox .cf-complex__tabs-item,.postbox .cf-complex__tabs .cf-complex__inserter-button{font-weight:600;color:#23282d}.postbox .cf-field{flex:1 1 100%;padding:12px;border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.postbox .cf-field__label{padding-bottom:5px;font-weight:600;color:#23282d}.cf-field__help{display:inline-block;color:#666;margin-top:10px}.postbox .cf-multiselect__control{border-color:#ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.postbox .cf-multiselect__control--is-focused,.postbox .cf-multiselect__control--is-focused:hover{box-shadow:0 0 2px rgba(0,115,170,.8)}.postbox .cf-media-gallery__inner{border:1px solid #e2e4e7}.postbox .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__actions{padding-left:0}.cf-container-term-meta .cf-media-gallery__list{margin:0 -8px;max-height:285px}.cf-container-term-meta .cf-media-gallery__item{flex-basis:20%}.cf-container-term-meta .cf-media-gallery__item-inner,.postbox .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__item-preview,.postbox .cf-media-gallery__item-preview{background-color:#f3f4f5}.cf-container-term-meta .cf-media-gallery__item-name,.postbox .cf-media-gallery__item-name{border-top:1px solid #e2e4e7;background-color:#f3f4f5}.inside .cf-radio-image .cf-radio__input:focus~.cf-radio__label{box-shadow:0 0 2px rgba(0,160,210,.8)}.inside .cf-radio-image__image{border:1px solid #b5bcc2}.inside .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.inside .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-container-widget .cf-field{margin:1em 0 .2em}.cf-container-term-meta{margin-bottom:13px}.carbon-table-row .cf-container-term-meta{margin-bottom:0}.cf-container-term-meta .cf-field{margin-top:13px}.cf-container-term-meta .cf-field:first-child{margin-top:0}.carbon-table-row .cf-field__head{position:absolute;left:0;font-weight:600}.carbon-table-row .cf-field__body{width:95%}.carbon-network #post-body.columns-2 #postbox-container-1.fixed,.carbon-theme-options #post-body.columns-2 #postbox-container-1.fixed{position:fixed;right:0;margin-right:20px}.cf-container-user-meta{max-width:600px}.carbon-box.hide-if-js:not([hidden]){display:block}#poststuff .carbon-box .inside,.carbon-box .inside{padding:0;margin:0}.cf-container__fields{display:flex;flex-wrap:wrap;margin:-1px -1px 0 0}.cf-container__fields[hidden]{display:none}.block-editor .cf-container__fields{border-left:1px solid #e2e4e7}.cf-container__tabs{position:relative;z-index:1;padding:12px 12px 0;border-bottom:1px solid #e2e4e7;background-color:#fbfbfc}.cf-container__tabs-list{display:flex;flex-wrap:wrap;margin:0 0 -1px}.cf-container__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0 8px 0 0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-container__tabs-item:hover{background-color:#fff}.cf-container__tabs-item--current{background-color:#fff;border-bottom-color:#fff} \ No newline at end of file diff --git a/build/gutenberg/metaboxes.min.js b/build/gutenberg/metaboxes.min.js index c61c03ca9..452b7241f 100644 --- a/build/gutenberg/metaboxes.min.js +++ b/build/gutenberg/metaboxes.min.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=40)}([function(e,t){e.exports=lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=wp.hooks},function(e,t){e.exports=wp.data},function(e,t){e.exports=cf.core},function(e,t){e.exports=wp.i18n},function(e,t,n){var r=n(8);e.exports=function(e){for(var t=1;t(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=cf.vendor.classnames},function(e,t){e.exports=(e=>t=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return b()(e,function(e){Object(a.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return b()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(a.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return b()(e,function(e){Object(a.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return b()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return b()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return b()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(a.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(m.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(m.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(a.assign)(e,Object(a.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(a.omit)(e,n);case"RECEIVE_SIDEBAR":return b()(e,function(e){Object(a.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return f()({},e,d()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(a.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function O(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function g(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function y(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function h(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function w(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function E(e){return{type:"ADD_CONTAINER",payload:e}}function x(e){return{type:"REMOVE_CONTAINER",payload:e}}function S(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function F(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function T(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function I(e){return e.containers}function C(e,t){return e.containers[t]}function A(e){return e.fields}function D(e,t){return Object(a.filter)(e.fields,["container_id",t])}function k(e,t){return e.fields[t]}function N(e){return Object.keys(e.savingLock).length>0}function G(e){return e.isDirty}function L(e,t){var n=Object(a.pick)(A(e),t);return n=Object(a.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(a.mapValues)(n,function(e){return e.value})}function P(e,t,n){return(e=Object(a.cloneDeep)(e)).id=Object(m.uniqueId)(),e.container_id=t,"complex"===e.type&&e.value.forEach(function(e){e.id=Object(m.uniqueId)(),e.container_id=t,e.fields=e.fields.map(function(e){return P(e,t,n)})}),n.push(e),Object(a.pick)(e,["id","type","name","base_name"])}function V(e){var t=[];return{containers:e.filter(function(e){var t=e.id;return!Object(a.endsWith)(t,"__i__")}).map(function(e){return Object(a.assign)({},e,{fields:e.fields.map(function(n){return P(n,e.id,t)})})}),fields:t}}Object(c.registerStore)("carbon-fields/metaboxes",{reducer:v,actions:r,selectors:o});var B=V(Object(a.get)(window.cf,"preloaded.containers",[])),R=B.containers,q=B.fields;Object(c.dispatch)("carbon-fields/metaboxes").setupState(Object(a.keyBy)(R,"id"),Object(a.keyBy)(q,"id"));var U=n(10),M=n(2),Q=Object(U.createHigherOrderComponent)(function(e){var t=Object(c.withSelect)(function(e,t){var n=window.cf.config,r=n.compactInput,o=n.compactInputKey,i=e("carbon-fields/metaboxes").getFieldById(t.id),c=i.value,a=t.name||i.name;return r&&!t.name&&-1===a.indexOf("widget-carbon_fields")&&(a="".concat(o,"[").concat(a,"]")),{field:i,name:a,value:c}}),n=Object(c.withDispatch)(function(e){return{onChange:e("carbon-fields/metaboxes").updateFieldValue}});return Object(U.compose)(t,n)(e)},"withField"),K=n(15),W=n.n(K),$=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:[];return Object(a.pick)(t,Object(a.difference)(Object(a.map)(e.fields,"id"),n))}function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(a.map)(e,function(e){return[e.id,"".concat(Object(a.repeat)("parent.",t)).concat(e.base_name)]})}var Z=Object(m.withConditionalLogic)(function(e){var t=Object(c.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(J.pipe)(Object(J.merge)($(t(e.field.container_id)),Object(m.fromSelector)(t,e.field.container_id)),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),H(a.isEqual))},function(e,t){t=Object(a.keyBy)(t,"id");var n=Object(c.select)("carbon-fields/metaboxes").getContainerById(e.field.container_id),r=[];if(Object(a.some)(n.fields,["id",e.id]))r=Y(r=X(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(a.find)(t,function(t){return t.container_id===e.field.container_id&&Object(a.startsWith)(o,t.name)}),u=o.split(/\[|\]/g);u.shift(),(u=u.filter(function(e){return""!==e})).pop();var l=u.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=Y(r=X(n,t,[i.id]),l+1);for(var d="".concat(i.id,".value");u.length>0;){var s=u.shift(),f=!isNaN(s),p=!f;if(f){d="".concat(d,"[").concat(s,"]");var b=X(Object(a.get)(t,d),t,[e.id]);r=r.concat(Y(b,l)),d="".concat(d,".fields")}if(p){var m=Object(a.find)(Object(a.get)(t,d),["name",s]);d="".concat(m.id,".value"),l--}}}return r=r.map(function(e){var n=W()(e,2),r=n[0];return[n[1],Object(a.get)(t,"".concat(r,".value"))]}),Object(a.fromPairs)(r)});function ee(){return!Object(a.isUndefined)(window._wpLoadGutenbergEditor)||!Object(a.isUndefined)(window._wpLoadBlockEditor)}var te=n(16),ne=n.n(te),re=n(17),oe=n.n(re),ie=n(18),ce=n.n(ie),ae=n(19),ue=n.n(ae),le=n(20),de=n.n(le),se=n(7),fe=n.n(se),pe=n(11),be=(n(29),n(30),Object(U.compose)(Q,Object(m.withFilters)("carbon-fields.field-wrapper.metabox"))(m.Field)),me=function(e){function t(){var e,n;ne()(this,t);for(var r=arguments.length,o=new Array(r),i=0;it=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})};function we(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function Ee(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function xe(e){for(var t=[],n=e,r=Ee(e);r>0&&n;)if(Ee(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var Se={post_ancestors:[],post_parent_id:0,post_level:1};function Fe(e){var t=e.options[e.selectedIndex];return{post_ancestors:xe(t),post_parent_id:we(t),post_level:Ee(t)+1}}Object(M.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Fe(e.target)}),_e(Fe(e))):$(Se)}),Object(M.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(c.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(J.pipe)(Object(J.combine)(Object(m.fromSelector)(Object(c.select)("core/editor").getCurrentPostId),Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"type"),Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"parent")),H(a.isEqual),Object(J.map)(function(e){var r=W()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return Se;var u=t(i);if(!Object(a.get)(u,["hierarchical"],!1))return Se;var l=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(a.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:l,post_parent_id:c,post_level:l.length+1}}))});var Te=n(23),Ie=n.n(Te),Ce=(e,t,n)=>Ie()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),Ae={post_format:"standard"};function De(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(M.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(J.pipe)(Ce(e,"input.post-format","change"),Object(J.map)(function(e){return De(e.target)}),_e(De(e.querySelector("input.post-format:checked")))):$(Ae)}),Object(M.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"format"),H(),Object(J.filter)(Boolean),Object(J.map)(function(e){return{post_format:e}}),_e(Ae))});var ke={post_template:""};function Ne(e){return{post_template:e.value}}Object(M.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Ne(e.target)}),_e(Ne(e))):$(ke)}),Object(M.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"template"),H(),Object(J.filter)(a.isString),Object(J.map)(function(e){return{post_template:e}}),_e(ke))});var Ge=n(14),Le=n.n(Ge);function Pe(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(Pe(window.tagBox,"parseTags"),Pe(window.tagBox,"flushTags")),Object(M.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(J.pipe)(J.merge.apply(void 0,Le()((e=document.querySelectorAll('div[id^="taxonomy-"]'),Le()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(J.pipe)(Ce(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(J.scan)(function(e,n){var r=n.target;return b()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(a.pull)(e[t],n)})},d()({},t,[])),_e(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return Le()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},d()({},e,[]))}(t)))}))).concat(Le()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return Le()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(J.pipe)(Object(J.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(J.map)(function(e){var n=e.target;return d()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),_e(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return d()({},e,n)}(t)))})}()))),Object(J.scan)(function(e,t){return{post_term:f()({},e.post_term,t)}},{post_term:{}}));var e}),Object(M.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(c.select)("core").getTaxonomies,t=Object(c.select)("core/editor").getEditedPostAttribute;return Object(J.pipe)(Object(m.fromSelector)(e,{per_page:-1}),Object(J.filter)(Boolean),Object(J.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(a.fromPairs)(n)}}))});var Ve={term_ancestors:[],term_parent:0,term_level:1};function Be(e){var t=e.options[e.selectedIndex];return{term_ancestors:xe(t),term_parent:we(t),term_level:Ee(t)+1}}Object(M.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Be(e.target)}),_e(Be(e))):$(Ve)});var Re={user_role:""};function qe(e){return{user_role:e.value}}Object(M.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return $(t?{user_role:t.dataset.profileRole}:Re)}return Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return qe(e.target)}),_e(qe(e)))});var Ue=Object(U.createHigherOrderComponent)(function(e){return Object(c.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(M.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(U.compose)(Ue,Object(m.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)}),n(36),Object(M.addFilter)("carbon-fields.widget.classic","carbon-fields/metaboxes",Object(ye.withEffects)(function(e){var t=e.mount;return Object(J.pipe)(t,Object(J.map)(function(){return{type:"COMPONENT_MOUNTED"}}))},{handler:function(e){return function(t){switch(t.type){case"COMPONENT_MOUNTED":var n=e.container,r=window.jQuery(".container-".concat(n.id));r.trigger("change"),r.closest(".widget").find(".widget-action").on("click",function(){setTimeout(function(){r.trigger("change")},500)})}}}}));var Me=n(21),Qe=n.n(Me);n(37),Object(M.addFilter)("carbon-fields.term_meta.classic","carbon-fields/metaboxes",Object(ye.withEffects)(function(){return Object(J.pipe)((e="ajaxSuccess","add-tag",Qe()(function(t){var n=function(e,n,r,o){Object(a.isString)(r.data)&&r.data.indexOf("add-tag")>-1&&t(1,{event:e,xhr:n,settings:r,data:o})}.handler;return window.jQuery(document).on(e,{handler:n}),function(){window.jQuery(document).off(e,{handler:n})}})),Object(J.filter)(function(e){var t=e.settings,n=e.data;return t.data.indexOf("carbon_fields_container")>-1&&!n.documentElement.querySelector("wp_error")}));var e},{handler:function(e){return function(){var t=u.a.map(e.container.fields,"id"),n=V(u.a.get(window.cf,"preloaded.containers",[])),r=n.containers,o=n.fields,i=u.a.find(r,["id",e.id]),a=u.a.filter(o,["container_id",e.id]),l=Object(c.dispatch)("carbon-fields/metaboxes"),d=l.updateState,s=l.removeFields;d(u.a.keyBy([i],"id"),u.a.keyBy(a,"id")),s(t)}}})),n(38),Object(M.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(ye.withEffects)(function(){return Object(J.pipe)(Object(J.fromEvent)(window,"scroll"),Object(J.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}}));var Ke=n(22),We=n.n(Ke),$e=(n(39),function(e){function t(){var e,n;ne()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1},evaluate:function(){return!1}},Ze={comparers:[f()({},Ye,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),f()({},Ye,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),f()({},Ye,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(a.intersection)(e,n).length;default:return!1}}}),ot={boolean:et,post_term:nt,post_ancestor_id:f()({},Ze,{comparers:[tt,rt],getEnvironmentValue:function(e,t){return Object(a.get)(t,"post_ancestors",[])}}),post_parent_id:Ze,post_level:Ze,post_format:Ze,post_template:Ze,term_level:Ze,term_parent:f()({},Ze,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(a.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(a.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:f()({},Ze,{comparers:[tt,rt],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(a.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(a.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(a.get)(t,"term_ancestors",[])}}),user_role:Ze},it=Object(c.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),ct=Object(ye.withEffects)(function(e,t){var n=t.context,r=Object(M.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(M.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(M.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),c=Object(M.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),u=Object(M.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),l=Object(M.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(J.pipe)(Object(J.merge)(r,o,i,c,u,l),Object(J.scan)(function(e,t){return b()(e,function(e){Object(a.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(a.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(a.get)(ot,t.type);return r?r.isFulfiled(t,n):(console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=W()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o));c&&(c.hidden=!i),a&&(i&&!a.dataset.mounted&&(a.dataset.mounted=!0,Xe(t[o],n)),!i&&a.dataset.mounted&&(delete a.dataset.mounted,Object(pe.unmountComponentAtNode)(a)))})}}}),at=Object(U.compose)(it,ct)(function(){return null});function ut(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}function lt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n-1}var pt=Object(ye.withEffects)(function(){return Object(J.merge)(Object(J.pipe)(lt(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(J.filter)(function(e){return ft(e.$widget[0].id)}),Object(J.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(J.pipe)(lt(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(J.filter)(function(e){var t=e.data;return Object(a.startsWith)(t,"deleted:")&&ft(t)}),Object(J.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(c.select)("carbon-fields/metaboxes").getContainerById,n=Object(c.dispatch)("carbon-fields/metaboxes"),r=n.addContainer,o=n.removeContainer,i=n.addFields,u=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var l,d=e.payload,s=d.event,f=d.$widget,p=Object(a.flow)(ut,JSON.parse)(f.find("[data-json]").data("json")),b=[];if("widget-updated"===s.type&&(l=t(p.id).fields.map(function(e){return e.id})),p.fields=p.fields.map(function(e){return P(e,p,b)}),i(b),r(p),"widget-updated"===s.type&&u(l),Xe(p,"classic"),window.cf.config.pagenow===dt&&"widget-added"===s.type){var m=f.find('[name="widget-id"]').val();f.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(m).liveUpdateMode=!1}break;case"WIDGET_DELETED":var v=e.payload.data.replace("deleted:",""),O="".concat("carbon_fields_container_").concat(v),j=t(O);Object(pe.unmountComponentAtNode)(document.querySelector(".container-".concat(O)));var g=_.map(j.fields,"id");o(O),u(g)}}}})(function(){return null}),bt=Object(c.withSelect)(function(e){return{isDirty:e("carbon-fields/metaboxes").isDirty()}})(function(e){return wp.element.createElement("input",{type:"hidden",name:window.cf.config.revisionsInputKey,disabled:!e.isDirty,value:"1"})});Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var mt,vt,Ot=ee()?"gutenberg":"classic";mt=Ot,vt=Object(c.select)("carbon-fields/metaboxes").getContainers(),Object(a.forEach)(vt,function(e){Xe(e,mt)}),function(e){var t=window.cf.config.pagenow;Object(pe.render)(wp.element.createElement(pe.Fragment,null,!ee()&&wp.element.createElement(he,null),("widgets.php"===t||t===dt)&&wp.element.createElement(pt,null),wp.element.createElement(at,{context:e})),document.createElement("div"));var n=document.querySelector("#poststuff");n&&Object(pe.render)(wp.element.createElement(bt,null),n.appendChild(document.createElement("div")))}(Ot)}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=42)}([function(e,t){e.exports=lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=wp.data},function(e,t){e.exports=wp.hooks},function(e,t){e.exports=cf.core},function(e,t){e.exports=wp.i18n},function(e,t,n){var r=n(8);e.exports=function(e){for(var t=1;t(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=cf.vendor.classnames},function(e,t){e.exports=(e=>t=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return b()(e,function(e){Object(a.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return b()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(a.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return b()(e,function(e){Object(a.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return b()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return b()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return b()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(a.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(m.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(m.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(a.assign)(e,Object(a.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(a.omit)(e,n);case"RECEIVE_SIDEBAR":return b()(e,function(e){Object(a.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return f()({},e,d()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(a.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function O(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function g(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function y(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function h(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function w(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function E(e){return{type:"ADD_CONTAINER",payload:e}}function x(e){return{type:"REMOVE_CONTAINER",payload:e}}function S(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function F(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function I(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function T(e){return e.containers}function C(e,t){return e.containers[t]}function A(e){return e.fields}function D(e,t){return Object(a.filter)(e.fields,["container_id",t])}function N(e,t){return e.fields[t]}function k(e){return Object.keys(e.savingLock).length>0}function G(e){return e.isDirty}function L(e,t){var n=Object(a.pick)(A(e),t);return n=Object(a.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(a.mapValues)(n,function(e){return e.value})}function P(e,t,n){return(e=Object(a.cloneDeep)(e)).id=Object(m.uniqueId)(),e.container_id=t,"complex"===e.type&&e.value.forEach(function(e){e.id=Object(m.uniqueId)(),e.container_id=t,e.fields=e.fields.map(function(e){return P(e,t,n)})}),n.push(e),Object(a.pick)(e,["id","type","name","base_name"])}function V(e){var t=[];return{containers:e.filter(function(e){var t=e.id;return!Object(a.endsWith)(t,"__i__")}).map(function(e){return Object(a.assign)({},e,{fields:e.fields.map(function(n){return P(n,e.id,t)})})}),fields:t}}Object(c.registerStore)("carbon-fields/metaboxes",{reducer:v,actions:r,selectors:o});var B=V(Object(a.get)(window.cf,"preloaded.containers",[])),R=B.containers,q=B.fields;Object(c.dispatch)("carbon-fields/metaboxes").setupState(Object(a.keyBy)(R,"id"),Object(a.keyBy)(q,"id"));var U=n(10),M=n(3),Q=Object(U.createHigherOrderComponent)(function(e){var t=Object(c.withSelect)(function(e,t){var n=window.cf.config,r=n.compactInput,o=n.compactInputKey,i=e("carbon-fields/metaboxes").getFieldById(t.id),c=i.value,a=t.name||i.name;return r&&!t.name&&-1===a.indexOf("widget-carbon_fields")&&(a="".concat(o,"[").concat(a,"]")),{field:i,name:a,value:c}}),n=Object(c.withDispatch)(function(e){return{onChange:e("carbon-fields/metaboxes").updateFieldValue}});return Object(U.compose)(t,n)(e)},"withField"),K=n(15),W=n.n(K),$=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:[];return Object(a.pick)(t,Object(a.difference)(Object(a.map)(e.fields,"id"),n))}function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(a.map)(e,function(e){return[e.id,"".concat(Object(a.repeat)("parent.",t)).concat(e.base_name)]})}var Z=Object(m.withConditionalLogic)(function(e){var t=Object(c.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(J.pipe)(Object(J.merge)($(t(e.field.container_id)),Object(m.fromSelector)(t,e.field.container_id)),H(a.isEqual))},function(e,t){t=Object(a.keyBy)(t,"id");var n=Object(c.select)("carbon-fields/metaboxes").getContainerById(e.field.container_id),r=[];if(Object(a.some)(n.fields,["id",e.id]))r=Y(r=X(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(a.find)(t,function(t){return t.container_id===e.field.container_id&&Object(a.startsWith)(o,t.name)}),u=o.split(/\[|\]/g);u.shift(),(u=u.filter(function(e){return""!==e})).pop();var l=u.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=Y(r=X(n,t,[i.id]),l+1);for(var d="".concat(i.id,".value");u.length>0;){var s=u.shift(),f=!isNaN(s),p=!f;if(f){d="".concat(d,"[").concat(s,"]");var b=X(Object(a.get)(t,d),t,[e.id]);r=r.concat(Y(b,l)),d="".concat(d,".fields")}if(p){var m=Object(a.find)(Object(a.get)(t,d),["name",s]);d="".concat(m.id,".value"),l--}}}return r=r.map(function(e){var n=W()(e,2),r=n[0];return[n[1],Object(a.get)(t,"".concat(r,".value"))]}),Object(a.fromPairs)(r)});function ee(){return!Object(a.isUndefined)(window._wpLoadGutenbergEditor)||!Object(a.isUndefined)(window._wpLoadBlockEditor)}var te=n(16),ne=n.n(te),re=n(17),oe=n.n(re),ie=n(18),ce=n.n(ie),ae=n(19),ue=n.n(ae),le=n(20),de=n.n(le),se=n(7),fe=n.n(se),pe=n(11),be=(n(29),n(30),Object(U.compose)(Q,Object(m.withFilters)("carbon-fields.field-wrapper.metabox"))(m.Field)),me=function(e){function t(){var e,n;ne()(this,t);for(var r=arguments.length,o=new Array(r),i=0;it=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})};function we(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function Ee(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function xe(e){for(var t=[],n=e,r=Ee(e);r>0&&n;)if(Ee(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var Se={post_ancestors:[],post_parent_id:0,post_level:1};function Fe(e){var t=e.options[e.selectedIndex];return{post_ancestors:xe(t),post_parent_id:we(t),post_level:Ee(t)+1}}Object(M.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Fe(e.target)}),_e(Fe(e))):$(Se)}),Object(M.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(c.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(J.pipe)(Object(J.combine)(Object(m.fromSelector)(Object(c.select)("core/editor").getCurrentPostId),Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"type"),Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"parent")),H(a.isEqual),Object(J.map)(function(e){var r=W()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return Se;var u=t(i);if(!Object(a.get)(u,["hierarchical"],!1))return Se;var l=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(a.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:l,post_parent_id:c,post_level:l.length+1}}))});var Ie=n(23),Te=n.n(Ie),Ce=(e,t,n)=>Te()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),Ae={post_format:"standard"};function De(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(M.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(J.pipe)(Ce(e,"input.post-format","change"),Object(J.map)(function(e){return De(e.target)}),_e(De(e.querySelector("input.post-format:checked")))):$(Ae)}),Object(M.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"format"),H(),Object(J.filter)(Boolean),Object(J.map)(function(e){return{post_format:e}}),_e(Ae))});var Ne={post_template:""};function ke(e){return{post_template:e.value}}Object(M.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return ke(e.target)}),_e(ke(e))):$(Ne)}),Object(M.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"template"),H(),Object(J.filter)(a.isString),Object(J.map)(function(e){return{post_template:e}}),_e(Ne))});var Ge=n(14),Le=n.n(Ge);function Pe(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(Pe(window.tagBox,"parseTags"),Pe(window.tagBox,"flushTags")),Object(M.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(J.pipe)(J.merge.apply(void 0,Le()((e=document.querySelectorAll('div[id^="taxonomy-"]'),Le()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(J.pipe)(Ce(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(J.scan)(function(e,n){var r=n.target;return b()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(a.pull)(e[t],n)})},d()({},t,[])),_e(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return Le()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},d()({},e,[]))}(t)))}))).concat(Le()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return Le()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(J.pipe)(Object(J.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(J.map)(function(e){var n=e.target;return d()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),_e(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return d()({},e,n)}(t)))})}()))),Object(J.scan)(function(e,t){return{post_term:f()({},e.post_term,t)}},{post_term:{}}));var e}),Object(M.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(c.select)("core").getTaxonomies,t=Object(c.select)("core/editor").getEditedPostAttribute;return Object(J.pipe)(Object(m.fromSelector)(e,{per_page:-1}),Object(J.filter)(Boolean),Object(J.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(a.fromPairs)(n)}}))});var Ve={term_ancestors:[],term_parent:0,term_level:1};function Be(e){var t=e.options[e.selectedIndex];return{term_ancestors:xe(t),term_parent:we(t),term_level:Ee(t)+1}}Object(M.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Be(e.target)}),_e(Be(e))):$(Ve)});var Re={user_role:""};function qe(e){return{user_role:e.value}}Object(M.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return $(t?{user_role:t.dataset.profileRole}:Re)}return Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return qe(e.target)}),_e(qe(e)))});var Ue=Object(U.createHigherOrderComponent)(function(e){return Object(c.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(M.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(U.compose)(Ue,Object(m.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)}),n(37),Object(M.addFilter)("carbon-fields.widget.classic","carbon-fields/metaboxes",Object(ye.withEffects)(function(e){var t=e.mount;return Object(J.pipe)(t,Object(J.map)(function(){return{type:"COMPONENT_MOUNTED"}}))},{handler:function(e){return function(t){switch(t.type){case"COMPONENT_MOUNTED":var n=e.container,r=window.jQuery(".container-".concat(n.id));r.trigger("change"),r.closest(".widget").find(".widget-action").on("click",function(){setTimeout(function(){r.trigger("change")},500)})}}}}));var Me=n(21),Qe=n.n(Me);n(38),Object(M.addFilter)("carbon-fields.term_meta.classic","carbon-fields/metaboxes",Object(ye.withEffects)(function(){return Object(J.pipe)((e="ajaxSuccess","add-tag",Qe()(function(t){var n=function(e,n,r,o){Object(a.isString)(r.data)&&r.data.indexOf("add-tag")>-1&&t(1,{event:e,xhr:n,settings:r,data:o})}.handler;return window.jQuery(document).on(e,{handler:n}),function(){window.jQuery(document).off(e,{handler:n})}})),Object(J.filter)(function(e){var t=e.settings,n=e.data;return t.data.indexOf("carbon_fields_container")>-1&&!n.documentElement.querySelector("wp_error")}));var e},{handler:function(e){return function(){var t=u.a.map(e.container.fields,"id"),n=V(u.a.get(window.cf,"preloaded.containers",[])),r=n.containers,o=n.fields,i=u.a.find(r,["id",e.id]),a=u.a.filter(o,["container_id",e.id]),l=Object(c.dispatch)("carbon-fields/metaboxes"),d=l.updateState,s=l.removeFields;d(u.a.keyBy([i],"id"),u.a.keyBy(a,"id")),s(t)}}})),n(39),Object(M.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(ye.withEffects)(function(){return Object(J.pipe)(Object(J.fromEvent)(window,"scroll"),Object(J.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}})),n(40);var Ke=n(22),We=n.n(Ke),$e=(n(41),function(e){function t(){var e,n;ne()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1},evaluate:function(){return!1}},Ze={comparers:[f()({},Ye,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),f()({},Ye,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),f()({},Ye,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(a.intersection)(e,n).length;default:return!1}}}),ot={boolean:et,post_term:nt,post_ancestor_id:f()({},Ze,{comparers:[tt,rt],getEnvironmentValue:function(e,t){return Object(a.get)(t,"post_ancestors",[])}}),post_parent_id:Ze,post_level:Ze,post_format:Ze,post_template:Ze,term_level:Ze,term_parent:f()({},Ze,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(a.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(a.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:f()({},Ze,{comparers:[tt,rt],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(a.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(a.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(a.get)(t,"term_ancestors",[])}}),user_role:Ze},it=Object(c.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),ct=Object(ye.withEffects)(function(e,t){var n=t.context,r=Object(M.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(M.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(M.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),c=Object(M.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),u=Object(M.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),l=Object(M.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(J.pipe)(Object(J.merge)(r,o,i,c,u,l),Object(J.scan)(function(e,t){return b()(e,function(e){Object(a.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(a.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(a.get)(ot,t.type);return r?r.isFulfiled(t,n):(console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=W()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o));c&&(c.hidden=!i),a&&(i&&!a.dataset.mounted&&(a.dataset.mounted=!0,Xe(t[o],n)),!i&&a.dataset.mounted&&(delete a.dataset.mounted,Object(pe.unmountComponentAtNode)(a)))})}}}),at=Object(U.compose)(it,ct)(function(){return null});function ut(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}function lt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n-1}var pt=Object(ye.withEffects)(function(){return Object(J.merge)(Object(J.pipe)(lt(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(J.filter)(function(e){return ft(e.$widget[0].id)}),Object(J.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(J.pipe)(lt(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(J.filter)(function(e){var t=e.data;return Object(a.startsWith)(t,"deleted:")&&ft(t)}),Object(J.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(c.select)("carbon-fields/metaboxes").getContainerById,n=Object(c.dispatch)("carbon-fields/metaboxes"),r=n.addContainer,o=n.removeContainer,i=n.addFields,u=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var l,d=e.payload,s=d.event,f=d.$widget,p=Object(a.flow)(ut,JSON.parse)(f.find("[data-json]").data("json")),b=[];if("widget-updated"===s.type&&(l=t(p.id).fields.map(function(e){return e.id})),p.fields=p.fields.map(function(e){return P(e,p,b)}),i(b),r(p),"widget-updated"===s.type&&u(l),Xe(p,"classic"),window.cf.config.pagenow===dt&&"widget-added"===s.type){var m=f.find('[name="widget-id"]').val();f.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(m).liveUpdateMode=!1}break;case"WIDGET_DELETED":var v=e.payload.data.replace("deleted:",""),O="".concat("carbon_fields_container_").concat(v),j=t(O);Object(pe.unmountComponentAtNode)(document.querySelector(".container-".concat(O)));var g=_.map(j.fields,"id");o(O),u(g)}}}})(function(){return null}),bt=Object(c.withSelect)(function(e){return{isDirty:e("carbon-fields/metaboxes").isDirty()}})(function(e){return wp.element.createElement("input",{type:"hidden",name:window.cf.config.revisionsInputKey,disabled:!e.isDirty,value:"1"})});Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var mt,vt,Ot=ee()?"gutenberg":"classic";mt=Ot,vt=Object(c.select)("carbon-fields/metaboxes").getContainers(),Object(a.forEach)(vt,function(e){Xe(e,mt)}),function(e){var t=window.cf.config.pagenow;Object(pe.render)(wp.element.createElement(pe.Fragment,null,!ee()&&wp.element.createElement(he,null),("widgets.php"===t||t===dt)&&wp.element.createElement(pt,null),wp.element.createElement(at,{context:e})),document.createElement("div"));var n=document.querySelector("#poststuff");n&&Object(pe.render)(wp.element.createElement(bt,null),n.appendChild(document.createElement("div")))}(Ot)}]); \ No newline at end of file diff --git a/build/gutenberg/report.html b/build/gutenberg/report.html deleted file mode 100644 index d65e214aa..000000000 --- a/build/gutenberg/report.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - Webpack Bundle Analyzer - - - - - - - - - -
- - - From d1e129bb9277975334bc3cef6942e7b62f6bafff Mon Sep 17 00:00:00 2001 From: Viktor Vasilev Date: Wed, 19 Dec 2018 14:11:17 +0200 Subject: [PATCH 05/11] Add bundles --- build/classic/core.css | 46 +++++++++++---------- build/classic/core.js | 24 +++++------ build/classic/core.min.css | 2 +- build/classic/core.min.js | 6 +-- build/classic/metaboxes.css | 68 +++++++++---------------------- build/classic/metaboxes.js | 57 +++++++++++++------------- build/classic/metaboxes.min.css | 2 +- build/classic/metaboxes.min.js | 2 +- build/gutenberg/blocks.css | 28 +++++++++++-- build/gutenberg/blocks.js | 44 +++++++++++++++----- build/gutenberg/blocks.min.css | 2 +- build/gutenberg/blocks.min.js | 12 +++++- build/gutenberg/core.css | 46 +++++++++++---------- build/gutenberg/core.js | 24 +++++------ build/gutenberg/core.min.css | 2 +- build/gutenberg/core.min.js | 6 +-- build/gutenberg/metaboxes.css | 68 +++++++++---------------------- build/gutenberg/metaboxes.js | 57 +++++++++++++------------- build/gutenberg/metaboxes.min.css | 2 +- build/gutenberg/metaboxes.min.js | 2 +- 20 files changed, 254 insertions(+), 246 deletions(-) diff --git a/build/classic/core.css b/build/classic/core.css index 94f095fe3..179c7f358 100644 --- a/build/classic/core.css +++ b/build/classic/core.css @@ -294,7 +294,7 @@ .cf-complex__groups { position: relative; z-index: 0; } - .cf-complex--tabbed-vertical .cf-complex__groups { + .cf-complex--tabbed-vertical > .cf-complex__groups { flex: 0 0 80%; } .cf-complex__group { @@ -362,7 +362,7 @@ background-color: #fff; } .cf-complex__group-body[hidden] { display: none; } - .cf-complex--grid .cf-complex__group-body { + .cf-complex__group--grid > .cf-complex__group-body { margin-top: -1px; } /** @@ -384,11 +384,11 @@ display: inline-block; } .cf-complex__tabs .cf-complex__inserter { height: 36px; } - .cf-complex--tabbed-horizontal .cf-complex__inserter { + .cf-complex__tabs--tabbed-horizontal .cf-complex__inserter { width: 36px; align-self: flex-end; margin-bottom: 4px; } - .cf-complex--tabbed-vertical .cf-complex__inserter { + .cf-complex__tabs--tabbed-vertical .cf-complex__inserter { display: block; } .cf-complex__tabs .cf-complex__inserter-button { @@ -436,6 +436,10 @@ .cf-complex__group-actions { display: flex; align-items: center; } + .cf-complex__group-actions--grid { + position: absolute; + top: 12px; + right: 12px; } .cf-complex__group-actions--tabbed { justify-content: flex-end; padding: 8px 12px; @@ -443,10 +447,6 @@ border-style: solid; border-color: #e2e4e7; background-color: #fbfbfc; } - .cf-complex--grid .cf-complex__group-actions { - position: absolute; - top: 12px; - right: 12px; } .cf-complex__group-action { display: inline-flex; @@ -472,19 +472,19 @@ .cf-complex__tabs { position: relative; z-index: 1; } - .cf-complex--tabbed-horizontal .cf-complex__tabs { + .cf-complex__tabs--tabbed-horizontal { display: inline-flex; margin-bottom: -5px; } - .cf-complex--tabbed-vertical .cf-complex__tabs { + .cf-complex__tabs--tabbed-vertical { flex: 0 0 20%; margin-right: -1px; } .cf-complex__tabs-list { margin: 0; } - .cf-complex--tabbed-horizontal .cf-complex__tabs-list { + .cf-complex__tabs--tabbed-horizontal .cf-complex__tabs-list { display: flex; flex-wrap: wrap; } - .cf-complex--tabbed-vertical .cf-complex__tabs-list { + .cf-complex__tabs--tabbed-vertical .cf-complex__tabs-list { margin-bottom: -1px; } .cf-complex__tabs-item { @@ -497,25 +497,29 @@ font-size: 12px; cursor: pointer; transition: background-color 0.1s linear, border-color 0.1s linear; } - .cf-complex--tabbed-horizontal .cf-complex__tabs-item { - margin: 0 4px 4px 0; } - .cf-complex--tabbed-vertical .cf-complex__tabs-item ~ .cf-complex__tabs-item { - border-top-width: 0; } .cf-complex__tabs-item:hover { background-color: #fff; } + .cf-complex__tabs-item--tabbed-horizontal { + margin: 0 4px 4px 0; } + .cf-complex__tabs-item--tabbed-vertical ~ .cf-complex__tabs-item--tabbed-vertical { + border-top-width: 0; } .cf-complex__tabs-item--current { background-color: #fff; } - .cf-complex--tabbed-horizontal .cf-complex__tabs-item--current { + .cf-complex__tabs-item--tabbed-horizontal.cf-complex__tabs-item--current { border-bottom-color: #fff !important; } - .cf-complex--tabbed-vertical .cf-complex__tabs-item--current { + .cf-complex__tabs-item--tabbed-vertical.cf-complex__tabs-item--current { border-right-color: #fff !important; } /** * Placeholder */ -.cf-complex__placeholder-label { +.cf-complex__placeholder-label.cf-complex__placeholder-label { margin: 8px 0 12px; } +.cf-container-term-meta .cf-complex__placeholder-label { + font-style: normal; + color: inherit; } + /* ========================================================================== Colors ========================================================================== */ @@ -1835,7 +1839,7 @@ span.flatpickr-weekday { ========================================================================== */ .cf-text__input { display: block; - width: 100%; + width: 100% !important; margin: 0; } /* ========================================================================== @@ -1864,7 +1868,7 @@ span.flatpickr-weekday { ========================================================================== */ .cf-textarea__input { display: block; - width: 100%; + width: 100% !important; resize: vertical; } /* ========================================================================== diff --git a/build/classic/core.js b/build/classic/core.js index f7504c19a..700c56323 100644 --- a/build/classic/core.js +++ b/build/classic/core.js @@ -3060,7 +3060,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\nvar MediaLibrary =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_8___default()(MediaLibrary, _Component);\n\n function MediaLibrary() {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4___default()(this, MediaLibrary);\n\n return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(MediaLibrary).apply(this, arguments));\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5___default()(MediaLibrary, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props = this.props,\n onSelect = _this$props.onSelect,\n typeFilter = _this$props.typeFilter;\n this.props.initMediaBrowser({\n onSelect: onSelect,\n typeFilter: typeFilter\n });\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.destroyMediaBrowser();\n }\n /**\n * Render the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var openMediaBrowser = this.props.openMediaBrowser;\n return this.props.children({\n openMediaBrowser: openMediaBrowser\n });\n }\n }]);\n\n return MediaLibrary;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var actions = [{\n event: 'initMediaBrowserEvent',\n prop: 'initMediaBrowser',\n type: 'INIT_MEDIA_BROWSER'\n }, {\n event: 'openMediaBrowserEvent',\n prop: 'openMediaBrowser',\n type: 'OPEN_MEDIA_BROWSER'\n }, {\n event: 'destroyMediaBrowserEvent',\n prop: 'destroyMediaBrowser',\n type: 'DESTROY_MEDIA_BROWSER'\n }].map(function (actionData) {\n var _component$useEvent = component.useEvent(actionData.event),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3___default()(_component$useEvent, 2),\n actionChannel$ = _component$useEvent2[0],\n action = _component$useEvent2[1];\n\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default()({}, actionData, {\n action: action,\n channel$: actionChannel$\n });\n });\n var combined$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"combine\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(actions.map(function (_ref) {\n var action = _ref.action,\n prop = _ref.prop;\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_13__[\"default\"])({\n action: action,\n prop: prop\n });\n }))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"map\"])(function (combinedActions) {\n return Object(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"toProps\"])(combinedActions.reduce(function (acc, curr) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default()({}, acc, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, curr.prop, curr.action));\n }, {}));\n }));\n return callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"merge\"].apply(void 0, [combined$].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(actions.map(function (_ref2) {\n var channel$ = _ref2.channel$,\n type = _ref2.type;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"pipe\"])(channel$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"map\"])(function (payload) {\n return {\n type: type,\n payload: payload\n };\n }));\n }))));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n var mediaBrowser = null;\n return function (effect) {\n switch (effect.type) {\n case 'INIT_MEDIA_BROWSER':\n var _effect$payload = effect.payload,\n onSelect = _effect$payload.onSelect,\n typeFilter = _effect$payload.typeFilter;\n\n if (!onSelect) {\n return;\n }\n\n mediaBrowser = wp.media({\n title: props.title,\n library: {\n type: typeFilter\n },\n button: {\n text: props.buttonLabel\n },\n multiple: props.multiple\n });\n mediaBrowser.on('select', function () {\n var file = mediaBrowser.state().get('selection').toJSON();\n onSelect(file);\n });\n break;\n\n case 'OPEN_MEDIA_BROWSER':\n if (mediaBrowser) {\n mediaBrowser.open();\n }\n\n break;\n\n case 'DESTROY_MEDIA_BROWSER':\n mediaBrowser = null;\n break;\n }\n };\n}\n\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"withEffects\"])(aperture, {\n handler: handler\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[\"compose\"])(applyWithEffects)(MediaLibrary));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/media-library/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\nfunction MediaLibrary(_ref) {\n var children = _ref.children,\n openMediaBrowser = _ref.openMediaBrowser;\n return children({\n openMediaBrowser: openMediaBrowser\n });\n}\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var mount$ = component.mount;\n var unmount$ = component.unmount;\n\n var _component$useEvent = component.useEvent('openMediaBrowserEvent'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n openMediaBrowserEvent$ = _component$useEvent2[0],\n openMediaBrowser = _component$useEvent2[1];\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(mount$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function () {\n return {\n type: 'INIT'\n };\n })), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(unmount$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function () {\n return {\n type: 'DESTROY'\n };\n })), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({\n openMediaBrowser: openMediaBrowser\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"toProps\"])), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(openMediaBrowserEvent$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (payload) {\n return {\n type: 'OPEN',\n payload: payload\n };\n })));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n var mediaBrowser = null;\n return function (effect) {\n switch (effect.type) {\n case 'INIT':\n var onSelect = props.onSelect,\n typeFilter = props.typeFilter;\n mediaBrowser = wp.media({\n title: props.title,\n library: {\n type: typeFilter\n },\n button: {\n text: props.buttonLabel\n },\n multiple: props.multiple\n });\n mediaBrowser.on('select', function () {\n var file = mediaBrowser.state().get('selection').toJSON();\n onSelect(file);\n });\n break;\n\n case 'OPEN':\n if (mediaBrowser) {\n mediaBrowser.open();\n }\n\n break;\n\n case 'DESTROY':\n mediaBrowser = null;\n break;\n }\n };\n}\n\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"withEffects\"])(aperture, {\n handler: handler\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"compose\"])(applyWithEffects)(MediaLibrary));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/media-library/index.js?"); /***/ }), @@ -3107,7 +3107,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\nvar Sortable =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(Sortable, _Component);\n\n function Sortable() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, Sortable);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Sortable)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleStart\", function (e, ui) {\n ui.item.data('index', ui.item.index());\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleUpdate\", function (e, ui) {\n var _this$props = _this.props,\n items = _this$props.items,\n forwardedRef = _this$props.forwardedRef,\n onUpdate = _this$props.onUpdate;\n var oldIndex = ui.item.data('index');\n var newIndex = ui.item.index();\n ui.item.removeData('index');\n window.jQuery(forwardedRef.current).sortable('cancel');\n onUpdate(immer__WEBPACK_IMPORTED_MODULE_9___default()(items, function (draft) {\n draft.splice.apply(draft, [newIndex, 0].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(draft.splice(oldIndex, 1))));\n }));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(Sortable, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props2 = this.props,\n options = _this$props2.options,\n forwardedRef = _this$props2.forwardedRef;\n window.jQuery(forwardedRef.current).sortable(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, options, {\n start: this.handleStart,\n update: this.handleUpdate\n }));\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var forwardedRef = this.props.forwardedRef;\n var $element = window.jQuery(forwardedRef.current);\n var instance = $element.sortable('instance');\n\n if (instance) {\n $element.sortable('destroy');\n }\n }\n /**\n * Handles the `start` event.\n *\n * @param {Object} e\n * @param {Object} ui\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n return _wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Children\"].only(this.props.children);\n }\n }]);\n\n return Sortable;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Sortable);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/sortable/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\nvar Sortable =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(Sortable, _Component);\n\n function Sortable() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, Sortable);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Sortable)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleStart\", function (e, ui) {\n var onStart = _this.props.onStart;\n\n if (onStart) {\n onStart(e, ui);\n }\n\n ui.item.data('index', ui.item.index());\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleUpdate\", function (e, ui) {\n var _this$props = _this.props,\n items = _this$props.items,\n forwardedRef = _this$props.forwardedRef,\n onUpdate = _this$props.onUpdate;\n var oldIndex = ui.item.data('index');\n var newIndex = ui.item.index();\n ui.item.removeData('index');\n window.jQuery(forwardedRef.current).sortable('cancel');\n onUpdate(immer__WEBPACK_IMPORTED_MODULE_9___default()(items, function (draft) {\n draft.splice.apply(draft, [newIndex, 0].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(draft.splice(oldIndex, 1))));\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleStop\", function (e, ui) {\n var onStop = _this.props.onStop;\n\n if (onStop) {\n onStop(e, ui);\n }\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(Sortable, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props2 = this.props,\n options = _this$props2.options,\n forwardedRef = _this$props2.forwardedRef;\n window.jQuery(forwardedRef.current).sortable(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, options, {\n start: this.handleStart,\n update: this.handleUpdate,\n stop: this.handleStop\n }));\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var forwardedRef = this.props.forwardedRef;\n var $element = window.jQuery(forwardedRef.current);\n var instance = $element.sortable('instance');\n\n if (instance) {\n $element.sortable('destroy');\n }\n }\n /**\n * Handles the `start` event.\n *\n * @param {Object} e\n * @param {Object} ui\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n return _wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Children\"].only(this.props.children);\n }\n }]);\n\n return Sortable;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Sortable);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/sortable/index.js?"); /***/ }), @@ -3119,7 +3119,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/association/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\nvar AssociationField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(AssociationField, _Component);\n\n function AssociationField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, AssociationField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(AssociationField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"selectedList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSearchChange\", function (queryTerm) {\n var _this$props = _this.props,\n fetchOptions = _this$props.fetchOptions,\n setState = _this$props.setState;\n setState({\n queryTerm: queryTerm\n });\n fetchOptions({\n queryTerm: queryTerm\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddItem\", function (option) {\n var _this$props2 = _this.props,\n field = _this$props2.field,\n id = _this$props2.id,\n value = _this$props2.value,\n onChange = _this$props2.onChange,\n setState = _this$props2.setState,\n selectedOptions = _this$props2.selectedOptions; // Don't do anything if the duplicates aren't allowed and\n // the item is already selected.\n\n if (!field.duplicates_allowed && option.disabled) {\n return;\n } // Don't do anything, because the maximum is reached.\n\n\n if (field.max > 0 && value.length >= field.max) {\n // alert( carbonFieldsL10n.field.maxNumItemsReached.replace( '%s', field.max ) );\n return;\n }\n\n onChange(id, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(value).concat([Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"pick\"])(option, 'id', 'type', 'subtype')]));\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat([option])\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveItem\", function (option) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n id = _this$props3.id,\n onChange = _this$props3.onChange,\n setState = _this$props3.setState,\n selectedOptions = _this$props3.selectedOptions;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(value, option));\n setState({\n selectedOptions: Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(selectedOptions, option)\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSort\", function (items) {\n var _this$props4 = _this.props,\n id = _this$props4.id,\n onChange = _this$props4.onChange;\n onChange(id, items);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(AssociationField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props5 = this.props,\n fetchSelectedOptions = _this$props5.fetchSelectedOptions,\n field = _this$props5.field,\n value = _this$props5.value,\n setState = _this$props5.setState;\n setState({\n options: field.options.options,\n totalOptionsCount: field.options.total_options\n });\n\n if (value) {\n fetchSelectedOptions();\n }\n }\n /**\n * Handles the change of search.\n *\n * @param {string} queryTerm\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props6 = this.props,\n name = _this$props6.name,\n value = _this$props6.value,\n field = _this$props6.field,\n totalOptionsCount = _this$props6.totalOptionsCount,\n selectedOptions = _this$props6.selectedOptions,\n queryTerm = _this$props6.queryTerm;\n var options = this.props.options;\n\n if (!field.duplicates_allowed) {\n options = immer__WEBPACK_IMPORTED_MODULE_10___default()(options, function (draft) {\n draft.map(function (option) {\n option.disabled = !!Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"find\"])(value, function (selectedOption) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isMatch\"])(selectedOption, {\n id: option.id,\n type: option.type,\n subtype: option.subtype\n });\n });\n return option;\n });\n });\n } // eslint-disable-next-line\n\n\n var sortableOptions = {\n axis: 'y',\n items: 'li',\n forceHelperSize: true,\n forcePlaceholderSize: true,\n scroll: true,\n handle: '.mobile-handle'\n };\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Fragment\"], null, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__bar\"\n }, __webpack_provided_wp_dot_element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n value: queryTerm,\n onChange: this.handleSearchChange\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__counter\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Showing %1$d of %2$d results', 'carbon-fields-ui'), Number(options.length), Number(totalOptionsCount)))), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__cols\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__col\"\n }, options.map(function (option, index) {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_16___default()('cf-association__option', {\n 'cf-association__option--selected': option.disabled\n }),\n key: index\n }, option.thumbnail && __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: option.thumbnail\n }), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, option.title), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, option.type)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, __webpack_provided_wp_dot_element.createElement(\"a\", {\n className: \"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit\",\n href: option.edit_link\n }), !option.disabled && (field.max < 0 || value.length < field.max) && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-plus-alt\",\n onClick: function onClick() {\n return _this2.handleAddItem(option);\n }\n })));\n })), __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n forwardedRef: this.selectedList,\n items: value,\n options: {\n axis: 'y',\n forceHelperSize: true,\n forcePlaceholderSize: true,\n scroll: true\n },\n onUpdate: this.handleSort\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__col\",\n ref: this.selectedList\n }, !!selectedOptions.length && value.map(function (option, index) {\n var optionData = selectedOptions.find(function (selectedOption) {\n return selectedOption.id === option.id && selectedOption.type === option.type && selectedOption.subtype === option.subtype;\n });\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option\",\n key: index\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-sort dashicons dashicons-menu\"\n }), optionData.thumbnail && __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: optionData.thumbnail\n }), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, optionData.title), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, optionData.type)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-dismiss\",\n onClick: function onClick() {\n return _this2.handleRemoveItem(option);\n }\n })), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[\").concat(index, \"]\"),\n value: \"\".concat(optionData.type, \":\").concat(optionData.subtype, \":\").concat(optionData.id),\n readOnly: true\n }));\n })))));\n }\n }]);\n\n return AssociationField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Component\"]);\n\nvar fetchData = function fetchData(field, data) {\n return Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/association/\"), 'get', _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({\n container_id: field.container_id,\n field_id: field.base_name\n }, data));\n};\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var actions = [{\n event: 'fetchOptionsEvent',\n prop: 'fetchOptions',\n type: 'FETCH_OPTIONS'\n }, {\n event: 'fetchSelectedOptionsEvent',\n prop: 'fetchSelectedOptions',\n type: 'FETCH_SELECTED_OPTIONS'\n }].map(function (actionData) {\n var _component$useEvent = component.useEvent(actionData.event),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n actionChannel$ = _component$useEvent2[0],\n action = _component$useEvent2[1];\n\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, actionData, {\n action: action,\n channel$: actionChannel$\n });\n });\n var combined$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"combine\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref) {\n var action = _ref.action,\n prop = _ref.prop;\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_19__[\"default\"])({\n action: action,\n prop: prop\n });\n }))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (combinedActions) {\n return Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"toProps\"])(combinedActions.reduce(function (acc, curr) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, acc, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()({}, curr.prop, curr.action));\n }, {}));\n }));\n return callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"merge\"].apply(void 0, [combined$].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref2) {\n var channel$ = _ref2.channel$,\n type = _ref2.type;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(channel$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (payload) {\n return {\n type: type,\n payload: payload\n };\n }));\n }))));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var field = props.field,\n setState = props.setState,\n selectedOptions = props.selectedOptions;\n\n switch (type) {\n case 'FETCH_OPTIONS':\n // eslint-disable-next-line\n var request = window.jQuery.get(window.ajaxurl, {\n action: 'carbon_fields_fetch_association_options',\n term: payload.queryTerm,\n container_id: field.container_id,\n field_name: field.base_name\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('An error occurred while trying to fetch association options.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n setState({\n options: response.data.options,\n totalOptionsCount: response.data.total_options\n });\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n break;\n\n case 'FETCH_SELECTED_OPTIONS':\n fetchData(field, {\n options: props.value\n }).then(function (response) {\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(response))\n });\n });\n break;\n }\n };\n}\n\nvar applyWithState = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"withState\"])({\n options: [],\n selectedOptions: [],\n totalOptionsCount: 0,\n queryTerm: ''\n});\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"withEffects\"])(aperture, {\n handler: handler\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__[\"addFilter\"])('carbon-fields.association.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Minimum number of items not reached (%s items)', 'carbon-fields-ui'), [field.min]);\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"compose\"])(applyWithState, applyWithEffects)(AssociationField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/association/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/association/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\nvar AssociationField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(AssociationField, _Component);\n\n function AssociationField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, AssociationField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(AssociationField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"selectedList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSearchChange\", function (queryTerm) {\n var _this$props = _this.props,\n fetchOptions = _this$props.fetchOptions,\n setState = _this$props.setState;\n setState({\n queryTerm: queryTerm\n });\n fetchOptions({\n queryTerm: queryTerm\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddItem\", function (option) {\n var _this$props2 = _this.props,\n field = _this$props2.field,\n id = _this$props2.id,\n value = _this$props2.value,\n onChange = _this$props2.onChange,\n setState = _this$props2.setState,\n selectedOptions = _this$props2.selectedOptions; // Don't do anything if the duplicates aren't allowed and\n // the item is already selected.\n\n if (!field.duplicates_allowed && option.disabled) {\n return;\n } // Don't do anything, because the maximum is reached.\n\n\n if (field.max > 0 && value.length >= field.max) {\n // eslint-disable-next-line no-alert\n alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Maximum number of items reached (%s items)', 'carbon-fields-ui'), Number(field.max)));\n return;\n }\n\n onChange(id, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(value).concat([Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"pick\"])(option, 'id', 'type', 'subtype')]));\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat([option])\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveItem\", function (option) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n id = _this$props3.id,\n onChange = _this$props3.onChange,\n setState = _this$props3.setState,\n selectedOptions = _this$props3.selectedOptions;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(value, option));\n setState({\n selectedOptions: Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(selectedOptions, option)\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSort\", function (items) {\n var _this$props4 = _this.props,\n id = _this$props4.id,\n onChange = _this$props4.onChange;\n onChange(id, items);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(AssociationField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props5 = this.props,\n fetchSelectedOptions = _this$props5.fetchSelectedOptions,\n field = _this$props5.field,\n value = _this$props5.value,\n setState = _this$props5.setState;\n setState({\n options: field.options.options,\n totalOptionsCount: field.options.total_options\n });\n\n if (value) {\n fetchSelectedOptions();\n }\n }\n /**\n * Handles the change of search.\n *\n * @param {string} queryTerm\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props6 = this.props,\n name = _this$props6.name,\n value = _this$props6.value,\n field = _this$props6.field,\n totalOptionsCount = _this$props6.totalOptionsCount,\n selectedOptions = _this$props6.selectedOptions,\n queryTerm = _this$props6.queryTerm;\n var options = this.props.options;\n\n if (!field.duplicates_allowed) {\n options = immer__WEBPACK_IMPORTED_MODULE_10___default()(options, function (draft) {\n draft.map(function (option) {\n option.disabled = !!Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"find\"])(value, function (selectedOption) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isMatch\"])(selectedOption, {\n id: option.id,\n type: option.type,\n subtype: option.subtype\n });\n });\n return option;\n });\n });\n }\n\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Fragment\"], null, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__bar\"\n }, __webpack_provided_wp_dot_element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n value: queryTerm,\n onChange: this.handleSearchChange\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__counter\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Showing %1$d of %2$d results', 'carbon-fields-ui'), Number(options.length), Number(totalOptionsCount)))), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__cols\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__col\"\n }, options.map(function (option, index) {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_16___default()('cf-association__option', {\n 'cf-association__option--selected': option.disabled\n }),\n key: index\n }, option.thumbnail && __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: option.thumbnail\n }), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, option.title), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, option.type)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, __webpack_provided_wp_dot_element.createElement(\"a\", {\n className: \"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit\",\n href: option.edit_link\n }), !option.disabled && (field.max < 0 || value.length < field.max) && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-plus-alt\",\n onClick: function onClick() {\n return _this2.handleAddItem(option);\n }\n })));\n })), __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n forwardedRef: this.selectedList,\n items: value,\n options: {\n axis: 'y',\n forceHelperSize: true,\n forcePlaceholderSize: true,\n scroll: true,\n handle: '.cf-association__option-sort'\n },\n onUpdate: this.handleSort\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__col\",\n ref: this.selectedList\n }, !!selectedOptions.length && value.map(function (option, index) {\n var optionData = selectedOptions.find(function (selectedOption) {\n return selectedOption.id === option.id && selectedOption.type === option.type && selectedOption.subtype === option.subtype;\n });\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option\",\n key: index\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-sort dashicons dashicons-menu\"\n }), optionData.thumbnail && __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: optionData.thumbnail\n }), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, optionData.title), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, optionData.type)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-dismiss\",\n onClick: function onClick() {\n return _this2.handleRemoveItem(option);\n }\n })), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[\").concat(index, \"]\"),\n value: \"\".concat(optionData.type, \":\").concat(optionData.subtype, \":\").concat(optionData.id),\n readOnly: true\n }));\n })))));\n }\n }]);\n\n return AssociationField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var actions = [{\n event: 'fetchOptionsEvent',\n prop: 'fetchOptions',\n type: 'FETCH_OPTIONS'\n }, {\n event: 'fetchSelectedOptionsEvent',\n prop: 'fetchSelectedOptions',\n type: 'FETCH_SELECTED_OPTIONS'\n }].map(function (actionData) {\n var _component$useEvent = component.useEvent(actionData.event),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_component$useEvent, 2),\n actionChannel$ = _component$useEvent2[0],\n action = _component$useEvent2[1];\n\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, actionData, {\n action: action,\n channel$: actionChannel$\n });\n });\n var combined$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"combine\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref) {\n var action = _ref.action,\n prop = _ref.prop;\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_19__[\"default\"])({\n action: action,\n prop: prop\n });\n }))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (combinedActions) {\n return Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"toProps\"])(combinedActions.reduce(function (acc, curr) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, acc, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()({}, curr.prop, curr.action));\n }, {}));\n }));\n return callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"merge\"].apply(void 0, [combined$].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref2) {\n var channel$ = _ref2.channel$,\n type = _ref2.type;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(channel$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (payload) {\n return {\n type: type,\n payload: payload\n };\n }));\n }))));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var setState = props.setState,\n selectedOptions = props.selectedOptions,\n hierarchyResolver = props.hierarchyResolver;\n\n switch (type) {\n case 'FETCH_OPTIONS':\n // eslint-disable-next-line\n var request = window.jQuery.get(window.ajaxurl, {\n action: 'carbon_fields_fetch_association_options',\n term: payload.queryTerm,\n container_id: props.containerId,\n field_name: hierarchyResolver()\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('An error occurred while trying to fetch association options.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n setState({\n options: response.data.options,\n totalOptionsCount: response.data.total_options\n });\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n break;\n\n case 'FETCH_SELECTED_OPTIONS':\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/association/\"), 'get', {\n container_id: props.containerId,\n options: props.value,\n field_id: hierarchyResolver()\n }).then(function (response) {\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(response))\n });\n });\n break;\n }\n };\n}\n\nvar applyWithState = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"withState\"])({\n options: [],\n selectedOptions: [],\n totalOptionsCount: 0,\n queryTerm: ''\n});\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"withEffects\"])(aperture, {\n handler: handler\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__[\"addFilter\"])('carbon-fields.association.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('This field is required.', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Minimum number of items not reached (%s items)', 'carbon-fields-ui'), [field.min]);\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"compose\"])(applyWithState, applyWithEffects)(AssociationField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/association/index.js?"); /***/ }), @@ -3200,7 +3200,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../registry/fields */ \"./packages/core/registry/fields.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar ComplexGroup =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexGroup, _Component);\n\n function ComplexGroup() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexGroup);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexGroup)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleClick\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onToggle = _this$props.onToggle;\n onToggle(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneClick\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n onClone = _this$props2.onClone;\n onClone(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveClick\", function () {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n onRemove = _this$props3.onRemove;\n onRemove(id);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexGroup, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n index = _this$props4.index,\n label = _this$props4.label,\n name = _this$props4.name,\n prefix = _this$props4.prefix,\n tabbed = _this$props4.tabbed,\n hidden = _this$props4.hidden,\n collapsed = _this$props4.collapsed,\n allowClone = _this$props4.allowClone,\n fields = _this$props4.fields,\n context = _this$props4.context,\n onFieldSetup = _this$props4.onFieldSetup;\n var groupClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group', {\n 'cf-complex__group--collapsed': collapsed\n });\n var toggleClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('dashicons-before', 'cf-complex__group-action-icon', {\n 'dashicons-arrow-up': !collapsed,\n 'dashicons-arrow-down': collapsed\n });\n var actionsClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group-actions', {\n 'cf-complex__group-actions--tabbed': tabbed\n });\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: groupClasses,\n hidden: hidden\n }, name && __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(prefix, \"[value]\"),\n value: name\n }), !tabbed && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__group-head\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-index\"\n }, index + 1), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-title\"\n }, label)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__group-body\",\n hidden: !tabbed && collapsed\n }, fields.map(function (field) {\n var FieldEdit = Object(_registry_fields__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, context);\n\n if (!FieldEdit) {\n return null;\n }\n\n var _onFieldSetup = onFieldSetup(field, {}, _this2.props),\n _onFieldSetup2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_onFieldSetup, 2),\n Field = _onFieldSetup2[0],\n props = _onFieldSetup2[1];\n\n return (// The `key` will be assigned via `onFieldSetup`.\n // eslint-disable-next-line react/jsx-key\n __webpack_provided_wp_dot_element.createElement(Field, props, __webpack_provided_wp_dot_element.createElement(FieldEdit, props))\n );\n })), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: actionsClasses\n }, allowClone && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleCloneClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"dashicons-before dashicons-admin-page cf-complex__group-action-icon\"\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Duplicate', 'carbon-fields-ui'))), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleRemoveClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"dashicons-before dashicons-trash cf-complex__group-action-icon\"\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Remove', 'carbon-fields-ui'))), !tabbed && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleToggleClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: toggleClasses\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Collapse', 'carbon-fields-ui')))));\n }\n }]);\n\n return ComplexGroup;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexGroup);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/group.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../registry/fields */ \"./packages/core/registry/fields.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar ComplexGroup =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexGroup, _Component);\n\n function ComplexGroup() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexGroup);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexGroup)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleClick\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onToggle = _this$props.onToggle;\n onToggle(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneClick\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n onClone = _this$props2.onClone;\n onClone(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveClick\", function () {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n onRemove = _this$props3.onRemove;\n onRemove(id);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexGroup, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n index = _this$props4.index,\n label = _this$props4.label,\n name = _this$props4.name,\n prefix = _this$props4.prefix,\n tabbed = _this$props4.tabbed,\n hidden = _this$props4.hidden,\n dragged = _this$props4.dragged,\n collapsed = _this$props4.collapsed,\n allowClone = _this$props4.allowClone,\n fields = _this$props4.fields,\n context = _this$props4.context,\n onFieldSetup = _this$props4.onFieldSetup;\n var groupClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group', {\n 'cf-complex__group--grid': !tabbed,\n 'cf-complex__group--tabbed': tabbed,\n 'cf-complex__group--collapsed': collapsed,\n 'cf-complex__group--dragged': dragged\n });\n var toggleClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('dashicons-before', 'cf-complex__group-action-icon', {\n 'dashicons-arrow-up': !collapsed,\n 'dashicons-arrow-down': collapsed\n });\n var actionsClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group-actions', {\n 'cf-complex__group-actions--grid': !tabbed,\n 'cf-complex__group-actions--tabbed': tabbed\n });\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: groupClasses,\n hidden: hidden\n }, name && __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(prefix, \"[value]\"),\n value: name\n }), !tabbed && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__group-head\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-index\"\n }, index + 1), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-title\"\n }, label)), !dragged && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__group-body\",\n hidden: !tabbed && collapsed\n }, fields.map(function (field) {\n var FieldEdit = Object(_registry_fields__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, context);\n\n if (!FieldEdit) {\n return null;\n }\n\n var _onFieldSetup = onFieldSetup(field, {}, _this2.props),\n _onFieldSetup2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_onFieldSetup, 2),\n Field = _onFieldSetup2[0],\n props = _onFieldSetup2[1];\n\n return (// The `key` will be assigned via `onFieldSetup`.\n // eslint-disable-next-line react/jsx-key\n __webpack_provided_wp_dot_element.createElement(Field, props, __webpack_provided_wp_dot_element.createElement(FieldEdit, props))\n );\n })), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: actionsClasses\n }, allowClone && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleCloneClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"dashicons-before dashicons-admin-page cf-complex__group-action-icon\"\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Duplicate', 'carbon-fields-ui'))), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleRemoveClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"dashicons-before dashicons-trash cf-complex__group-action-icon\"\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Remove', 'carbon-fields-ui'))), !tabbed && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleToggleClick\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: toggleClasses\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Collapse', 'carbon-fields-ui')))));\n }\n }]);\n\n return ComplexGroup;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexGroup);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/group.js?"); /***/ }), @@ -3212,7 +3212,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./tabs */ \"./packages/core/fields/complex/tabs.js\");\n/* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./inserter */ \"./packages/core/fields/complex/inserter.js\");\n/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./group */ \"./packages/core/fields/complex/group.js\");\n/* harmony import */ var _placeholder__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./placeholder */ \"./packages/core/fields/complex/placeholder.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"groupsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"tabsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"state\", {\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(_this.props.value, \"0.\".concat(_this.props.groupIdKey), null)\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddGroup\", function (selection) {\n var _this$props = _this.props,\n groupIdKey = _this$props.groupIdKey,\n onAddGroup = _this$props.onAddGroup;\n onAddGroup(selection, function (group) {\n if (_this.isTabbed) {\n _this.handleTabsChange(group[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleCloneGroup\", function (groupId) {\n var _this$props2 = _this.props,\n groupIdKey = _this$props2.groupIdKey,\n onCloneGroup = _this$props2.onCloneGroup;\n\n var group = _this.findGroup(groupId);\n\n onCloneGroup(group, function (clonedGroup) {\n if (_this.isTabbed) {\n _this.handleTabsChange(clonedGroup[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveGroup\", function (groupId) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n groupIdKey = _this$props3.groupIdKey,\n onRemoveGroup = _this$props3.onRemoveGroup;\n\n var group = _this.findGroup(groupId);\n\n if (_this.isTabbed) {\n var currentIndex = value.indexOf(group);\n var nextIndex = currentIndex > 0 ? currentIndex - 1 : 1;\n\n _this.setState({\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(value, \"\".concat(nextIndex, \".\").concat(groupIdKey), null)\n });\n }\n\n onRemoveGroup(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleToggleAllClick\", function () {\n var _this$props4 = _this.props,\n allGroupsAreCollapsed = _this$props4.allGroupsAreCollapsed,\n onToggleAllGroups = _this$props4.onToggleAllGroups;\n onToggleAllGroups(!allGroupsAreCollapsed);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSortGroups\", function (groups) {\n var _this$props5 = _this.props,\n id = _this$props5.id,\n onChange = _this$props5.onChange;\n onChange(id, groups);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleTabsChange\", function (groupId) {\n _this.setState({\n currentTab: groupId\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, [{\n key: \"findGroup\",\n\n /**\n * Finds a group.\n *\n * @param {string} groupId\n * @return {?Object}\n */\n value: function findGroup(groupId) {\n var _this$props6 = this.props,\n value = _this$props6.value,\n groupIdKey = _this$props6.groupIdKey;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(value, [groupIdKey, groupId]);\n }\n /**\n * Returns a list of groups that can be added if the field\n * doesn't allow duplicating of groups.\n *\n * @param {string} key\n * @return {Object[]}\n */\n\n }, {\n key: \"getAvailableGroups\",\n value: function getAvailableGroups(key) {\n var _this$props7 = this.props,\n field = _this$props7.field,\n value = _this$props7.value;\n\n if (field.duplicate_groups_allowed) {\n return field.groups;\n }\n\n var existingGroupNames = value.map(function (group) {\n return group[key];\n });\n return field.groups.filter(function (_ref) {\n var name = _ref.name;\n return existingGroupNames.indexOf(name) === -1;\n });\n }\n /**\n * Returns a list of labels of existing groups.\n *\n * @return {string[]}\n */\n\n }, {\n key: \"getGroupLabels\",\n value: function getGroupLabels() {\n var _this$props8 = this.props,\n field = _this$props8.field,\n groupValues = _this$props8.groupValues;\n return groupValues.map(function (_ref2, index) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_ref2, 2),\n name = _ref3[0],\n values = _ref3[1];\n\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(field.groups, ['name', name]);\n\n if (!group) {\n return 'N/A';\n }\n\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isString\"])(group.label_template)) {\n return group.label;\n }\n\n try {\n var label = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"template\"])(group.label_template)(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({\n $_index: index\n }, values));\n return label || group.label;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Couldn't create the label of group - \".concat(e.message));\n return 'N/A';\n }\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} selection\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var _this$props9 = this.props,\n value = _this$props9.value,\n field = _this$props9.field,\n groupIdKey = _this$props9.groupIdKey,\n groupFilterKey = _this$props9.groupFilterKey,\n allGroupsAreCollapsed = _this$props9.allGroupsAreCollapsed,\n onGroupSetup = _this$props9.onGroupSetup,\n onGroupFieldSetup = _this$props9.onGroupFieldSetup,\n onToggleGroup = _this$props9.onToggleGroup;\n var availableGroups = this.getAvailableGroups(groupFilterKey);\n var groupLabels = this.getGroupLabels(); // TODO: Move this to a memoized function.\n\n var tabs = value.map(function (group, index) {\n var id = group[groupIdKey];\n var label = groupLabels[index];\n return {\n id: id,\n label: label\n };\n });\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Fragment\"], null, this.isTabbed && !!value.length && __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n forwardedRef: this.tabsList,\n options: {\n axis: field.layout === 'tabbed-vertical' ? 'y' : 'x',\n forcePlaceholderSize: true\n },\n onUpdate: this.handleSortGroups\n }, __webpack_provided_wp_dot_element.createElement(_tabs__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n ref: this.tabsList,\n items: tabs,\n current: currentTab,\n onChange: this.handleTabsChange\n }, !!availableGroups.length && !this.isMaximumReached && __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: \"+\",\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }))), !value.length && __webpack_provided_wp_dot_element.createElement(_placeholder__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n label: \"There are no entries yet.\"\n }, __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n })), !!value.length && __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n options: {\n axis: 'y',\n handle: '.cf-complex__group-head',\n placeholder: 'cf-complex__group-placeholder',\n forcePlaceholderSize: true\n },\n forwardedRef: this.groupsList,\n onUpdate: this.handleSortGroups\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__groups\",\n ref: this.groupsList\n }, value.map(function (group, index) {\n return (// The `key` will be assigned via `onGroupSetup`.\n // eslint-disable-next-line react/jsx-key\n __webpack_provided_wp_dot_element.createElement(_group__WEBPACK_IMPORTED_MODULE_18__[\"default\"], onGroupSetup(group, {\n index: index,\n label: groupLabels[index],\n tabbed: _this2.isTabbed,\n hidden: _this2.isTabbed && group[groupIdKey] !== currentTab,\n allowClone: field.duplicate_groups_allowed && !_this2.isMaximumReached,\n onFieldSetup: onGroupFieldSetup,\n onClone: _this2.handleCloneGroup,\n onRemove: _this2.handleRemoveGroup,\n onToggle: onToggleGroup\n }))\n );\n }))), !this.isTabbed && !!value.length && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__actions\"\n }, !!availableGroups.length && !this.isMaximumReached && __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-complex__toggler\",\n onClick: this.handleToggleAllClick\n }, allGroupsAreCollapsed ? 'Expand All' : 'Collapse All')));\n }\n }, {\n key: \"isTabbed\",\n\n /**\n * Returns true if the field is using tabs for the layout.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.props.field.layout.indexOf('tabbed') > -1;\n }\n /**\n * Returns true if the maximum number of entries is reached.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isMaximumReached\",\n get: function get() {\n var _this$props10 = this.props,\n field = _this$props10.field,\n value = _this$props10.value;\n return field.max > 0 && value.length >= field.max;\n }\n /**\n * Returns the text used in \"Add Entry\" button.\n *\n * @return {string}\n */\n\n }, {\n key: \"inserterButtonText\",\n get: function get() {\n var field = this.props.field;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Add %s', 'carbon-fields-ui'), field.labels.singular_name);\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.field-wrapper', 'carbon-fields/core', function (OriginalField) {\n return function (props) {\n var field = props.field;\n\n if (field.type !== 'complex') {\n return __webpack_provided_wp_dot_element.createElement(OriginalField, props);\n }\n\n return __webpack_provided_wp_dot_element.createElement(OriginalField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n className: \"cf-complex--\".concat(field.layout)\n }, props));\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n labels = field.labels,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n var label = min === 1 ? labels.singular_name : labels.plural_name;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Minimum number of rows not reached (%1$d %2$s)', 'carbon-fields-ui'), Number(min), label.toLowerCase());\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./tabs */ \"./packages/core/fields/complex/tabs.js\");\n/* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./inserter */ \"./packages/core/fields/complex/inserter.js\");\n/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./group */ \"./packages/core/fields/complex/group.js\");\n/* harmony import */ var _placeholder__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./placeholder */ \"./packages/core/fields/complex/placeholder.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"groupsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"tabsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"state\", {\n currentDraggedGroup: null,\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(_this.props.value, \"0.\".concat(_this.props.groupIdKey), null)\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddGroup\", function (selection) {\n var _this$props = _this.props,\n groupIdKey = _this$props.groupIdKey,\n onAddGroup = _this$props.onAddGroup;\n onAddGroup(selection, function (group) {\n if (_this.isTabbed) {\n _this.handleTabsChange(group[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleCloneGroup\", function (groupId) {\n var _this$props2 = _this.props,\n groupIdKey = _this$props2.groupIdKey,\n onCloneGroup = _this$props2.onCloneGroup;\n\n var group = _this.findGroup(groupId);\n\n onCloneGroup(group, function (clonedGroup) {\n if (_this.isTabbed) {\n _this.handleTabsChange(clonedGroup[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveGroup\", function (groupId) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n groupIdKey = _this$props3.groupIdKey,\n onRemoveGroup = _this$props3.onRemoveGroup;\n\n var group = _this.findGroup(groupId);\n\n if (_this.isTabbed) {\n var currentIndex = value.indexOf(group);\n var nextIndex = currentIndex > 0 ? currentIndex - 1 : 1;\n\n _this.setState({\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(value, \"\".concat(nextIndex, \".\").concat(groupIdKey), null)\n });\n }\n\n onRemoveGroup(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleToggleAllClick\", function () {\n var _this$props4 = _this.props,\n allGroupsAreCollapsed = _this$props4.allGroupsAreCollapsed,\n onToggleAllGroups = _this$props4.onToggleAllGroups;\n onToggleAllGroups(!allGroupsAreCollapsed);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleGroupsSortStart\", function (e, ui) {\n var _this$props5 = _this.props,\n value = _this$props5.value,\n groupIdKey = _this$props5.groupIdKey;\n var index = ui.item.index();\n var id = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(value, \"\".concat(index, \".\").concat(groupIdKey), null);\n\n _this.setState({\n currentDraggedGroup: id\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleGroupsSortUpdate\", function (groups) {\n var _this$props6 = _this.props,\n id = _this$props6.id,\n onChange = _this$props6.onChange;\n onChange(id, groups);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleGroupsSortStop\", function () {\n _this.setState({\n currentDraggedGroup: null\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleTabsChange\", function (groupId) {\n _this.setState({\n currentTab: groupId\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, [{\n key: \"findGroup\",\n\n /**\n * Finds a group.\n *\n * @param {string} groupId\n * @return {?Object}\n */\n value: function findGroup(groupId) {\n var _this$props7 = this.props,\n value = _this$props7.value,\n groupIdKey = _this$props7.groupIdKey;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(value, [groupIdKey, groupId]);\n }\n /**\n * Returns a list of groups that can be added if the field\n * doesn't allow duplicating of groups.\n *\n * @param {string} key\n * @return {Object[]}\n */\n\n }, {\n key: \"getAvailableGroups\",\n value: function getAvailableGroups(key) {\n var _this$props8 = this.props,\n field = _this$props8.field,\n value = _this$props8.value;\n\n if (field.duplicate_groups_allowed) {\n return field.groups;\n }\n\n var existingGroupNames = value.map(function (group) {\n return group[key];\n });\n return field.groups.filter(function (_ref) {\n var name = _ref.name;\n return existingGroupNames.indexOf(name) === -1;\n });\n }\n /**\n * Returns a list of labels of existing groups.\n *\n * @return {string[]}\n */\n\n }, {\n key: \"getGroupLabels\",\n value: function getGroupLabels() {\n var _this$props9 = this.props,\n field = _this$props9.field,\n groupValues = _this$props9.groupValues;\n return groupValues.map(function (_ref2, index) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_ref2, 2),\n name = _ref3[0],\n values = _ref3[1];\n\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(field.groups, ['name', name]);\n\n if (!group) {\n return 'N/A';\n }\n\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isString\"])(group.label_template)) {\n return group.label;\n }\n\n try {\n var label = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"template\"])(group.label_template)(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({\n $_index: index\n }, values));\n return label || group.label;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Couldn\\'t create the label of group - %s', 'carbon-fields-ui'), e.message));\n return 'N/A';\n }\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} selection\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$state = this.state,\n currentDraggedGroup = _this$state.currentDraggedGroup,\n currentTab = _this$state.currentTab;\n var _this$props10 = this.props,\n value = _this$props10.value,\n field = _this$props10.field,\n groupIdKey = _this$props10.groupIdKey,\n groupFilterKey = _this$props10.groupFilterKey,\n allGroupsAreCollapsed = _this$props10.allGroupsAreCollapsed,\n onGroupSetup = _this$props10.onGroupSetup,\n onGroupFieldSetup = _this$props10.onGroupFieldSetup,\n onToggleGroup = _this$props10.onToggleGroup;\n var availableGroups = this.getAvailableGroups(groupFilterKey);\n var groupLabels = this.getGroupLabels(); // TODO: Move this to a memoized function.\n\n var tabs = value.map(function (group, index) {\n var id = group[groupIdKey];\n var label = groupLabels[index];\n return {\n id: id,\n label: label\n };\n });\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Fragment\"], null, this.isTabbed && !!value.length && __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n forwardedRef: this.tabsList,\n options: {\n axis: field.layout === 'tabbed-vertical' ? 'y' : 'x',\n forcePlaceholderSize: true\n },\n onUpdate: this.handleGroupsSortUpdate\n }, __webpack_provided_wp_dot_element.createElement(_tabs__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n ref: this.tabsList,\n items: tabs,\n current: currentTab,\n layout: field.layout,\n onChange: this.handleTabsChange\n }, !!availableGroups.length && !this.isMaximumReached && __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: \"+\",\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }))), !value.length && __webpack_provided_wp_dot_element.createElement(_placeholder__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n label: \"There are no entries yet.\"\n }, __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n })), !!value.length && __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n options: {\n // axis: 'y',\n helper: 'clone',\n handle: '.cf-complex__group-head',\n placeholder: 'cf-complex__group-placeholder',\n forceHelperSize: true,\n forcePlaceholderSize: true\n },\n forwardedRef: this.groupsList,\n onStart: this.handleGroupsSortStart,\n onUpdate: this.handleGroupsSortUpdate,\n onStop: this.handleGroupsSortStop\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__groups\",\n ref: this.groupsList\n }, value.map(function (group, index) {\n return (// The `key` will be assigned via `onGroupSetup`.\n // eslint-disable-next-line react/jsx-key\n __webpack_provided_wp_dot_element.createElement(_group__WEBPACK_IMPORTED_MODULE_18__[\"default\"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n key: \"\".concat(group[groupFilterKey], \"-\").concat(index)\n }, onGroupSetup(group, {\n index: index,\n label: groupLabels[index],\n dragged: group[groupIdKey] === currentDraggedGroup,\n tabbed: _this2.isTabbed,\n hidden: _this2.isTabbed && group[groupIdKey] !== currentTab,\n allowClone: field.duplicate_groups_allowed && !_this2.isMaximumReached,\n onFieldSetup: onGroupFieldSetup,\n onClone: _this2.handleCloneGroup,\n onRemove: _this2.handleRemoveGroup,\n onToggle: onToggleGroup\n })))\n );\n }))), !this.isTabbed && !!value.length && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__actions\"\n }, !!availableGroups.length && !this.isMaximumReached && __webpack_provided_wp_dot_element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-complex__toggler\",\n onClick: this.handleToggleAllClick\n }, allGroupsAreCollapsed ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Expand All', 'carbon-fields-ui') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Collapse All', 'carbon-fields-ui'))));\n }\n }, {\n key: \"isTabbed\",\n\n /**\n * Returns true if the field is using tabs for the layout.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.props.field.layout.indexOf('tabbed') > -1;\n }\n /**\n * Returns true if the maximum number of entries is reached.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isMaximumReached\",\n get: function get() {\n var _this$props11 = this.props,\n field = _this$props11.field,\n value = _this$props11.value;\n return field.max > 0 && value.length >= field.max;\n }\n /**\n * Returns the text used in \"Add Entry\" button.\n *\n * @return {string}\n */\n\n }, {\n key: \"inserterButtonText\",\n get: function get() {\n var field = this.props.field;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Add %s', 'carbon-fields-ui'), field.labels.singular_name);\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.field-wrapper', 'carbon-fields/core', function (OriginalField) {\n return function (props) {\n var field = props.field;\n\n if (field.type !== 'complex') {\n return __webpack_provided_wp_dot_element.createElement(OriginalField, props);\n }\n\n return __webpack_provided_wp_dot_element.createElement(OriginalField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n className: \"cf-complex--\".concat(field.layout)\n }, props));\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n labels = field.labels,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('This field is required.', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n var label = min === 1 ? labels.singular_name : labels.plural_name;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Minimum number of rows not reached (%1$d %2$s)', 'carbon-fields-ui'), Number(min), label.toLowerCase());\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/index.js?"); /***/ }), @@ -3259,7 +3259,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Renders the tabs navigation.\n *\n * @param {Object} props\n * @param {Object[]} props.items\n * @param {string} props.current\n * @param {mixed} props.children\n * @param {Function} props.onChange\n * @param {Object} ref\n * @return {void}\n */\n\nfunction ComplexTabs(_ref, ref) {\n var items = _ref.items,\n current = _ref.current,\n children = _ref.children,\n onChange = _ref.onChange;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__tabs\"\n }, __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-complex__tabs-list\",\n ref: ref\n }, items.map(function (item, index) {\n var classes = classnames__WEBPACK_IMPORTED_MODULE_0___default()('cf-complex__tabs-item', {\n 'cf-complex__tabs-item--current': item.id === current\n });\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n key: item.id,\n className: classes,\n onClick: function onClick() {\n return onChange(item.id);\n }\n }, item.label ? __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__tabs-title\",\n dangerouslySetInnerHTML: {\n __html: item.label\n }\n }) : __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__tabs-index\"\n }, index + 1));\n })), children);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"])(ComplexTabs));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/tabs.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Renders the tabs navigation.\n *\n * @param {Object} props\n * @param {Object[]} props.items\n * @param {string} props.current\n * @param {string} props.layout\n * @param {mixed} props.children\n * @param {Function} props.onChange\n * @param {Object} ref\n * @return {void}\n */\n\nfunction ComplexTabs(_ref, ref) {\n var items = _ref.items,\n current = _ref.current,\n layout = _ref.layout,\n children = _ref.children,\n onChange = _ref.onChange;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-complex__tabs cf-complex__tabs--\".concat(layout)\n }, __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-complex__tabs-list\",\n ref: ref\n }, items.map(function (item, index) {\n var classes = classnames__WEBPACK_IMPORTED_MODULE_0___default()('cf-complex__tabs-item', \"cf-complex__tabs-item--\".concat(layout), {\n 'cf-complex__tabs-item--current': item.id === current\n });\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n key: item.id,\n className: classes,\n onClick: function onClick() {\n return onChange(item.id);\n }\n }, item.label ? __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__tabs-title\",\n dangerouslySetInnerHTML: {\n __html: item.label\n }\n }) : __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-complex__tabs-index\"\n }, index + 1));\n })), children);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"])(ComplexTabs));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/tabs.js?"); /***/ }), @@ -3306,7 +3306,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/file/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _components_media_library__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/media-library */ \"./packages/core/components/media-library/index.js\");\n/* harmony import */ var _utils_fetch_attachments_data__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/fetch-attachments-data */ \"./packages/core/utils/fetch-attachments-data.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar FileField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(FileField, _Component);\n\n function FileField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, FileField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(FileField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n data: {}\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFileDataChange\", function (data) {\n _this.setState({\n data: data\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleClear\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, '');\n\n _this.handleFileDataChange({});\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSelect\", function (files) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field,\n onChange = _this$props2.onChange;\n\n var _files = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(files, 1),\n file = _files[0];\n\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"get\"])(file, field.value_type, file.id));\n\n _this.handleFileDataChange(file);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(FileField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle Hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this2 = this;\n\n var _this$props3 = this.props,\n value = _this$props3.value,\n field = _this$props3.field;\n\n if (value) {\n Object(_utils_fetch_attachments_data__WEBPACK_IMPORTED_MODULE_12__[\"default\"])([field.value_meta.id]).then(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 1),\n _ref2$ = _ref2[0],\n data = _ref2$ === void 0 ? {} : _ref2$;\n\n _this2.handleFileDataChange(data);\n });\n }\n }\n /**\n * Returns an URL to the attachment's thumbnail.\n *\n * @return {string}\n */\n\n }, {\n key: \"getThumb\",\n value: function getThumb() {\n var data = this.state.data;\n\n if (data.sizes) {\n var size = data.sizes.thumbnail || data.sizes.full;\n\n if (size) {\n return size.url;\n }\n }\n\n return data.icon;\n }\n /**\n * Handles the file meta set.\n *\n * @param {Object} data\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this3 = this;\n\n var data = this.state.data;\n var _this$props4 = this.props,\n value = _this$props4.value,\n name = _this$props4.name,\n field = _this$props4.field,\n buttonLabel = _this$props4.buttonLabel,\n mediaLibraryButtonLabel = _this$props4.mediaLibraryButtonLabel,\n mediaLibraryTitle = _this$props4.mediaLibraryTitle;\n return __webpack_provided_wp_dot_element.createElement(_components_media_library__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n onSelect: this.handleSelect,\n multiple: false,\n title: mediaLibraryTitle,\n buttonLabel: mediaLibraryButtonLabel,\n typeFilter: field.type_filter\n }, function (_ref3) {\n var openMediaBrowser = _ref3.openMediaBrowser;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__inner\"\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: name,\n value: value,\n readOnly: true\n }), value && data.id && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__content\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__preview\"\n }, __webpack_provided_wp_dot_element.createElement(\"img\", {\n src: _this3.getThumb(),\n className: \"cf-file__image\"\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-file__remove dashicons-before dashicons-no-alt\",\n onClick: _this3.handleClear\n })), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-file__name\",\n title: data.filename\n }, data.filename)), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-file__browse\",\n onClick: openMediaBrowser\n }, buttonLabel));\n });\n }\n }]);\n\n return FileField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FileField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/file/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/file/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _components_media_library__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/media-library */ \"./packages/core/components/media-library/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar FileField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(FileField, _Component);\n\n function FileField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, FileField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(FileField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n data: {}\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFileDataChange\", function (data) {\n _this.setState({\n data: data\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleClear\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, '');\n\n _this.handleFileDataChange({});\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSelect\", function (files) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field,\n onChange = _this$props2.onChange;\n\n var _files = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(files, 1),\n file = _files[0];\n\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"get\"])(file, field.value_type, file.id));\n\n _this.handleFileDataChange(file);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(FileField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle Hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props3 = this.props,\n value = _this$props3.value,\n field = _this$props3.field;\n\n if (value) {\n // TODO: Refactor this to use `@wordpress/api-fetch` package.\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/attachment/?type=\").concat(field.value_type, \"&value=\").concat(value), 'get').then(this.handleFileDataChange);\n }\n }\n /**\n * Returns an URL to the attachment's thumbnail.\n *\n * @return {string}\n */\n\n }, {\n key: \"getThumb\",\n value: function getThumb() {\n var data = this.state.data;\n\n if (data.sizes) {\n var size = data.sizes.thumbnail || data.sizes.full;\n\n if (size) {\n return size.url;\n }\n }\n\n if (data.thumb_url) {\n return data.thumb_url;\n }\n\n return data.icon;\n }\n /**\n * Handles the file meta set.\n *\n * @param {Object} data\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var data = this.state.data;\n var _this$props4 = this.props,\n value = _this$props4.value,\n name = _this$props4.name,\n field = _this$props4.field,\n buttonLabel = _this$props4.buttonLabel,\n mediaLibraryButtonLabel = _this$props4.mediaLibraryButtonLabel,\n mediaLibraryTitle = _this$props4.mediaLibraryTitle;\n return __webpack_provided_wp_dot_element.createElement(_components_media_library__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n onSelect: this.handleSelect,\n multiple: false,\n title: mediaLibraryTitle,\n buttonLabel: mediaLibraryButtonLabel,\n typeFilter: field.type_filter\n }, function (_ref) {\n var openMediaBrowser = _ref.openMediaBrowser;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__inner\"\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: name,\n value: value,\n readOnly: true\n }), value && data.id && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__content\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__preview\"\n }, __webpack_provided_wp_dot_element.createElement(\"img\", {\n src: _this2.getThumb(),\n className: \"cf-file__image\"\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-file__remove dashicons-before dashicons-no-alt\",\n onClick: _this2.handleClear\n })), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-file__name\",\n title: data.filename || data.file_name\n }, data.filename || data.file_name)), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-file__browse\",\n onClick: openMediaBrowser\n }, buttonLabel));\n });\n }\n }]);\n\n return FileField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FileField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/file/index.js?"); /***/ }), @@ -3377,7 +3377,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/map/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _google_map__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./google-map */ \"./packages/core/fields/map/google-map.js\");\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\nvar MapField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(MapField, _Component);\n\n function MapField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, MapField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(MapField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleSearchChange\", Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"debounce\"])(function (address) {\n if (address) {\n _this.props.onGeocodeAddress({\n address: address\n });\n }\n }, 250));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleMapChange\", function (location) {\n var _this$props = _this.props,\n id = _this$props.id,\n value = _this$props.value,\n onChange = _this$props.onChange;\n onChange(id, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, value, location));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(MapField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value;\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Fragment\"], null, __webpack_provided_wp_dot_element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n id: id,\n className: \"cf-map__search\",\n name: \"\".concat(name, \"[address]\"),\n value: value.address,\n onChange: this.handleSearchChange\n }), __webpack_provided_wp_dot_element.createElement(_google_map__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n className: \"cf-map__canvas\",\n lat: value.lat,\n lng: value.lng,\n zoom: value.zoom,\n onChange: this.handleMapChange\n }), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[lat]\"),\n value: value.lat\n }), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[lng]\"),\n value: value.lng,\n readOnly: true\n }), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[zoom]\"),\n value: value.zoom,\n readOnly: true\n }));\n }\n }]);\n\n return MapField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var _component$useEvent = component.useEvent('geocodeAddress'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n geocodeAddress$ = _component$useEvent2[0],\n geocodeAddress = _component$useEvent2[1];\n\n var geocodeAddressProps$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({\n onGeocodeAddress: geocodeAddress\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_12__[\"toProps\"]));\n var geocodeAddressEffect$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"pipe\"])(geocodeAddress$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(function (payload) {\n return {\n type: 'GEOCODE_ADDRESS',\n payload: payload\n };\n }));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"merge\"])(geocodeAddressProps$, geocodeAddressEffect$);\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var id = props.id,\n value = props.value,\n onChange = props.onChange;\n\n switch (type) {\n case 'GEOCODE_ADDRESS':\n var geocode = function geocode(address) {\n return new Promise(function (resolve, reject) {\n var geocoder = new window.google.maps.Geocoder();\n geocoder.geocode({\n address: address\n }, function (results, status) {\n if (status === window.google.maps.GeocoderStatus.OK) {\n var location = results[0].geometry.location;\n resolve({\n lat: location.lat(),\n lng: location.lng()\n });\n } else if (status === 'ZERO_RESULTS') {\n reject(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('The address could not be found. ', 'carbon-fields-ui'));\n } else {\n reject(\"\".concat(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Geocode was not successful for the following reason: ', 'carbon-fields-ui'), \" \").concat(status));\n }\n });\n });\n };\n\n geocode(payload.address).then(function (_ref) {\n var lat = _ref.lat,\n lng = _ref.lng;\n onChange(id, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, value, {\n address: payload.address,\n value: \"\".concat(lat, \",\").concat(lng),\n lat: lat,\n lng: lng\n }));\n }).catch(function (alert) {\n // eslint-disable-next-line\n console.log('Error alert'); // eslint-disable-next-line\n\n console.log(alert);\n });\n break;\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_12__[\"withEffects\"])(aperture, {\n handler: handler\n})(MapField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/map/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/map/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _google_map__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./google-map */ \"./packages/core/fields/map/google-map.js\");\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\nvar MapField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(MapField, _Component);\n\n function MapField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, MapField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(MapField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleSearchChange\", Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"debounce\"])(function (address) {\n if (address) {\n _this.props.onGeocodeAddress({\n address: address\n });\n }\n }, 250));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleMapChange\", function (location) {\n var _this$props = _this.props,\n id = _this$props.id,\n value = _this$props.value,\n onChange = _this$props.onChange;\n onChange(id, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, value, location));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(MapField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value;\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Fragment\"], null, __webpack_provided_wp_dot_element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n id: id,\n className: \"cf-map__search\",\n name: \"\".concat(name, \"[address]\"),\n value: value.address,\n onChange: this.handleSearchChange\n }), __webpack_provided_wp_dot_element.createElement(_google_map__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n className: \"cf-map__canvas\",\n lat: value.lat,\n lng: value.lng,\n zoom: value.zoom,\n onChange: this.handleMapChange\n }), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[lat]\"),\n value: value.lat\n }), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[lng]\"),\n value: value.lng,\n readOnly: true\n }), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[zoom]\"),\n value: value.zoom,\n readOnly: true\n }));\n }\n }]);\n\n return MapField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var _component$useEvent = component.useEvent('geocodeAddress'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n geocodeAddress$ = _component$useEvent2[0],\n geocodeAddress = _component$useEvent2[1];\n\n var geocodeAddressProps$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({\n onGeocodeAddress: geocodeAddress\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_12__[\"toProps\"]));\n var geocodeAddressEffect$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"pipe\"])(geocodeAddress$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(function (payload) {\n return {\n type: 'GEOCODE_ADDRESS',\n payload: payload\n };\n }));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"merge\"])(geocodeAddressProps$, geocodeAddressEffect$);\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var id = props.id,\n value = props.value,\n onChange = props.onChange;\n\n switch (type) {\n case 'GEOCODE_ADDRESS':\n var geocode = function geocode(address) {\n return new Promise(function (resolve, reject) {\n var geocoder = new window.google.maps.Geocoder();\n geocoder.geocode({\n address: address\n }, function (results, status) {\n if (status === window.google.maps.GeocoderStatus.OK) {\n var location = results[0].geometry.location;\n resolve({\n lat: location.lat(),\n lng: location.lng()\n });\n } else if (status === 'ZERO_RESULTS') {\n reject(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('The address could not be found.', 'carbon-fields-ui'));\n } else {\n reject(\"\".concat(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Geocode was not successful for the following reason: ', 'carbon-fields-ui'), \" \").concat(status));\n }\n });\n });\n };\n\n geocode(payload.address).then(function (_ref) {\n var lat = _ref.lat,\n lng = _ref.lng;\n onChange(id, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, value, {\n address: payload.address,\n value: \"\".concat(lat, \",\").concat(lng),\n lat: lat,\n lng: lng\n }));\n }).catch(function (alert) {\n // eslint-disable-next-line\n console.log(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Error alert', 'carbon-fields-ui')); // eslint-disable-next-line\n\n console.log(alert);\n });\n break;\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_12__[\"withEffects\"])(aperture, {\n handler: handler\n})(MapField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/map/index.js?"); /***/ }), @@ -3608,7 +3608,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_13__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\nvar SidebarField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(SidebarField, _Component);\n\n function SidebarField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, SidebarField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(SidebarField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (e) {\n var _this$props = _this.props,\n id = _this$props.id,\n onAdd = _this$props.onAdd,\n onChange = _this$props.onChange;\n var value = e.target.value;\n\n if (value !== '__add_new') {\n onChange(id, value);\n } else {\n onAdd(id);\n }\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(SidebarField, [{\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return __webpack_provided_wp_dot_element.createElement(\"select\", {\n id: id,\n name: name,\n value: value,\n onChange: this.handleChange\n }, __webpack_provided_wp_dot_element.createElement(\"option\", {\n value: \"0\",\n disabled: true\n }, \"Please choose\"), field.options.map(function (option) {\n return __webpack_provided_wp_dot_element.createElement(\"option\", {\n key: option.value,\n value: option.value\n }, option.label);\n }));\n }\n }]);\n\n return SidebarField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var _component$useEvent = component.useEvent('addSidebar'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n addSidebar$ = _component$useEvent2[0],\n addSidebar = _component$useEvent2[1];\n\n var addSidebarProps$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({\n onAdd: addSidebar\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"toProps\"]));\n var addSidebarEffect$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"pipe\"])(addSidebar$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"map\"])(function (fieldKey) {\n return {\n type: 'ADD_SIDEBAR',\n payload: {\n fieldKey: fieldKey\n }\n };\n }));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"merge\"])(addSidebarProps$, addSidebarEffect$);\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n switch (effect.type) {\n case 'ADD_SIDEBAR':\n /* eslint-disable-next-line no-alert */\n var name = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"trim\"])(window.prompt(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Please enter the name of the new sidebar:', 'carbon-fields-ui')));\n\n if (!name) {\n return;\n }\n\n var isExisting = props.field.options.some(function (option) {\n return option.label === name;\n });\n\n if (isExisting) {\n return;\n }\n\n var request = window.jQuery.post(window.ajaxurl, {\n action: 'carbon_fields_add_sidebar',\n name: name\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('An error occurred while trying to create the sidebar.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n var onAdded = props.onAdded,\n onChange = props.onChange;\n var sidebar = {\n value: response.data.id,\n label: response.data.name\n };\n onAdded(sidebar);\n onChange(effect.payload.fieldKey, sidebar.value);\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n break;\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"withEffects\"])(aperture, {\n handler: handler\n})(SidebarField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/sidebar/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_13__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\nvar SidebarField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(SidebarField, _Component);\n\n function SidebarField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, SidebarField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(SidebarField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (e) {\n var _this$props = _this.props,\n id = _this$props.id,\n onAdd = _this$props.onAdd,\n onChange = _this$props.onChange;\n var value = e.target.value;\n\n if (value !== '__add_new') {\n onChange(id, value);\n } else {\n onAdd(id);\n }\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(SidebarField, [{\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return __webpack_provided_wp_dot_element.createElement(\"select\", {\n id: id,\n name: name,\n value: value,\n onChange: this.handleChange\n }, __webpack_provided_wp_dot_element.createElement(\"option\", {\n value: \"0\",\n disabled: true\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Please choose', 'carbon-fields-ui')), field.options.map(function (option) {\n return __webpack_provided_wp_dot_element.createElement(\"option\", {\n key: option.value,\n value: option.value\n }, option.label);\n }));\n }\n }]);\n\n return SidebarField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var _component$useEvent = component.useEvent('addSidebar'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n addSidebar$ = _component$useEvent2[0],\n addSidebar = _component$useEvent2[1];\n\n var addSidebarProps$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({\n onAdd: addSidebar\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"toProps\"]));\n var addSidebarEffect$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"pipe\"])(addSidebar$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"map\"])(function (fieldKey) {\n return {\n type: 'ADD_SIDEBAR',\n payload: {\n fieldKey: fieldKey\n }\n };\n }));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"merge\"])(addSidebarProps$, addSidebarEffect$);\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n switch (effect.type) {\n case 'ADD_SIDEBAR':\n /* eslint-disable-next-line no-alert */\n var name = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"trim\"])(window.prompt(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Please enter the name of the new sidebar:', 'carbon-fields-ui')));\n\n if (!name) {\n return;\n }\n\n var isExisting = props.field.options.some(function (option) {\n return option.label === name;\n });\n\n if (isExisting) {\n return;\n }\n\n var request = window.jQuery.post(window.ajaxurl, {\n action: 'carbon_fields_add_sidebar',\n name: name\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('An error occurred while trying to create the sidebar.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n var onAdded = props.onAdded,\n onChange = props.onChange;\n var sidebar = {\n value: response.data.id,\n label: response.data.name\n };\n onAdded(sidebar);\n onChange(effect.payload.fieldKey, sidebar.value);\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n break;\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"withEffects\"])(aperture, {\n handler: handler\n})(SidebarField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/sidebar/index.js?"); /***/ }), @@ -3690,7 +3690,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return withConditionalLogic; });\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _compare__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./compare */ \"./packages/core/hocs/with-conditional-logic/compare.js\");\n/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Creates a high-order components which adds ability to evalute\n * the conditional logic of fields.\n *\n * @param {Function} input\n * @param {Function} output\n * @return {Function}\n */\n\nfunction withConditionalLogic(input, output) {\n /**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @param {Object} props\n * @return {Object}\n */\n function aperture(component, props) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"isEmpty\"])(props.field.conditional_logic)) {\n return;\n }\n\n return input(props, component);\n }\n /**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\n function handler(props) {\n return function (effect) {\n var _props$field$conditio = props.field.conditional_logic,\n relation = _props$field$conditio.relation,\n rules = _props$field$conditio.rules;\n var data = output(props, effect);\n var results = rules.reduce(function (accumulator, rule) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"has\"])(data, rule.field)) {\n // eslint-disable-next-line\n console.error(\"An unknown field is used in condition - \\\"\".concat(rule.field, \"\\\".\"));\n return accumulator.concat(false);\n } // TODO: Handle the conditional logic for chained fields. Probably we'll need the id of each sibling.\n // See https://github.com/htmlburger/carbon-fields/commit/3628a86c8840c8323f45c829a96c512a9985ad10#diff-b1aea524a4b1ab510e28e01a54c25fcd\n\n\n var result = Object(_compare__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(data[rule.field], rule.compare, rule.value);\n return accumulator.concat(result);\n }, []);\n var isVisible = false;\n\n switch (relation) {\n case 'AND':\n isVisible = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"every\"])(results);\n break;\n\n case 'OR':\n isVisible = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"some\"])(results);\n break;\n }\n\n if (isVisible) {\n props.showField(props.id);\n } else {\n props.hideField(props.id);\n }\n };\n }\n\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"createHigherOrderComponent\"])(function (OriginalComponent) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/core'),\n showField = _dispatch.showField,\n hideField = _dispatch.hideField;\n\n return {\n showField: showField,\n hideField: hideField\n };\n }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withSelect\"])(function (select, props) {\n return {\n visible: select('carbon-fields/core').isFieldVisible(props.id)\n };\n }), Object(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"withEffects\"])(aperture, {\n handler: handler\n }))(OriginalComponent);\n }, 'withConditionalLogic');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-conditional-logic/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return withConditionalLogic; });\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _compare__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./compare */ \"./packages/core/hocs/with-conditional-logic/compare.js\");\n/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Creates a high-order components which adds ability to evalute\n * the conditional logic of fields.\n *\n * @param {Function} input\n * @param {Function} output\n * @return {Function}\n */\n\nfunction withConditionalLogic(input, output) {\n /**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @param {Object} props\n * @return {Object}\n */\n function aperture(component, props) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isEmpty\"])(props.field.conditional_logic)) {\n return;\n }\n\n return input(props, component);\n }\n /**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\n function handler(props) {\n return function (effect) {\n var _props$field$conditio = props.field.conditional_logic,\n relation = _props$field$conditio.relation,\n rules = _props$field$conditio.rules;\n var data = output(props, effect);\n var results = rules.reduce(function (accumulator, rule) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"has\"])(data, rule.field)) {\n // eslint-disable-next-line\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('An unknown field is used in condition - \"%s\"', 'carbon-fields-ui'), rule.field));\n return accumulator.concat(false);\n } // TODO: Handle the conditional logic for chained fields. Probably we'll need the id of each sibling.\n // See https://github.com/htmlburger/carbon-fields/commit/3628a86c8840c8323f45c829a96c512a9985ad10#diff-b1aea524a4b1ab510e28e01a54c25fcd\n\n\n var result = Object(_compare__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(data[rule.field], rule.compare, rule.value);\n return accumulator.concat(result);\n }, []);\n var isVisible = false;\n\n switch (relation) {\n case 'AND':\n isVisible = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"every\"])(results);\n break;\n\n case 'OR':\n isVisible = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"some\"])(results);\n break;\n }\n\n if (isVisible) {\n props.showField(props.id);\n } else {\n props.hideField(props.id);\n }\n };\n }\n\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"createHigherOrderComponent\"])(function (OriginalComponent) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/core'),\n showField = _dispatch.showField,\n hideField = _dispatch.hideField;\n\n return {\n showField: showField,\n hideField: hideField\n };\n }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withSelect\"])(function (select, props) {\n return {\n visible: select('carbon-fields/core').isFieldVisible(props.id)\n };\n }), Object(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"withEffects\"])(aperture, {\n handler: handler\n }))(OriginalComponent);\n }, 'withConditionalLogic');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-conditional-logic/index.js?"); /***/ }), @@ -3738,7 +3738,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return required; });\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Validates the given value.\n *\n * @param {mixed} value\n * @return {?string}\n */\n\nfunction required(value) {\n var isObjectValue = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isObject\"])(value);\n\n if (isObjectValue && !Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(value) || !isObjectValue && !!value) {\n return null;\n }\n\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-validation/required.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return required; });\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Validates the given value.\n *\n * @param {mixed} value\n * @return {?string}\n */\n\nfunction required(value) {\n var isObjectValue = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isObject\"])(value);\n\n if (isObjectValue && !Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(value) || !isObjectValue && !!value) {\n return null;\n }\n\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('This field is required.', 'carbon-fields-ui');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-validation/required.js?"); /***/ }), @@ -3774,7 +3774,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createRegistry\", function() { return createRegistry; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Creates a new registry.\n *\n * @param {string} domain\n * @param {string[]} supportedContexts\n * @return {boolean}\n */\n\nfunction createRegistry(domain, supportedContexts) {\n var _ref;\n\n var domainStartCased = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"startCase\"])(domain);\n /**\n * Keeps track of registered types.\n *\n * @type {Object}\n */\n\n var types = {};\n /**\n * Registers a new type.\n *\n * @param {string} type\n * @param {Function} component\n * @return {boolean}\n */\n\n function registerType(type, component) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isString\"])(type)) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('%1$s type must be a string.', 'carbon-fields-ui'), domainStartCased));\n return false;\n }\n\n if (types[type]) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('%1$s %2$s is already registered.', 'carbon-fields-ui'), domainStartCased, type));\n return false;\n }\n\n if (!component || !Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isFunction\"])(component)) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('The \"component\" param must be a function.', 'carbon-fields-ui'));\n return false;\n }\n\n types[type] = supportedContexts.reduce(function (accumulator, context) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, accumulator, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, context, Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"applyFilters\"])(\"carbon-fields.register-\".concat(domain, \"-type\"), type, context, component)));\n }, {});\n return true;\n }\n /**\n * Returns a registered type.\n *\n * @param {string} type\n * @param {string} context\n * @return {?Object}\n */\n\n\n function getType(type, context) {\n if (!supportedContexts.includes(context)) {\n console.error(\"The provided context isn't a valid one. Must be one of - \".concat(supportedContexts.join(', '), \" .\"));\n return;\n }\n\n if (!types[type]) {\n console.error(\"\".concat(domainStartCased, \" \").concat(type, \" isn't registered.\"));\n return;\n }\n\n return types[type][context];\n }\n\n return _ref = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_ref, \"register\".concat(domainStartCased, \"Type\"), registerType), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_ref, \"get\".concat(domainStartCased, \"Type\"), getType), _ref;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/registry/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createRegistry\", function() { return createRegistry; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Creates a new registry.\n *\n * @param {string} domain\n * @param {string[]} supportedContexts\n * @return {boolean}\n */\n\nfunction createRegistry(domain, supportedContexts) {\n var _ref;\n\n var domainStartCased = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"startCase\"])(domain);\n /**\n * Keeps track of registered types.\n *\n * @type {Object}\n */\n\n var types = {};\n /**\n * Registers a new type.\n *\n * @param {string} type\n * @param {Function} component\n * @return {boolean}\n */\n\n function registerType(type, component) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isString\"])(type)) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('%1$s type must be a string.', 'carbon-fields-ui'), domainStartCased));\n return false;\n }\n\n if (types[type]) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('%1$s %2$s is already registered.', 'carbon-fields-ui'), domainStartCased, type));\n return false;\n }\n\n if (!component || !Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isFunction\"])(component)) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('The \"component\" param must be a function.', 'carbon-fields-ui'));\n return false;\n }\n\n types[type] = supportedContexts.reduce(function (accumulator, context) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, accumulator, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, context, Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"applyFilters\"])(\"carbon-fields.register-\".concat(domain, \"-type\"), type, context, component)));\n }, {});\n return true;\n }\n /**\n * Returns a registered type.\n *\n * @param {string} type\n * @param {string} context\n * @return {?Object}\n */\n\n\n function getType(type, context) {\n if (!supportedContexts.includes(context)) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('The provided context isn\\'t a valid one. Must be one of - %s .', 'carbon-fields-ui'), supportedContexts.join(', ')));\n return;\n }\n\n if (!types[type]) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('%s %s isn\\'t registered.', 'carbon-fields-ui'), domainStartCased, type));\n return;\n }\n\n return types[type][context];\n }\n\n return _ref = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_ref, \"register\".concat(domainStartCased, \"Type\"), registerType), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_ref, \"get\".concat(domainStartCased, \"Type\"), getType), _ref;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/registry/index.js?"); /***/ }), diff --git a/build/classic/core.min.css b/build/classic/core.min.css index a33c63153..c24e9d673 100644 --- a/build/classic/core.min.css +++ b/build/classic/core.min.css @@ -1 +1 @@ -.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{position:relative;z-index:0}.cf-complex--tabbed-vertical .cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex--grid .cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex--grid .cf-complex__group-actions{position:absolute;top:12px;right:12px}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex--tabbed-horizontal .cf-complex__tabs{display:inline-flex;margin-bottom:-5px}.cf-complex--tabbed-vertical .cf-complex__tabs{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex--tabbed-horizontal .cf-complex__tabs-item{margin:0 4px 4px 0}.cf-complex--tabbed-vertical .cf-complex__tabs-item~.cf-complex__tabs-item{border-top-width:0}.cf-complex__tabs-item--current,.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex--tabbed-horizontal .cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex--tabbed-vertical .cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label{margin:8px 0 12px}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%;margin:0}.cf-textarea__input{display:block;width:100%;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file +.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{position:relative;z-index:0}.cf-complex--tabbed-vertical>.cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex__group--grid>.cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex__tabs--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex__tabs--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--grid{position:absolute;top:12px;right:12px}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex__tabs--tabbed-horizontal{display:inline-flex;margin-bottom:-5px}.cf-complex__tabs--tabbed-vertical{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex__tabs--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex__tabs--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal{margin:0 4px 4px 0}.cf-complex__tabs-item--tabbed-vertical~.cf-complex__tabs-item--tabbed-vertical{border-top-width:0}.cf-complex__tabs-item--current{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal.cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex__tabs-item--tabbed-vertical.cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label.cf-complex__placeholder-label{margin:8px 0 12px}.cf-container-term-meta .cf-complex__placeholder-label{font-style:normal;color:inherit}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%!important;margin:0}.cf-textarea__input{display:block;width:100%!important;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file diff --git a/build/classic/core.min.js b/build/classic/core.min.js index a1b343838..73113abde 100644 --- a/build/classic/core.min.js +++ b/build/classic/core.min.js @@ -1,10 +1,10 @@ -this.cf=this.cf||{},this.cf.core=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=323)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.cf.vendor.react}()},function(e,t){!function(){e.exports=this.cf.vendor["@wordpress/element"]}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.cf.vendor.lodash}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n1?t-1:0),i=1;i=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},h}(r.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},i}},function(e,t,n){"use strict";var r=n(3),o=n.n(r),a=n(15),i=n.n(a),u=n(12),s=n.n(u),c=n(17),l=n.n(c),f=n(5),p=n.n(f),d=n(6),h=n.n(d),m=n(7),g=n.n(m),v=n(8),b=n.n(v),y=n(9),E=n.n(y),w=n(2),x=n(14),O=n(18),C=n(11),_=n(26),k=function(e){function t(){return p()(this,t),g()(this,b()(t).apply(this,arguments))}return E()(t,e),h()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.onSelect,n=e.typeFilter;this.props.initMediaBrowser({onSelect:t,typeFilter:n})}},{key:"componentWillUnmount",value:function(){this.props.destroyMediaBrowser()}},{key:"render",value:function(){var e=this.props.openMediaBrowser;return this.props.children({openMediaBrowser:e})}}]),t}(w.Component),S=Object(O.withEffects)(function(e){var t=[{event:"initMediaBrowserEvent",prop:"initMediaBrowser",type:"INIT_MEDIA_BROWSER"},{event:"openMediaBrowserEvent",prop:"openMediaBrowser",type:"OPEN_MEDIA_BROWSER"},{event:"destroyMediaBrowserEvent",prop:"destroyMediaBrowser",type:"DESTROY_MEDIA_BROWSER"}].map(function(t){var n=e.useEvent(t.event),r=l()(n,2),o=r[0],a=r[1];return s()({},t,{action:a,channel$:o})}),n=Object(C.pipe)(C.combine.apply(void 0,i()(t.map(function(e){var t=e.action,n=e.prop;return Object(_.a)({action:t,prop:n})}))),Object(C.map)(function(e){return Object(O.toProps)(e.reduce(function(e,t){return s()({},e,o()({},t.prop,t.action))},{}))}));return C.merge.apply(void 0,[n].concat(i()(t.map(function(e){var t=e.channel$,n=e.type;return Object(C.pipe)(t,Object(C.map)(function(e){return{type:n,payload:e}}))}))))},{handler:function(e){var t=null;return function(n){switch(n.type){case"INIT_MEDIA_BROWSER":var r=n.payload,o=r.onSelect,a=r.typeFilter;if(!o)return;(t=wp.media({title:e.title,library:{type:a},button:{text:e.buttonLabel},multiple:e.multiple})).on("select",function(){var e=t.state().get("selection").toJSON();o(e)});break;case"OPEN_MEDIA_BROWSER":t&&t.open();break;case"DESTROY_MEDIA_BROWSER":t=null}}}});t.a=Object(x.compose)(S)(k)},function(e,t,n){"use strict";var r=n(10);t.a=function(e){return new Promise(function(t,n){var o=wp.media.ajax({data:{action:"query-attachments",query:{post__in:e}}});o.done(function(e){t(e)}),o.fail(function(){n(Object(r.__)("An error occurred while trying to fetch files data.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(313),n(31)),w=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():e.createElement(E.a,null)}}]),n}(y.Component);t.a=w}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(0),h=n.n(d),m=n(3),g=n.n(m),v=n(54),b=function(t){function n(){var e,t;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i1?t.setState(function(e){return{menuVisible:!e.menuVisible}}):r(n[0])}),g()(h()(h()(t)),"handleItemClick",function(e){t.setState({menuVisible:!1}),t.props.onSelect(e)}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.buttonText,o=n.groups;return e.createElement("div",{className:"cf-complex__inserter"},e.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},r),o.length>1&&e.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},o.map(function(n,r){return e.createElement("li",{className:"cf-complex__inserter-item",key:r,onClick:function(){return t.handleItemClick(n)}},n.label)})))}}]),n}(n(2).Component);t.a=Object(v.a)(b)}).call(this,n(2))},function(e,t,n){"use strict";var r=u(n(305)),o=u(n(310)),a=u(n(115)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:a.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(319),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(79),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(63)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(85)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(44),o=n(190),a=n(191),i=n(192),u=n(193),s=n(194);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(33)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(199),o=n(206),a=n(208),i=n(209),u=n(210);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0?e.createElement("select",{id:n,name:r,value:o||Object(b.get)(a.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},a.options.map(function(t){return e.createElement("option",{key:t.value,value:t.value},t.label)})):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return i});var r=n(2),o=Object(r.createContext)(!1),a=o.Provider,i=o.Consumer},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(37))},function(e,t,n){var r=n(172),o=n(42);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(174),o=n(82),a=n(23),i=n(62),u=n(83),s=n(84),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,h=d?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||h.push(g);return h}},function(e,t,n){var r=n(175),o=n(27),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&el))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=l}function E(){var e=o();if(y(e))return w(e);p=setTimeout(E,function(e){var n=t-(e-d);return g?u(n,l-(e-h)):n}(e))}function w(e){return p=void 0,v&&s?b(e):(s=c=void 0,f)}function x(){var e=o(),n=y(e);if(s=arguments,c=this,d=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(E,t),m?b(e):f}(d);if(g)return p=setTimeout(E,t),b(d)}return void 0===p&&(p=setTimeout(E,t)),f}return t=a(t)||0,r(n)&&(m=!!n.leading,l=(g="maxWait"in n)?i(a(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,s=d=c=p=void 0},x.flush=function(){return void 0===p?f:w(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(284)),o=a(n(286));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,i.polyfill)(p);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(113),i=n(311);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(20),i=n.n(a),u=n(14),s=n(22),c=n(4),l=(n(320),n(148)),f=n(35);t.a=Object(u.compose)(Object(s.withSelect)(function(e,t){var n=e("carbon-fields/core"),r=n.getValidationError,o=n.isFieldVisible;return{error:r(t.id),hidden:!o(t.id)}}),Object(f.a)("carbon-fields.field-wrapper"))(function(t){var n=t.id,r=t.field,a=t.error,u=t.hidden,s=t.className,f=t.children,p=r.width?{flexBasis:"".concat(r.width,"%")}:null,d=["cf-field","cf-".concat(Object(c.kebabCase)(r.type)),{"cf-field--has-width":!!r.width,"cf-field--invalid":!!a},s].concat(o()(r.classes));return e.createElement("div",{className:i()(d),style:p,hidden:u},e.createElement("div",{className:"cf-field__head"},r.label&&e.createElement("label",{className:"cf-field__label",htmlFor:n},r.label,r.required&&e.createElement("span",{className:"cf-field__asterisk"},"*"))),!u&&e.createElement("div",{className:"cf-field__body"},f),u&&e.createElement(l.a,{className:"cf-field__body"},f),r.help_text&&e.createElement("em",{className:"cf-field__help",dangerouslySetInnerHTML:{__html:r.help_text}}),a&&e.createElement("span",{className:"cf-field__error"},a))})}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(12),i=n.n(a),u=n(15),s=n.n(u),c=n(5),l=n.n(c),f=n(6),p=n.n(f),d=n(7),h=n.n(d),m=n(8),g=n.n(m),v=n(9),b=n.n(v),y=n(0),E=n.n(y),w=n(3),x=n.n(w),O=n(38),C=n.n(O),_=n(10),k=n(2),S=n(14),j=n(19),D=n(18),A=n(20),M=n.n(A),F=n(4),T=n(11),P=n(26),N=(n(160),n(39)),I=n(36),R=n(119),L=function(t){function n(){var e,t;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&a.length>=r.max||(i(o,s()(a).concat([Object(F.pick)(e,"id","type","subtype")])),u({selectedOptions:s()(c).concat([e])}))}),x()(E()(E()(t)),"handleRemoveItem",function(e){var n=t.props,r=n.value,o=n.id,a=n.onChange,i=n.setState,u=n.selectedOptions;a(o,Object(F.without)(r,e)),i({selectedOptions:Object(F.without)(u,e)})}),x()(E()(E()(t)),"handleSort",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),t}return b()(n,t),p()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var t=this,n=this.props,r=n.name,o=n.value,a=n.field,i=n.totalOptionsCount,u=n.selectedOptions,s=n.queryTerm,c=this.props.options;return a.duplicates_allowed||(c=C()(c,function(e){e.map(function(e){return e.disabled=!!Object(F.find)(o,function(t){return Object(F.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),e.createElement(k.Fragment,null,e.createElement("div",{className:"cf-association__bar"},e.createElement(N.a,{value:s,onChange:this.handleSearchChange}),e.createElement("span",{className:"cf-association__counter"},Object(_.sprintf)(Object(_.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(c.length),Number(i)))),e.createElement("div",{className:"cf-association__cols"},e.createElement("div",{className:"cf-association__col"},c.map(function(n,r){return e.createElement("div",{className:M()("cf-association__option",{"cf-association__option--selected":n.disabled}),key:r},n.thumbnail&&e.createElement("img",{className:"cf-association__option-thumb",src:n.thumbnail}),e.createElement("div",{className:"cf-association__option-content"},e.createElement("span",{className:"cf-association__option-title"},n.title),e.createElement("span",{className:"cf-association__option-type"},n.type)),e.createElement("div",{className:"cf-association__option-actions"},e.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:n.edit_link}),!n.disabled&&(a.max<0||o.length0&&t.length=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";var r=n(10);t.a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(o,a){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){o(e)}),i.fail(function(){a(Object(r.__)("An error occured.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(163),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;t.setState({currentTab:Object(k.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),x()(E()(E()(t)),"handleToggleAllClick",function(){var e=t.props,n=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!n)}),x()(E()(E()(t)),"handleSortGroups",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),x()(E()(E()(t)),"handleTabsChange",function(e){t.setState({currentTab:e})}),t}return b()(n,t),p()(n,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(k.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=s()(e,2),o=r[0],a=r[1],u=Object(k.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(k.isString)(u.label_template))return u.label;try{return Object(k.template)(u.label_template)(i()({$_index:n},a))||u.label}catch(e){return console.error("Couldn't create the label of group - ".concat(e.message)),"N/A"}})}},{key:"render",value:function(){var t=this,n=this.state.currentTab,r=this.props,o=r.value,a=r.field,i=r.groupIdKey,u=r.groupFilterKey,s=r.allGroupsAreCollapsed,c=r.onGroupSetup,l=r.onGroupFieldSetup,f=r.onToggleGroup,p=this.getAvailableGroups(u),d=this.getGroupLabels(),h=o.map(function(e,t){return{id:e[i],label:d[t]}});return e.createElement(C.Fragment,null,this.isTabbed&&!!o.length&&e.createElement(S.a,{items:o,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===a.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleSortGroups},e.createElement(j.a,{ref:this.tabsList,items:h,current:n,onChange:this.handleTabsChange},!!p.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:"+",groups:p,onSelect:this.handleAddGroup}))),!o.length&&e.createElement(M.a,{label:"There are no entries yet."},e.createElement(D.a,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup})),!!o.length&&e.createElement(S.a,{items:o,options:{axis:"y",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forcePlaceholderSize:!0},forwardedRef:this.groupsList,onUpdate:this.handleSortGroups},e.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},o.map(function(r,o){return e.createElement(A.a,c(r,{index:o,label:d[o],tabbed:t.isTabbed,hidden:t.isTabbed&&r[i]!==n,allowClone:a.duplicate_groups_allowed&&!t.isMaximumReached,onFieldSetup:l,onClone:t.handleCloneGroup,onRemove:t.handleRemoveGroup,onToggle:f}))}))),!this.isTabbed&&!!o.length&&e.createElement("div",{className:"cf-complex__actions"},!!p.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup}),e.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},s?"Expand All":"Collapse All")))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(_.sprintf)(Object(_.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),n}(C.Component);Object(O.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(t){return function(n){var r=n.field;return"complex"!==r.type?e.createElement(t,n):e.createElement(t,o()({className:"cf-complex--".concat(r.layout)},n))}}),Object(O.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(k.isEmpty)(t))return Object(_.__)("This field is required. ","carbon-fields-ui");if(n>0&&t.length=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===l.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);l.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return l.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();f.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},f.defaultProps={options:{}},t.default=f},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=function(t){function n(){return i()(this,n),l()(this,p()(n).apply(this,arguments))}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.value,a=t.field;return e.createElement("input",o()({type:"hidden",name:n,value:r,className:"hidden-text"},a.attributes))}}]),n}(n(2).Component);t.a=m}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(2);t.a=function(t){var n=t.field;return e.createElement(r.RawHTML,{className:"cf-html__content"},n.html)}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(12),i=n.n(a),u=n(5),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(26),x=n(2),O=n(10),C=n(18),_=n(4),k=n(11),S=(n(295),n(39)),j=n(133),D=function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1})}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?e.createElement(b.a,{id:n,name:r,value:this.filterValues(o),options:a.options,delimiter:a.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){(function(t){for(var r=n(304),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],c=0;!u&&c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(14),w=n(10),x=n(18),O=n(11),C=n(26),_=n(4),k=(n(312),n(39)),S=n(141),j=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.embedCode,i=t.embedType,u=t.provider;return e.createElement("div",{ref:this.node},e.createElement(k.a,{id:n,value:o,onChange:this.handleChange}),a?e.createElement(S.a,{html:a,type:i,provider:u}):null,e.createElement("input",{type:"hidden",name:r,value:o,readOnly:!0}))}}]),n}(y.Component),D=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),A=Object(x.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=o()(t,2),r=n[0],a=n[1],i=Object(O.pipe)(Object(C.a)({onFetchEmbedCode:a}),Object(O.map)(x.toProps)),u=Object(O.pipe)(r,Object(O.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(O.merge)(i,u)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(w.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(w.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}});t.a=Object(E.compose)(D,A)(j)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(0),h=n.n(d),m=n(2),g=function(t){function n(){var e;return o()(this,n),(e=s()(this,l()(n).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(h()(h()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(h()(h()(e))),e}return p()(n,t),i()(n,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,c=u.height;"resize"!==o||s===a&&c===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var t=this;return e.createElement("div",{className:"cf-oembed__preview"},e.createElement("iframe",{ref:function(e){return t.iframe=e},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var t="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",n="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(t,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),r=e.createElement("html",{lang:document.documentElement.lang},e.createElement("head",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),e.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},e.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),e.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:n}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(m.renderToString)(r)),this.iframe.contentWindow.document.close()}}}]),n}(m.Component);t.a=g}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(12),o=n.n(r),a=n(29),i=n(57);n(314),t.a=Object(a.a)(function(t){return o()({},t,{field:o()({},t.field,{options:t.field.options.map(function(t){return o()({},t,{label:e.createElement("img",{className:"cf-radio-image__image",src:t.label})})})})})})(i.a)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(12),i=n.n(a),u=n(5),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(10),O=n(4),C=n(20),_=n.n(C),k=function(t){function n(){var e;return s()(this,n),e=p()(this,h()(n).call(this)),E()(b()(b()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(O.isString)(t)?t:t.target.value)}),E()(b()(b()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=i()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=i()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return g()(n,t),l()(n,[{key:"componentDidMount",value:function(){setTimeout(this.initEditor,100)}},{key:"componentWillUnmount",value:function(){this.destroyEditor()}},{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field,s=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":u.rich_editing},{"html-active":!u.rich_editing}],c=u.media_buttons?Object(O.template)(u.media_buttons)({id:r}):null;return e.createElement("div",{id:"wp-".concat(r,"-wrap"),className:_()(s),ref:function(e){return t.editorNode=e}},u.media_buttons&&e.createElement("div",{id:"wp-".concat(r,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},e.createElement("span",{dangerouslySetInnerHTML:{__html:c}})),u.rich_editing&&e.createElement("div",{className:"wp-editor-tabs"},e.createElement("button",{type:"button",id:"".concat(r,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":r},Object(x.__)("Visual","carbon-fields-ui")),e.createElement("button",{type:"button",id:"".concat(r,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":r},Object(x.__)("Text","carbon-fields-ui"))),e.createElement("div",{id:"wp-".concat(r,"-editor-container"),className:"wp-editor-container"},e.createElement("textarea",o()({style:{width:"100%"},className:"regular-text",id:r,name:a,value:i,onChange:this.handleChange},u.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),n}(w.Component);t.a=k}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(2),h=(n(316),function(t){function n(){return o()(this,n),s()(this,l()(n).apply(this,arguments))}return p()(n,t),i()(n,[{key:"render",value:function(){return e.createElement("h3",null,this.props.field.label)}}]),n}(d.Component));t.a=h}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(4),w=(n(317),n(31)),x=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1}),t}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field;return u.options.length>0?e.createElement("ul",{className:"cf-set__list"},u.options.map(function(n,s){return e.createElement("li",{className:"cf-set__list-item",key:s},e.createElement("input",o()({type:"checkbox",id:"".concat(r,"-").concat(n.value),name:"".concat(a,"[]"),checked:t.isChecked(i,n),value:n.value,className:"cf-set__input",onChange:t.handleChange},u.attributes)),e.createElement("label",{className:"cf-set__label",htmlFor:"".concat(r,"-").concat(n.value)},n.label))})):e.createElement(w.a,null)}}]),n}(y.Component);t.a=x}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(5),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(26),E=n(2),w=n(10),x=n(18),O=n(4),C=n(11),_=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;ar&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===f.inserted[v]&&(n="",h(e,t),f.inserted[v]=n)}var O=function(){var e=w.apply(this,arguments),t=a+"-"+v;return void 0===f.registered[t]&&(f.registered[t]=b),x("."+t,e),t};function C(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):n+=t+" "}),n}function _(e,t){var n=[],r=C(n,e);return n.length<2?e:r+O(n,t)}function k(e){f.inserted[e]=!0}if(l){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){l&&(d.flush(),d.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},C=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},_=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function A(e){return D(e)?window.pageYOffset:e.scrollTop}function M(e,t){D(e)?window.scrollTo(0,t):e.scrollTop=t}function F(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k,a=A(e),i=t-a,u=0;!function t(){var s,c=i*((s=(s=u+=10)/n-1)*s*s+1)+a;M(e,c),u=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&F(s,C,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&w>=r)return a&&F(s,C,160),{placement:"bottom",maxHeight:i?w-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&E>=r)&&(k=i?E-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return M(s,C),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&F(s,_,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&E>=r){var S=t;return(!i&&x>=r||i&&E>=r)&&(S=i?E-y:x-y),a&&F(s,_,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!l,isFixedPosition:l,theme:s});c&&c(f),r.setState(f)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||P(e);return E({},r.props,{placement:t,maxHeight:r.state.maxHeight})},O(r,n)}return w(t,e),b(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(a.Component);N.contextTypes={getPortalPlacement:l.a.func};var I=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},R=I,L=I,H=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};H.defaultProps={children:"No options"};var B=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};B.defaultProps={children:"Loading..."};var V=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=l-f-c,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),p.scrollTop=l,m=!0,r.isBottom=!0):!d&&-t>c&&(i&&!r.isTop&&i(e),p.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},O(r,n)}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return i.a.createElement(Z,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(a.Component),le=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=x(e,["isEnabled"]);return t?i.a.createElement(ce,n):this.props.children}}]),t}(a.Component);le.defaultProps={isEnabled:!0};var fe=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,s=e.hasValue;return i.a.createElement("div",{className:r(Object(u.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s},n)},t)}}]),t}(a.Component),pe=function(e){var t=e.size,n=x(e,["size"]);return i.a.createElement("svg",E({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(u.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},de=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},he=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},me=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},ge=me,ve=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};ve.defaultProps={children:i.a.createElement(he,null)};var be=me,ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};ye.defaultProps={children:i.a.createElement(de,null)};var Ee=function(e){var t=e.color,n=e.delay,r=e.offset;return i.a.createElement("span",{className:Object(u.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(u.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var we=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,s=e.isRtl,c=e.theme.colors,l=a?c.neutral80:c.neutral20;return i.a.createElement("div",E({},o,{className:n(Object(u.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),i.a.createElement(Ee,{color:l,delay:0,offset:s}),i.a.createElement(Ee,{color:l,delay:160,offset:!0}),i.a.createElement(Ee,{color:l,delay:320,offset:!s}))};we.defaultProps={size:4};var xe=function(e){var t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)},Oe=xe,Ce=xe,_e=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)}}]),t}(a.Component);_e.defaultProps={children:i.a.createElement(de,{size:14})};var ke=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,s=e.getStyles,c=e.innerProps,l=e.isDisabled,f=e.removeProps,p=e.selectProps,d=r.Container,h=r.Label,m=r.Remove,g=E({className:o(Object(u.a)(s("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":l},n)},c),v={className:o(Object(u.a)(s("multiValueLabel",this.props)),{"multi-value__label":!0},n)},b=E({className:o(Object(u.a)(s("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},f);return i.a.createElement(d,{data:a,innerProps:g,selectProps:p},i.a.createElement(h,{data:a,innerProps:v,selectProps:p},t),i.a.createElement(m,{data:a,innerProps:b,selectProps:p}))}}]),t}(a.Component);ke.defaultProps={cropWithEllipsis:!0};var Se={ClearIndicator:ye,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,c=e.innerRef,l=e.innerProps;return i.a.createElement("div",E({ref:c,className:n(Object(u.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":s},o)},l),t)},DropdownIndicator:ve,DownChevron:he,CrossIcon:de,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,c=e.label,l=e.theme;return i.a.createElement("div",{className:r(Object(u.a)(o("group",e)),{group:!0},n)},i.a.createElement(a,E({},s,{theme:l,getStyles:o,cx:r}),c),i.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=x(e,["className","cx","getStyles","theme"]);return i.a.createElement("div",E({className:n(Object(u.a)(r("groupHeading",E({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return i.a.createElement("div",{className:r(Object(u.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return i.a.createElement("span",E({},o,{className:n(Object(u.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,s=e.isDisabled,c=e.theme,l=x(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return i.a.createElement("div",{className:Object(u.a)(r("input",E({theme:c},l)))},i.a.createElement(p.a,E({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:s},l)))},LoadingIndicator:we,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps,c=r(Object(u.a)(o("menu",e)),{menu:!0},n);return i.a.createElement("div",E({className:c},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef;return i.a.createElement("div",{className:r(Object(u.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:s},t)},MenuPortal:V,LoadingMessage:B,NoOptionsMessage:H,MultiValue:ke,MultiValueContainer:Oe,MultiValueLabel:Ce,MultiValueRemove:_e,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,c=e.isSelected,l=e.innerRef,f=e.innerProps;return i.a.createElement("div",E({ref:l,className:r(Object(u.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":c},n)},f),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,c=e.isRtl;return i.a.createElement("div",E({className:r(Object(u.a)(o("container",e)),{"--is-disabled":s,"--is-rtl":c},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:fe},je=function(e){return E({},Se,e.components)},De={clearIndicator:be,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:ge,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:L,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return y(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),y(t,"backgroundColor",i.neutral0),y(t,"borderRadius",o),y(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),y(t,"marginBottom",a.menuGutter),y(t,"marginTop",a.menuGutter),y(t,"position","absolute"),y(t,"width","100%"),y(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:R,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ae={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Me={backspaceRemovesValue:!0,blurInputOnSelect:T(),captureMenuScroll:!T(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=E({ignoreCase:!0,ignoreAccents:!0,stringify:K,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?$(t):t,c=i?$(a(e)):a(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=q(s),c=q(c)),"start"===u?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Fe=1,Te=function(e){function t(e){v(this,t);var n=O(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pe.call(n);var r=e.value;n.cacheComponents=h(n.cacheComponents,Y).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Fe);var o=j(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=j(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!u&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?M(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,c=-1;if(a.length){switch(e){case"previous":c=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ae):E({},Ae,this.props.theme):Ae}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,c=this.state.selectValue,l=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+S(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:l,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var c=a?void 0:function(){return n.onOptionHover(e)},l=a?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:l,onMouseMove:c,onMouseOver:c,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:f,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,c=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,c=r||this.getElementId("input");if(!n)return i.a.createElement(J,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:k,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,d=f.theme;return i.a.createElement(u,E({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,f=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,h=l.inputValue,m=l.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue;if(!this.hasValue()||!f)return h?null:i.a.createElement(s,E({},c,{key:"placeholder",isDisabled:p}),m);if(d)return v.map(function(t){var u=t===b;return i.a.createElement(n,E({},c,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var y=v[0];return i.a.createElement(u,E({},c,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:u,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?i.a.createElement(e,E({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.a.createElement(n,E({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,O=m.maxMenuHeight,C=m.menuIsOpen,_=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,j=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,A=m.noOptionsMessage,M=m.onMenuScrollToTop,F=m.onMenuScrollToBottom;if(!C)return null;var T=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,i.a.createElement(l,E({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},P=void 0;if(this.hasOptions())P=h.render.map(function(t){if("group"===t.type){t.type;var o=x(t,["type"]),a=t.key+"-heading";return i.a.createElement(n,E({},f,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return T(e)}))}if("option"===t.type)return T(t)});else if(b){var I=y({inputValue:v});if(null===I)return null;P=i.a.createElement(s,f,I)}else{var R=A({inputValue:v});if(null===R)return null;P=i.a.createElement(c,f,R)}var L={minMenuHeight:w,maxMenuHeight:O,menuPlacement:_,menuPosition:k,menuShouldScrollIntoView:D},H=i.a.createElement(N,E({},f,L),function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return i.a.createElement(o,E({},f,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),i.a.createElement(le,{isEnabled:g,onTopArrive:M,onBottomArrive:F},i.a.createElement(se,{isEnabled:j},i.a.createElement(a,E({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),P))))});return S||"fixed"===k?i.a.createElement(u,E({},f,{appendTo:S,controlElement:this.controlRef,menuPlacement:_,menuPosition:k}),H):H}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(o){if(n){var s=u.map(function(t){return e.getOptionValue(t)}).join(n);return i.a.createElement("input",{name:a,type:"hidden",value:s})}var c=u.length>0?u.map(function(t,n){return i.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):i.a.createElement("input",{name:a,type:"hidden"});return i.a.createElement("div",null,c)}var l=u[0]?this.getOptionValue(u[0]):"";return i.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?i.a.createElement(X,{"aria-live":"assertive"},i.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),i.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,u=a.className,s=a.id,c=a.isDisabled,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.a.createElement(r,E({},f,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:l}),this.renderLiveRegion(),i.a.createElement(t,E({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:l}),i.a.createElement(o,E({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),i.a.createElement(n,E({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(a.Component);Te.defaultProps=Me;var Pe=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=je({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(_(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=De[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,E({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=C(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=C(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof l&&(l(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!c||!f||!m||p&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(c){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":c?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!c){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":c?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":c?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!c)return;e.focusOption("pageup");break;case"PageDown":if(!c)return;e.focusOption("pagedown");break;case"Home":if(!c)return;e.focusOption("first");break;case"End":if(!c)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Ne=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;v(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=c(n(1)),o=c(n(21)),a=c(n(25)),i=n(52),u=c(n(289)),s=c(n(290));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,c=e.hsv,l=e.hsl,f=e.onChange,p=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:l,hsv:c,onChange:f})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:l,onChange:f})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:l,renderers:m,onChange:f}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:l,hex:o,onChange:f,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:f,onSwatchHover:p}))};l.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},l.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(l)},function(e,t,n){"use strict";var r=n(167);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(169)),o=u(n(61)),a=u(n(180)),i=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(32),o=n(23),a=n(27);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(41),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(173)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(45);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(44);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(44),o=n(71),a=n(72);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(86),o=n(196),a=n(28),i=n(90),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t,n){var r,o=n(197),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(200),o=n(44),a=n(71);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(201),o=n(202),a=n(203),i=n(204),u=n(205);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(244);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(69),o=n(103),a=n(104),i=n(246),u=n(247),s=n(250),c=n(251),l=n(252),f=n(253),p=n(94),d=n(254),h=n(48),m=n(255),g=n(256),v=n(261),b=n(23),y=n(62),E=n(263),w=n(28),x=n(265),O=n(42),C="[object Arguments]",_="[object Function]",k="[object Object]",S={};S[C]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[_]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var F,T=1&n,P=2&n,N=4&n;if(j&&(F=A?j(t,D,A,M):j(t)),void 0!==F)return F;if(!w(t))return t;var I=b(t);if(I){if(F=m(t),!T)return c(t,F)}else{var R=h(t),L=R==_||"[object GeneratorFunction]"==R;if(y(t))return s(t,T);if(R==k||R==C||L&&!A){if(F=P||L?{}:v(t),!T)return P?f(t,u(F,t)):l(t,i(F,t))}else{if(!S[R])return A?t:{};F=g(t,R,T)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,F),x(t))return t.forEach(function(r){F.add(e(r,n,j,r,t,M))}),F;if(E(t))return t.forEach(function(r,o){F.set(o,e(r,n,j,o,t,M))}),F;var B=N?P?d:p:P?keysIn:O,V=I?void 0:B(t);return o(V||t,function(r,o){V&&(r=t[o=r]),a(F,o,e(r,n,j,o,t,M))}),F}},function(e,t,n){var r=n(33),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(51),o=n(42);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(51),o=n(106);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(28),o=n(67),a=n(249),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(63)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*c/a)/100,n.hsl.a!==l)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:l,source:"rgb"}}else{var f;if(f=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==f)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*c/a+100)/100,n.hsl.h!==l)return{h:l,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==f)return{h:f,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?c=a:l<0?l=0:l>i&&(l=i);var f=100*c/a,p=-100*l/i+100;return{h:n.hsl.h,s:f,v:p,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=T(e,360),t=T(t,100),n=T(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,f,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=F(s),{ok:h,format:e.format||m,r:c(255,l(u.r,0)),g:c(255,l(u.g,0)),b:c(255,l(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r,o,a=l(e,t,n),i=c(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(p(r));return a}function D(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(p({h:r,s:o,v:a})),a=(a+u)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(L(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*T(this._r,255))+"%",g:s(100*T(this._g,255))+"%",b:s(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%)":"rgba("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:R(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),a=n/100;return p({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,a=p.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},p.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;cs&&(s=r,u=p(t[c]));return p.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var A=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,l(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function L(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var B,V,U,z=(V="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",U="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+V),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+V),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+V),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:l.fields,className:"flexbox-fix"},r.default.createElement("div",{style:l.double},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"hex",value:s.replace("#",""),onChange:f})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.alpha},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:f,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t1?t-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(o,a){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){o(e)}),i.fail(function(){a(Object(r.__)("An error occured.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";var r=n(1),o=n(30);function a(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var i,u,s=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}},c=(void 0===i&&(i=0),function(){return++i}),l={},f={},p=["touchstart","touchmove"];function d(e,t){var n=null;return-1!==p.indexOf(t)&&u&&(n={passive:!e.props.preventDefault}),n}t.a=function(e,t){var n,i;return i=n=function(n){var i,p;function h(e){var t;return(t=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof t.__clickOutsideHandlerProp){var n=t.getInstance();if("function"!=typeof n.props.handleClickOutside){if("function"!=typeof n.handleClickOutside)throw new Error("WrappedComponent lacks a handleClickOutside(event) function for processing outside click events.");n.handleClickOutside(e)}else n.props.handleClickOutside(e)}else t.__clickOutsideHandlerProp(e)},t.enableOnClickOutside=function(){if("undefined"!=typeof document&&!f[t._uid]){void 0===u&&(u=s()),f[t._uid]=!0;var e=t.props.eventTypes;e.forEach||(e=[e]),l[t._uid]=function(e){var n;t.props.disableOnClickOutside||null!==t.componentNode&&(t.props.preventDefault&&e.preventDefault(),t.props.stopPropagation&&e.stopPropagation(),t.props.excludeScrollbar&&(n=e,document.documentElement.clientWidth<=n.clientX||document.documentElement.clientHeight<=n.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode;){if(a(e,t,n))return!0;e=e.parentNode}return e}(e.target,t.componentNode,t.props.outsideClickIgnoreClass)===document&&t.__outsideClickHandler(e))},e.forEach(function(e){document.addEventListener(e,l[t._uid],d(t,e))})}},t.disableOnClickOutside=function(){delete f[t._uid];var e=l[t._uid];if(e&&"undefined"!=typeof document){var n=t.props.eventTypes;n.forEach||(n=[n]),n.forEach(function(n){return document.removeEventListener(n,e,d(t,n))}),delete l[t._uid]}},t.getRef=function(e){return t.instanceRef=e},t._uid=c(),t}p=n,(i=h).prototype=Object.create(p.prototype),i.prototype.constructor=i,i.__proto__=p;var m=h.prototype;return m.getInstance=function(){if(!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},m.componentDidMount=function(){if("undefined"!=typeof document&&document.createElement){var e=this.getInstance();if(t&&"function"==typeof t.handleClickOutside&&(this.__clickOutsideHandlerProp=t.handleClickOutside(e),"function"!=typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=Object(o.findDOMNode)(this.getInstance()),this.enableOnClickOutside()}},m.componentDidUpdate=function(){this.componentNode=Object(o.findDOMNode)(this.getInstance())},m.componentWillUnmount=function(){this.disableOnClickOutside()},m.render=function(){var t=this.props,n=(t.excludeScrollbar,function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},h}(r.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},i}},function(e,t,n){"use strict";var r=n(16),o=n.n(r),a=n(14),i=n(17),u=n(11),s=n(26),c=Object(i.withEffects)(function(e){var t=e.mount,n=e.unmount,r=e.useEvent("openMediaBrowserEvent"),a=o()(r,2),c=a[0],l=a[1];return Object(u.merge)(Object(u.pipe)(t,Object(u.map)(function(){return{type:"INIT"}})),Object(u.pipe)(n,Object(u.map)(function(){return{type:"DESTROY"}})),Object(u.pipe)(Object(s.a)({openMediaBrowser:l}),Object(u.map)(i.toProps)),Object(u.pipe)(c,Object(u.map)(function(e){return{type:"OPEN",payload:e}})))},{handler:function(e){var t=null;return function(n){switch(n.type){case"INIT":var r=e.onSelect,o=e.typeFilter;(t=wp.media({title:e.title,library:{type:o},button:{text:e.buttonLabel},multiple:e.multiple})).on("select",function(){var e=t.state().get("selection").toJSON();r(e)});break;case"OPEN":t&&t.open();break;case"DESTROY":t=null}}}});t.a=Object(a.compose)(c)(function(e){return(0,e.children)({openMediaBrowser:e.openMediaBrowser})})},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(313),n(31)),w=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():e.createElement(E.a,null)}}]),n}(y.Component);t.a=w}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(3),g=n.n(m),v=n(55),b=function(t){function n(){var e,t;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i1?t.setState(function(e){return{menuVisible:!e.menuVisible}}):r(n[0])}),g()(h()(h()(t)),"handleItemClick",function(e){t.setState({menuVisible:!1}),t.props.onSelect(e)}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.buttonText,o=n.groups;return e.createElement("div",{className:"cf-complex__inserter"},e.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},r),o.length>1&&e.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},o.map(function(n,r){return e.createElement("li",{className:"cf-complex__inserter-item",key:r,onClick:function(){return t.handleItemClick(n)}},n.label)})))}}]),n}(n(2).Component);t.a=Object(v.a)(b)}).call(this,n(2))},function(e,t,n){"use strict";var r=u(n(305)),o=u(n(310)),a=u(n(115)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:a.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(319),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(79),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(63)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(85)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(44),o=n(190),a=n(191),i=n(192),u=n(193),s=n(194);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(33)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(199),o=n(206),a=n(208),i=n(209),u=n(210);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0?e.createElement("select",{id:n,name:r,value:o||Object(b.get)(a.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},a.options.map(function(t){return e.createElement("option",{key:t.value,value:t.value},t.label)})):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return i});var r=n(2),o=Object(r.createContext)(!1),a=o.Provider,i=o.Consumer},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(37))},function(e,t,n){var r=n(172),o=n(42);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(174),o=n(82),a=n(23),i=n(62),u=n(83),s=n(84),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,h=d?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||h.push(g);return h}},function(e,t,n){var r=n(175),o=n(27),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&el))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=l}function E(){var e=o();if(y(e))return w(e);p=setTimeout(E,function(e){var n=t-(e-d);return g?u(n,l-(e-h)):n}(e))}function w(e){return p=void 0,v&&s?b(e):(s=c=void 0,f)}function x(){var e=o(),n=y(e);if(s=arguments,c=this,d=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(E,t),m?b(e):f}(d);if(g)return p=setTimeout(E,t),b(d)}return void 0===p&&(p=setTimeout(E,t)),f}return t=a(t)||0,r(n)&&(m=!!n.leading,l=(g="maxWait"in n)?i(a(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,s=d=c=p=void 0},x.flush=function(){return void 0===p?f:w(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(284)),o=a(n(286));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,i.polyfill)(p);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(113),i=n(311);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";(function(e){var r=n(18),o=n.n(r),a=n(20),i=n.n(a),u=n(14),s=n(22),c=n(4),l=(n(320),n(148)),f=n(35);t.a=Object(u.compose)(Object(s.withSelect)(function(e,t){var n=e("carbon-fields/core"),r=n.getValidationError,o=n.isFieldVisible;return{error:r(t.id),hidden:!o(t.id)}}),Object(f.a)("carbon-fields.field-wrapper"))(function(t){var n=t.id,r=t.field,a=t.error,u=t.hidden,s=t.className,f=t.children,p=r.width?{flexBasis:"".concat(r.width,"%")}:null,d=["cf-field","cf-".concat(Object(c.kebabCase)(r.type)),{"cf-field--has-width":!!r.width,"cf-field--invalid":!!a},s].concat(o()(r.classes));return e.createElement("div",{className:i()(d),style:p,hidden:u},e.createElement("div",{className:"cf-field__head"},r.label&&e.createElement("label",{className:"cf-field__label",htmlFor:n},r.label,r.required&&e.createElement("span",{className:"cf-field__asterisk"},"*"))),!u&&e.createElement("div",{className:"cf-field__body"},f),u&&e.createElement(l.a,{className:"cf-field__body"},f),r.help_text&&e.createElement("em",{className:"cf-field__help",dangerouslySetInnerHTML:{__html:r.help_text}}),a&&e.createElement("span",{className:"cf-field__error"},a))})}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(16),i=n.n(a),u=n(18),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(10),b=n.n(v),y=n(0),E=n.n(y),w=n(3),x=n.n(w),O=n(38),_=n.n(O),C=n(5),k=n(2),S=n(14),j=n(19),D=n(17),A=n(20),M=n.n(A),T=n(4),F=n(11),P=n(26),N=(n(160),n(39)),I=n(36),L=n(54),R=function(t){function n(){var e,t;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&a.length>=r.max?alert(Object(C.sprintf)(Object(C.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(i(o,s()(a).concat([Object(T.pick)(e,"id","type","subtype")])),u({selectedOptions:s()(c).concat([e])})))}),x()(E()(E()(t)),"handleRemoveItem",function(e){var n=t.props,r=n.value,o=n.id,a=n.onChange,i=n.setState,u=n.selectedOptions;a(o,Object(T.without)(r,e)),i({selectedOptions:Object(T.without)(u,e)})}),x()(E()(E()(t)),"handleSort",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),t}return b()(n,t),p()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var t=this,n=this.props,r=n.name,o=n.value,a=n.field,i=n.totalOptionsCount,u=n.selectedOptions,s=n.queryTerm,c=this.props.options;return a.duplicates_allowed||(c=_()(c,function(e){e.map(function(e){return e.disabled=!!Object(T.find)(o,function(t){return Object(T.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),e.createElement(k.Fragment,null,e.createElement("div",{className:"cf-association__bar"},e.createElement(N.a,{value:s,onChange:this.handleSearchChange}),e.createElement("span",{className:"cf-association__counter"},Object(C.sprintf)(Object(C.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(c.length),Number(i)))),e.createElement("div",{className:"cf-association__cols"},e.createElement("div",{className:"cf-association__col"},c.map(function(n,r){return e.createElement("div",{className:M()("cf-association__option",{"cf-association__option--selected":n.disabled}),key:r},n.thumbnail&&e.createElement("img",{className:"cf-association__option-thumb",src:n.thumbnail}),e.createElement("div",{className:"cf-association__option-content"},e.createElement("span",{className:"cf-association__option-title"},n.title),e.createElement("span",{className:"cf-association__option-type"},n.type)),e.createElement("div",{className:"cf-association__option-actions"},e.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:n.edit_link}),!n.disabled&&(a.max<0||o.length0&&t.length=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(163),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;t.setState({currentTab:Object(k.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),x()(E()(E()(t)),"handleToggleAllClick",function(){var e=t.props,n=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!n)}),x()(E()(E()(t)),"handleGroupsSortStart",function(e,n){var r=t.props,o=r.value,a=r.groupIdKey,i=n.item.index(),u=Object(k.get)(o,"".concat(i,".").concat(a),null);t.setState({currentDraggedGroup:u})}),x()(E()(E()(t)),"handleGroupsSortUpdate",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),x()(E()(E()(t)),"handleGroupsSortStop",function(){t.setState({currentDraggedGroup:null})}),x()(E()(E()(t)),"handleTabsChange",function(e){t.setState({currentTab:e})}),t}return b()(n,t),p()(n,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(k.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=s()(e,2),o=r[0],a=r[1],u=Object(k.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(k.isString)(u.label_template))return u.label;try{return Object(k.template)(u.label_template)(i()({$_index:n},a))||u.label}catch(e){return console.error(Object(C.sprintf)(Object(C.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var t=this,n=this.state,r=n.currentDraggedGroup,a=n.currentTab,i=this.props,u=i.value,s=i.field,c=i.groupIdKey,l=i.groupFilterKey,f=i.allGroupsAreCollapsed,p=i.onGroupSetup,d=i.onGroupFieldSetup,h=i.onToggleGroup,m=this.getAvailableGroups(l),g=this.getGroupLabels(),v=u.map(function(e,t){return{id:e[c],label:g[t]}});return e.createElement(_.Fragment,null,this.isTabbed&&!!u.length&&e.createElement(S.a,{items:u,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===s.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},e.createElement(j.a,{ref:this.tabsList,items:v,current:a,layout:s.layout,onChange:this.handleTabsChange},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:"+",groups:m,onSelect:this.handleAddGroup}))),!u.length&&e.createElement(M.a,{label:"There are no entries yet."},e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup})),!!u.length&&e.createElement(S.a,{items:u,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},e.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},u.map(function(n,i){return e.createElement(A.a,o()({key:"".concat(n[l],"-").concat(i)},p(n,{index:i,label:g[i],dragged:n[c]===r,tabbed:t.isTabbed,hidden:t.isTabbed&&n[c]!==a,allowClone:s.duplicate_groups_allowed&&!t.isMaximumReached,onFieldSetup:d,onClone:t.handleCloneGroup,onRemove:t.handleRemoveGroup,onToggle:h})))}))),!this.isTabbed&&!!u.length&&e.createElement("div",{className:"cf-complex__actions"},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup}),e.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},f?Object(C.__)("Expand All","carbon-fields-ui"):Object(C.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(C.sprintf)(Object(C.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),n}(_.Component);Object(O.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(t){return function(n){var r=n.field;return"complex"!==r.type?e.createElement(t,n):e.createElement(t,o()({className:"cf-complex--".concat(r.layout)},n))}}),Object(O.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(k.isEmpty)(t))return Object(C.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===l.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);l.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return l.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();f.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},f.defaultProps={options:{}},t.default=f},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=function(t){function n(){return i()(this,n),l()(this,p()(n).apply(this,arguments))}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.value,a=t.field;return e.createElement("input",o()({type:"hidden",name:n,value:r,className:"hidden-text"},a.attributes))}}]),n}(n(2).Component);t.a=m}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(2);t.a=function(t){var n=t.field;return e.createElement(r.RawHTML,{className:"cf-html__content"},n.html)}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(26),x=n(2),O=n(5),_=n(17),C=n(4),k=n(11),S=(n(295),n(39)),j=n(132),D=function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1})}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?e.createElement(b.a,{id:n,name:r,value:this.filterValues(o),options:a.options,delimiter:a.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){(function(t){for(var r=n(304),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],c=0;!u&&c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(14),w=n(5),x=n(17),O=n(11),_=n(26),C=n(4),k=(n(312),n(39)),S=n(141),j=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.embedCode,i=t.embedType,u=t.provider;return e.createElement("div",{ref:this.node},e.createElement(k.a,{id:n,value:o,onChange:this.handleChange}),a?e.createElement(S.a,{html:a,type:i,provider:u}):null,e.createElement("input",{type:"hidden",name:r,value:o,readOnly:!0}))}}]),n}(y.Component),D=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),A=Object(x.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=o()(t,2),r=n[0],a=n[1],i=Object(O.pipe)(Object(_.a)({onFetchEmbedCode:a}),Object(O.map)(x.toProps)),u=Object(O.pipe)(r,Object(O.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(O.merge)(i,u)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(w.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(w.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}});t.a=Object(E.compose)(D,A)(j)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(2),g=function(t){function n(){var e;return o()(this,n),(e=s()(this,l()(n).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(h()(h()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(h()(h()(e))),e}return p()(n,t),i()(n,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,c=u.height;"resize"!==o||s===a&&c===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var t=this;return e.createElement("div",{className:"cf-oembed__preview"},e.createElement("iframe",{ref:function(e){return t.iframe=e},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var t="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",n="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(t,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),r=e.createElement("html",{lang:document.documentElement.lang},e.createElement("head",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),e.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},e.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),e.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:n}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(m.renderToString)(r)),this.iframe.contentWindow.document.close()}}}]),n}(m.Component);t.a=g}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(29),i=n(57);n(314),t.a=Object(a.a)(function(t){return o()({},t,{field:o()({},t.field,{options:t.field.options.map(function(t){return o()({},t,{label:e.createElement("img",{className:"cf-radio-image__image",src:t.label})})})})})})(i.a)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(5),O=n(4),_=n(20),C=n.n(_),k=function(t){function n(){var e;return s()(this,n),e=p()(this,h()(n).call(this)),E()(b()(b()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(O.isString)(t)?t:t.target.value)}),E()(b()(b()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=i()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=i()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return g()(n,t),l()(n,[{key:"componentDidMount",value:function(){setTimeout(this.initEditor,100)}},{key:"componentWillUnmount",value:function(){this.destroyEditor()}},{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field,s=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":u.rich_editing},{"html-active":!u.rich_editing}],c=u.media_buttons?Object(O.template)(u.media_buttons)({id:r}):null;return e.createElement("div",{id:"wp-".concat(r,"-wrap"),className:C()(s),ref:function(e){return t.editorNode=e}},u.media_buttons&&e.createElement("div",{id:"wp-".concat(r,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},e.createElement("span",{dangerouslySetInnerHTML:{__html:c}})),u.rich_editing&&e.createElement("div",{className:"wp-editor-tabs"},e.createElement("button",{type:"button",id:"".concat(r,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":r},Object(x.__)("Visual","carbon-fields-ui")),e.createElement("button",{type:"button",id:"".concat(r,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":r},Object(x.__)("Text","carbon-fields-ui"))),e.createElement("div",{id:"wp-".concat(r,"-editor-container"),className:"wp-editor-container"},e.createElement("textarea",o()({style:{width:"100%"},className:"regular-text",id:r,name:a,value:i,onChange:this.handleChange},u.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),n}(w.Component);t.a=k}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(2),h=(n(316),function(t){function n(){return o()(this,n),s()(this,l()(n).apply(this,arguments))}return p()(n,t),i()(n,[{key:"render",value:function(){return e.createElement("h3",null,this.props.field.label)}}]),n}(d.Component));t.a=h}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(4),w=(n(317),n(31)),x=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1}),t}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field;return u.options.length>0?e.createElement("ul",{className:"cf-set__list"},u.options.map(function(n,s){return e.createElement("li",{className:"cf-set__list-item",key:s},e.createElement("input",o()({type:"checkbox",id:"".concat(r,"-").concat(n.value),name:"".concat(a,"[]"),checked:t.isChecked(i,n),value:n.value,className:"cf-set__input",onChange:t.handleChange},u.attributes)),e.createElement("label",{className:"cf-set__label",htmlFor:"".concat(r,"-").concat(n.value)},n.label))})):e.createElement(w.a,null)}}]),n}(y.Component);t.a=x}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(26),E=n(2),w=n(5),x=n(17),O=n(4),_=n(11),C=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;ar&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===f.inserted[v]&&(n="",h(e,t),f.inserted[v]=n)}var O=function(){var e=w.apply(this,arguments),t=a+"-"+v;return void 0===f.registered[t]&&(f.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){f.inserted[e]=!0}if(l){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){l&&(d.flush(),d.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},C=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function A(e){return D(e)?window.pageYOffset:e.scrollTop}function M(e,t){D(e)?window.scrollTo(0,t):e.scrollTop=t}function T(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k,a=A(e),i=t-a,u=0;!function t(){var s,c=i*((s=(s=u+=10)/n-1)*s*s+1)+a;M(e,c),u=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&T(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&w>=r)return a&&T(s,_,160),{placement:"bottom",maxHeight:i?w-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&E>=r)&&(k=i?E-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return M(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&T(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&E>=r){var S=t;return(!i&&x>=r||i&&E>=r)&&(S=i?E-y:x-y),a&&T(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!l,isFixedPosition:l,theme:s});c&&c(f),r.setState(f)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||P(e);return E({},r.props,{placement:t,maxHeight:r.state.maxHeight})},O(r,n)}return w(t,e),b(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(a.Component);N.contextTypes={getPortalPlacement:l.a.func};var I=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},L=I,R=I,H=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};H.defaultProps={children:"No options"};var V=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};V.defaultProps={children:"Loading..."};var B=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=l-f-c,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),p.scrollTop=l,m=!0,r.isBottom=!0):!d&&-t>c&&(i&&!r.isTop&&i(e),p.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},O(r,n)}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return i.a.createElement(Z,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(a.Component),le=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=x(e,["isEnabled"]);return t?i.a.createElement(ce,n):this.props.children}}]),t}(a.Component);le.defaultProps={isEnabled:!0};var fe=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,s=e.hasValue;return i.a.createElement("div",{className:r(Object(u.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s},n)},t)}}]),t}(a.Component),pe=function(e){var t=e.size,n=x(e,["size"]);return i.a.createElement("svg",E({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(u.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},de=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},he=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},me=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},ge=me,ve=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};ve.defaultProps={children:i.a.createElement(he,null)};var be=me,ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};ye.defaultProps={children:i.a.createElement(de,null)};var Ee=function(e){var t=e.color,n=e.delay,r=e.offset;return i.a.createElement("span",{className:Object(u.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(u.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var we=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,s=e.isRtl,c=e.theme.colors,l=a?c.neutral80:c.neutral20;return i.a.createElement("div",E({},o,{className:n(Object(u.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),i.a.createElement(Ee,{color:l,delay:0,offset:s}),i.a.createElement(Ee,{color:l,delay:160,offset:!0}),i.a.createElement(Ee,{color:l,delay:320,offset:!s}))};we.defaultProps={size:4};var xe=function(e){var t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)},Oe=xe,_e=xe,Ce=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)}}]),t}(a.Component);Ce.defaultProps={children:i.a.createElement(de,{size:14})};var ke=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,s=e.getStyles,c=e.innerProps,l=e.isDisabled,f=e.removeProps,p=e.selectProps,d=r.Container,h=r.Label,m=r.Remove,g=E({className:o(Object(u.a)(s("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":l},n)},c),v={className:o(Object(u.a)(s("multiValueLabel",this.props)),{"multi-value__label":!0},n)},b=E({className:o(Object(u.a)(s("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},f);return i.a.createElement(d,{data:a,innerProps:g,selectProps:p},i.a.createElement(h,{data:a,innerProps:v,selectProps:p},t),i.a.createElement(m,{data:a,innerProps:b,selectProps:p}))}}]),t}(a.Component);ke.defaultProps={cropWithEllipsis:!0};var Se={ClearIndicator:ye,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,c=e.innerRef,l=e.innerProps;return i.a.createElement("div",E({ref:c,className:n(Object(u.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":s},o)},l),t)},DropdownIndicator:ve,DownChevron:he,CrossIcon:de,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,c=e.label,l=e.theme;return i.a.createElement("div",{className:r(Object(u.a)(o("group",e)),{group:!0},n)},i.a.createElement(a,E({},s,{theme:l,getStyles:o,cx:r}),c),i.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=x(e,["className","cx","getStyles","theme"]);return i.a.createElement("div",E({className:n(Object(u.a)(r("groupHeading",E({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return i.a.createElement("div",{className:r(Object(u.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return i.a.createElement("span",E({},o,{className:n(Object(u.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,s=e.isDisabled,c=e.theme,l=x(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return i.a.createElement("div",{className:Object(u.a)(r("input",E({theme:c},l)))},i.a.createElement(p.a,E({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:s},l)))},LoadingIndicator:we,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps,c=r(Object(u.a)(o("menu",e)),{menu:!0},n);return i.a.createElement("div",E({className:c},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef;return i.a.createElement("div",{className:r(Object(u.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:s},t)},MenuPortal:B,LoadingMessage:V,NoOptionsMessage:H,MultiValue:ke,MultiValueContainer:Oe,MultiValueLabel:_e,MultiValueRemove:Ce,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,c=e.isSelected,l=e.innerRef,f=e.innerProps;return i.a.createElement("div",E({ref:l,className:r(Object(u.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":c},n)},f),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,c=e.isRtl;return i.a.createElement("div",E({className:r(Object(u.a)(o("container",e)),{"--is-disabled":s,"--is-rtl":c},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:fe},je=function(e){return E({},Se,e.components)},De={clearIndicator:be,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:ge,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:R,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return y(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),y(t,"backgroundColor",i.neutral0),y(t,"borderRadius",o),y(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),y(t,"marginBottom",a.menuGutter),y(t,"marginTop",a.menuGutter),y(t,"position","absolute"),y(t,"width","100%"),y(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:L,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ae={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Me={backspaceRemovesValue:!0,blurInputOnSelect:F(),captureMenuScroll:!F(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=E({ignoreCase:!0,ignoreAccents:!0,stringify:K,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?$(t):t,c=i?$(a(e)):a(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=q(s),c=q(c)),"start"===u?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Te=1,Fe=function(e){function t(e){v(this,t);var n=O(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pe.call(n);var r=e.value;n.cacheComponents=h(n.cacheComponents,Y).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Te);var o=j(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=j(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!u&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?M(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,c=-1;if(a.length){switch(e){case"previous":c=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ae):E({},Ae,this.props.theme):Ae}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,c=this.state.selectValue,l=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+S(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:l,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var c=a?void 0:function(){return n.onOptionHover(e)},l=a?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:l,onMouseMove:c,onMouseOver:c,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:f,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,c=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,c=r||this.getElementId("input");if(!n)return i.a.createElement(J,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:k,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,d=f.theme;return i.a.createElement(u,E({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,f=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,h=l.inputValue,m=l.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue;if(!this.hasValue()||!f)return h?null:i.a.createElement(s,E({},c,{key:"placeholder",isDisabled:p}),m);if(d)return v.map(function(t){var u=t===b;return i.a.createElement(n,E({},c,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var y=v[0];return i.a.createElement(u,E({},c,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:u,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?i.a.createElement(e,E({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.a.createElement(n,E({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,O=m.maxMenuHeight,_=m.menuIsOpen,C=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,j=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,A=m.noOptionsMessage,M=m.onMenuScrollToTop,T=m.onMenuScrollToBottom;if(!_)return null;var F=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,i.a.createElement(l,E({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},P=void 0;if(this.hasOptions())P=h.render.map(function(t){if("group"===t.type){t.type;var o=x(t,["type"]),a=t.key+"-heading";return i.a.createElement(n,E({},f,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return F(e)}))}if("option"===t.type)return F(t)});else if(b){var I=y({inputValue:v});if(null===I)return null;P=i.a.createElement(s,f,I)}else{var L=A({inputValue:v});if(null===L)return null;P=i.a.createElement(c,f,L)}var R={minMenuHeight:w,maxMenuHeight:O,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:D},H=i.a.createElement(N,E({},f,R),function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return i.a.createElement(o,E({},f,R,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),i.a.createElement(le,{isEnabled:g,onTopArrive:M,onBottomArrive:T},i.a.createElement(se,{isEnabled:j},i.a.createElement(a,E({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),P))))});return S||"fixed"===k?i.a.createElement(u,E({},f,{appendTo:S,controlElement:this.controlRef,menuPlacement:C,menuPosition:k}),H):H}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(o){if(n){var s=u.map(function(t){return e.getOptionValue(t)}).join(n);return i.a.createElement("input",{name:a,type:"hidden",value:s})}var c=u.length>0?u.map(function(t,n){return i.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):i.a.createElement("input",{name:a,type:"hidden"});return i.a.createElement("div",null,c)}var l=u[0]?this.getOptionValue(u[0]):"";return i.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?i.a.createElement(X,{"aria-live":"assertive"},i.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),i.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,u=a.className,s=a.id,c=a.isDisabled,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.a.createElement(r,E({},f,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:l}),this.renderLiveRegion(),i.a.createElement(t,E({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:l}),i.a.createElement(o,E({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),i.a.createElement(n,E({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(a.Component);Fe.defaultProps=Me;var Pe=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=je({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(C(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=De[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,E({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=_(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=_(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof l&&(l(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!c||!f||!m||p&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(c){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":c?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!c){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":c?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":c?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!c)return;e.focusOption("pageup");break;case"PageDown":if(!c)return;e.focusOption("pagedown");break;case"Home":if(!c)return;e.focusOption("first");break;case"End":if(!c)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Ne=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;v(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=c(n(1)),o=c(n(21)),a=c(n(25)),i=n(52),u=c(n(289)),s=c(n(290));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,c=e.hsv,l=e.hsl,f=e.onChange,p=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:l,hsv:c,onChange:f})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:l,onChange:f})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:l,renderers:m,onChange:f}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:l,hex:o,onChange:f,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:f,onSwatchHover:p}))};l.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},l.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(l)},function(e,t,n){"use strict";var r=n(167);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(169)),o=u(n(61)),a=u(n(180)),i=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(32),o=n(23),a=n(27);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(41),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(173)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(45);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(44);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(44),o=n(71),a=n(72);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(86),o=n(196),a=n(28),i=n(90),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t,n){var r,o=n(197),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(200),o=n(44),a=n(71);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(201),o=n(202),a=n(203),i=n(204),u=n(205);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(244);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(69),o=n(103),a=n(104),i=n(246),u=n(247),s=n(250),c=n(251),l=n(252),f=n(253),p=n(94),d=n(254),h=n(48),m=n(255),g=n(256),v=n(261),b=n(23),y=n(62),E=n(263),w=n(28),x=n(265),O=n(42),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var T,F=1&n,P=2&n,N=4&n;if(j&&(T=A?j(t,D,A,M):j(t)),void 0!==T)return T;if(!w(t))return t;var I=b(t);if(I){if(T=m(t),!F)return c(t,T)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,F);if(L==k||L==_||R&&!A){if(T=P||R?{}:v(t),!F)return P?f(t,u(T,t)):l(t,i(T,t))}else{if(!S[L])return A?t:{};T=g(t,L,F)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,T),x(t))return t.forEach(function(r){T.add(e(r,n,j,r,t,M))}),T;if(E(t))return t.forEach(function(r,o){T.set(o,e(r,n,j,o,t,M))}),T;var V=N?P?d:p:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(T,o,e(r,n,j,o,t,M))}),T}},function(e,t,n){var r=n(33),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(51),o=n(42);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(51),o=n(106);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(28),o=n(67),a=n(249),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(63)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*c/a)/100,n.hsl.a!==l)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:l,source:"rgb"}}else{var f;if(f=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==f)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*c/a+100)/100,n.hsl.h!==l)return{h:l,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==f)return{h:f,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?c=a:l<0?l=0:l>i&&(l=i);var f=100*c/a,p=-100*l/i+100;return{h:n.hsl.h,s:f,v:p,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=F(e,360),t=F(t,100),n=F(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,f,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=T(s),{ok:h,format:e.format||m,r:c(255,l(u.r,0)),g:c(255,l(u.g,0)),b:c(255,l(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r,o,a=l(e,t,n),i=c(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(p(r));return a}function D(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(p({h:r,s:o,v:a})),a=(a+u)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*F(this._r,255))+"%",g:s(100*F(this._g,255))+"%",b:s(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%)":"rgba("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),a=n/100;return p({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,a=p.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},p.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;cs&&(s=r,u=p(t[c]));return p.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var A=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,l(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:l.fields,className:"flexbox-fix"},r.default.createElement("div",{style:l.double},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"hex",value:s.replace("#",""),onChange:f})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.alpha},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:f,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},c={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},l=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},f=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r,a){if(0===e||e){var s,c=a||o,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var f=t||(n||g).dateFormat,p=String(e).trim();if("today"===p)s=new Date,r=!0;else if(/Z$/.test(p)||/GMT$/.test(p))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,f);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function E(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(l=o===s.hourElement?l-i-t(!s.amPM):a,p&&N(void 0,1,s.hourElement)),s.amPM&&f&&(1===u?l+c===23:Math.abs(l-c)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(l)}}(n);var r=s._input.value;_(),ge(),s._input.value!==r&&s._debouncedChange()}}function _(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var c=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,c.getHours()))===c.getHours()&&(o=Math.max(o,c.getMinutes())),o===c.getMinutes()&&(a=Math.max(a,c.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function F(){fe("onChange")}function T(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function R(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===p(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===p(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===p(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&p(e,s.selectedDates[0])>=0&&p(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),fe("onDayCreate",a),a}function L(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var c=o.children[u];if(-1===c.className.indexOf("hidden")&&J(c.dateObj))return c}}function B(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,c=i.children.length,l=u;l>=0&&l0?c:-1);l+=o){var f=i.children[l];if(-1===f.className.indexOf("hidden")&&J(f.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return L(f)}s.changeMonth(o),B(H(o),0)}(r,t):L(r)}function V(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",c=i?"nextMonthDay hidden":"nextMonthDay",l=r+1-n,f=0;l<=r;l++,f++)a.appendChild(R(u,new Date(e,t-1,l),l,f));for(l=1;l<=o;l++,f++)a.appendChild(R("",new Date(e,t,l),l,f));for(var p=o+1;p<=42-n&&(1===s.config.showMonths||f%7!=0);p++,f++)a.appendChild(R(c,new Date(e,t+1,p%o),p,f));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,fe("onYearChange")),U(),fe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),fe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&p(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&p(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),B(H(1),0)):B(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),B(H(1),0)):a||B(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var c=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),l=c.indexOf(e.target);if(-1!==l){var f=c[l+(e.shiftKey?-1:1)];void 0!==f?(e.preventDefault(),f.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],_(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],_(),ge()}fe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,c=0,l=r;lr&&lu)?u=l:l>n&&(!c||l0&&l0&&l>c;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=l||(nt&&l===n&&a.classList.add("endRange"),l>=u&&(0===c||l<=c)&&d(l,n,t)&&a.classList.add("inRange")))))},v=0,b=p.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===C.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},C.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?C.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=l(s),s.parseDate=f({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){fe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),c=window.innerHeight-u.bottom,l="above"===a||"below"!==a&&cn,f=window.pageYOffset+u.top+(l?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!l),v(s.calendarContainer,"arrowBottom",l),!s.config.inline){var p=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=p+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=f+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=p+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==p(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(_(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&fe("onYearChange"),fe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():L(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,c="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||c)&&ie()}F()}}s.parseDate=f({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&fe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),fe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&fe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=T,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void fe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),fe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),T(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);ce(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),T(),k(),ge(t),t&&fe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function ce(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function le(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function fe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&fe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=le(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=le(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):C.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):C.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var c=0;c-1?s.config[p]=r(f[p]).map(g).concat(s.config[p]):void 0===t[p]&&(s.config[p]=f[p])}fe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&ce(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),fe("onChange"),fe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(F,w),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),F()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),fe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},c={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},l=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},f=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r,a){if(0===e||e){var s,c=a||o,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var f=t||(n||g).dateFormat,p=String(e).trim();if("today"===p)s=new Date,r=!0;else if(/Z$/.test(p)||/GMT$/.test(p))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,f);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function E(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(l=o===s.hourElement?l-i-t(!s.amPM):a,p&&N(void 0,1,s.hourElement)),s.amPM&&f&&(1===u?l+c===23:Math.abs(l-c)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(l)}}(n);var r=s._input.value;C(),ge(),s._input.value!==r&&s._debouncedChange()}}function C(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var c=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,c.getHours()))===c.getHours()&&(o=Math.max(o,c.getMinutes())),o===c.getMinutes()&&(a=Math.max(a,c.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function T(){fe("onChange")}function F(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function L(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===p(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===p(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===p(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&p(e,s.selectedDates[0])>=0&&p(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),fe("onDayCreate",a),a}function R(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var c=o.children[u];if(-1===c.className.indexOf("hidden")&&J(c.dateObj))return c}}function V(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,c=i.children.length,l=u;l>=0&&l0?c:-1);l+=o){var f=i.children[l];if(-1===f.className.indexOf("hidden")&&J(f.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return R(f)}s.changeMonth(o),V(H(o),0)}(r,t):R(r)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",c=i?"nextMonthDay hidden":"nextMonthDay",l=r+1-n,f=0;l<=r;l++,f++)a.appendChild(L(u,new Date(e,t-1,l),l,f));for(l=1;l<=o;l++,f++)a.appendChild(L("",new Date(e,t,l),l,f));for(var p=o+1;p<=42-n&&(1===s.config.showMonths||f%7!=0);p++,f++)a.appendChild(L(c,new Date(e,t+1,p%o),p,f));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,fe("onYearChange")),U(),fe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),fe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&p(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&p(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),V(H(1),0)):V(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),V(H(1),0)):a||V(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var c=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),l=c.indexOf(e.target);if(-1!==l){var f=c[l+(e.shiftKey?-1:1)];void 0!==f?(e.preventDefault(),f.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],C(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],C(),ge()}fe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,c=0,l=r;lr&&lu)?u=l:l>n&&(!c||l0&&l0&&l>c;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=l||(nt&&l===n&&a.classList.add("endRange"),l>=u&&(0===c||l<=c)&&d(l,n,t)&&a.classList.add("inRange")))))},v=0,b=p.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===_.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},_.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?_.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=l(s),s.parseDate=f({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){fe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),c=window.innerHeight-u.bottom,l="above"===a||"below"!==a&&cn,f=window.pageYOffset+u.top+(l?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!l),v(s.calendarContainer,"arrowBottom",l),!s.config.inline){var p=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=p+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=f+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=p+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==p(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&fe("onYearChange"),fe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():R(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,c="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||c)&&ie()}T()}}s.parseDate=f({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&fe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),fe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&fe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=F,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void fe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),fe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),F(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);ce(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),F(),k(),ge(t),t&&fe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function ce(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function le(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function fe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&fe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=le(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=le(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):_.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):_.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var c=0;c-1?s.config[p]=r(f[p]).map(g).concat(s.config[p]):void 0===t[p]&&(s.config[p]=f[p])}fe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&ce(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),fe("onChange"),fe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(T,w),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),T()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),fe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(e[s=l[c]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&E(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!E(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=g,f.ok=v,f.equal=function(e,t,n){e!=t&&g(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(37))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var c,E="",C=!1,_=["{","}"];return d(n)&&(C=!0,_=["[","]"]),O(n)&&(E=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(E=" "+RegExp.prototype.toString.call(n)),w(n)&&(E=" "+Date.prototype.toUTCString.call(n)),x(n)&&(E=" "+f(n)),0!==i.length||C&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=C?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,_)):_[0]+E+_[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return E(e)&&"[object RegExp]"===C(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===C(e)}function x(e){return E(e)&&("[object Error]"===C(e)||e instanceof Error)}function O(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=E,t.isDate=w,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(299);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[_((e=new Date).getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(300),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(37),n(111))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(111))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(306)),o=u(n(309)),a=u(n(1)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var c=o in t,l=o in u,f=t[o],p=(0,r.isValidElement)(f)&&!f.props.in;!l||c&&!p?l||!c||p?l&&c&&(0,r.isValidElement)(f)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:f.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(f.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return l()({},e,s()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(f.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function d(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function h(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function m(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function g(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function v(e,t){return e.validation[t]||null}function b(e,t){return-1===e.hiddenFields.indexOf(t)}Object(i.registerStore)("carbon-fields/core",{reducer:p,actions:r,selectors:o});var y=n(15),E=n.n(y),w=n(14),x=n(19),O=n(35),C=n(34),_=n(117),k=n(120),S=n(121),j=n(125),D=n(29),A=n(40),M=Object(D.a)(function(e){return l()({},e,{buttonText:Object(a.__)("Select Date","carbon-fields-ui")})})(A.a),F=n(76),T=n(130),P=n(131),N=n(132),I=n(135),R=n(136),L=n(140),H=n(57),B=n(142),V=n(143),U=n(77),z=n(144),W=n(145),Y=n(146),G=n(147),q=n(60),$=Object(D.a)(function(e){return l()({},e,{icon:"clock",buttonText:Object(a.__)("Select Time","carbon-fields-ui")})})(A.a);Object(x.addFilter)("carbon-fields.register-field-type","carbon-fields/core",function(e,t,n){return Object(w.compose)(Object(O.a)("carbon-fields.field-edit.".concat(t)),Object(O.a)("carbon-fields.".concat(e,".").concat(t)))(n)}),[["association",_.a],["checkbox",k.a],["color",S.a],["complex",j.a],["date",M],["date_time",A.a],["file",F.a],["footer_scripts",q.a],["gravity_form",U.a],["header_scripts",q.a],["hidden",T.a],["html",P.a],["image",F.a],["map",N.a],["multiselect",R.a],["media_gallery",I.a],["oembed",L.a],["radio",H.a],["radio_image",B.a],["rich_text",V.a],["select",U.a],["separator",z.a],["set",W.a],["sidebar",Y.a],["text",G.a],["textarea",q.a],["time",$]].forEach(function(e){return C.b.apply(void 0,E()(e))});var K=n(53),X=n(116),J=n(17),Z=n.n(J),Q=function(e,t){return e===t},ee=n(18),te=n(11),ne=Object(ee.withEffects)(function(e,t){if(t.field.required){var n=e.mount,r=e.unmount,o=e.observe("value"),a=e.observe("visible");return Object(te.merge)(Object(te.pipe)(Object(te.combine)(o,a,n),Object(te.filter)(function(e){return Z()(e,2)[1]}),Object(te.take)(1),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:Z()(e,1)[0],transient:!0}}})),Object(te.pipe)(o,function(e){return function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(o=n,e(0,function(e,t){0===e?(a=t)(1):1===e&&(i=!0,a(2))})),1===t?i?r(1,n):o(1):r(t,n)})}}}}(n),function(e){return void 0===e&&(e=Q),function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(a=n),1===t?i&&e(o,n)?a(1):(i=!0,o=n,r(1,n)):r(t,n)})}}}}(),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:e,transient:!1}}})),Object(te.pipe)(r,Object(te.map)(function(){return{type:"RESET"}})))}},{handler:function(e){return function(t){var n=e.id,r=e.field,o=e.markAsInvalid,i=e.markAsValid,u=e.lockSaving,s=e.unlockSaving;switch(t.type){case"VALIDATE":var c=t.payload,l=c.value,p=c.transient,d="carbon-fields.".concat(r.type,".validate"),h=Object(x.hasFilter)(d)?Object(x.applyFilters)(d,r,l):function(e){var t=Object(f.isObject)(e);return t&&!Object(f.isEmpty)(e)||!t&&e?null:Object(a.__)("This field is required. ","carbon-fields-ui")}(l);h?(p||o(n,h),u(n)):(p||i(n),s(n));break;case"RESET":i(n),s(n)}}}}),re=Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{markAsValid:t.markAsValid,markAsInvalid:t.markAsInvalid}}),oe=Object(w.compose)(re,ne);function ae(e,t){function n(t,n){if(!Object(f.isEmpty)(n.field.conditional_logic))return e(n,t)}function r(e){return function(n){var r=e.field.conditional_logic,o=r.relation,a=r.rules,i=t(e,n),u=a.reduce(function(e,t){if(!Object(f.has)(i,t.field))return console.error('An unknown field is used in condition - "'.concat(t.field,'".')),e.concat(!1);var n=function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;case">":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(f.some)(n,function(t){return t==e});case"NOT IN":return Object(f.every)(n,function(t){return t!=e});case"INCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(i[t.field],t.compare,t.value);return e.concat(n)},[]),s=!1;switch(o){case"AND":s=Object(f.every)(u);break;case"OR":s=Object(f.some)(u)}s?e.showField(e.id):e.hideField(e.id)}}return Object(w.createHigherOrderComponent)(function(e){return Object(w.compose)(Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(i.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(ee.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var ie=n(149),ue=n.n(ie),se="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function ce(){return"cf-".concat(ue()(se,21))}function le(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(e[s=l[c]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&E(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!E(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=g,f.ok=v,f.equal=function(e,t,n){e!=t&&g(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(37))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var c,E="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(E=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(E=" "+RegExp.prototype.toString.call(n)),w(n)&&(E=" "+Date.prototype.toUTCString.call(n)),x(n)&&(E=" "+f(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,C)):C[0]+E+C[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return E(e)&&"[object RegExp]"===_(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===_(e)}function x(e){return E(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=E,t.isDate=w,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(299);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(300),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(37),n(111))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(111))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(306)),o=u(n(309)),a=u(n(1)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var c=o in t,l=o in u,f=t[o],p=(0,r.isValidElement)(f)&&!f.props.in;!l||c&&!p?l||!c||p?l&&c&&(0,r.isValidElement)(f)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:f.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(f.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return l()({},e,s()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(f.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function d(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function h(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function m(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function g(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function v(e,t){return e.validation[t]||null}function b(e,t){return-1===e.hiddenFields.indexOf(t)}Object(i.registerStore)("carbon-fields/core",{reducer:p,actions:r,selectors:o});var y=n(18),E=n.n(y),w=n(14),x=n(19),O=n(35),_=n(34),C=n(117),k=n(119),S=n(120),j=n(124),D=n(29),A=n(40),M=Object(D.a)(function(e){return l()({},e,{buttonText:Object(a.__)("Select Date","carbon-fields-ui")})})(A.a),T=n(76),F=n(129),P=n(130),N=n(131),I=n(134),L=n(136),R=n(140),H=n(57),V=n(142),B=n(143),U=n(77),z=n(144),W=n(145),Y=n(146),G=n(147),q=n(60),$=Object(D.a)(function(e){return l()({},e,{icon:"clock",buttonText:Object(a.__)("Select Time","carbon-fields-ui")})})(A.a);Object(x.addFilter)("carbon-fields.register-field-type","carbon-fields/core",function(e,t,n){return Object(w.compose)(Object(O.a)("carbon-fields.field-edit.".concat(t)),Object(O.a)("carbon-fields.".concat(e,".").concat(t)))(n)}),[["association",C.a],["checkbox",k.a],["color",S.a],["complex",j.a],["date",M],["date_time",A.a],["file",T.a],["footer_scripts",q.a],["gravity_form",U.a],["header_scripts",q.a],["hidden",F.a],["html",P.a],["image",T.a],["map",N.a],["multiselect",L.a],["media_gallery",I.a],["oembed",R.a],["radio",H.a],["radio_image",V.a],["rich_text",B.a],["select",U.a],["separator",z.a],["set",W.a],["sidebar",Y.a],["text",G.a],["textarea",q.a],["time",$]].forEach(function(e){return _.b.apply(void 0,E()(e))});var K=n(53),X=n(116),J=n(16),Z=n.n(J),Q=function(e,t){return e===t},ee=n(17),te=n(11),ne=Object(ee.withEffects)(function(e,t){if(t.field.required){var n=e.mount,r=e.unmount,o=e.observe("value"),a=e.observe("visible");return Object(te.merge)(Object(te.pipe)(Object(te.combine)(o,a,n),Object(te.filter)(function(e){return Z()(e,2)[1]}),Object(te.take)(1),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:Z()(e,1)[0],transient:!0}}})),Object(te.pipe)(o,function(e){return function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(o=n,e(0,function(e,t){0===e?(a=t)(1):1===e&&(i=!0,a(2))})),1===t?i?r(1,n):o(1):r(t,n)})}}}}(n),function(e){return void 0===e&&(e=Q),function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(a=n),1===t?i&&e(o,n)?a(1):(i=!0,o=n,r(1,n)):r(t,n)})}}}}(),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:e,transient:!1}}})),Object(te.pipe)(r,Object(te.map)(function(){return{type:"RESET"}})))}},{handler:function(e){return function(t){var n=e.id,r=e.field,o=e.markAsInvalid,i=e.markAsValid,u=e.lockSaving,s=e.unlockSaving;switch(t.type){case"VALIDATE":var c=t.payload,l=c.value,p=c.transient,d="carbon-fields.".concat(r.type,".validate"),h=Object(x.hasFilter)(d)?Object(x.applyFilters)(d,r,l):function(e){var t=Object(f.isObject)(e);return t&&!Object(f.isEmpty)(e)||!t&&e?null:Object(a.__)("This field is required.","carbon-fields-ui")}(l);h?(p||o(n,h),u(n)):(p||i(n),s(n));break;case"RESET":i(n),s(n)}}}}),re=Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{markAsValid:t.markAsValid,markAsInvalid:t.markAsInvalid}}),oe=Object(w.compose)(re,ne);function ae(e,t){function n(t,n){if(!Object(f.isEmpty)(n.field.conditional_logic))return e(n,t)}function r(e){return function(n){var r=e.field.conditional_logic,o=r.relation,i=r.rules,u=t(e,n),s=i.reduce(function(e,t){if(!Object(f.has)(u,t.field))return console.error(Object(a.sprintf)(Object(a.__)('An unknown field is used in condition - "%s"',"carbon-fields-ui"),t.field)),e.concat(!1);var n=function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;case">":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(f.some)(n,function(t){return t==e});case"NOT IN":return Object(f.every)(n,function(t){return t!=e});case"INCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),c=!1;switch(o){case"AND":c=Object(f.every)(s);break;case"OR":c=Object(f.some)(s)}c?e.showField(e.id):e.hideField(e.id)}}return Object(w.createHigherOrderComponent)(function(e){return Object(w.compose)(Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(i.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(ee.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var ie=n(149),ue=n.n(ie),se="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function ce(){return"cf-".concat(ue()(se,21))}function le(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r .cf-field > .cf-field__head, +.cf-container-user-meta .cf-container__fields > .cf-field > .cf-field__head { + position: absolute; + left: 0; + font-weight: 600; } + +.cf-container .cf-field__label { padding-bottom: 5px; font-weight: 600; color: #23282d; } +.cf-container-term-meta .cf-field__label, +.cf-container-user-meta .cf-field__label { + margin: 0 !important; } + .cf-field__help { display: inline-block; color: #666; margin-top: 10px; } -/* ========================================================================== - Multiselect - ========================================================================== */ - /* ========================================================================== Colors ========================================================================== */ @@ -244,47 +250,6 @@ .cf-container-widget .cf-field { margin: 1em 0 .2em; } -/* ========================================================================== - Colors - ========================================================================== */ -/* ========================================================================== - WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ - ========================================================================== */ -/* ========================================================================== - Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss - ========================================================================== */ -/* ========================================================================== - Fonts - ========================================================================== */ -/* ========================================================================== - Variables - ========================================================================== */ -/* ========================================================================== - WordPress Variables - ========================================================================== */ -/* ========================================================================== - Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss - ========================================================================== */ -/* ========================================================================== - Term Meta - ========================================================================== */ -.cf-container-term-meta { - margin-bottom: 13px; } - .carbon-table-row .cf-container-term-meta { - margin-bottom: 0; } - .cf-container-term-meta .cf-field { - margin-top: 13px; } - .cf-container-term-meta .cf-field:first-child { - margin-top: 0; } - -.carbon-table-row .cf-field__head { - position: absolute; - left: 0; - font-weight: 600; } - -.carbon-table-row .cf-field__body { - width: 95%; } - /* ========================================================================== Colors ========================================================================== */ @@ -377,11 +342,18 @@ .cf-container__fields { display: flex; flex-wrap: wrap; - margin: -1px -1px 0 0; } + margin: -1px -1px 0 0; + background-color: #fff; } .cf-container__fields[hidden] { display: none; } .block-editor .cf-container__fields { border-left: 1px solid #e2e4e7; } + .cf-container-term-meta .cf-container__fields, + .cf-container-user-meta .cf-container__fields { + border-width: 0 0 1px 1px; + border-style: solid; + border-color: #e2e4e7; + margin: 0; } .cf-container__tabs { position: relative; diff --git a/build/classic/metaboxes.js b/build/classic/metaboxes.js index 04070de8c..3b250a07c 100644 --- a/build/classic/metaboxes.js +++ b/build/classic/metaboxes.js @@ -385,7 +385,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n\nconst startWith = (...xs) = /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/container/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../field */ \"./packages/metaboxes/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar Container =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(Container, _Component);\n\n function Container() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Container);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Container)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n currentTab: null\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleTabClick\", function (tab) {\n _this.setState({\n currentTab: tab\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Container, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var container = this.props.container;\n\n if (this.isTabbed(container)) {\n this.setState({\n currentTab: Object.keys(container.settings.tabs)[0]\n });\n }\n }\n /**\n * Returns whether the container uses tabs.\n *\n * @param {Object} container\n * @return {boolean}\n */\n\n }, {\n key: \"isTabbed\",\n value: function isTabbed(container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"isPlainObject\"])(container.settings.tabs);\n }\n /**\n * Renders the given field.\n *\n * @param {Object} field\n * @return {Object}\n */\n\n }, {\n key: \"renderField\",\n value: function renderField(field) {\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, 'metabox');\n\n if (!FieldEdit) {\n return null;\n }\n\n return __webpack_provided_wp_dot_element.createElement(_field__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n key: field.id,\n id: field.id\n }, __webpack_provided_wp_dot_element.createElement(FieldEdit, {\n id: field.id\n }));\n }\n /**\n * Handles click on the tabs.\n *\n * @param {string} tab\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var container = this.props.container;\n var hasTabs = this.isTabbed(container);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()(['cf-container', \"cf-container-\".concat(container.id), \"cf-container-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"kebabCase\"])(container.type))].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(container.classes), [{\n 'cf-container--plain': !hasTabs\n }]));\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: classes\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: container.nonce.name,\n value: container.nonce.value\n }), hasTabs && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__tabs\"\n }, __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-container__tabs-list\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n // eslint-disable-next-line no-shadow\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-container__tabs-item', {\n 'cf-container__tabs-item--current': tabName === currentTab\n });\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n key: tabName,\n className: classes,\n onClick: function onClick() {\n return _this2.handleTabClick(tabName);\n }\n }, tabName);\n }))), hasTabs && Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__fields\",\n key: tabName,\n hidden: tabName !== currentTab\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(fieldNames, function (fieldName) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"find\"])(container.fields, ['name', fieldName]);\n return _this2.renderField(field);\n }));\n }), !hasTabs && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__fields\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.fields, this.renderField)));\n }\n }]);\n\n return Container;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Container);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/components/container/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/container/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../field */ \"./packages/metaboxes/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar Container =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(Container, _Component);\n\n function Container() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Container);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Container)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n currentTab: null\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"renderField\", function (field) {\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, 'metabox');\n\n if (!FieldEdit) {\n return null;\n }\n\n return __webpack_provided_wp_dot_element.createElement(_field__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n key: field.id,\n id: field.id\n }, __webpack_provided_wp_dot_element.createElement(FieldEdit, {\n id: field.id,\n containerId: _this.props.id\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleTabClick\", function (tab) {\n _this.setState({\n currentTab: tab\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Container, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var container = this.props.container;\n\n if (this.isTabbed(container)) {\n this.setState({\n currentTab: Object.keys(container.settings.tabs)[0]\n });\n }\n }\n /**\n * Returns whether the container uses tabs.\n *\n * @param {Object} container\n * @return {boolean}\n */\n\n }, {\n key: \"isTabbed\",\n value: function isTabbed(container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"isPlainObject\"])(container.settings.tabs);\n }\n /**\n * Renders the given field.\n *\n * @param {Object} field\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var container = this.props.container;\n var hasTabs = this.isTabbed(container);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()(['cf-container', \"cf-container-\".concat(container.id), \"cf-container-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"kebabCase\"])(container.type))].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(container.classes), [{\n 'cf-container--plain': !hasTabs\n }]));\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: classes\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: container.nonce.name,\n value: container.nonce.value\n }), hasTabs && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__tabs\"\n }, __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-container__tabs-list\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n // eslint-disable-next-line no-shadow\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-container__tabs-item', {\n 'cf-container__tabs-item--current': tabName === currentTab\n });\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n key: tabName,\n className: classes,\n onClick: function onClick() {\n return _this2.handleTabClick(tabName);\n }\n }, tabName);\n }))), hasTabs && Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__fields\",\n key: tabName,\n hidden: tabName !== currentTab\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(fieldNames, function (fieldName) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"find\"])(container.fields, ['name', fieldName]);\n return _this2.renderField(field);\n }));\n }), !hasTabs && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__fields\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.fields, this.renderField)));\n }\n }]);\n\n return Container;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Container);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/components/container/index.js?"); /***/ }), @@ -467,18 +467,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_from_ajax_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/from-ajax-event */ \"./packages/metaboxes/utils/from-ajax-event.js\");\n/* harmony import */ var _store_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../store/helpers */ \"./packages/metaboxes/store/helpers.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/term-meta/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_ajax_event__WEBPACK_IMPORTED_MODULE_5__[\"default\"])('ajaxSuccess', 'add-tag'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var settings = _ref.settings,\n data = _ref.data;\n return settings.data.indexOf('carbon_fields_container') > -1 && !data.documentElement.querySelector('wp_error');\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function () {\n // Collects identifiers of current fields so we can remove them later.\n var oldFieldIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(props.container.fields, 'id'); // Get a fresh copy of the container and fields.\n\n\n var _normalizePreloadedSt = Object(_store_helpers__WEBPACK_IMPORTED_MODULE_6__[\"normalizePreloadedState\"])(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\n var container = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(containers, ['id', props.id]);\n\n var containerFields = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(fields, ['container_id', props.id]); // Replace the container and add the new fields.\n\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"dispatch\"])('carbon-fields/metaboxes'),\n updateState = _dispatch.updateState,\n removeFields = _dispatch.removeFields;\n\n updateState(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy([container], 'id'), lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy(containerFields, 'id'));\n removeFields(oldFieldIds);\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.term_meta.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/term-meta/index.js?"); - -/***/ }), - -/***/ "./packages/metaboxes/containers/term-meta/style.scss": -/*!************************************************************!*\ - !*** ./packages/metaboxes/containers/term-meta/style.scss ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/term-meta/style.scss?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/from-event-pattern */ \"./packages/metaboxes/utils/from-event-pattern.js\");\n/* harmony import */ var _store_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../store/helpers */ \"./packages/metaboxes/store/helpers.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (handler) {\n return window.jQuery(document).on('ajaxSuccess', handler);\n }, function (handler) {\n return window.jQuery(document).off('ajaxSuccess', handler);\n }, function (e, xhr, options, data) {\n return {\n options: options,\n data: data\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var options = _ref.options,\n data = _ref.data;\n return options.data.indexOf('carbon_fields_container') > -1 && options.data.indexOf('add-tag') > -1 && !data.documentElement.querySelector('wp_error');\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function () {\n // Collects identifiers of current fields so we can remove them later.\n var oldFieldIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(props.container.fields, 'id'); // Get a fresh copy of the container and fields.\n\n\n var _normalizePreloadedSt = Object(_store_helpers__WEBPACK_IMPORTED_MODULE_6__[\"normalizePreloadedState\"])(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\n var container = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(containers, ['id', props.id]);\n\n var containerFields = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(fields, ['container_id', props.id]); // Replace the container and add the new fields.\n\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"dispatch\"])('carbon-fields/metaboxes'),\n updateState = _dispatch.updateState,\n removeFields = _dispatch.removeFields;\n\n updateState(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy([container], 'id'), lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy(containerFields, 'id'));\n removeFields(oldFieldIds);\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.term_meta.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/term-meta/index.js?"); /***/ }), @@ -551,6 +540,18 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ }), +/***/ "./packages/metaboxes/fields/association/index.js": +/*!********************************************************!*\ + !*** ./packages/metaboxes/fields/association/index.js ***! + \********************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_strip_compact_input_prefix__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/strip-compact-input-prefix */ \"./packages/metaboxes/utils/strip-compact-input-prefix.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Returns a field with the given name.\n *\n * @param {Object[]} fields\n * @param {string} name\n * @return {?Object}\n */\n\nfunction findFieldByName(fields, name) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"find\"])(fields, function (field) {\n return field.name.indexOf(name) === 0;\n });\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.association.metabox', 'carbon-fields/metaboxes', Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withProps\"])(function (props) {\n return {\n hierarchyResolver: function hierarchyResolver() {\n // Get all fields.\n var fields = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getFieldsByContainerId(props.containerId); // Get a clean version of field's name.\n\n var fieldName = Object(_utils_strip_compact_input_prefix__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(props.name); // Get the path.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove chunks that are empty.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Get the root field.\n\n var rootFieldName = path.shift();\n var rootField = findFieldByName(fields, rootFieldName); // Get the hierarchy.\n\n var accessor = fields.indexOf(rootField);\n var hierarchy = rootField.base_name; // Visit every branch in the tree so we can get the full hierarchy.\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isSameField = chunk === props.field.base_name;\n var isNestedComplex = !isGroup && !isSameField;\n\n if (isGroup) {\n accessor = \"\".concat(accessor, \".value.\").concat(chunk, \".name\");\n hierarchy = \"\".concat(hierarchy, \"[\").concat(chunk, \"]:\").concat(Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(fields, accessor), \"/\");\n }\n\n if (isNestedComplex) {\n var field = findFieldByName(fields, chunk);\n accessor = fields.indexOf(field);\n hierarchy = \"\".concat(hierarchy).concat(field.base_name);\n }\n\n if (isSameField) {\n hierarchy = \"\".concat(hierarchy).concat(chunk);\n }\n }\n\n return hierarchy;\n }\n };\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/association/index.js?"); + +/***/ }), + /***/ "./packages/metaboxes/fields/complex/index.js": /*!****************************************************!*\ !*** ./packages/metaboxes/fields/complex/index.js ***! @@ -559,7 +560,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/field */ \"./packages/metaboxes/components/field/index.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n field = _this$props.field,\n value = _this$props.value,\n addFields = _this$props.addFields,\n onChange = _this$props.onChange; // Create a copy of the group to prevent\n // incidentally modifications.\n\n group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group); // Get a flat list of all fields for this group.\n\n var fields = [];\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n group.container_id = field.container_id;\n group.fields = group.fields.map(function (groupField) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(groupField, field.container_id, fields);\n }); // Push the group to the field.\n\n addFields(fields);\n onChange(id, value.concat(group));\n callback(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n cloneFields = _this$props2.cloneFields,\n onChange = _this$props2.onChange;\n var originFieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n var cloneFieldIds = originFieldIds.map(function () {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n });\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group);\n clonedGroup.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n clonedGroup.fields.forEach(function (groupField, index) {\n groupField.id = cloneFieldIds[index];\n });\n cloneFields(originFieldIds, cloneFieldIds);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.splice(value.indexOf(group) + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n removeFields = _this$props3.removeFields,\n onChange = _this$props3.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"without\"])(value, group)); // Delay removal of fields because React will complain\n // about missing objects.\n // TODO: Investigate why this is necessary.\n\n setTimeout(function () {\n var fieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n removeFields(fieldIds);\n }, 1);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleGroup\", function (groupId) {\n var _this$props4 = _this.props,\n field = _this$props4.field,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"find\"])(draft, ['id', groupId]);\n group.collapsed = !group.collapsed;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleAllGroups\", function (collapsed) {\n var _this$props5 = _this.props,\n field = _this$props5.field,\n value = _this$props5.value,\n onChange = _this$props5.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.forEach(function (group) {\n group.collapsed = collapsed;\n });\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupSetup\", function (group, props) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n key: group.id,\n id: group.id,\n name: group.name,\n prefix: \"\".concat(_this.props.name, \"[\").concat(props.index, \"]\"),\n fields: group.fields,\n collapsed: group.collapsed,\n context: 'metabox'\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n return [_components_field__WEBPACK_IMPORTED_MODULE_15__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n key: field.id,\n id: field.id,\n name: \"\".concat(groupProps.prefix, \"[\").concat(field.name, \"]\")\n })];\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ComplexField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props6 = this.props,\n value = _this$props6.value,\n children = _this$props6.children;\n var allGroupsAreCollapsed = value.every(function (_ref) {\n var collapsed = _ref.collapsed;\n return collapsed;\n });\n return children({\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withSelect\"])(function (select, props) {\n var _select = select('carbon-fields/metaboxes'),\n getComplexGroupValues = _select.getComplexGroupValues;\n\n var groupValues = props.value.map(function (group) {\n var fieldIds = group.fields.map(function (field) {\n return field.id;\n });\n return [group.name, getComplexGroupValues(fieldIds)];\n });\n return {\n groupValues: groupValues\n };\n});\nvar applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n addFields = _dispatch.addFields,\n cloneFields = _dispatch.cloneFields,\n removeFields = _dispatch.removeFields;\n\n return {\n addFields: addFields,\n cloneFields: cloneFields,\n removeFields: removeFields\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"addFilter\"])('carbon-fields.complex.metabox', 'carbon-fields/metaboxes', function (OriginalComplexField) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[\"compose\"])(applyWithSelect, applyWithDispatch)(function (props) {\n var id = props.id,\n field = props.field,\n name = props.name,\n value = props.value,\n groupValues = props.groupValues;\n return __webpack_provided_wp_dot_element.createElement(ComplexField, props, function (_ref2) {\n var allGroupsAreCollapsed = _ref2.allGroupsAreCollapsed,\n handleGroupSetup = _ref2.handleGroupSetup,\n handleGroupFieldSetup = _ref2.handleGroupFieldSetup,\n handleAddGroup = _ref2.handleAddGroup,\n handleCloneGroup = _ref2.handleCloneGroup,\n handleRemoveGroup = _ref2.handleRemoveGroup,\n handleToggleGroup = _ref2.handleToggleGroup,\n handleToggleAllGroups = _ref2.handleToggleAllGroups;\n return __webpack_provided_wp_dot_element.createElement(OriginalComplexField, {\n groupIdKey: \"id\",\n groupFilterKey: \"name\",\n id: id,\n field: field,\n name: name,\n value: value,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n });\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/complex/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/field */ \"./packages/metaboxes/components/field/index.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n field = _this$props.field,\n value = _this$props.value,\n addFields = _this$props.addFields,\n onChange = _this$props.onChange; // Create a copy of the group to prevent\n // incidentally modifications.\n\n group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group); // Get a flat list of all fields for this group.\n\n var fields = [];\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n group.container_id = field.container_id;\n group.fields = group.fields.map(function (groupField) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(groupField, field.container_id, fields);\n }); // Make sure that the group is expanded even\n // `set_collapsed(true)` is used.\n\n group.collapsed = false; // Push the group to the field.\n\n addFields(fields);\n onChange(id, value.concat(group));\n callback(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n cloneFields = _this$props2.cloneFields,\n onChange = _this$props2.onChange;\n var originFieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n var cloneFieldIds = originFieldIds.map(function () {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n });\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group);\n clonedGroup.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n clonedGroup.fields.forEach(function (groupField, index) {\n groupField.id = cloneFieldIds[index];\n });\n cloneFields(originFieldIds, cloneFieldIds);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.splice(value.indexOf(group) + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n removeFields = _this$props3.removeFields,\n onChange = _this$props3.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"without\"])(value, group)); // Delay removal of fields because React will complain\n // about missing objects.\n // TODO: Investigate why this is necessary.\n\n setTimeout(function () {\n var fieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n removeFields(fieldIds);\n }, 1);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleGroup\", function (groupId) {\n var _this$props4 = _this.props,\n field = _this$props4.field,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"find\"])(draft, ['id', groupId]);\n group.collapsed = !group.collapsed;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleAllGroups\", function (collapsed) {\n var _this$props5 = _this.props,\n field = _this$props5.field,\n value = _this$props5.value,\n onChange = _this$props5.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.forEach(function (group) {\n group.collapsed = collapsed;\n });\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupSetup\", function (group, props) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n id: group.id,\n name: group.name,\n prefix: \"\".concat(_this.props.name, \"[\").concat(props.index, \"]\"),\n fields: group.fields,\n collapsed: group.collapsed,\n context: 'metabox'\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n return [_components_field__WEBPACK_IMPORTED_MODULE_15__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n key: field.id,\n id: field.id,\n containerId: _this.props.containerId,\n name: \"\".concat(groupProps.prefix, \"[\").concat(field.name, \"]\")\n })];\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ComplexField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props6 = this.props,\n value = _this$props6.value,\n children = _this$props6.children;\n var allGroupsAreCollapsed = value.every(function (_ref) {\n var collapsed = _ref.collapsed;\n return collapsed;\n });\n return children({\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withSelect\"])(function (select, props) {\n var _select = select('carbon-fields/metaboxes'),\n getComplexGroupValues = _select.getComplexGroupValues;\n\n var groupValues = props.value.map(function (group) {\n var fieldIds = group.fields.map(function (field) {\n return field.id;\n });\n return [group.name, getComplexGroupValues(fieldIds)];\n });\n return {\n groupValues: groupValues\n };\n});\nvar applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n addFields = _dispatch.addFields,\n cloneFields = _dispatch.cloneFields,\n removeFields = _dispatch.removeFields;\n\n return {\n addFields: addFields,\n cloneFields: cloneFields,\n removeFields: removeFields\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"addFilter\"])('carbon-fields.complex.metabox', 'carbon-fields/metaboxes', function (OriginalComplexField) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[\"compose\"])(applyWithSelect, applyWithDispatch)(function (props) {\n var id = props.id,\n field = props.field,\n name = props.name,\n value = props.value,\n groupValues = props.groupValues;\n return __webpack_provided_wp_dot_element.createElement(ComplexField, props, function (_ref2) {\n var allGroupsAreCollapsed = _ref2.allGroupsAreCollapsed,\n handleGroupSetup = _ref2.handleGroupSetup,\n handleGroupFieldSetup = _ref2.handleGroupFieldSetup,\n handleAddGroup = _ref2.handleAddGroup,\n handleCloneGroup = _ref2.handleCloneGroup,\n handleRemoveGroup = _ref2.handleRemoveGroup,\n handleToggleGroup = _ref2.handleToggleGroup,\n handleToggleAllGroups = _ref2.handleToggleAllGroups;\n return __webpack_provided_wp_dot_element.createElement(OriginalComplexField, {\n groupIdKey: \"id\",\n groupFilterKey: \"name\",\n id: id,\n field: field,\n name: name,\n value: value,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n });\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/complex/index.js?"); /***/ }), @@ -618,7 +619,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./multiselect */ \"./packages/metaboxes/fields/multiselect/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./association */ \"./packages/metaboxes/fields/association/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./multiselect */ \"./packages/metaboxes/fields/multiselect/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/index.js?"); /***/ }), @@ -711,7 +712,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.field.container_id)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"fromSelector\"])(getFieldsByContainerId, props.field.container_id)), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.field.container_id);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(fields, function (field) {\n return field.container_id === props.field.container_id && Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-conditional-logic/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.containerId)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"fromSelector\"])(getFieldsByContainerId, props.containerId)), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.containerId);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(fields, function (field) {\n return field.container_id === props.containerId && Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-conditional-logic/index.js?"); /***/ }), @@ -1171,18 +1172,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ }), -/***/ "./packages/metaboxes/utils/from-ajax-event.js": -/*!*****************************************************!*\ - !*** ./packages/metaboxes/utils/from-ajax-event.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return fromAjaxEvent; });\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-create */ \"./node_modules/callbag-create/index.js\");\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(callbag_create__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\nfunction fromAjaxEvent(eventName, action) {\n return callbag_create__WEBPACK_IMPORTED_MODULE_0___default()(function (sink) {\n // Emit the AJAX event through the channel.\n var _ref = function _ref(event, xhr, settings, data) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isString\"])(settings.data) && settings.data.indexOf(action) > -1) {\n sink(1, {\n event: event,\n xhr: xhr,\n settings: settings,\n data: data\n });\n }\n },\n handler = _ref.handler; // Cancel the subscription.\n\n\n var unsubscribe = function unsubscribe() {\n window.jQuery(document).off(eventName, {\n handler: handler\n });\n }; // Setup the subscription.\n\n\n window.jQuery(document).on(eventName, {\n handler: handler\n });\n return unsubscribe;\n });\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/from-ajax-event.js?"); - -/***/ }), - /***/ "./packages/metaboxes/utils/from-event-pattern.js": /*!********************************************************!*\ !*** ./packages/metaboxes/utils/from-event-pattern.js ***! @@ -1207,6 +1196,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ }), +/***/ "./packages/metaboxes/utils/strip-compact-input-prefix.js": +/*!****************************************************************!*\ + !*** ./packages/metaboxes/utils/strip-compact-input-prefix.js ***! + \****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return stripCompactInputPrefix; });\n/**\n * Removes the prefix used to compact the input of Carbon Fields.\n *\n * @param {string} str\n * @return {string}\n */\nfunction stripCompactInputPrefix(str) {\n var _window$cf$config = window.cf.config,\n compactInput = _window$cf$config.compactInput,\n compactInputKey = _window$cf$config.compactInputKey;\n\n if (!compactInput || str.indexOf(compactInputKey) !== 0) {\n return str;\n }\n\n return str.replace(new RegExp(\"^\".concat(compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1');\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/strip-compact-input-prefix.js?"); + +/***/ }), + /***/ "./packages/metaboxes/utils/urldecode.js": /*!***********************************************!*\ !*** ./packages/metaboxes/utils/urldecode.js ***! diff --git a/build/classic/metaboxes.min.css b/build/classic/metaboxes.min.css index d7aa7c483..992c10cbd 100644 --- a/build/classic/metaboxes.min.css +++ b/build/classic/metaboxes.min.css @@ -1 +1 @@ -.postbox .cf-complex__inserter-menu{margin:0;border-radius:3px;background-color:#191e23}.postbox .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-color:transparent #191e23;border-style:solid;border-width:5px 5px 5px 0;margin-top:-5px;content:""}.postbox .cf-complex__inserter-item{font-weight:600;color:#fff;transition:color .1s linear}.postbox .cf-complex__inserter-item:hover{color:#00a0d2}.postbox .cf-complex__tabs-item,.postbox .cf-complex__tabs .cf-complex__inserter-button{font-weight:600;color:#23282d}.postbox .cf-field{flex:1 1 100%;padding:12px;border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.postbox .cf-field__label{padding-bottom:5px;font-weight:600;color:#23282d}.cf-field__help{display:inline-block;color:#666;margin-top:10px}.postbox .cf-multiselect__control{border-color:#ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.postbox .cf-multiselect__control--is-focused,.postbox .cf-multiselect__control--is-focused:hover{box-shadow:0 0 2px rgba(0,115,170,.8)}.postbox .cf-media-gallery__inner{border:1px solid #e2e4e7}.postbox .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__actions{padding-left:0}.cf-container-term-meta .cf-media-gallery__list{margin:0 -8px;max-height:285px}.cf-container-term-meta .cf-media-gallery__item{flex-basis:20%}.cf-container-term-meta .cf-media-gallery__item-inner,.postbox .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__item-preview,.postbox .cf-media-gallery__item-preview{background-color:#f3f4f5}.cf-container-term-meta .cf-media-gallery__item-name,.postbox .cf-media-gallery__item-name{border-top:1px solid #e2e4e7;background-color:#f3f4f5}.inside .cf-radio-image .cf-radio__input:focus~.cf-radio__label{box-shadow:0 0 2px rgba(0,160,210,.8)}.inside .cf-radio-image__image{border:1px solid #b5bcc2}.inside .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.inside .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-container-widget .cf-field{margin:1em 0 .2em}.cf-container-term-meta{margin-bottom:13px}.carbon-table-row .cf-container-term-meta{margin-bottom:0}.cf-container-term-meta .cf-field{margin-top:13px}.cf-container-term-meta .cf-field:first-child{margin-top:0}.carbon-table-row .cf-field__head{position:absolute;left:0;font-weight:600}.carbon-table-row .cf-field__body{width:95%}.carbon-network #post-body.columns-2 #postbox-container-1.fixed,.carbon-theme-options #post-body.columns-2 #postbox-container-1.fixed{position:fixed;right:0;margin-right:20px}.cf-container-user-meta{max-width:600px}.carbon-box.hide-if-js:not([hidden]){display:block}#poststuff .carbon-box .inside,.carbon-box .inside{padding:0;margin:0}.cf-container__fields{display:flex;flex-wrap:wrap;margin:-1px -1px 0 0}.cf-container__fields[hidden]{display:none}.block-editor .cf-container__fields{border-left:1px solid #e2e4e7}.cf-container__tabs{position:relative;z-index:1;padding:12px 12px 0;border-bottom:1px solid #e2e4e7;background-color:#fbfbfc}.cf-container__tabs-list{display:flex;flex-wrap:wrap;margin:0 0 -1px}.cf-container__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0 8px 0 0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-container__tabs-item:hover{background-color:#fff}.cf-container__tabs-item--current{background-color:#fff;border-bottom-color:#fff} \ No newline at end of file +.postbox .cf-complex__inserter-menu{margin:0;border-radius:3px;background-color:#191e23}.postbox .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-color:transparent #191e23;border-style:solid;border-width:5px 5px 5px 0;margin-top:-5px;content:""}.postbox .cf-complex__inserter-item{font-weight:600;color:#fff;transition:color .1s linear}.postbox .cf-complex__inserter-item:hover{color:#00a0d2}.postbox .cf-complex__tabs-item,.postbox .cf-complex__tabs .cf-complex__inserter-button{font-weight:600;color:#23282d}.cf-container .cf-field{flex:1 1 100%;padding:12px;border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.cf-container-user-meta .cf-container__fields>.cf-field>.cf-field__head,.term-php .cf-container__fields>.cf-field>.cf-field__head{position:absolute;left:0;font-weight:600}.cf-container .cf-field__label{padding-bottom:5px;font-weight:600;color:#23282d}.cf-container-term-meta .cf-field__label,.cf-container-user-meta .cf-field__label{margin:0!important}.cf-field__help{display:inline-block;color:#666;margin-top:10px}.postbox .cf-multiselect__control{border-color:#ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.postbox .cf-multiselect__control--is-focused,.postbox .cf-multiselect__control--is-focused:hover{box-shadow:0 0 2px rgba(0,115,170,.8)}.postbox .cf-media-gallery__inner{border:1px solid #e2e4e7}.postbox .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__actions{padding-left:0}.cf-container-term-meta .cf-media-gallery__list{margin:0 -8px;max-height:285px}.cf-container-term-meta .cf-media-gallery__item{flex-basis:20%}.cf-container-term-meta .cf-media-gallery__item-inner,.postbox .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__item-preview,.postbox .cf-media-gallery__item-preview{background-color:#f3f4f5}.cf-container-term-meta .cf-media-gallery__item-name,.postbox .cf-media-gallery__item-name{border-top:1px solid #e2e4e7;background-color:#f3f4f5}.inside .cf-radio-image .cf-radio__input:focus~.cf-radio__label{box-shadow:0 0 2px rgba(0,160,210,.8)}.inside .cf-radio-image__image{border:1px solid #b5bcc2}.inside .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.inside .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-container-widget .cf-field{margin:1em 0 .2em}.carbon-network #post-body.columns-2 #postbox-container-1.fixed,.carbon-theme-options #post-body.columns-2 #postbox-container-1.fixed{position:fixed;right:0;margin-right:20px}.cf-container-user-meta{max-width:600px}.carbon-box.hide-if-js:not([hidden]){display:block}#poststuff .carbon-box .inside,.carbon-box .inside{padding:0;margin:0}.cf-container__fields{display:flex;flex-wrap:wrap;margin:-1px -1px 0 0;background-color:#fff}.cf-container__fields[hidden]{display:none}.block-editor .cf-container__fields{border-left:1px solid #e2e4e7}.cf-container-term-meta .cf-container__fields,.cf-container-user-meta .cf-container__fields{border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;margin:0}.cf-container__tabs{position:relative;z-index:1;padding:12px 12px 0;border-bottom:1px solid #e2e4e7;background-color:#fbfbfc}.cf-container__tabs-list{display:flex;flex-wrap:wrap;margin:0 0 -1px}.cf-container__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0 8px 0 0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-container__tabs-item:hover{background-color:#fff}.cf-container__tabs-item--current{background-color:#fff;border-bottom-color:#fff} \ No newline at end of file diff --git a/build/classic/metaboxes.min.js b/build/classic/metaboxes.min.js index 6c54319a5..b2cc86043 100644 --- a/build/classic/metaboxes.min.js +++ b/build/classic/metaboxes.min.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=66)}([function(e,t){e.exports=cf.vendor.lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=cf.vendor["@wordpress/data"]},function(e,t){e.exports=cf.vendor["@wordpress/hooks"]},function(e,t){e.exports=cf.core},function(e,t){e.exports=cf.vendor["@wordpress/i18n"]},function(e,t,n){var r=n(9);e.exports=function(e){for(var t=1;t(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=cf.vendor.classnames},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return c});var r=n(4),o=Object(r.createRegistry)("container",["classic","gutenberg"]),i=o.registerContainerType,c=o.getContainerType},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return l});var r=n(7),o=n(34),i=n(38),c=n(39),a=n(37),u=n(20),s=n(17);function l(t){var n=window.cf.config.pagenow;Object(r.render)(e.createElement(r.Fragment,null,!Object(u.a)()&&e.createElement(o.a,null),(n===s.d||n===s.c)&&e.createElement(c.a,null),e.createElement(i.a,{context:t})),document.createElement("div"));var l=document.querySelector("#poststuff");l&&Object(r.render)(e.createElement(a.a,null),l.appendChild(document.createElement("div")))}}).call(this,n(7))},function(e,t,n){"use strict";var r=n(13),o=n(2),i=n(4);t.a=Object(r.withEffects)(function(){return Object(i.fromSelector)(Object(o.select)("carbon-fields/metaboxes").isSavingLocked)},{handler:function(){return function(e){document.querySelectorAll('\n\t\t\t#publishing-action input#publish,\n\t\t\t#publishing-action input#save,\n\t\t\t#addtag input#submit,\n\t\t\t#edittag input[type="submit"],\n\t\t\t#your-profile input#submit\n\t\t').forEach(function(t){t.disabled=e})}}})(function(){return null})},function(e,t){e.exports=(e=>t=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),i=n(24),c=n.n(i),a=n(25),u=n.n(a),s=n(26),l=n.n(s),d=n(27),f=n.n(d),p=n(28),b=n.n(p),m=n(8),v=n.n(m),O=n(9),j=n.n(O),g=n(31),y=n.n(g),h=n(7),_=n(0),w=n(4),E=(n(65),n(29)),x=function(t){function n(){var e,t;c()(this,n);for(var r=arguments.length,o=new Array(r),i=0;it=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})},m=n(14),v=n(4);function O(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function j(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function g(e){for(var t=[],n=e,r=j(e);r>0&&n;)if(j(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var y={post_ancestors:[],post_parent_id:0,post_level:1};function h(e){var t=e.options[e.selectedIndex];return{post_ancestors:g(t),post_parent_id:O(t),post_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return h(e.target)}),b(h(e))):Object(p.a)(y)}),Object(u.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(l.pipe)(Object(l.combine)(Object(v.fromSelector)(Object(o.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"parent")),Object(m.a)(s.isEqual),Object(l.map)(function(e){var r=f()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return y;var a=t(i);if(!Object(s.get)(a,["hierarchical"],!1))return y;var u=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(s.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:u,post_parent_id:c,post_level:u.length+1}}))});var _=n(35),w=n.n(_),E=(e,t,n)=>w()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),x={post_format:"standard"};function S(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(u.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(l.pipe)(E(e,"input.post-format","change"),Object(l.map)(function(e){return S(e.target)}),b(S(e.querySelector("input.post-format:checked")))):Object(p.a)(x)}),Object(u.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"format"),Object(m.a)(),Object(l.filter)(Boolean),Object(l.map)(function(e){return{post_format:e}}),b(x))});var F={post_template:""};function I(e){return{post_template:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return I(e.target)}),b(I(e))):Object(p.a)(F)}),Object(u.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"template"),Object(m.a)(),Object(l.filter)(s.isString),Object(l.map)(function(e){return{post_template:e}}),b(F))});var T=n(6),C=n.n(T),A=n(9),D=n.n(A),N=n(16),k=n.n(N);function G(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(G(window.tagBox,"parseTags"),G(window.tagBox,"flushTags")),Object(u.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(l.pipe)(l.merge.apply(void 0,k()((e=document.querySelectorAll('div[id^="taxonomy-"]'),k()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(l.pipe)(E(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(l.scan)(function(e,n){var r=n.target;return a()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(s.pull)(e[t],n)})},D()({},t,[])),b(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return k()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},D()({},e,[]))}(t)))}))).concat(k()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return k()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(l.pipe)(Object(l.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(l.map)(function(e){var n=e.target;return D()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),b(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return D()({},e,n)}(t)))})}()))),Object(l.scan)(function(e,t){return{post_term:C()({},e.post_term,t)}},{post_term:{}}));var e}),Object(u.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core").getTaxonomies,t=Object(o.select)("core/editor").getEditedPostAttribute;return Object(l.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(l.filter)(Boolean),Object(l.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(s.fromPairs)(n)}}))});var L={term_ancestors:[],term_parent:0,term_level:1};function P(e){var t=e.options[e.selectedIndex];return{term_ancestors:g(t),term_parent:O(t),term_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return P(e.target)}),b(P(e))):Object(p.a)(L)});var V={user_role:""};function B(e){return{user_role:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return t?Object(p.a)({user_role:t.dataset.profileRole}):Object(p.a)(V)}return Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return B(e.target)}),b(B(e)))});var R=n(7),q=n(5),U=n(21),M={operators:[],isOperatorSupported:function(e){return this.operators.indexOf(e)>-1},evaluate:function(){return!1}},Q={comparers:[C()({},M,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),C()({},M,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),C()({},M,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(s.intersection)(e,n).length;default:return!1}}}),H={boolean:K,post_term:$,post_ancestor_id:C()({},Q,{comparers:[W,z],getEnvironmentValue:function(e,t){return Object(s.get)(t,"post_ancestors",[])}}),post_parent_id:Q,post_level:Q,post_format:Q,post_template:Q,term_level:Q,term_parent:C()({},Q,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:C()({},Q,{comparers:[W,z],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(s.get)(t,"term_ancestors",[])}}),user_role:Q},J=Object(o.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),X=Object(i.withEffects)(function(e,t){var n=t.context,r=Object(u.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(u.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(u.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),c=Object(u.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),d=Object(u.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),f=Object(u.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(l.pipe)(Object(l.merge)(r,o,i,c,d,f),Object(l.scan)(function(e,t){return a()(e,function(e){Object(s.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(s.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(s.get)(H,t.type);return r?r.isFulfiled(t,n):(console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=f()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o));c&&(c.hidden=!i),a&&(i&&!a.dataset.mounted&&(a.dataset.mounted=!0,Object(U.b)(t[o],n)),!i&&a.dataset.mounted&&(delete a.dataset.mounted,Object(R.unmountComponentAtNode)(a)))})}}});t.a=Object(r.compose)(J,X)(function(){return null})},function(e,t,n){"use strict";var r=n(2),o=n(7),i=n(0),c=n(13),a=n(1);function u(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var s=n(18),l=n(30),d=n.n(l);function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n-1}t.a=Object(c.withEffects)(function(){return Object(a.merge)(Object(a.pipe)(f(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(a.filter)(function(e){return m(e.$widget[0].id)}),Object(a.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(a.pipe)(f(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(a.filter)(function(e){var t=e.data;return Object(i.startsWith)(t,"deleted:")&&m(t)}),Object(a.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(r.select)("carbon-fields/metaboxes").getContainerById,n=Object(r.dispatch)("carbon-fields/metaboxes"),c=n.addContainer,a=n.removeContainer,l=n.addFields,d=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var f,m=e.payload,v=m.event,O=m.$widget,j=Object(i.flow)(u,JSON.parse)(O.find("[data-json]").data("json")),g=[];if("widget-updated"===v.type&&(f=t(j.id).fields.map(function(e){return e.id})),j.fields=j.fields.map(function(e){return Object(s.a)(e,j,g)}),l(g),c(j),"widget-updated"===v.type&&d(f),Object(p.b)(j,"classic"),window.cf.config.pagenow===b.c&&"widget-added"===v.type){var y=O.find('[name="widget-id"]').val();O.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(y).liveUpdateMode=!1}break;case"WIDGET_DELETED":var h=e.payload.data.replace("deleted:",""),w="".concat(b.a).concat(h),E=t(w);Object(o.unmountComponentAtNode)(document.querySelector(".container-".concat(w)));var x=_.map(E.fields,"id");a(w),d(x)}}}})(function(){return null})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";(function(e){var t=n(24),r=n.n(t),o=n(25),i=n.n(o),c=n(26),a=n.n(c),u=n(27),s=n.n(u),l=n(28),d=n.n(l),f=n(8),p=n.n(f),b=n(9),m=n.n(b),v=n(10),O=n.n(v),j=n(7),g=n(3),y=n(11),h=n(2),_=n(0),w=n(4),E=(n(46),n(29)),x=n(18),S=function(e){function t(){var e,n;r()(this,t);for(var o=arguments.length,i=new Array(o),c=0;c0&&n.toggleClass("fixed",e>=o).css("top",r)}}}))},function(e,t,n){},function(e,t,n){"use strict";n(64)},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupState",function(){return v}),n.d(r,"updateState",function(){return O}),n.d(r,"updateFieldValue",function(){return j}),n.d(r,"addFields",function(){return g}),n.d(r,"cloneFields",function(){return y}),n.d(r,"removeFields",function(){return h}),n.d(r,"addContainer",function(){return _}),n.d(r,"removeContainer",function(){return w}),n.d(r,"receiveSidebar",function(){return E}),n.d(r,"lockSaving",function(){return x}),n.d(r,"unlockSaving",function(){return S});var o={};n.r(o),n.d(o,"getContainers",function(){return F}),n.d(o,"getContainerById",function(){return I}),n.d(o,"getFields",function(){return T}),n.d(o,"getFieldsByContainerId",function(){return C}),n.d(o,"getFieldById",function(){return A}),n.d(o,"isSavingLocked",function(){return D}),n.d(o,"isDirty",function(){return N}),n.d(o,"getComplexGroupValues",function(){return k});var i=n(5),c=n(2),a=n(0),u=n(9),s=n.n(u),l=n(6),d=n.n(l),f=n(10),p=n.n(f),b=n(4),m=Object(c.combineReducers)({containers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return p()(e,function(e){Object(a.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return p()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(a.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return p()(e,function(e){Object(a.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return p()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return p()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return p()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(a.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(b.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(b.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(a.assign)(e,Object(a.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(a.omit)(e,n);case"RECEIVE_SIDEBAR":return p()(e,function(e){Object(a.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return d()({},e,s()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(a.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function v(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function O(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function g(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function y(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function h(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function _(e){return{type:"ADD_CONTAINER",payload:e}}function w(e){return{type:"REMOVE_CONTAINER",payload:e}}function E(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function x(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function S(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function F(e){return e.containers}function I(e,t){return e.containers[t]}function T(e){return e.fields}function C(e,t){return Object(a.filter)(e.fields,["container_id",t])}function A(e,t){return e.fields[t]}function D(e){return Object.keys(e.savingLock).length>0}function N(e){return e.isDirty}function k(e,t){var n=Object(a.pick)(T(e),t);return n=Object(a.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(a.mapValues)(n,function(e){return e.value})}var G=n(22);Object(c.registerStore)("carbon-fields/metaboxes",{reducer:m,actions:r,selectors:o});var L=Object(G.a)(Object(a.get)(window.cf,"preloaded.containers",[])),P=L.containers,V=L.fields;Object(c.dispatch)("carbon-fields/metaboxes").setupState(Object(a.keyBy)(P,"id"),Object(a.keyBy)(V,"id"));var B=n(11),R=n(3),q=n(23),U=n(19),M=n.n(U),Q=n(12),K=n(14),W=n(1);function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Object(a.pick)(t,Object(a.difference)(Object(a.map)(e.fields,"id"),n))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(a.map)(e,function(e){return[e.id,"".concat(Object(a.repeat)("parent.",t)).concat(e.base_name)]})}var H=Object(b.withConditionalLogic)(function(e){var t=Object(c.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(W.pipe)(Object(W.merge)(Object(Q.a)(t(e.field.container_id)),Object(b.fromSelector)(t,e.field.container_id)),Object(K.a)(a.isEqual))},function(e,t){t=Object(a.keyBy)(t,"id");var n=Object(c.select)("carbon-fields/metaboxes").getContainerById(e.field.container_id),r=[];if(Object(a.some)(n.fields,["id",e.id]))r=z(r=$(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(a.find)(t,function(t){return t.container_id===e.field.container_id&&Object(a.startsWith)(o,t.name)}),u=o.split(/\[|\]/g);u.shift(),(u=u.filter(function(e){return""!==e})).pop();var s=u.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=z(r=$(n,t,[i.id]),s+1);for(var l="".concat(i.id,".value");u.length>0;){var d=u.shift(),f=!isNaN(d),p=!f;if(f){l="".concat(l,"[").concat(d,"]");var b=$(Object(a.get)(t,l),t,[e.id]);r=r.concat(z(b,s)),l="".concat(l,".fields")}if(p){var m=Object(a.find)(Object(a.get)(t,l),["name",d]);l="".concat(m.id,".value"),s--}}}return r=r.map(function(e){var n=M()(e,2),r=n[0];return[n[1],Object(a.get)(t,"".concat(r,".value"))]}),Object(a.fromPairs)(r)}),J=n(20);n(43),n(48),n(49),n(50),n(51),n(52),n(54),Object(R.addFilter)("carbon-fields.sidebar.metabox","carbon-fields/metaboxes",Object(c.withDispatch)(function(e){return{onAdded:e("carbon-fields/metaboxes").receiveSidebar}})),Object(R.addFilter)("carbon-fields.field-edit.metabox","carbon-fields/metaboxes",Object(B.compose)(q.a,H,Object(c.withDispatch)(function(e){if(Object(J.a)()){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}var n=e("carbon-fields/metaboxes");return{lockSaving:n.lockSaving,unlockSaving:n.unlockSaving}}),b.withValidation));var X=n(33),Y=n(21);Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var Z=Object(J.a)()?"gutenberg":"classic";Object(Y.a)(Z),Object(X.a)(Z)},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(3),c=n(2),a=n(13),u=n(1),s=n(30),l=n.n(s),d=n(22);n(60),Object(i.addFilter)("carbon-fields.term_meta.classic","carbon-fields/metaboxes",Object(a.withEffects)(function(){return Object(u.pipe)((e="ajaxSuccess","add-tag",l()(function(t){var n=function(e,n,o,i){Object(r.isString)(o.data)&&o.data.indexOf("add-tag")>-1&&t(1,{event:e,xhr:n,settings:o,data:i})}.handler;return window.jQuery(document).on(e,{handler:n}),function(){window.jQuery(document).off(e,{handler:n})}})),Object(u.filter)(function(e){var t=e.settings,n=e.data;return t.data.indexOf("carbon_fields_container")>-1&&!n.documentElement.querySelector("wp_error")}));var e},{handler:function(e){return function(){var t=o.a.map(e.container.fields,"id"),n=Object(d.a)(o.a.get(window.cf,"preloaded.containers",[])),r=n.containers,i=n.fields,a=o.a.find(r,["id",e.id]),u=o.a.filter(i,["container_id",e.id]),s=Object(c.dispatch)("carbon-fields/metaboxes"),l=s.updateState,f=s.removeFields;l(o.a.keyBy([a],"id"),o.a.keyBy(u,"id")),f(t)}}}))},function(e,t,n){"use strict";var r=n(11),o=n(3),i=n(4),c=n(2),a=Object(r.createHigherOrderComponent)(function(e){return Object(c.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(o.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(r.compose)(a,Object(i.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)})}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=67)}([function(e,t){e.exports=cf.vendor.lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=cf.vendor["@wordpress/data"]},function(e,t){e.exports=cf.vendor["@wordpress/hooks"]},function(e,t){e.exports=cf.core},function(e,t){e.exports=cf.vendor["@wordpress/i18n"]},function(e,t,n){var r=n(9);e.exports=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;nt=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const c=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,c),o=e((e,t)=>{r||0===e||(n(e,t),c(e))})})},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),c=n(25),i=n.n(c),a=n(26),u=n.n(a),s=n(27),l=n.n(s),d=n(28),f=n.n(d),p=n(29),b=n.n(p),m=n(8),v=n.n(m),O=n(9),j=n.n(O),g=n(31),y=n.n(g),h=n(7),_=n(0),w=n(4),E=(n(66),n(30)),x=function(t){function n(){var t,r;i()(this,n);for(var o=arguments.length,c=new Array(o),a=0;at=>(n,r)=>{if(0!==n)return;let o,c,i=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(c=[1,n]),2===t&&(i=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());i||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(c&&(o(...c),c=null));r(e,t)})},m=n(14),v=n(4);function O(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function j(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function g(e){for(var t=[],n=e,r=j(e);r>0&&n;)if(j(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var y={post_ancestors:[],post_parent_id:0,post_level:1};function h(e){var t=e.options[e.selectedIndex];return{post_ancestors:g(t),post_parent_id:O(t),post_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return h(e.target)}),b(h(e))):Object(p.a)(y)}),Object(u.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(l.pipe)(Object(l.combine)(Object(v.fromSelector)(Object(o.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"parent")),Object(m.a)(s.isEqual),Object(l.map)(function(e){var r=f()(e,3),o=r[0],c=r[1],i=r[2];if(i=parseInt(i,10),isNaN(i))return y;var a=t(c);if(!Object(s.get)(a,["hierarchical"],!1))return y;var u=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(s.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(i,n("postType",c,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:u,post_parent_id:i,post_level:u.length+1}}))});var _=n(35),w=n.n(_),E=(e,t,n)=>w()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let c=!1;const i=e=>{o(1,e)};o(0,r=>{2===r&&(c=!0,e.removeEventListener(t,i,n))}),c||e.addEventListener(t,i,n)})(e,n)),x={post_format:"standard"};function S(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(u.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(l.pipe)(E(e,"input.post-format","change"),Object(l.map)(function(e){return S(e.target)}),b(S(e.querySelector("input.post-format:checked")))):Object(p.a)(x)}),Object(u.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"format"),Object(m.a)(),Object(l.filter)(Boolean),Object(l.map)(function(e){return{post_format:e}}),b(x))});var I={post_template:""};function F(e){return{post_template:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return F(e.target)}),b(F(e))):Object(p.a)(I)}),Object(u.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"template"),Object(m.a)(),Object(l.filter)(s.isString),Object(l.map)(function(e){return{post_template:e}}),b(I))});var T=n(6),C=n.n(T),A=n(9),D=n.n(A),N=n(16),k=n.n(N);function G(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(G(window.tagBox,"parseTags"),G(window.tagBox,"flushTags")),Object(u.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(l.pipe)(l.merge.apply(void 0,k()((e=document.querySelectorAll('div[id^="taxonomy-"]'),k()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(l.pipe)(E(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(l.scan)(function(e,n){var r=n.target;return a()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(s.pull)(e[t],n)})},D()({},t,[])),b(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return k()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},D()({},e,[]))}(t)))}))).concat(k()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return k()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(l.pipe)(Object(l.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(l.map)(function(e){var n=e.target;return D()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),b(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return D()({},e,n)}(t)))})}()))),Object(l.scan)(function(e,t){return{post_term:C()({},e.post_term,t)}},{post_term:{}}));var e}),Object(u.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core").getTaxonomies,t=Object(o.select)("core/editor").getEditedPostAttribute;return Object(l.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(l.filter)(Boolean),Object(l.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(s.fromPairs)(n)}}))});var L={term_ancestors:[],term_parent:0,term_level:1};function P(e){var t=e.options[e.selectedIndex];return{term_ancestors:g(t),term_parent:O(t),term_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return P(e.target)}),b(P(e))):Object(p.a)(L)});var R={user_role:""};function V(e){return{user_role:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return t?Object(p.a)({user_role:t.dataset.profileRole}):Object(p.a)(R)}return Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return V(e.target)}),b(V(e)))});var B=n(7),q=n(5),U=n(21),M={operators:[],isOperatorSupported:function(e){return this.operators.indexOf(e)>-1},evaluate:function(){return!1}},Q={comparers:[C()({},M,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),C()({},M,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),C()({},M,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(s.intersection)(e,n).length;default:return!1}}}),H={boolean:K,post_term:$,post_ancestor_id:C()({},Q,{comparers:[W,z],getEnvironmentValue:function(e,t){return Object(s.get)(t,"post_ancestors",[])}}),post_parent_id:Q,post_level:Q,post_format:Q,post_template:Q,term_level:Q,term_parent:C()({},Q,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:C()({},Q,{comparers:[W,z],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(s.get)(t,"term_ancestors",[])}}),user_role:Q},J=Object(o.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),X=Object(c.withEffects)(function(e,t){var n=t.context,r=Object(u.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(u.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),c=Object(u.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),i=Object(u.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),d=Object(u.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),f=Object(u.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(l.pipe)(Object(l.merge)(r,o,c,i,d,f),Object(l.scan)(function(e,t){return a()(e,function(e){Object(s.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(s.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(s.get)(H,t.type);return r?r.isFulfiled(t,n):(console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=f()(e,2),o=r[0],c=r[1],i=document.getElementById(o),a=document.querySelector(".container-".concat(o));i&&(i.hidden=!c),a&&(c&&!a.dataset.mounted&&(a.dataset.mounted=!0,Object(U.b)(t[o],n)),!c&&a.dataset.mounted&&(delete a.dataset.mounted,Object(B.unmountComponentAtNode)(a)))})}}});t.a=Object(r.compose)(J,X)(function(){return null})},function(e,t,n){"use strict";var r=n(2),o=n(7),c=n(0),i=n(13),a=n(1);function u(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var s=n(18),l=n(22),d=n(21),f=n(17);function p(e){return e.indexOf(f.b)>-1}t.a=Object(i.withEffects)(function(){return Object(a.merge)(Object(a.pipe)(Object(l.a)(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(a.filter)(function(e){return p(e.$widget[0].id)}),Object(a.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(a.pipe)(Object(l.a)(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(a.filter)(function(e){var t=e.data;return Object(c.startsWith)(t,"deleted:")&&p(t)}),Object(a.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(r.select)("carbon-fields/metaboxes").getContainerById,n=Object(r.dispatch)("carbon-fields/metaboxes"),i=n.addContainer,a=n.removeContainer,l=n.addFields,p=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var b,m=e.payload,v=m.event,O=m.$widget,j=Object(c.flow)(u,JSON.parse)(O.find("[data-json]").data("json")),g=[];if("widget-updated"===v.type&&(b=t(j.id).fields.map(function(e){return e.id})),j.fields=j.fields.map(function(e){return Object(s.a)(e,j,g)}),l(g),i(j),"widget-updated"===v.type&&p(b),Object(d.b)(j,"classic"),window.cf.config.pagenow===f.c&&"widget-added"===v.type){var y=O.find('[name="widget-id"]').val();O.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(y).liveUpdateMode=!1}break;case"WIDGET_DELETED":var h=e.payload.data.replace("deleted:",""),w="".concat(f.a).concat(h),E=t(w);Object(o.unmountComponentAtNode)(document.querySelector(".container-".concat(w)));var x=_.map(E.fields,"id");a(w),p(x)}}}})(function(){return null})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";(function(e){var t=n(25),r=n.n(t),o=n(26),c=n.n(o),i=n(27),a=n.n(i),u=n(28),s=n.n(u),l=n(29),d=n.n(l),f=n(8),p=n.n(f),b=n(9),m=n.n(b),v=n(10),O=n.n(v),j=n(7),g=n(3),y=n(11),h=n(2),_=n(0),w=n(4),E=(n(47),n(30)),x=n(18),S=function(e){function t(){var e,n;r()(this,t);for(var o=arguments.length,c=new Array(o),i=0;i-1&&t.data.indexOf("add-tag")>-1&&!n.documentElement.querySelector("wp_error")}))},{handler:function(e){return function(){var t=o.a.map(e.container.fields,"id"),n=Object(l.a)(o.a.get(window.cf,"preloaded.containers",[])),r=n.containers,c=n.fields,a=o.a.find(r,["id",e.id]),u=o.a.filter(c,["container_id",e.id]),s=Object(i.dispatch)("carbon-fields/metaboxes"),d=s.updateState,f=s.removeFields;d(o.a.keyBy([a],"id"),o.a.keyBy(u,"id")),f(t)}}}))},function(e,t,n){"use strict";var r=n(3),o=n(13),c=n(1);n(63),Object(r.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(o.withEffects)(function(){return Object(c.pipe)(Object(c.fromEvent)(window,"scroll"),Object(c.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}}))},function(e,t,n){},function(e,t,n){"use strict";n(65)},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupState",function(){return v}),n.d(r,"updateState",function(){return O}),n.d(r,"updateFieldValue",function(){return j}),n.d(r,"addFields",function(){return g}),n.d(r,"cloneFields",function(){return y}),n.d(r,"removeFields",function(){return h}),n.d(r,"addContainer",function(){return _}),n.d(r,"removeContainer",function(){return w}),n.d(r,"receiveSidebar",function(){return E}),n.d(r,"lockSaving",function(){return x}),n.d(r,"unlockSaving",function(){return S});var o={};n.r(o),n.d(o,"getContainers",function(){return I}),n.d(o,"getContainerById",function(){return F}),n.d(o,"getFields",function(){return T}),n.d(o,"getFieldsByContainerId",function(){return C}),n.d(o,"getFieldById",function(){return A}),n.d(o,"isSavingLocked",function(){return D}),n.d(o,"isDirty",function(){return N}),n.d(o,"getComplexGroupValues",function(){return k});var c=n(5),i=n(2),a=n(0),u=n(9),s=n.n(u),l=n(6),d=n.n(l),f=n(10),p=n.n(f),b=n(4),m=Object(i.combineReducers)({containers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return p()(e,function(e){Object(a.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return p()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(a.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return p()(e,function(e){Object(a.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return p()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return p()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return p()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,c=r.reduce(function(t,n,r){return function e(t,n,r,o){var c=Object(a.cloneDeep)(r[t]);return c.id=n,"complex"===c.type&&c.value.forEach(function(t){t.id=Object(b.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,c=Object(b.uniqueId)();return n.id=c,e(o,c,r,t)},o)}),o.concat(c)}(n,o[r],e,t)},[]);Object(a.assign)(e,Object(a.keyBy)(c,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(a.omit)(e,n);case"RECEIVE_SIDEBAR":return p()(e,function(e){Object(a.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return d()({},e,s()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(a.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function v(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function O(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function g(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function y(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function h(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function _(e){return{type:"ADD_CONTAINER",payload:e}}function w(e){return{type:"REMOVE_CONTAINER",payload:e}}function E(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function x(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function S(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function I(e){return e.containers}function F(e,t){return e.containers[t]}function T(e){return e.fields}function C(e,t){return Object(a.filter)(e.fields,["container_id",t])}function A(e,t){return e.fields[t]}function D(e){return Object.keys(e.savingLock).length>0}function N(e){return e.isDirty}function k(e,t){var n=Object(a.pick)(T(e),t);return n=Object(a.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(a.mapValues)(n,function(e){return e.value})}var G=n(23);Object(i.registerStore)("carbon-fields/metaboxes",{reducer:m,actions:r,selectors:o});var L=Object(G.a)(Object(a.get)(window.cf,"preloaded.containers",[])),P=L.containers,R=L.fields;Object(i.dispatch)("carbon-fields/metaboxes").setupState(Object(a.keyBy)(P,"id"),Object(a.keyBy)(R,"id"));var V=n(11),B=n(3),q=n(24),U=n(19),M=n.n(U),Q=n(12),K=n(14),W=n(1);function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Object(a.pick)(t,Object(a.difference)(Object(a.map)(e.fields,"id"),n))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(a.map)(e,function(e){return[e.id,"".concat(Object(a.repeat)("parent.",t)).concat(e.base_name)]})}var H=Object(b.withConditionalLogic)(function(e){var t=Object(i.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(W.pipe)(Object(W.merge)(Object(Q.a)(t(e.containerId)),Object(b.fromSelector)(t,e.containerId)),Object(K.a)(a.isEqual))},function(e,t){t=Object(a.keyBy)(t,"id");var n=Object(i.select)("carbon-fields/metaboxes").getContainerById(e.containerId),r=[];if(Object(a.some)(n.fields,["id",e.id]))r=z(r=$(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),c=Object(a.find)(t,function(t){return t.container_id===e.containerId&&Object(a.startsWith)(o,t.name)}),u=o.split(/\[|\]/g);u.shift(),(u=u.filter(function(e){return""!==e})).pop();var s=u.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=z(r=$(n,t,[c.id]),s+1);for(var l="".concat(c.id,".value");u.length>0;){var d=u.shift(),f=!isNaN(d),p=!f;if(f){l="".concat(l,"[").concat(d,"]");var b=$(Object(a.get)(t,l),t,[e.id]);r=r.concat(z(b,s)),l="".concat(l,".fields")}if(p){var m=Object(a.find)(Object(a.get)(t,l),["name",d]);l="".concat(m.id,".value"),s--}}}return r=r.map(function(e){var n=M()(e,2),r=n[0];return[n[1],Object(a.get)(t,"".concat(r,".value"))]}),Object(a.fromPairs)(r)}),J=n(20);function X(e,t){return Object(a.find)(e,function(e){return 0===e.name.indexOf(t)})}Object(B.addFilter)("carbon-fields.association.metabox","carbon-fields/metaboxes",Object(b.withProps)(function(e){return{hierarchyResolver:function(){for(var t,n,r,o,c=Object(i.select)("carbon-fields/metaboxes").getFieldsByContainerId(e.containerId),u=(t=e.name,n=window.cf.config,r=n.compactInput,o=n.compactInputKey,r&&0===t.indexOf(o)?t.replace(new RegExp("^".concat(o,"\\[(.+?)\\]")),"$1"):t).split(/\[|\]/g),s=X(c,(u=u.filter(function(e){return""!==e})).shift()),l=c.indexOf(s),d=s.base_name;u.length>0;){var f=u.shift(),p=!isNaN(f),b=f===e.field.base_name,m=!p&&!b;if(p&&(l="".concat(l,".value.").concat(f,".name"),d="".concat(d,"[").concat(f,"]:").concat(Object(a.get)(c,l),"/")),m){var v=X(c,f);l=c.indexOf(v),d="".concat(d).concat(v.base_name)}b&&(d="".concat(d).concat(f))}return d}}})),n(44),n(49),n(50),n(51),n(52),n(53),n(55),Object(B.addFilter)("carbon-fields.sidebar.metabox","carbon-fields/metaboxes",Object(i.withDispatch)(function(e){return{onAdded:e("carbon-fields/metaboxes").receiveSidebar}})),Object(B.addFilter)("carbon-fields.field-edit.metabox","carbon-fields/metaboxes",Object(V.compose)(q.a,H,Object(i.withDispatch)(function(e){if(Object(J.a)()){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}var n=e("carbon-fields/metaboxes");return{lockSaving:n.lockSaving,unlockSaving:n.unlockSaving}}),b.withValidation));var Y=n(33),Z=n(21);Object(c.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var ee=Object(J.a)()?"gutenberg":"classic";Object(Z.a)(ee),Object(Y.a)(ee)},function(e,t,n){"use strict";var r=n(11),o=n(3),c=n(4),i=n(2),a=Object(r.createHigherOrderComponent)(function(e){return Object(i.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(o.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(r.compose)(a,Object(c.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)})}]); \ No newline at end of file diff --git a/build/gutenberg/blocks.css b/build/gutenberg/blocks.css index 030c82c6b..f00d5cc2b 100644 --- a/build/gutenberg/blocks.css +++ b/build/gutenberg/blocks.css @@ -125,18 +125,19 @@ .block-editor .cf-complex__tabs-item--current { color: #191e23; } +.edit-post-sidebar .cf-complex__tabs-item { + border-color: #8d96a0; } + .edit-post-sidebar .cf-complex__group-head { border-color: #8d96a0; } .edit-post-sidebar .cf-complex__group-body { + display: block; border-color: #8d96a0; } .edit-post-sidebar .cf-complex__group-actions--tabbed { border-color: #8d96a0; } -.edit-post-sidebar .cf-complex__tabs-item { - border-color: #8d96a0; } - /* ========================================================================== Colors ========================================================================== */ @@ -683,9 +684,30 @@ /* ========================================================================== Block ========================================================================== */ +.cf-block__tabs { + margin-bottom: 16px; } + +.wp-block .cf-block__tabs-list { + display: flex; + padding: 0; + margin: 0; + list-style: none outside none; } + +.cf-block__tabs-item { + padding: 8px; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + font-size: 13px; + line-height: 1; + cursor: pointer; } + .cf-block__tabs-item--current { + box-shadow: 0 3px 0 #00a0d2; } + .cf-block__fields { display: flex; flex-wrap: wrap; } + .cf-block__fields[hidden] { + display: none; } .wp-block .cf-block__fields { margin: -8px; } diff --git a/build/gutenberg/blocks.js b/build/gutenberg/blocks.js index 956806eab..1778a02e2 100644 --- a/build/gutenberg/blocks.js +++ b/build/gutenberg/blocks.js @@ -461,6 +461,17 @@ eval("const take = max => source => (start, sink) => {\n if (start !== 0) retur /***/ }), +/***/ "./node_modules/classnames/index.js": +/*!******************************************!*\ + !*** ./node_modules/classnames/index.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif ( true && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (true) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n\t\t\treturn classNames;\n\t\t}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n}());\n\n\n//# sourceURL=webpack:///./node_modules/classnames/index.js?"); + +/***/ }), + /***/ "./packages/blocks/components/block-edit/index.js": /*!********************************************************!*\ !*** ./packages/blocks/components/block-edit/index.js ***! @@ -469,7 +480,7 @@ eval("const take = max => source => (start, sink) => {\n if (start !== 0) retur /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/editor */ \"@wordpress/editor\");\n/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_editor__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/components/block-edit/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../field */ \"./packages/blocks/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar BlockEdit =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(BlockEdit, _Component);\n\n function BlockEdit() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, BlockEdit);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(BlockEdit)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n mode: 'edit'\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFieldChange\", function (fieldId, value) {\n var _this$props = _this.props,\n attributes = _this$props.attributes,\n setAttributes = _this$props.setAttributes;\n var fieldName = fieldId.replace(/^.+__(.+)?$/, '$1');\n setAttributes({\n data: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, attributes.data, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()({}, fieldName, value))\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleModeChange\", function () {\n _this.setState({\n mode: _this.isInEditMode ? 'preview' : 'edit'\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(BlockEdit, [{\n key: \"renderFields\",\n\n /**\n * Renders the fields.\n *\n * @return {Object}\n */\n value: function renderFields() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n clientId = _this$props2.clientId,\n fields = _this$props2.fields,\n attributes = _this$props2.attributes;\n return wp.element.createElement(\"div\", {\n className: \"cf-block__fields\"\n }, fields.map(function (field, index) {\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_14__[\"getFieldType\"])(field.type, 'block');\n\n if (!FieldEdit) {\n return null;\n }\n\n var id = \"cf-\".concat(clientId, \"__\").concat(field.base_name);\n var value = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(attributes.data, field.base_name, field.default_value);\n return wp.element.createElement(_field__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n key: index,\n id: id,\n field: field\n }, wp.element.createElement(FieldEdit, {\n id: id,\n blockId: clientId,\n value: value,\n field: field,\n name: field.base_name,\n onChange: _this2.handleFieldChange\n }));\n }));\n }\n /**\n * Render the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var _this$props3 = this.props,\n name = _this$props3.name,\n attributes = _this$props3.attributes,\n supportsPreview = _this$props3.supportsPreview;\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Fragment\"], null, supportsPreview && wp.element.createElement(_wordpress_editor__WEBPACK_IMPORTED_MODULE_10__[\"BlockControls\"], null, wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__[\"Toolbar\"], {\n controls: [{\n icon: this.isInEditMode ? 'visibility' : 'hidden',\n title: this.isInEditMode ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Show preview', 'carbon-fields-ui') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Hide preview', 'carbon-fields-ui'),\n onClick: this.handleModeChange\n }]\n })), this.isInEditMode && this.renderFields(), this.isInPreviewMode && wp.element.createElement(\"div\", {\n className: \"cf-block__preview\"\n }, wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__[\"ServerSideRender\"], {\n block: name,\n attributes: attributes\n })), this.isInPreviewMode && wp.element.createElement(_wordpress_editor__WEBPACK_IMPORTED_MODULE_10__[\"InspectorControls\"], null, wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__[\"PanelBody\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Fields', 'carbon-fields-ui')\n }, this.renderFields())));\n }\n }, {\n key: \"isInEditMode\",\n\n /**\n * Returns whether the block is in edit mode.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.state.mode === 'edit';\n }\n /**\n * Returns whether the block is in edit mode.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isInPreviewMode\",\n get: function get() {\n return this.state.mode === 'preview';\n }\n }]);\n\n return BlockEdit;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withSelect\"])(function (select, _ref) {\n var name = _ref.name;\n\n var _select = select('core/blocks'),\n hasBlockSupport = _select.hasBlockSupport;\n\n var _select2 = select('carbon-fields/blocks'),\n getFieldDefinitionsByBlockName = _select2.getFieldDefinitionsByBlockName;\n\n return {\n fields: getFieldDefinitionsByBlockName(name),\n supportsPreview: hasBlockSupport(name, 'preview')\n };\n})(BlockEdit));\n\n//# sourceURL=webpack:///./packages/blocks/components/block-edit/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/editor */ \"@wordpress/editor\");\n/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_editor__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/components/block-edit/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../field */ \"./packages/blocks/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar BlockEdit =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(BlockEdit, _Component);\n\n function BlockEdit() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, BlockEdit);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(BlockEdit)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n mode: 'edit',\n currentTab: _this.props.supportsTabs ? Object.keys(_this.props.container.settings.tabs)[0] : null\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFieldChange\", function (fieldId, value) {\n var _this$props = _this.props,\n attributes = _this$props.attributes,\n setAttributes = _this$props.setAttributes;\n var fieldName = fieldId.replace(/^.+__(.+)?$/, '$1');\n setAttributes({\n data: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, attributes.data, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()({}, fieldName, value))\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleModeChange\", function () {\n _this.setState({\n mode: _this.isInEditMode ? 'preview' : 'edit'\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleTabChange\", function (tab) {\n _this.setState({\n currentTab: tab\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"renderField\", function (field, index) {\n var _this$props2 = _this.props,\n clientId = _this$props2.clientId,\n container = _this$props2.container,\n attributes = _this$props2.attributes;\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_15__[\"getFieldType\"])(field.type, 'block');\n\n if (!FieldEdit) {\n return null;\n }\n\n var id = \"cf-\".concat(clientId, \"__\").concat(field.base_name);\n var value = Object(lodash__WEBPACK_IMPORTED_MODULE_14__[\"get\"])(attributes.data, field.base_name, field.default_value);\n return wp.element.createElement(_field__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n key: index,\n id: id,\n field: field\n }, wp.element.createElement(FieldEdit, {\n id: id,\n containerId: container.id,\n blockId: clientId,\n value: value,\n field: field,\n name: field.base_name,\n onChange: _this.handleFieldChange\n }));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(BlockEdit, [{\n key: \"renderTabbedFields\",\n\n /**\n * Renders the fields in tabs.\n *\n * @param {string[]} fieldNames\n * @return {Object[]}\n */\n value: function renderTabbedFields(fieldNames) {\n var _this2 = this;\n\n var fields = this.props.fields;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(fieldNames, function (fieldName, index) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_14__[\"find\"])(fields, ['name', fieldName]);\n return _this2.renderField(field, index);\n });\n }\n /**\n * Renders the fields that aren't in tabs.\n *\n * @return {Object}\n */\n\n }, {\n key: \"renderNonTabbedFields\",\n value: function renderNonTabbedFields() {\n return wp.element.createElement(\"div\", {\n className: \"cf-block__fields\"\n }, this.props.fields.map(this.renderField));\n }\n /**\n * Render the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var currentTab = this.state.currentTab;\n var _this$props3 = this.props,\n name = _this$props3.name,\n container = _this$props3.container,\n attributes = _this$props3.attributes,\n supportsTabs = _this$props3.supportsTabs,\n supportsPreview = _this$props3.supportsPreview;\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Fragment\"], null, supportsPreview && wp.element.createElement(_wordpress_editor__WEBPACK_IMPORTED_MODULE_11__[\"BlockControls\"], null, wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__[\"Toolbar\"], {\n controls: [{\n icon: this.isInEditMode ? 'visibility' : 'hidden',\n title: this.isInEditMode ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_13__[\"__\"])('Show preview', 'carbon-fields-ui') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_13__[\"__\"])('Hide preview', 'carbon-fields-ui'),\n onClick: this.handleModeChange\n }]\n })), this.isInEditMode && supportsTabs && wp.element.createElement(\"div\", {\n className: \"cf-block__tabs\"\n }, wp.element.createElement(\"ul\", {\n className: \"cf-block__tabs-list\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-block__tabs-item', {\n 'cf-block__tabs-item--current': tabName === currentTab\n });\n return wp.element.createElement(\"li\", {\n key: tabName,\n className: classes,\n onClick: function onClick() {\n return _this3.handleTabChange(tabName);\n }\n }, tabName);\n }))), this.isInEditMode && (supportsTabs ? Object(lodash__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n return wp.element.createElement(\"div\", {\n className: \"cf-block__fields\",\n key: tabName,\n hidden: tabName !== currentTab\n }, _this3.renderTabbedFields(fieldNames));\n }) : this.renderNonTabbedFields()), this.isInPreviewMode && wp.element.createElement(\"div\", {\n className: \"cf-block__preview\"\n }, wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__[\"ServerSideRender\"], {\n block: name,\n attributes: attributes\n })), this.isInPreviewMode && wp.element.createElement(_wordpress_editor__WEBPACK_IMPORTED_MODULE_11__[\"InspectorControls\"], null, supportsTabs ? Object(lodash__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n return wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__[\"PanelBody\"], {\n key: tabName,\n title: tabName\n }, wp.element.createElement(\"div\", {\n className: \"cf-block__fields\"\n }, _this3.renderTabbedFields(fieldNames)));\n }) : wp.element.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__[\"PanelBody\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_13__[\"__\"])('Fields', 'carbon-fields-ui')\n }, this.renderNonTabbedFields())));\n }\n }, {\n key: \"isInEditMode\",\n\n /**\n * Returns whether the block is in edit mode.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.state.mode === 'edit';\n }\n /**\n * Returns whether the block is in edit mode.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isInPreviewMode\",\n get: function get() {\n return this.state.mode === 'preview';\n }\n /**\n * Renders a field.\n *\n * @param {Object} field\n * @param {number} index\n * @return {Object}\n */\n\n }]);\n\n return BlockEdit;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_12__[\"withSelect\"])(function (select, _ref) {\n var name = _ref.name;\n\n var _select = select('core/blocks'),\n hasBlockSupport = _select.hasBlockSupport;\n\n var _select2 = select('carbon-fields/blocks'),\n getContainerDefinitionByBlockName = _select2.getContainerDefinitionByBlockName,\n getFieldDefinitionsByBlockName = _select2.getFieldDefinitionsByBlockName;\n\n return {\n container: getContainerDefinitionByBlockName(name),\n fields: getFieldDefinitionsByBlockName(name),\n supportsTabs: hasBlockSupport(name, 'tabs'),\n supportsPreview: hasBlockSupport(name, 'preview')\n };\n})(BlockEdit));\n\n//# sourceURL=webpack:///./packages/blocks/components/block-edit/index.js?"); /***/ }), @@ -539,7 +550,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/fields/association/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/blocks/fields/association/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/fields/association/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_4__);\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.association.block', 'carbon-fields/blocks', Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withProps\"])(function (props) {\n return {\n hierarchyResolver: function hierarchyResolver() {\n // Get the block that contains the field.\n var block = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('core/editor').getBlock(props.blockId); // Get the path.\n\n var path = props.id.split('__'); // Remove the chunk that contains the block identifier.\n\n path.shift(); // Get the hierarchy.\n\n var hierarchy = path.shift();\n var accessor = \"data.\".concat(hierarchy); // Visit every branch in the tree so we can get the full hierarchy.\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = chunk.indexOf('cf-') === 0;\n\n if (isGroup) {\n var groups = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(block.attributes, \"\".concat(accessor));\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"find\"])(groups, ['_id', chunk]);\n var groupIndex = groups.indexOf(group);\n accessor = \"\".concat(accessor, \".\").concat(groupIndex);\n hierarchy = \"\".concat(hierarchy, \"[\").concat(groupIndex, \"]:\").concat(group._type, \"/\");\n } else {\n accessor = \"\".concat(accessor, \".\").concat(chunk);\n hierarchy = \"\".concat(hierarchy).concat(chunk);\n }\n }\n\n return hierarchy;\n }\n };\n}));\n\n//# sourceURL=webpack:///./packages/blocks/fields/association/index.js?"); /***/ }), @@ -562,7 +573,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/field */ \"./packages/blocks/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n collapsedGroups: _this.props.value.reduce(function (accumulator, _ref) {\n var _id = _ref._id,\n _type = _ref._type;\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"find\"])(_this.props.field.groups, ['name', _type]);\n\n if (!group.collapsed) {\n return accumulator;\n }\n\n return accumulator.concat(_id);\n }, [])\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n value = _this$props.value,\n onChange = _this$props.onChange;\n var data = {};\n data._id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__[\"uniqueId\"])();\n data._type = group.name;\n group.fields.reduce(function (accumulator, field) {\n accumulator[field.base_name] = field.default_value;\n return accumulator;\n }, data);\n onChange(id, value.concat(data));\n callback(data);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n onChange = _this$props2.onChange;\n var index = value.indexOf(group);\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"cloneDeep\"])(group);\n clonedGroup._id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__[\"uniqueId\"])();\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n draft.splice(index + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n onChange = _this$props3.onChange;\n var groupIndex = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"findIndex\"])(value, ['_id', group._id]);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n draft.splice(groupIndex, 1);\n }));\n\n _this.setState(function (_ref2) {\n var collapsedGroups = _ref2.collapsedGroups;\n return {\n collapsedGroups: Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"without\"])(collapsedGroups, group._id)\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleGroup\", function (groupId) {\n _this.setState(function (_ref3) {\n var collapsedGroups = _ref3.collapsedGroups;\n\n if (collapsedGroups.indexOf(groupId) > -1) {\n collapsedGroups = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"without\"])(collapsedGroups, groupId);\n } else {\n collapsedGroups = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(collapsedGroups).concat([groupId]);\n }\n\n return {\n collapsedGroups: collapsedGroups\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleAllGroups\", function () {\n var value = _this.props.value;\n\n _this.setState(function (_ref4) {\n var collapsedGroups = _ref4.collapsedGroups;\n\n if (collapsedGroups.length !== value.length) {\n collapsedGroups = value.map(function (group) {\n return group._id;\n });\n } else {\n collapsedGroups = [];\n }\n\n return {\n collapsedGroups: collapsedGroups\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleGroupSetup\", function (group, props) {\n var fields = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"get\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"find\"])(_this.props.field.groups, ['name', group._type]), 'fields', []);\n var values = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"omit\"])(group, ['_id', '_type']);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"assign\"])({}, props, {\n key: group._id,\n id: group._id,\n fields: fields,\n collapsed: _this.state.collapsedGroups.indexOf(group._id) > -1,\n context: 'block',\n values: values\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n var blockId = _this.props.blockId;\n var id = \"\".concat(_this.props.id, \"__\").concat(groupProps.id, \"__\").concat(field.base_name);\n var value = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"get\"])(groupProps, \"values.\".concat(field.base_name));\n return [_components_field__WEBPACK_IMPORTED_MODULE_14__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"assign\"])({}, props, {\n key: id,\n id: id,\n name: field.base_name,\n blockId: blockId,\n field: field,\n value: value,\n onChange: _this.handleGroupFieldChange\n })];\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleGroupFieldChange\", function (fieldId, fieldValue) {\n var _this$props4 = _this.props,\n id = _this$props4.id,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n var path = fieldId.split('__');\n var fieldName = path.pop();\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"find\"])(draft, ['_id', path.pop()]);\n Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"set\"])(group, fieldName, fieldValue);\n }));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexField, [{\n key: \"getGroupValues\",\n\n /**\n * Returns a list of group values.\n *\n * @return {Array}\n */\n value: function getGroupValues() {\n return this.props.value.map(function (group) {\n var values = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"mapKeys\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"omit\"])(group, ['_id', '_type']), function (value, key) {\n return key.replace(/\\-/g, '_');\n });\n return [group._type, values];\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} group\n * @param {Function} callback\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props5 = this.props,\n value = _this$props5.value,\n children = _this$props5.children;\n var groupValues = this.getGroupValues();\n var allGroupsAreCollapsed = this.state.collapsedGroups.length === value.length;\n return children({\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.block', 'carbon-fields/blocks', function (OriginalComplexField) {\n return function (props) {\n var id = props.id,\n name = props.name,\n value = props.value,\n error = props.error,\n field = props.field;\n return wp.element.createElement(ComplexField, props, function (_ref5) {\n var groupValues = _ref5.groupValues,\n allGroupsAreCollapsed = _ref5.allGroupsAreCollapsed,\n handleGroupSetup = _ref5.handleGroupSetup,\n handleGroupFieldSetup = _ref5.handleGroupFieldSetup,\n handleAddGroup = _ref5.handleAddGroup,\n handleCloneGroup = _ref5.handleCloneGroup,\n handleRemoveGroup = _ref5.handleRemoveGroup,\n handleToggleGroup = _ref5.handleToggleGroup,\n handleToggleAllGroups = _ref5.handleToggleAllGroups;\n return wp.element.createElement(OriginalComplexField, {\n groupIdKey: \"_id\",\n groupFilterKey: \"_type\",\n id: id,\n name: name,\n value: value,\n error: error,\n field: field,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n };\n});\n\n//# sourceURL=webpack:///./packages/blocks/fields/complex/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/field */ \"./packages/blocks/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n collapsedGroups: _this.props.value.reduce(function (accumulator, _ref) {\n var _id = _ref._id,\n _type = _ref._type;\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"find\"])(_this.props.field.groups, ['name', _type]);\n\n if (!group.collapsed) {\n return accumulator;\n }\n\n return accumulator.concat(_id);\n }, [])\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n value = _this$props.value,\n onChange = _this$props.onChange;\n var data = {};\n data._id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__[\"uniqueId\"])();\n data._type = group.name;\n group.fields.reduce(function (accumulator, field) {\n accumulator[field.base_name] = field.default_value;\n return accumulator;\n }, data);\n onChange(id, value.concat(data));\n callback(data);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n onChange = _this$props2.onChange;\n var index = value.indexOf(group);\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"cloneDeep\"])(group);\n clonedGroup._id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_12__[\"uniqueId\"])();\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n draft.splice(index + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n onChange = _this$props3.onChange;\n var groupIndex = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"findIndex\"])(value, ['_id', group._id]);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n draft.splice(groupIndex, 1);\n }));\n\n _this.setState(function (_ref2) {\n var collapsedGroups = _ref2.collapsedGroups;\n return {\n collapsedGroups: Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"without\"])(collapsedGroups, group._id)\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleGroup\", function (groupId) {\n _this.setState(function (_ref3) {\n var collapsedGroups = _ref3.collapsedGroups;\n\n if (collapsedGroups.indexOf(groupId) > -1) {\n collapsedGroups = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"without\"])(collapsedGroups, groupId);\n } else {\n collapsedGroups = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(collapsedGroups).concat([groupId]);\n }\n\n return {\n collapsedGroups: collapsedGroups\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleAllGroups\", function () {\n var value = _this.props.value;\n\n _this.setState(function (_ref4) {\n var collapsedGroups = _ref4.collapsedGroups;\n\n if (collapsedGroups.length !== value.length) {\n collapsedGroups = value.map(function (group) {\n return group._id;\n });\n } else {\n collapsedGroups = [];\n }\n\n return {\n collapsedGroups: collapsedGroups\n };\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleGroupSetup\", function (group, props) {\n var fields = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"get\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"find\"])(_this.props.field.groups, ['name', group._type]), 'fields', []);\n var values = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"omit\"])(group, ['_id', '_type']);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"assign\"])({}, props, {\n id: group._id,\n fields: fields,\n collapsed: _this.state.collapsedGroups.indexOf(group._id) > -1,\n context: 'block',\n values: values\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n var blockId = _this.props.blockId;\n var id = \"\".concat(_this.props.id, \"__\").concat(groupProps.id, \"__\").concat(field.base_name);\n var value = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"get\"])(groupProps, \"values.\".concat(field.base_name));\n return [_components_field__WEBPACK_IMPORTED_MODULE_14__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"assign\"])({}, props, {\n key: id,\n id: id,\n name: field.base_name,\n containerId: _this.props.containerId,\n blockId: blockId,\n field: field,\n value: value,\n onChange: _this.handleGroupFieldChange\n })];\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleGroupFieldChange\", function (fieldId, fieldValue) {\n var _this$props4 = _this.props,\n id = _this$props4.id,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_8___default()(value, function (draft) {\n var path = fieldId.split('__');\n var fieldName = path.pop();\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"find\"])(draft, ['_id', path.pop()]);\n Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"set\"])(group, fieldName, fieldValue);\n }));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexField, [{\n key: \"getGroupValues\",\n\n /**\n * Returns a list of group values.\n *\n * @return {Array}\n */\n value: function getGroupValues() {\n return this.props.value.map(function (group) {\n var values = Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"mapKeys\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"omit\"])(group, ['_id', '_type']), function (value, key) {\n return key.replace(/\\-/g, '_');\n });\n return [group._type, values];\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} group\n * @param {Function} callback\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props5 = this.props,\n value = _this$props5.value,\n children = _this$props5.children;\n var groupValues = this.getGroupValues();\n var allGroupsAreCollapsed = this.state.collapsedGroups.length === value.length;\n return children({\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.block', 'carbon-fields/blocks', function (OriginalComplexField) {\n return function (props) {\n var id = props.id,\n name = props.name,\n value = props.value,\n error = props.error,\n field = props.field;\n return wp.element.createElement(ComplexField, props, function (_ref5) {\n var groupValues = _ref5.groupValues,\n allGroupsAreCollapsed = _ref5.allGroupsAreCollapsed,\n handleGroupSetup = _ref5.handleGroupSetup,\n handleGroupFieldSetup = _ref5.handleGroupFieldSetup,\n handleAddGroup = _ref5.handleAddGroup,\n handleCloneGroup = _ref5.handleCloneGroup,\n handleRemoveGroup = _ref5.handleRemoveGroup,\n handleToggleGroup = _ref5.handleToggleGroup,\n handleToggleAllGroups = _ref5.handleToggleAllGroups;\n return wp.element.createElement(OriginalComplexField, {\n groupIdKey: \"_id\",\n groupFilterKey: \"_type\",\n id: id,\n name: name,\n value: value,\n error: error,\n field: field,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n };\n});\n\n//# sourceURL=webpack:///./packages/blocks/fields/complex/index.js?"); /***/ }), @@ -585,7 +596,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/fields/datetime/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.date_time.block', 'carbon-fields/blocks', function (OriginalDateTimeField) {\n return function (props) {\n return wp.element.createElement(OriginalDateTimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Date', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack:///./packages/blocks/fields/datetime/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_date__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/date */ \"@wordpress/date\");\n/* harmony import */ var _wordpress_date__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_date__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style.scss */ \"./packages/blocks/fields/datetime/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar DateTimeField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(DateTimeField, _Component);\n\n function DateTimeField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, DateTimeField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(DateTimeField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (selectedDates, selectedDateStr) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange,\n value = _this$props.value,\n field = _this$props.field;\n var formattedDate = Object(_wordpress_date__WEBPACK_IMPORTED_MODULE_8__[\"format\"])(field.storage_format, selectedDateStr);\n\n if (formattedDate !== value) {\n onChange(id, formattedDate);\n }\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(DateTimeField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleChange = this.handleChange;\n var children = this.props.children;\n return children({\n handleChange: handleChange\n });\n }\n }]);\n\n return DateTimeField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.date_time.block', 'carbon-fields/blocks', function (OriginalDateTimeField) {\n return function (props) {\n return wp.element.createElement(DateTimeField, props, function (_ref) {\n var handleChange = _ref.handleChange;\n return wp.element.createElement(OriginalDateTimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Select Date', 'carbon-fields-ui')\n }, props, {\n onChange: handleChange\n }));\n });\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.date.block', 'carbon-fields/blocks', function (OriginalDateField) {\n return function (props) {\n return wp.element.createElement(DateTimeField, props, function (_ref2) {\n var handleChange = _ref2.handleChange;\n return wp.element.createElement(OriginalDateField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n onChange: handleChange\n }));\n });\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.time.block', 'carbon-fields/blocks', function (OriginalTimeField) {\n return function (props) {\n return wp.element.createElement(DateTimeField, props, function (_ref3) {\n var handleChange = _ref3.handleChange;\n return wp.element.createElement(OriginalTimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n onChange: handleChange\n }));\n });\n };\n});\n\n//# sourceURL=webpack:///./packages/blocks/fields/datetime/index.js?"); /***/ }), @@ -968,7 +979,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var call /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ \"@wordpress/blocks\");\n/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _fields__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./fields */ \"./packages/blocks/fields/index.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./store */ \"./packages/blocks/store/index.js\");\n/* harmony import */ var _components_block_edit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/block-edit */ \"./packages/blocks/components/block-edit/index.js\");\n/* harmony import */ var _components_block_save__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/block-save */ \"./packages/blocks/components/block-save/index.js\");\n/* harmony import */ var _utils_transform_fields_to_attributes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/transform-fields-to-attributes */ \"./packages/blocks/utils/transform-fields-to-attributes.js\");\n\n\n/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n/**\n * Sets the locale data for the package type\n */\n\nObject(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__[\"setLocaleData\"])(window.cf.config.locale, 'carbon-fields-ui');\n/**\n * Register the blocks.\n */\n\nvar definitions = {};\nObject(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(window.cf, 'preloaded.blocks', []).forEach(function (container) {\n var name = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"kebabCase\"])(container.id).replace('carbon-fields-container-', '');\n var fields = Object(_utils_transform_fields_to_attributes__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(container.fields);\n\n var getBlockSetting = function getBlockSetting(key) {\n var def = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(container, \"settings.\".concat(key), def);\n };\n\n definitions[name] = container.fields.map(function (field) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, field, {\n container_id: container.id\n });\n });\n Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__[\"registerBlockType\"])(\"carbon-fields/\".concat(name), {\n id: container.id,\n title: container.title,\n icon: getBlockSetting('icon'),\n category: getBlockSetting('category.slug'),\n keywords: getBlockSetting('keywords', []),\n description: getBlockSetting('description', ''),\n attributes: {\n data: {\n type: 'object',\n default: fields\n }\n },\n supports: {\n preview: getBlockSetting('preview'),\n alignWide: false,\n anchor: false,\n html: false\n },\n edit: _components_block_edit__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n save: _components_block_save__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n });\n});\n/**\n * Load the definitions in store.\n */\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"dispatch\"])('carbon-fields/blocks').setupFieldDefinitions(definitions);\n\n//# sourceURL=webpack:///./packages/blocks/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ \"@wordpress/blocks\");\n/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _fields__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./fields */ \"./packages/blocks/fields/index.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./store */ \"./packages/blocks/store/index.js\");\n/* harmony import */ var _components_block_edit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/block-edit */ \"./packages/blocks/components/block-edit/index.js\");\n/* harmony import */ var _components_block_save__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/block-save */ \"./packages/blocks/components/block-save/index.js\");\n/* harmony import */ var _utils_transform_fields_to_attributes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/transform-fields-to-attributes */ \"./packages/blocks/utils/transform-fields-to-attributes.js\");\n\n\n/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n/**\n * Sets the locale data for the package type\n */\n\nObject(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"setLocaleData\"])(window.cf.config.locale, 'carbon-fields-ui');\n/**\n * Register the blocks.\n */\n\nvar containerDefinitions = {};\nvar fieldDefinitions = {};\nObject(lodash__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(window.cf, 'preloaded.blocks', []).forEach(function (container) {\n var name = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"kebabCase\"])(container.id).replace('carbon-fields-container-', '');\n var fields = Object(_utils_transform_fields_to_attributes__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(container.fields);\n\n var getBlockSetting = function getBlockSetting(key) {\n var def = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(container, \"settings.\".concat(key), def);\n };\n\n containerDefinitions[name] = container;\n fieldDefinitions[name] = container.fields.map(function (field) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, field);\n });\n Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__[\"registerBlockType\"])(\"carbon-fields/\".concat(name), {\n title: container.title,\n icon: getBlockSetting('icon'),\n category: getBlockSetting('category.slug'),\n keywords: getBlockSetting('keywords', []),\n description: getBlockSetting('description', ''),\n attributes: {\n data: {\n type: 'object',\n default: fields\n }\n },\n supports: {\n tabs: Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isPlainObject\"])(getBlockSetting('tabs')),\n preview: getBlockSetting('preview'),\n alignWide: false,\n anchor: false,\n html: false\n },\n edit: _components_block_edit__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n save: _components_block_save__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n });\n});\n/**\n * Load the definitions in store.\n */\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"dispatch\"])('carbon-fields/blocks').setupContainerDefinitions(containerDefinitions);\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"dispatch\"])('carbon-fields/blocks').setupFieldDefinitions(fieldDefinitions);\n\n//# sourceURL=webpack:///./packages/blocks/index.js?"); /***/ }), @@ -976,11 +987,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /*!******************************************!*\ !*** ./packages/blocks/store/actions.js ***! \******************************************/ -/*! exports provided: setupFieldDefinitions */ +/*! exports provided: setupContainerDefinitions, setupFieldDefinitions */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setupFieldDefinitions\", function() { return setupFieldDefinitions; });\n/**\n * Returns an action object used to setup the definitions state when first opening an editor.\n *\n * @param {Object} definitions\n * @return {Object}\n */\nfunction setupFieldDefinitions(definitions) {\n return {\n type: 'SETUP_FIELD_DEFINITIONS',\n payload: {\n definitions: definitions\n }\n };\n}\n\n//# sourceURL=webpack:///./packages/blocks/store/actions.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setupContainerDefinitions\", function() { return setupContainerDefinitions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setupFieldDefinitions\", function() { return setupFieldDefinitions; });\n/**\n * Returns an action object used to setup the definitions state when first opening an editor.\n *\n * @param {Object} definitions\n * @return {Object}\n */\nfunction setupContainerDefinitions(definitions) {\n return {\n type: 'SETUP_CONTAINER_DEFINITIONS',\n payload: {\n definitions: definitions\n }\n };\n}\n/**\n * Returns an action object used to setup the definitions state when first opening an editor.\n *\n * @param {Object} definitions\n * @return {Object}\n */\n\nfunction setupFieldDefinitions(definitions) {\n return {\n type: 'SETUP_FIELD_DEFINITIONS',\n payload: {\n definitions: definitions\n }\n };\n}\n\n//# sourceURL=webpack:///./packages/blocks/store/actions.js?"); /***/ }), @@ -1000,11 +1011,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /*!******************************************!*\ !*** ./packages/blocks/store/reducer.js ***! \******************************************/ -/*! exports provided: fieldDefinitionsByBlockName, default */ +/*! exports provided: containerDefinitionsByBlockName, fieldDefinitionsByBlockName, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fieldDefinitionsByBlockName\", function() { return fieldDefinitionsByBlockName; });\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * The reducer that keeps track of field defitions keyed by block's name.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction fieldDefinitionsByBlockName() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_FIELD_DEFINITIONS':\n return action.payload.definitions;\n\n default:\n return state;\n }\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"combineReducers\"])({\n fieldDefinitionsByBlockName: fieldDefinitionsByBlockName\n}));\n\n//# sourceURL=webpack:///./packages/blocks/store/reducer.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"containerDefinitionsByBlockName\", function() { return containerDefinitionsByBlockName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fieldDefinitionsByBlockName\", function() { return fieldDefinitionsByBlockName; });\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * The reducer that keeps track of container definitions keyed by block's name.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction containerDefinitionsByBlockName() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_CONTAINER_DEFINITIONS':\n return action.payload.definitions;\n\n default:\n return state;\n }\n}\n/**\n * The reducer that keeps track of field definitions keyed by block's name.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction fieldDefinitionsByBlockName() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_FIELD_DEFINITIONS':\n return action.payload.definitions;\n\n default:\n return state;\n }\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"combineReducers\"])({\n containerDefinitionsByBlockName: containerDefinitionsByBlockName,\n fieldDefinitionsByBlockName: fieldDefinitionsByBlockName\n}));\n\n//# sourceURL=webpack:///./packages/blocks/store/reducer.js?"); /***/ }), @@ -1012,11 +1023,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /*!********************************************!*\ !*** ./packages/blocks/store/selectors.js ***! \********************************************/ -/*! exports provided: getFieldDefinitionsByBlockName */ +/*! exports provided: getContainerDefinitionByBlockName, getFieldDefinitionsByBlockName */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldDefinitionsByBlockName\", function() { return getFieldDefinitionsByBlockName; });\n/**\n * Get the definitions by a given block name.\n *\n * @param {Object} state\n * @param {string} blockName\n * @return {Object[]}\n */\nfunction getFieldDefinitionsByBlockName(state, blockName) {\n return state.fieldDefinitionsByBlockName[blockName.replace('carbon-fields/', '')] || [];\n}\n\n//# sourceURL=webpack:///./packages/blocks/store/selectors.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainerDefinitionByBlockName\", function() { return getContainerDefinitionByBlockName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldDefinitionsByBlockName\", function() { return getFieldDefinitionsByBlockName; });\n/**\n * Get the container by a given block name.\n *\n * @param {Object} state\n * @param {string} blockName\n * @return {Object}\n */\nfunction getContainerDefinitionByBlockName(state, blockName) {\n return state.containerDefinitionsByBlockName[blockName.replace('carbon-fields/', '')] || {};\n}\n/**\n * Get the fields by a given block name.\n *\n * @param {Object} state\n * @param {string} blockName\n * @return {Object[]}\n */\n\nfunction getFieldDefinitionsByBlockName(state, blockName) {\n return state.fieldDefinitionsByBlockName[blockName.replace('carbon-fields/', '')] || [];\n}\n\n//# sourceURL=webpack:///./packages/blocks/store/selectors.js?"); /***/ }), @@ -1087,6 +1098,17 @@ eval("module.exports = wp[\"data\"];\n\n//# sourceURL=webpack:///external_%5B%22 /***/ }), +/***/ "@wordpress/date": +/*!******************************!*\ + !*** external ["wp","date"] ***! + \******************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = wp[\"date\"];\n\n//# sourceURL=webpack:///external_%5B%22wp%22,%22date%22%5D?"); + +/***/ }), + /***/ "@wordpress/editor": /*!********************************!*\ !*** external ["wp","editor"] ***! diff --git a/build/gutenberg/blocks.min.css b/build/gutenberg/blocks.min.css index 1c9eea708..3e8a6855b 100644 --- a/build/gutenberg/blocks.min.css +++ b/build/gutenberg/blocks.min.css @@ -1 +1 @@ -.block-editor .cf-association__cols{border-top-width:1px;margin-top:4px}.edit-post-sidebar .cf-association__cols{border-color:#8d96a0}.edit-post-sidebar .cf-association__cols:before{background-color:#8d96a0}.edit-post-sidebar .cf-association__counter{display:none}.edit-post-sidebar .cf-association__option{height:40px}.edit-post-sidebar .cf-association__option+.cf-association__option{border-top-color:#8d96a0}.edit-post-sidebar .cf-association__option-thumb{display:none}.edit-post-sidebar .cf-association__option-content{align-items:flex-start;flex-direction:column;min-width:0}.edit-post-sidebar .cf-association__option-title{width:100%}.edit-post-sidebar .cf-association__col:first-child .cf-association__option-actions{min-width:0}.edit-post-sidebar .cf-association__option-actions{margin-left:auto}.edit-post-sidebar .cf-association__option-action--edit{display:none}.block-editor .cf-complex__placeholder-label{font-size:13px;line-height:1.4}.block-editor .cf-complex__inserter-menu{z-index:10;list-style:none outside none;border:1px solid #e2e4e7;box-shadow:0 3px 30px rgba(25,30,35,.1);background-color:#fff}.block-editor .cf-complex__inserter-menu:after,.block-editor .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-width:8px 8px 8px 0;border-style:solid;margin-top:-8px;content:""}.block-editor .cf-complex__inserter-menu:before{border-color:transparent #e2e4e7;margin-right:1px}.block-editor .cf-complex__inserter-menu:after{border-color:transparent #fff}.block-editor .cf-complex__inserter-item{color:#40464d}.block-editor .cf-complex__inserter-item:hover{color:#191e23}.edit-post-sidebar .cf-complex__tabs .cf-complex__inserter-button{border-color:#8d96a0}.block-editor .cf-complex__tabs-item{color:#555d66}.block-editor .cf-complex__tabs-item--current{color:#191e23}.edit-post-sidebar .cf-complex__group-actions--tabbed,.edit-post-sidebar .cf-complex__group-body,.edit-post-sidebar .cf-complex__group-head,.edit-post-sidebar .cf-complex__tabs-item{border-color:#8d96a0}.block-editor .cf-field{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4;color:#555d66;padding:8px;min-width:0}.edit-post-sidebar .cf-block__fields>.cf-field{padding:4px 0 0}.block-editor .cf-complex .cf-field{border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.edit-post-sidebar .cf-complex .cf-field{border-color:#8d96a0}.block-editor .cf-field__label{margin-bottom:4px}.edit-post-sidebar .cf-datetime__inner{position:relative}.edit-post-sidebar .cf-datetime__inner:before{position:absolute;top:50%;left:9px;display:inline-block;margin-top:-10px}.wp-block .cf-field .cf-datetime__input{min-width:0;border-color:#e2e4e7;border-radius:0}.wp-block .cf-field .cf-datetime__input:focus{box-shadow:none}.edit-post-sidebar .cf-field .cf-datetime__input{padding-left:35px}.wp-block .cf-datetime__button{height:auto;border-color:#e2e4e7}.edit-post-sidebar .cf-datetime__button{display:none}.edit-post-sidebar .cf-file__content,.edit-post-sidebar .cf-file__inner,.edit-post-sidebar .cf-file__name{border-color:#8d96a0}.edit-post-sidebar .cf-map__canvas{border-color:#8d96a0;border-top-width:1px;margin-top:4px}.block-editor .cf-map__search[focus-within]~.cf-map__canvas{border-color:#00a0d2}.block-editor .cf-map__search:focus-within~.cf-map__canvas{border-color:#00a0d2}.wp-block .cf-multiselect__control{border-radius:0}.edit-post-sidebar .cf-multiselect__control,.edit-post-sidebar .cf-multiselect__control:hover{border-color:#8d96a0}.edit-post-sidebar .cf-multiselect__control--is-focused,.edit-post-sidebar .cf-multiselect__control--is-focused:hover{border-color:#00a0d2;box-shadow:0 0 0 1px #00a0d2}@media (min-width:1440px){.block-editor .cf-media-gallery__item{flex-basis:16.6667%}}@media (min-width:1680px){.block-editor .cf-media-gallery__item{flex-basis:16.6667%}}.edit-post-sidebar .cf-media-gallery__item{flex-basis:50%}.wp-block .cf-media-gallery__inner{border:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__inner{border:1px solid #8d96a0}.wp-block .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__actions{border-top:1px solid #8d96a0}.wp-block .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__item-inner{border:1px solid #8d96a0}.block-editor .cf-media-gallery__item-name,.block-editor .cf-media-gallery__item-preview{background-color:#f3f4f5}.wp-block .cf-media-gallery__item-name{border-top:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__item-name{border-top:1px solid #8d96a0}.edit-post-sidebar .cf-oembed__preview{border-color:#8d96a0;border-top-width:1px;margin-top:4px}.block-editor .cf-oembed[focus-within] .cf-oembed__preview{border-color:#00a0d2}.block-editor .cf-oembed:focus-within .cf-oembed__preview{border-color:#00a0d2}.wp-block .cf-radio__list{list-style:none outside none}.block-editor .cf-radio__list-item{margin:0}@media (min-width:1440px){.wp-block .cf-radio-image .cf-radio__list-item{flex-basis:25%}}@media (min-width:1680px){.wp-block .cf-radio-image .cf-radio__list-item{flex-basis:25%}}.edit-post-sidebar .cf-radio-image .cf-radio__list-item{flex-basis:33.3333%}.wp-block .cf-radio-image__image{border:1px solid #e2e4e7}.edit-post-sidebar .cf-radio-image__image{border:1px solid #8d96a0}.block-editor .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.block-editor .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:2px solid #00a0d2}.wp-block .cf-field .cf-select__input{border-color:#e2e4e7;border-radius:0}.wp-block .cf-field .cf-select__input:focus{box-shadow:none}.wp-block .cf-set__list{list-style:none outside none}.block-editor .cf-separator h3{margin:0}.wp-block .cf-field .cf-text__input{border-color:#e2e4e7;border-radius:0}.wp-block .cf-field .cf-text__input:focus{box-shadow:none}.wp-block .cf-field .cf-textarea__input{border-color:#e2e4e7;border-radius:0;transition:border-color .1s linear}.wp-block .cf-field .cf-textarea__input:focus{border-color:#00a0d2;box-shadow:none}.cf-block__fields{display:flex;flex-wrap:wrap}.wp-block .cf-block__fields{margin:-8px}.cf-block__preview{min-height:100px} \ No newline at end of file +.block-editor .cf-association__cols{border-top-width:1px;margin-top:4px}.edit-post-sidebar .cf-association__cols{border-color:#8d96a0}.edit-post-sidebar .cf-association__cols:before{background-color:#8d96a0}.edit-post-sidebar .cf-association__counter{display:none}.edit-post-sidebar .cf-association__option{height:40px}.edit-post-sidebar .cf-association__option+.cf-association__option{border-top-color:#8d96a0}.edit-post-sidebar .cf-association__option-thumb{display:none}.edit-post-sidebar .cf-association__option-content{align-items:flex-start;flex-direction:column;min-width:0}.edit-post-sidebar .cf-association__option-title{width:100%}.edit-post-sidebar .cf-association__col:first-child .cf-association__option-actions{min-width:0}.edit-post-sidebar .cf-association__option-actions{margin-left:auto}.edit-post-sidebar .cf-association__option-action--edit{display:none}.block-editor .cf-complex__placeholder-label{font-size:13px;line-height:1.4}.block-editor .cf-complex__inserter-menu{z-index:10;list-style:none outside none;border:1px solid #e2e4e7;box-shadow:0 3px 30px rgba(25,30,35,.1);background-color:#fff}.block-editor .cf-complex__inserter-menu:after,.block-editor .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-width:8px 8px 8px 0;border-style:solid;margin-top:-8px;content:""}.block-editor .cf-complex__inserter-menu:before{border-color:transparent #e2e4e7;margin-right:1px}.block-editor .cf-complex__inserter-menu:after{border-color:transparent #fff}.block-editor .cf-complex__inserter-item{color:#40464d}.block-editor .cf-complex__inserter-item:hover{color:#191e23}.edit-post-sidebar .cf-complex__tabs .cf-complex__inserter-button{border-color:#8d96a0}.block-editor .cf-complex__tabs-item{color:#555d66}.block-editor .cf-complex__tabs-item--current{color:#191e23}.edit-post-sidebar .cf-complex__group-head,.edit-post-sidebar .cf-complex__tabs-item{border-color:#8d96a0}.edit-post-sidebar .cf-complex__group-body{display:block;border-color:#8d96a0}.edit-post-sidebar .cf-complex__group-actions--tabbed{border-color:#8d96a0}.block-editor .cf-field{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4;color:#555d66;padding:8px;min-width:0}.edit-post-sidebar .cf-block__fields>.cf-field{padding:4px 0 0}.block-editor .cf-complex .cf-field{border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.edit-post-sidebar .cf-complex .cf-field{border-color:#8d96a0}.block-editor .cf-field__label{margin-bottom:4px}.edit-post-sidebar .cf-datetime__inner{position:relative}.edit-post-sidebar .cf-datetime__inner:before{position:absolute;top:50%;left:9px;display:inline-block;margin-top:-10px}.wp-block .cf-field .cf-datetime__input{min-width:0;border-color:#e2e4e7;border-radius:0}.wp-block .cf-field .cf-datetime__input:focus{box-shadow:none}.edit-post-sidebar .cf-field .cf-datetime__input{padding-left:35px}.wp-block .cf-datetime__button{height:auto;border-color:#e2e4e7}.edit-post-sidebar .cf-datetime__button{display:none}.edit-post-sidebar .cf-file__content,.edit-post-sidebar .cf-file__inner,.edit-post-sidebar .cf-file__name{border-color:#8d96a0}.edit-post-sidebar .cf-map__canvas{border-color:#8d96a0;border-top-width:1px;margin-top:4px}.block-editor .cf-map__search[focus-within]~.cf-map__canvas{border-color:#00a0d2}.block-editor .cf-map__search:focus-within~.cf-map__canvas{border-color:#00a0d2}.wp-block .cf-multiselect__control{border-radius:0}.edit-post-sidebar .cf-multiselect__control,.edit-post-sidebar .cf-multiselect__control:hover{border-color:#8d96a0}.edit-post-sidebar .cf-multiselect__control--is-focused,.edit-post-sidebar .cf-multiselect__control--is-focused:hover{border-color:#00a0d2;box-shadow:0 0 0 1px #00a0d2}@media (min-width:1440px){.block-editor .cf-media-gallery__item{flex-basis:16.6667%}}@media (min-width:1680px){.block-editor .cf-media-gallery__item{flex-basis:16.6667%}}.edit-post-sidebar .cf-media-gallery__item{flex-basis:50%}.wp-block .cf-media-gallery__inner{border:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__inner{border:1px solid #8d96a0}.wp-block .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__actions{border-top:1px solid #8d96a0}.wp-block .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__item-inner{border:1px solid #8d96a0}.block-editor .cf-media-gallery__item-name,.block-editor .cf-media-gallery__item-preview{background-color:#f3f4f5}.wp-block .cf-media-gallery__item-name{border-top:1px solid #e2e4e7}.edit-post-sidebar .cf-media-gallery__item-name{border-top:1px solid #8d96a0}.edit-post-sidebar .cf-oembed__preview{border-color:#8d96a0;border-top-width:1px;margin-top:4px}.block-editor .cf-oembed[focus-within] .cf-oembed__preview{border-color:#00a0d2}.block-editor .cf-oembed:focus-within .cf-oembed__preview{border-color:#00a0d2}.wp-block .cf-radio__list{list-style:none outside none}.block-editor .cf-radio__list-item{margin:0}@media (min-width:1440px){.wp-block .cf-radio-image .cf-radio__list-item{flex-basis:25%}}@media (min-width:1680px){.wp-block .cf-radio-image .cf-radio__list-item{flex-basis:25%}}.edit-post-sidebar .cf-radio-image .cf-radio__list-item{flex-basis:33.3333%}.wp-block .cf-radio-image__image{border:1px solid #e2e4e7}.edit-post-sidebar .cf-radio-image__image{border:1px solid #8d96a0}.block-editor .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.block-editor .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:2px solid #00a0d2}.wp-block .cf-field .cf-select__input{border-color:#e2e4e7;border-radius:0}.wp-block .cf-field .cf-select__input:focus{box-shadow:none}.wp-block .cf-set__list{list-style:none outside none}.block-editor .cf-separator h3{margin:0}.wp-block .cf-field .cf-text__input{border-color:#e2e4e7;border-radius:0}.wp-block .cf-field .cf-text__input:focus{box-shadow:none}.wp-block .cf-field .cf-textarea__input{border-color:#e2e4e7;border-radius:0;transition:border-color .1s linear}.wp-block .cf-field .cf-textarea__input:focus{border-color:#00a0d2;box-shadow:none}.cf-block__tabs{margin-bottom:16px}.wp-block .cf-block__tabs-list{display:flex;padding:0;margin:0;list-style:none outside none}.cf-block__tabs-item{padding:8px;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1;cursor:pointer}.cf-block__tabs-item--current{box-shadow:0 3px 0 #00a0d2}.cf-block__fields{display:flex;flex-wrap:wrap}.cf-block__fields[hidden]{display:none}.wp-block .cf-block__fields{margin:-8px}.cf-block__preview{min-height:100px} \ No newline at end of file diff --git a/build/gutenberg/blocks.min.js b/build/gutenberg/blocks.min.js index ca0416841..2e43860c5 100644 --- a/build/gutenberg/blocks.min.js +++ b/build/gutenberg/blocks.min.js @@ -1 +1,11 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=61)}([function(e,t){e.exports=lodash},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=wp.i18n},function(e,t){e.exports=wp.hooks},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=cf.core},function(e,t){e.exports=wp.data},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;tt=>{let n;t(0,(t,r)=>{0===t&&(n=r),1===t&&e(r),1!==t&&0!==t||n(1)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;let r;n(0,e=>{2===e&&r&&(r.unsubscribe?r.unsubscribe():r())}),r=e.subscribe({next:e=>n(1,e),error:e=>n(2,e),complete:()=>n(2)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;const r="undefined"!=typeof Symbol&&e[Symbol.iterator]?e[Symbol.iterator]():e;let o,i=!1,c=!1;n(0,e=>{1===e&&(c=!0,i||o&&o.done||function(){for(i=!0;c;)c=!1,(o=r.next()).done?n(2):n(1,o.value);i=!1}())})})},function(e,t){e.exports=((e,t)=>(n,r)=>{if(0!==n)return;const o=e=>r(1,e);r(0,n=>{2===n&&e.removeEventListener(t,o)}),e.addEventListener(t,o)})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;let r=!1;e.then(e=>{r||(n(1,e),n(2))},e=>{r||n(2,e)}),n(0,e=>{2===e&&(r=!0)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;let r=0;const o=setInterval(()=>{n(1,r++)},e);n(0,e=>{2===e&&clearInterval(o)})})},function(e,t){e.exports=(e=>t=>(n,r)=>{0===n&&t(0,(t,n)=>{r(t,1===t?e(n):n)})})},function(e,t){e.exports=function(e,t){let n=2===arguments.length;return r=>(o,i)=>{if(0!==o)return;let c=t;r(0,(t,r)=>{1===t?(c=n?e(c,r):(n=!0,r),i(1,c)):i(t,r)})}}},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;const r=e=>void 0!==e,o=e=>void 0===e,i=()=>{};let c,l,u=!1;function a(e){1===e&&(l||c||i)(1),2===e&&(l&&l(2),c&&c(2))}e(0,(e,t)=>{if(0===e)c=t,n(0,a);else if(1===e){const e=t;l&&l(2),e(0,(e,t)=>{0===e?(l=t)(1):1===e?n(1,t):2===e&&o(t)?u?n(2):(l=void 0,c(1)):2===e&&r(t)&&n(2,t)})}else 2===e&&o(t)?l?u=!0:n(2):2===e&&r(t)&&n(2,t)})})},function(e,t){e.exports=(e=>t=>(n,r)=>{if(0!==n)return;let o,i=0;function c(t,n){i{0===t?(o=n,r(0,c)):1===t?it=>(n,r)=>{if(0!==n)return;let o,i=0;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t&&it=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=function(...e){return(t,n)=>{if(0!==t)return;const r=e.length,o=new Array(r);let i=0,c=0;const l=e=>{if(0!==e)for(let t=0;t{0===e?(o[t]=u,1==++i&&n(0,l)):2===e?(o[t]=void 0,++c===r&&n(2)):n(e,u)})}}},function(e,t){e.exports=((...e)=>(t,n)=>{if(0!==t)return;const r=e.length;if(0===r)return n(0,()=>{}),void n(2);let o,i=0;const c=(e,t)=>{1!==e&&2!==e||o(e,t)};!function t(){i!==r?e[i](0,(e,r)=>{0===e?(o=r,0===i?n(0,c):o(1)):1===e?n(1,r):2===e&&(i++,t())}):n(2)}()})},function(e,t){const n={};e.exports=((...e)=>(t,r)=>{if(0!==t)return;const o=e.length;if(0===o)return r(0,()=>{}),r(1,[]),void r(2);let i=o,c=o,l=o;const u=new Array(o),a=new Array(o),s=(e,t)=>{if(2===e)for(let e=0;e{u[t]=n,e(0,(e,f)=>{if(0===e)a[t]=f,0==--i&&r(0,s);else if(1===e){const e=c?u[t]===n?--c:c:0;if(u[t]=f,0===e){const e=new Array(o);for(let t=0;t{let t,n=[];return function(r,o){if(0!==r)return;n.push(o);const i=(e,r)=>{if(0!==e)if(2===e){const e=n.indexOf(o);e>-1&&n.splice(e,1),n.length||t(2)}else t(e,r)};1!==n.length?o(0,i):e(0,(e,r)=>{if(0===e)t=r,o(0,i);else for(let t of n.slice(0))t(e,r);2===e&&(n=[])})}})},function(e,t){e.exports=function(...e){let t=e[0];for(let n=1,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:0;return Object(l.mapKeys)(e,function(e,n){return"".concat(Object(l.repeat)("parent.",t)).concat(n)})}function v(e){return Object(l.startsWith)(e,"cf-")}var y=Object(d.withConditionalLogic)(function(e){return Object(m.pipe)(Object(d.fromSelector)(Object(u.select)("core/editor").getBlock,e.blockId),function(e){return void 0===e&&(e=b),function(t){return function(n,r){if(0===n){var o,i,c=!1;t(0,function(t,n){0===t&&(i=n),1===t?c&&e(o,n)?i(1):(c=!0,o=n,r(1,n)):r(t,n)})}}}}(),Object(m.map)(function(e){return e.attributes.data}))},function(e,t){var n={};if(Object(l.has)(t,e.field.base_name))n=h(Object(l.omit)(t,[e.field.base_name]));else{var r=e.id.split("__");r.shift();var o=r.shift();r.pop();var i=r.reduce(function(e,t){return v(t)?e:e+1},0);n=h(n=Object(l.omit)(t,[o]),i+1);for(var c=o;r.length>0;){var u=r.shift(),a=v(u),s=!a;if(a){var f=Object(l.findIndex)(Object(l.get)(t,c),["_id",u]);c="".concat(c,".").concat(f);var p=Object(l.get)(t,c);p=h(p=Object(l.omit)(p,["_id","_type",e.field.base_name]),i),Object(l.assign)(n,p)}s&&(c="".concat(c,".").concat(u),i--)}}return n}),g=(n(39),n(21)),O=n.n(g),_=n(10),j=n.n(_),w=n(11),k=n.n(w),x=n(12),S=n.n(x),G=n(13),E=n.n(G),F=n(14),I=n.n(F),C=n(1),A=n.n(C),P=n(4),T=n.n(P),L=n(15),B=n.n(L),D=n(8),M=(n(45),n(46),Object(d.withFilters)("carbon-fields.field-wrapper.block")(d.Field)),N=function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1?Object(l.without)(n,e):O()(n).concat([e])}})}),T()(A()(A()(n)),"handleToggleAllGroups",function(){var e=n.props.value;n.setState(function(t){var n=t.collapsedGroups;return{collapsedGroups:n=n.length!==e.length?e.map(function(e){return e._id}):[]}})}),T()(A()(A()(n)),"handleGroupSetup",function(e,t){var r=Object(l.get)(Object(l.find)(n.props.field.groups,["name",e._type]),"fields",[]),o=Object(l.omit)(e,["_id","_type"]);return Object(l.assign)({},t,{key:e._id,id:e._id,fields:r,collapsed:n.state.collapsedGroups.indexOf(e._id)>-1,context:"block",values:o})}),T()(A()(A()(n)),"handleGroupFieldSetup",function(e,t,r){var o=n.props.blockId,i="".concat(n.props.id,"__").concat(r.id,"__").concat(e.base_name),c=Object(l.get)(r,"values.".concat(e.base_name));return[M,Object(l.assign)({},t,{key:i,id:i,name:e.base_name,blockId:o,field:e,value:c,onChange:n.handleGroupFieldChange})]}),T()(A()(A()(n)),"handleGroupFieldChange",function(e,t){var r=n.props,o=r.id,i=r.value;(0,r.onChange)(o,B()(i,function(n){var r=e.split("__"),o=r.pop(),i=Object(l.find)(n,["_id",r.pop()]);Object(l.set)(i,o,t)}))}),n}return I()(t,e),k()(t,[{key:"getGroupValues",value:function(){return this.props.value.map(function(e){var t=Object(l.mapKeys)(Object(l.omit)(e,["_id","_type"]),function(e,t){return t.replace(/\-/g,"_")});return[e._type,t]})}},{key:"render",value:function(){var e=this.handleGroupSetup,t=this.handleGroupFieldSetup,n=this.handleAddGroup,r=this.handleCloneGroup,o=this.handleRemoveGroup,i=this.handleToggleGroup,c=this.handleToggleAllGroups,l=this.props,u=l.value;return(0,l.children)({groupValues:this.getGroupValues(),allGroupsAreCollapsed:this.state.collapsedGroups.length===u.length,handleGroupSetup:e,handleGroupFieldSetup:t,handleAddGroup:n,handleCloneGroup:r,handleRemoveGroup:o,handleToggleGroup:i,handleToggleAllGroups:c})}}]),t}(D.Component);Object(p.addFilter)("carbon-fields.complex.block","carbon-fields/blocks",function(e){return function(t){var n=t.id,r=t.name,o=t.value,i=t.error,c=t.field;return wp.element.createElement(N,t,function(l){var u=l.groupValues,a=l.allGroupsAreCollapsed,s=l.handleGroupSetup,f=l.handleGroupFieldSetup,p=l.handleAddGroup,d=l.handleCloneGroup,b=l.handleRemoveGroup,m=l.handleToggleGroup,h=l.handleToggleAllGroups;return wp.element.createElement(e,{groupIdKey:"_id",groupFilterKey:"_type",id:n,name:r,value:o,error:i,field:c,groupValues:u,allGroupsAreCollapsed:a,onGroupSetup:s,onGroupFieldSetup:f,onAddGroup:p,onCloneGroup:d,onRemoveGroup:b,onToggleGroup:m,onToggleAllGroups:h,onChange:t.onChange})})}});var R=n(7),V=n.n(R);n(47),Object(p.addFilter)("carbon-fields.date_time.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonText:Object(s.__)("Select Date","carbon-fields-ui")},t))}}),n(48),Object(p.addFilter)("carbon-fields.file.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonLabel:Object(s.__)("Select File","carbon-fields-ui"),mediaLibraryButtonLabel:Object(s.__)("Use File","carbon-fields-ui"),mediaLibraryTitle:Object(s.__)("Select File","carbon-fields-ui")},t))}});var U=function(e){var t=e.type;return wp.element.createElement("em",null,Object(s.sprintf)(Object(s.__)("Field of type '%s' is not supported in Gutenberg.","carbon-fields-ui"),[t]))};Object(p.addFilter)("carbon-fields.footer_scripts.block","carbon-fields/blocks",function(){return function(e){return wp.element.createElement(U,{type:e.field.type})}}),Object(p.addFilter)("carbon-fields.header_scripts.block","carbon-fields/blocks",function(){return function(e){return wp.element.createElement(U,{type:e.field.type})}}),Object(p.addFilter)("carbon-fields.hidden.block","carbon-fields/blocks",function(){return function(e){return wp.element.createElement(U,{type:e.field.type})}}),Object(p.addFilter)("carbon-fields.image.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonLabel:Object(s.__)("Select Image","carbon-fields-ui"),mediaLibraryButtonLabel:Object(s.__)("Use Image","carbon-fields-ui"),mediaLibraryTitle:Object(s.__)("Select Image","carbon-fields-ui")},t))}}),n(49),n(50),n(51),Object(p.addFilter)("carbon-fields.media_gallery.block","carbon-fields/blocks",function(e){return function(t){return wp.element.createElement(e,V()({buttonLabel:Object(s.__)("Select Attachments","carbon-fields-ui"),mediaLibraryButtonLabel:Object(s.__)("Use Attachments","carbon-fields-ui"),mediaLibraryTitle:Object(s.__)("Select Attachments","carbon-fields-ui")},t))}}),n(52),n(53),n(54),n(55),n(56),Object(p.addFilter)("carbon-fields.sidebar.block","carbon-fields/blocks",function(){return function(e){return wp.element.createElement(U,{type:e.field.type})}}),n(57),n(58),n(59),Object(p.addFilter)("carbon-fields.field-edit.block","carbon-fields/blocks",Object(f.compose)(y,Object(u.withDispatch)(function(e){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}),d.withValidation));var K=Object(u.combineReducers)({fieldDefinitionsByBlockName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_FIELD_DEFINITIONS":return t.payload.definitions;default:return e}}});function q(e){return{type:"SETUP_FIELD_DEFINITIONS",payload:{definitions:e}}}function W(e,t){return e.fieldDefinitionsByBlockName[t.replace("carbon-fields/","")]||[]}Object(u.registerStore)("carbon-fields/blocks",{reducer:K,actions:r,selectors:o});var $=n(16),H=n(18),z=(n(60),function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i1&&void 0!==arguments[1]?arguments[1]:null;return Object(l.get)(e,"settings.".concat(t),n)};X[t]=e.fields.map(function(t){return c()({},t,{container_id:e.id})}),Object(a.registerBlockType)("carbon-fields/".concat(t),{id:e.id,title:e.title,icon:r("icon"),category:r("category.slug"),keywords:r("keywords",[]),description:r("description",""),attributes:{data:{type:"object",default:n}},supports:{preview:r("preview"),alignWide:!1,anchor:!1,html:!1},edit:J,save:Q})}),Object(u.dispatch)("carbon-fields/blocks").setupFieldDefinitions(X)}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=63)}([function(e,t){e.exports=lodash},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=wp.hooks},function(e,t){e.exports=wp.i18n},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=wp.data},function(e,t){e.exports=cf.core},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;tt=>{let n;t(0,(t,r)=>{0===t&&(n=r),1===t&&e(r),1!==t&&0!==t||n(1)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;let r;n(0,e=>{2===e&&r&&(r.unsubscribe?r.unsubscribe():r())}),r=e.subscribe({next:e=>n(1,e),error:e=>n(2,e),complete:()=>n(2)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;const r="undefined"!=typeof Symbol&&e[Symbol.iterator]?e[Symbol.iterator]():e;let o,i=!1,c=!1;n(0,e=>{1===e&&(c=!0,i||o&&o.done||function(){for(i=!0;c;)c=!1,(o=r.next()).done?n(2):n(1,o.value);i=!1}())})})},function(e,t){e.exports=((e,t)=>(n,r)=>{if(0!==n)return;const o=e=>r(1,e);r(0,n=>{2===n&&e.removeEventListener(t,o)}),e.addEventListener(t,o)})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;let r=!1;e.then(e=>{r||(n(1,e),n(2))},e=>{r||n(2,e)}),n(0,e=>{2===e&&(r=!0)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;let r=0;const o=setInterval(()=>{n(1,r++)},e);n(0,e=>{2===e&&clearInterval(o)})})},function(e,t){e.exports=(e=>t=>(n,r)=>{0===n&&t(0,(t,n)=>{r(t,1===t?e(n):n)})})},function(e,t){e.exports=function(e,t){let n=2===arguments.length;return r=>(o,i)=>{if(0!==o)return;let c=t;r(0,(t,r)=>{1===t?(c=n?e(c,r):(n=!0,r),i(1,c)):i(t,r)})}}},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;const r=e=>void 0!==e,o=e=>void 0===e,i=()=>{};let c,a,l=!1;function u(e){1===e&&(a||c||i)(1),2===e&&(a&&a(2),c&&c(2))}e(0,(e,t)=>{if(0===e)c=t,n(0,u);else if(1===e){const e=t;a&&a(2),e(0,(e,t)=>{0===e?(a=t)(1):1===e?n(1,t):2===e&&o(t)?l?n(2):(a=void 0,c(1)):2===e&&r(t)&&n(2,t)})}else 2===e&&o(t)?a?l=!0:n(2):2===e&&r(t)&&n(2,t)})})},function(e,t){e.exports=(e=>t=>(n,r)=>{if(0!==n)return;let o,i=0;function c(t,n){i{0===t?(o=n,r(0,c)):1===t?it=>(n,r)=>{if(0!==n)return;let o,i=0;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t&&it=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=function(...e){return(t,n)=>{if(0!==t)return;const r=e.length,o=new Array(r);let i=0,c=0;const a=e=>{if(0!==e)for(let t=0;t{0===e?(o[t]=l,1==++i&&n(0,a)):2===e?(o[t]=void 0,++c===r&&n(2)):n(e,l)})}}},function(e,t){e.exports=((...e)=>(t,n)=>{if(0!==t)return;const r=e.length;if(0===r)return n(0,()=>{}),void n(2);let o,i=0;const c=(e,t)=>{1!==e&&2!==e||o(e,t)};!function t(){i!==r?e[i](0,(e,r)=>{0===e?(o=r,0===i?n(0,c):o(1)):1===e?n(1,r):2===e&&(i++,t())}):n(2)}()})},function(e,t){const n={};e.exports=((...e)=>(t,r)=>{if(0!==t)return;const o=e.length;if(0===o)return r(0,()=>{}),r(1,[]),void r(2);let i=o,c=o,a=o;const l=new Array(o),u=new Array(o),s=(e,t)=>{if(2===e)for(let e=0;e{l[t]=n,e(0,(e,f)=>{if(0===e)u[t]=f,0==--i&&r(0,s);else if(1===e){const e=c?l[t]===n?--c:c:0;if(l[t]=f,0===e){const e=new Array(o);for(let t=0;t{let t,n=[];return function(r,o){if(0!==r)return;n.push(o);const i=(e,r)=>{if(0!==e)if(2===e){const e=n.indexOf(o);e>-1&&n.splice(e,1),n.length||t(2)}else t(e,r)};1!==n.length?o(0,i):e(0,(e,r)=>{if(0===e)t=r,o(0,i);else for(let t of n.slice(0))t(e,r);2===e&&(n=[])})}})},function(e,t){e.exports=function(...e){let t=e[0];for(let n=1,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:0;return Object(s.mapKeys)(e,function(e,n){return"".concat(Object(s.repeat)("parent.",t)).concat(n)})}function v(e){return Object(s.startsWith)(e,"cf-")}var y=Object(p.withConditionalLogic)(function(e){return Object(m.pipe)(Object(p.fromSelector)(Object(a.select)("core/editor").getBlock,e.blockId),function(e){return void 0===e&&(e=b),function(t){return function(n,r){if(0===n){var o,i,c=!1;t(0,function(t,n){0===t&&(i=n),1===t?c&&e(o,n)?i(1):(c=!0,o=n,r(1,n)):r(t,n)})}}}}(),Object(m.map)(function(e){return e.attributes.data}))},function(e,t){var n={};if(Object(s.has)(t,e.field.base_name))n=h(Object(s.omit)(t,[e.field.base_name]));else{var r=e.id.split("__");r.shift();var o=r.shift();r.pop();var i=r.reduce(function(e,t){return v(t)?e:e+1},0);n=h(n=Object(s.omit)(t,[o]),i+1);for(var c=o;r.length>0;){var a=r.shift(),l=v(a),u=!l;if(l){var f=Object(s.findIndex)(Object(s.get)(t,c),["_id",a]);c="".concat(c,".").concat(f);var d=Object(s.get)(t,c);d=h(d=Object(s.omit)(d,["_id","_type",e.field.base_name]),i),Object(s.assign)(n,d)}u&&(c="".concat(c,".").concat(a),i--)}}return n});n(41),Object(d.addFilter)("carbon-fields.association.block","carbon-fields/blocks",Object(p.withProps)(function(e){return{hierarchyResolver:function(){var t=Object(a.select)("core/editor").getBlock(e.blockId),n=e.id.split("__");n.shift();for(var r=n.shift(),o="data.".concat(r);n.length>0;){var i=n.shift();if(0===i.indexOf("cf-")){var c=Object(s.get)(t.attributes,"".concat(o)),l=Object(s.find)(c,["_id",i]),u=c.indexOf(l);o="".concat(o,".").concat(u),r="".concat(r,"[").concat(u,"]:").concat(l._type,"/")}else o="".concat(o,".").concat(i),r="".concat(r).concat(i)}return r}}}));var g=n(21),O=n.n(g),_=n(9),j=n.n(_),w=n(10),k=n.n(w),x=n(11),S=n.n(x),E=n(12),G=n.n(E),C=n(13),F=n.n(C),I=n(1),T=n.n(I),A=n(4),P=n.n(A),N=n(16),B=n.n(N),D=n(8),L=(n(47),n(48),Object(p.withFilters)("carbon-fields.field-wrapper.block")(p.Field)),M=function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1?Object(s.without)(n,e):O()(n).concat([e])}})}),P()(T()(T()(n)),"handleToggleAllGroups",function(){var e=n.props.value;n.setState(function(t){var n=t.collapsedGroups;return{collapsedGroups:n=n.length!==e.length?e.map(function(e){return e._id}):[]}})}),P()(T()(T()(n)),"handleGroupSetup",function(e,t){var r=Object(s.get)(Object(s.find)(n.props.field.groups,["name",e._type]),"fields",[]),o=Object(s.omit)(e,["_id","_type"]);return Object(s.assign)({},t,{id:e._id,fields:r,collapsed:n.state.collapsedGroups.indexOf(e._id)>-1,context:"block",values:o})}),P()(T()(T()(n)),"handleGroupFieldSetup",function(e,t,r){var o=n.props.blockId,i="".concat(n.props.id,"__").concat(r.id,"__").concat(e.base_name),c=Object(s.get)(r,"values.".concat(e.base_name));return[L,Object(s.assign)({},t,{key:i,id:i,name:e.base_name,containerId:n.props.containerId,blockId:o,field:e,value:c,onChange:n.handleGroupFieldChange})]}),P()(T()(T()(n)),"handleGroupFieldChange",function(e,t){var r=n.props,o=r.id,i=r.value;(0,r.onChange)(o,B()(i,function(n){var r=e.split("__"),o=r.pop(),i=Object(s.find)(n,["_id",r.pop()]);Object(s.set)(i,o,t)}))}),n}return F()(t,e),k()(t,[{key:"getGroupValues",value:function(){return this.props.value.map(function(e){var t=Object(s.mapKeys)(Object(s.omit)(e,["_id","_type"]),function(e,t){return t.replace(/\-/g,"_")});return[e._type,t]})}},{key:"render",value:function(){var e=this.handleGroupSetup,t=this.handleGroupFieldSetup,n=this.handleAddGroup,r=this.handleCloneGroup,o=this.handleRemoveGroup,i=this.handleToggleGroup,c=this.handleToggleAllGroups,a=this.props,l=a.value;return(0,a.children)({groupValues:this.getGroupValues(),allGroupsAreCollapsed:this.state.collapsedGroups.length===l.length,handleGroupSetup:e,handleGroupFieldSetup:t,handleAddGroup:n,handleCloneGroup:r,handleRemoveGroup:o,handleToggleGroup:i,handleToggleAllGroups:c})}}]),t}(D.Component);Object(d.addFilter)("carbon-fields.complex.block","carbon-fields/blocks",function(e){return function(t){var n=t.id,r=t.name,o=t.value,i=t.error,c=t.field;return wp.element.createElement(M,t,function(a){var l=a.groupValues,u=a.allGroupsAreCollapsed,s=a.handleGroupSetup,f=a.handleGroupFieldSetup,d=a.handleAddGroup,p=a.handleCloneGroup,b=a.handleRemoveGroup,m=a.handleToggleGroup,h=a.handleToggleAllGroups;return wp.element.createElement(e,{groupIdKey:"_id",groupFilterKey:"_type",id:n,name:r,value:o,error:i,field:c,groupValues:l,allGroupsAreCollapsed:u,onGroupSetup:s,onGroupFieldSetup:f,onAddGroup:d,onCloneGroup:p,onRemoveGroup:b,onToggleGroup:m,onToggleAllGroups:h,onChange:t.onChange})})}});var R=n(7),U=n.n(R),V=n(22),K=(n(49),function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_CONTAINER_DEFINITIONS":return t.payload.definitions;default:return e}},fieldDefinitionsByBlockName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_FIELD_DEFINITIONS":return t.payload.definitions;default:return e}}});function $(e){return{type:"SETUP_CONTAINER_DEFINITIONS",payload:{definitions:e}}}function H(e){return{type:"SETUP_FIELD_DEFINITIONS",payload:{definitions:e}}}function z(e,t){return e.containerDefinitionsByBlockName[t.replace("carbon-fields/","")]||{}}function J(e,t){return e.fieldDefinitionsByBlockName[t.replace("carbon-fields/","")]||[]}Object(a.registerStore)("carbon-fields/blocks",{reducer:W,actions:r,selectors:o});var Q=n(23),X=n.n(Q),Y=n(15),Z=n(18),ee=(n(62),function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i1&&void 0!==arguments[1]?arguments[1]:null;return Object(s.get)(e,"settings.".concat(t),n)};re[t]=e,oe[t]=e.fields.map(function(e){return c()({},e)}),Object(l.registerBlockType)("carbon-fields/".concat(t),{title:e.title,icon:r("icon"),category:r("category.slug"),keywords:r("keywords",[]),description:r("description",""),attributes:{data:{type:"object",default:n}},supports:{tabs:Object(s.isPlainObject)(r("tabs")),preview:r("preview"),alignWide:!1,anchor:!1,html:!1},edit:te,save:ne})}),Object(a.dispatch)("carbon-fields/blocks").setupContainerDefinitions(re),Object(a.dispatch)("carbon-fields/blocks").setupFieldDefinitions(oe)}]); \ No newline at end of file diff --git a/build/gutenberg/core.css b/build/gutenberg/core.css index 94f095fe3..179c7f358 100644 --- a/build/gutenberg/core.css +++ b/build/gutenberg/core.css @@ -294,7 +294,7 @@ .cf-complex__groups { position: relative; z-index: 0; } - .cf-complex--tabbed-vertical .cf-complex__groups { + .cf-complex--tabbed-vertical > .cf-complex__groups { flex: 0 0 80%; } .cf-complex__group { @@ -362,7 +362,7 @@ background-color: #fff; } .cf-complex__group-body[hidden] { display: none; } - .cf-complex--grid .cf-complex__group-body { + .cf-complex__group--grid > .cf-complex__group-body { margin-top: -1px; } /** @@ -384,11 +384,11 @@ display: inline-block; } .cf-complex__tabs .cf-complex__inserter { height: 36px; } - .cf-complex--tabbed-horizontal .cf-complex__inserter { + .cf-complex__tabs--tabbed-horizontal .cf-complex__inserter { width: 36px; align-self: flex-end; margin-bottom: 4px; } - .cf-complex--tabbed-vertical .cf-complex__inserter { + .cf-complex__tabs--tabbed-vertical .cf-complex__inserter { display: block; } .cf-complex__tabs .cf-complex__inserter-button { @@ -436,6 +436,10 @@ .cf-complex__group-actions { display: flex; align-items: center; } + .cf-complex__group-actions--grid { + position: absolute; + top: 12px; + right: 12px; } .cf-complex__group-actions--tabbed { justify-content: flex-end; padding: 8px 12px; @@ -443,10 +447,6 @@ border-style: solid; border-color: #e2e4e7; background-color: #fbfbfc; } - .cf-complex--grid .cf-complex__group-actions { - position: absolute; - top: 12px; - right: 12px; } .cf-complex__group-action { display: inline-flex; @@ -472,19 +472,19 @@ .cf-complex__tabs { position: relative; z-index: 1; } - .cf-complex--tabbed-horizontal .cf-complex__tabs { + .cf-complex__tabs--tabbed-horizontal { display: inline-flex; margin-bottom: -5px; } - .cf-complex--tabbed-vertical .cf-complex__tabs { + .cf-complex__tabs--tabbed-vertical { flex: 0 0 20%; margin-right: -1px; } .cf-complex__tabs-list { margin: 0; } - .cf-complex--tabbed-horizontal .cf-complex__tabs-list { + .cf-complex__tabs--tabbed-horizontal .cf-complex__tabs-list { display: flex; flex-wrap: wrap; } - .cf-complex--tabbed-vertical .cf-complex__tabs-list { + .cf-complex__tabs--tabbed-vertical .cf-complex__tabs-list { margin-bottom: -1px; } .cf-complex__tabs-item { @@ -497,25 +497,29 @@ font-size: 12px; cursor: pointer; transition: background-color 0.1s linear, border-color 0.1s linear; } - .cf-complex--tabbed-horizontal .cf-complex__tabs-item { - margin: 0 4px 4px 0; } - .cf-complex--tabbed-vertical .cf-complex__tabs-item ~ .cf-complex__tabs-item { - border-top-width: 0; } .cf-complex__tabs-item:hover { background-color: #fff; } + .cf-complex__tabs-item--tabbed-horizontal { + margin: 0 4px 4px 0; } + .cf-complex__tabs-item--tabbed-vertical ~ .cf-complex__tabs-item--tabbed-vertical { + border-top-width: 0; } .cf-complex__tabs-item--current { background-color: #fff; } - .cf-complex--tabbed-horizontal .cf-complex__tabs-item--current { + .cf-complex__tabs-item--tabbed-horizontal.cf-complex__tabs-item--current { border-bottom-color: #fff !important; } - .cf-complex--tabbed-vertical .cf-complex__tabs-item--current { + .cf-complex__tabs-item--tabbed-vertical.cf-complex__tabs-item--current { border-right-color: #fff !important; } /** * Placeholder */ -.cf-complex__placeholder-label { +.cf-complex__placeholder-label.cf-complex__placeholder-label { margin: 8px 0 12px; } +.cf-container-term-meta .cf-complex__placeholder-label { + font-style: normal; + color: inherit; } + /* ========================================================================== Colors ========================================================================== */ @@ -1835,7 +1839,7 @@ span.flatpickr-weekday { ========================================================================== */ .cf-text__input { display: block; - width: 100%; + width: 100% !important; margin: 0; } /* ========================================================================== @@ -1864,7 +1868,7 @@ span.flatpickr-weekday { ========================================================================== */ .cf-textarea__input { display: block; - width: 100%; + width: 100% !important; resize: vertical; } /* ========================================================================== diff --git a/build/gutenberg/core.js b/build/gutenberg/core.js index d10fadbf6..fda91fe05 100644 --- a/build/gutenberg/core.js +++ b/build/gutenberg/core.js @@ -3060,7 +3060,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\nvar MediaLibrary =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_8___default()(MediaLibrary, _Component);\n\n function MediaLibrary() {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4___default()(this, MediaLibrary);\n\n return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(MediaLibrary).apply(this, arguments));\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5___default()(MediaLibrary, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props = this.props,\n onSelect = _this$props.onSelect,\n typeFilter = _this$props.typeFilter;\n this.props.initMediaBrowser({\n onSelect: onSelect,\n typeFilter: typeFilter\n });\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.destroyMediaBrowser();\n }\n /**\n * Render the component.\n *\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var openMediaBrowser = this.props.openMediaBrowser;\n return this.props.children({\n openMediaBrowser: openMediaBrowser\n });\n }\n }]);\n\n return MediaLibrary;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var actions = [{\n event: 'initMediaBrowserEvent',\n prop: 'initMediaBrowser',\n type: 'INIT_MEDIA_BROWSER'\n }, {\n event: 'openMediaBrowserEvent',\n prop: 'openMediaBrowser',\n type: 'OPEN_MEDIA_BROWSER'\n }, {\n event: 'destroyMediaBrowserEvent',\n prop: 'destroyMediaBrowser',\n type: 'DESTROY_MEDIA_BROWSER'\n }].map(function (actionData) {\n var _component$useEvent = component.useEvent(actionData.event),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3___default()(_component$useEvent, 2),\n actionChannel$ = _component$useEvent2[0],\n action = _component$useEvent2[1];\n\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default()({}, actionData, {\n action: action,\n channel$: actionChannel$\n });\n });\n var combined$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"combine\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(actions.map(function (_ref) {\n var action = _ref.action,\n prop = _ref.prop;\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_13__[\"default\"])({\n action: action,\n prop: prop\n });\n }))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"map\"])(function (combinedActions) {\n return Object(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"toProps\"])(combinedActions.reduce(function (acc, curr) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default()({}, acc, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, curr.prop, curr.action));\n }, {}));\n }));\n return callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"merge\"].apply(void 0, [combined$].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(actions.map(function (_ref2) {\n var channel$ = _ref2.channel$,\n type = _ref2.type;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"pipe\"])(channel$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_12__[\"map\"])(function (payload) {\n return {\n type: type,\n payload: payload\n };\n }));\n }))));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n var mediaBrowser = null;\n return function (effect) {\n switch (effect.type) {\n case 'INIT_MEDIA_BROWSER':\n var _effect$payload = effect.payload,\n onSelect = _effect$payload.onSelect,\n typeFilter = _effect$payload.typeFilter;\n\n if (!onSelect) {\n return;\n }\n\n mediaBrowser = wp.media({\n title: props.title,\n library: {\n type: typeFilter\n },\n button: {\n text: props.buttonLabel\n },\n multiple: props.multiple\n });\n mediaBrowser.on('select', function () {\n var file = mediaBrowser.state().get('selection').toJSON();\n onSelect(file);\n });\n break;\n\n case 'OPEN_MEDIA_BROWSER':\n if (mediaBrowser) {\n mediaBrowser.open();\n }\n\n break;\n\n case 'DESTROY_MEDIA_BROWSER':\n mediaBrowser = null;\n break;\n }\n };\n}\n\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"withEffects\"])(aperture, {\n handler: handler\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[\"compose\"])(applyWithEffects)(MediaLibrary));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/media-library/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\nfunction MediaLibrary(_ref) {\n var children = _ref.children,\n openMediaBrowser = _ref.openMediaBrowser;\n return children({\n openMediaBrowser: openMediaBrowser\n });\n}\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var mount$ = component.mount;\n var unmount$ = component.unmount;\n\n var _component$useEvent = component.useEvent('openMediaBrowserEvent'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n openMediaBrowserEvent$ = _component$useEvent2[0],\n openMediaBrowser = _component$useEvent2[1];\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(mount$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function () {\n return {\n type: 'INIT'\n };\n })), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(unmount$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function () {\n return {\n type: 'DESTROY'\n };\n })), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({\n openMediaBrowser: openMediaBrowser\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"toProps\"])), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(openMediaBrowserEvent$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (payload) {\n return {\n type: 'OPEN',\n payload: payload\n };\n })));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n var mediaBrowser = null;\n return function (effect) {\n switch (effect.type) {\n case 'INIT':\n var onSelect = props.onSelect,\n typeFilter = props.typeFilter;\n mediaBrowser = wp.media({\n title: props.title,\n library: {\n type: typeFilter\n },\n button: {\n text: props.buttonLabel\n },\n multiple: props.multiple\n });\n mediaBrowser.on('select', function () {\n var file = mediaBrowser.state().get('selection').toJSON();\n onSelect(file);\n });\n break;\n\n case 'OPEN':\n if (mediaBrowser) {\n mediaBrowser.open();\n }\n\n break;\n\n case 'DESTROY':\n mediaBrowser = null;\n break;\n }\n };\n}\n\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"withEffects\"])(aperture, {\n handler: handler\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"compose\"])(applyWithEffects)(MediaLibrary));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/media-library/index.js?"); /***/ }), @@ -3107,7 +3107,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\nvar Sortable =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(Sortable, _Component);\n\n function Sortable() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, Sortable);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Sortable)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleStart\", function (e, ui) {\n ui.item.data('index', ui.item.index());\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleUpdate\", function (e, ui) {\n var _this$props = _this.props,\n items = _this$props.items,\n forwardedRef = _this$props.forwardedRef,\n onUpdate = _this$props.onUpdate;\n var oldIndex = ui.item.data('index');\n var newIndex = ui.item.index();\n ui.item.removeData('index');\n window.jQuery(forwardedRef.current).sortable('cancel');\n onUpdate(immer__WEBPACK_IMPORTED_MODULE_9___default()(items, function (draft) {\n draft.splice.apply(draft, [newIndex, 0].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(draft.splice(oldIndex, 1))));\n }));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(Sortable, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props2 = this.props,\n options = _this$props2.options,\n forwardedRef = _this$props2.forwardedRef;\n window.jQuery(forwardedRef.current).sortable(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, options, {\n start: this.handleStart,\n update: this.handleUpdate\n }));\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var forwardedRef = this.props.forwardedRef;\n var $element = window.jQuery(forwardedRef.current);\n var instance = $element.sortable('instance');\n\n if (instance) {\n $element.sortable('destroy');\n }\n }\n /**\n * Handles the `start` event.\n *\n * @param {Object} e\n * @param {Object} ui\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n return _wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Children\"].only(this.props.children);\n }\n }]);\n\n return Sortable;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Sortable);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/sortable/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\nvar Sortable =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(Sortable, _Component);\n\n function Sortable() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, Sortable);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Sortable)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleStart\", function (e, ui) {\n var onStart = _this.props.onStart;\n\n if (onStart) {\n onStart(e, ui);\n }\n\n ui.item.data('index', ui.item.index());\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleUpdate\", function (e, ui) {\n var _this$props = _this.props,\n items = _this$props.items,\n forwardedRef = _this$props.forwardedRef,\n onUpdate = _this$props.onUpdate;\n var oldIndex = ui.item.data('index');\n var newIndex = ui.item.index();\n ui.item.removeData('index');\n window.jQuery(forwardedRef.current).sortable('cancel');\n onUpdate(immer__WEBPACK_IMPORTED_MODULE_9___default()(items, function (draft) {\n draft.splice.apply(draft, [newIndex, 0].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(draft.splice(oldIndex, 1))));\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleStop\", function (e, ui) {\n var onStop = _this.props.onStop;\n\n if (onStop) {\n onStop(e, ui);\n }\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(Sortable, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props2 = this.props,\n options = _this$props2.options,\n forwardedRef = _this$props2.forwardedRef;\n window.jQuery(forwardedRef.current).sortable(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, options, {\n start: this.handleStart,\n update: this.handleUpdate,\n stop: this.handleStop\n }));\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var forwardedRef = this.props.forwardedRef;\n var $element = window.jQuery(forwardedRef.current);\n var instance = $element.sortable('instance');\n\n if (instance) {\n $element.sortable('destroy');\n }\n }\n /**\n * Handles the `start` event.\n *\n * @param {Object} e\n * @param {Object} ui\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n return _wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Children\"].only(this.props.children);\n }\n }]);\n\n return Sortable;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Sortable);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/components/sortable/index.js?"); /***/ }), @@ -3119,7 +3119,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/association/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\nvar AssociationField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(AssociationField, _Component);\n\n function AssociationField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, AssociationField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(AssociationField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"selectedList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSearchChange\", function (queryTerm) {\n var _this$props = _this.props,\n fetchOptions = _this$props.fetchOptions,\n setState = _this$props.setState;\n setState({\n queryTerm: queryTerm\n });\n fetchOptions({\n queryTerm: queryTerm\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddItem\", function (option) {\n var _this$props2 = _this.props,\n field = _this$props2.field,\n id = _this$props2.id,\n value = _this$props2.value,\n onChange = _this$props2.onChange,\n setState = _this$props2.setState,\n selectedOptions = _this$props2.selectedOptions; // Don't do anything if the duplicates aren't allowed and\n // the item is already selected.\n\n if (!field.duplicates_allowed && option.disabled) {\n return;\n } // Don't do anything, because the maximum is reached.\n\n\n if (field.max > 0 && value.length >= field.max) {\n // alert( carbonFieldsL10n.field.maxNumItemsReached.replace( '%s', field.max ) );\n return;\n }\n\n onChange(id, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(value).concat([Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"pick\"])(option, 'id', 'type', 'subtype')]));\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat([option])\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveItem\", function (option) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n id = _this$props3.id,\n onChange = _this$props3.onChange,\n setState = _this$props3.setState,\n selectedOptions = _this$props3.selectedOptions;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(value, option));\n setState({\n selectedOptions: Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(selectedOptions, option)\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSort\", function (items) {\n var _this$props4 = _this.props,\n id = _this$props4.id,\n onChange = _this$props4.onChange;\n onChange(id, items);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(AssociationField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props5 = this.props,\n fetchSelectedOptions = _this$props5.fetchSelectedOptions,\n field = _this$props5.field,\n value = _this$props5.value,\n setState = _this$props5.setState;\n setState({\n options: field.options.options,\n totalOptionsCount: field.options.total_options\n });\n\n if (value) {\n fetchSelectedOptions();\n }\n }\n /**\n * Handles the change of search.\n *\n * @param {string} queryTerm\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props6 = this.props,\n name = _this$props6.name,\n value = _this$props6.value,\n field = _this$props6.field,\n totalOptionsCount = _this$props6.totalOptionsCount,\n selectedOptions = _this$props6.selectedOptions,\n queryTerm = _this$props6.queryTerm;\n var options = this.props.options;\n\n if (!field.duplicates_allowed) {\n options = immer__WEBPACK_IMPORTED_MODULE_10___default()(options, function (draft) {\n draft.map(function (option) {\n option.disabled = !!Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"find\"])(value, function (selectedOption) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isMatch\"])(selectedOption, {\n id: option.id,\n type: option.type,\n subtype: option.subtype\n });\n });\n return option;\n });\n });\n } // eslint-disable-next-line\n\n\n var sortableOptions = {\n axis: 'y',\n items: 'li',\n forceHelperSize: true,\n forcePlaceholderSize: true,\n scroll: true,\n handle: '.mobile-handle'\n };\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Fragment\"], null, wp.element.createElement(\"div\", {\n className: \"cf-association__bar\"\n }, wp.element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n value: queryTerm,\n onChange: this.handleSearchChange\n }), wp.element.createElement(\"span\", {\n className: \"cf-association__counter\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Showing %1$d of %2$d results', 'carbon-fields-ui'), Number(options.length), Number(totalOptionsCount)))), wp.element.createElement(\"div\", {\n className: \"cf-association__cols\"\n }, wp.element.createElement(\"div\", {\n className: \"cf-association__col\"\n }, options.map(function (option, index) {\n return wp.element.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_16___default()('cf-association__option', {\n 'cf-association__option--selected': option.disabled\n }),\n key: index\n }, option.thumbnail && wp.element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: option.thumbnail\n }), wp.element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, option.title), wp.element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, option.type)), wp.element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, wp.element.createElement(\"a\", {\n className: \"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit\",\n href: option.edit_link\n }), !option.disabled && (field.max < 0 || value.length < field.max) && wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-plus-alt\",\n onClick: function onClick() {\n return _this2.handleAddItem(option);\n }\n })));\n })), wp.element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n forwardedRef: this.selectedList,\n items: value,\n options: {\n axis: 'y',\n forceHelperSize: true,\n forcePlaceholderSize: true,\n scroll: true\n },\n onUpdate: this.handleSort\n }, wp.element.createElement(\"div\", {\n className: \"cf-association__col\",\n ref: this.selectedList\n }, !!selectedOptions.length && value.map(function (option, index) {\n var optionData = selectedOptions.find(function (selectedOption) {\n return selectedOption.id === option.id && selectedOption.type === option.type && selectedOption.subtype === option.subtype;\n });\n return wp.element.createElement(\"div\", {\n className: \"cf-association__option\",\n key: index\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-sort dashicons dashicons-menu\"\n }), optionData.thumbnail && wp.element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: optionData.thumbnail\n }), wp.element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, optionData.title), wp.element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, optionData.type)), wp.element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-dismiss\",\n onClick: function onClick() {\n return _this2.handleRemoveItem(option);\n }\n })), wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[\").concat(index, \"]\"),\n value: \"\".concat(optionData.type, \":\").concat(optionData.subtype, \":\").concat(optionData.id),\n readOnly: true\n }));\n })))));\n }\n }]);\n\n return AssociationField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Component\"]);\n\nvar fetchData = function fetchData(field, data) {\n return Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/association/\"), 'get', _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({\n container_id: field.container_id,\n field_id: field.base_name\n }, data));\n};\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var actions = [{\n event: 'fetchOptionsEvent',\n prop: 'fetchOptions',\n type: 'FETCH_OPTIONS'\n }, {\n event: 'fetchSelectedOptionsEvent',\n prop: 'fetchSelectedOptions',\n type: 'FETCH_SELECTED_OPTIONS'\n }].map(function (actionData) {\n var _component$useEvent = component.useEvent(actionData.event),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n actionChannel$ = _component$useEvent2[0],\n action = _component$useEvent2[1];\n\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, actionData, {\n action: action,\n channel$: actionChannel$\n });\n });\n var combined$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"combine\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref) {\n var action = _ref.action,\n prop = _ref.prop;\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_19__[\"default\"])({\n action: action,\n prop: prop\n });\n }))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (combinedActions) {\n return Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"toProps\"])(combinedActions.reduce(function (acc, curr) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, acc, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()({}, curr.prop, curr.action));\n }, {}));\n }));\n return callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"merge\"].apply(void 0, [combined$].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref2) {\n var channel$ = _ref2.channel$,\n type = _ref2.type;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(channel$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (payload) {\n return {\n type: type,\n payload: payload\n };\n }));\n }))));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var field = props.field,\n setState = props.setState,\n selectedOptions = props.selectedOptions;\n\n switch (type) {\n case 'FETCH_OPTIONS':\n // eslint-disable-next-line\n var request = window.jQuery.get(window.ajaxurl, {\n action: 'carbon_fields_fetch_association_options',\n term: payload.queryTerm,\n container_id: field.container_id,\n field_name: field.base_name\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('An error occurred while trying to fetch association options.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n setState({\n options: response.data.options,\n totalOptionsCount: response.data.total_options\n });\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n break;\n\n case 'FETCH_SELECTED_OPTIONS':\n fetchData(field, {\n options: props.value\n }).then(function (response) {\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(response))\n });\n });\n break;\n }\n };\n}\n\nvar applyWithState = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"withState\"])({\n options: [],\n selectedOptions: [],\n totalOptionsCount: 0,\n queryTerm: ''\n});\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"withEffects\"])(aperture, {\n handler: handler\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__[\"addFilter\"])('carbon-fields.association.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Minimum number of items not reached (%s items)', 'carbon-fields-ui'), [field.min]);\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"compose\"])(applyWithState, applyWithEffects)(AssociationField));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/association/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/association/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\nvar AssociationField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(AssociationField, _Component);\n\n function AssociationField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, AssociationField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(AssociationField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"selectedList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSearchChange\", function (queryTerm) {\n var _this$props = _this.props,\n fetchOptions = _this$props.fetchOptions,\n setState = _this$props.setState;\n setState({\n queryTerm: queryTerm\n });\n fetchOptions({\n queryTerm: queryTerm\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddItem\", function (option) {\n var _this$props2 = _this.props,\n field = _this$props2.field,\n id = _this$props2.id,\n value = _this$props2.value,\n onChange = _this$props2.onChange,\n setState = _this$props2.setState,\n selectedOptions = _this$props2.selectedOptions; // Don't do anything if the duplicates aren't allowed and\n // the item is already selected.\n\n if (!field.duplicates_allowed && option.disabled) {\n return;\n } // Don't do anything, because the maximum is reached.\n\n\n if (field.max > 0 && value.length >= field.max) {\n // eslint-disable-next-line no-alert\n alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Maximum number of items reached (%s items)', 'carbon-fields-ui'), Number(field.max)));\n return;\n }\n\n onChange(id, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(value).concat([Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"pick\"])(option, 'id', 'type', 'subtype')]));\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat([option])\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveItem\", function (option) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n id = _this$props3.id,\n onChange = _this$props3.onChange,\n setState = _this$props3.setState,\n selectedOptions = _this$props3.selectedOptions;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(value, option));\n setState({\n selectedOptions: Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(selectedOptions, option)\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSort\", function (items) {\n var _this$props4 = _this.props,\n id = _this$props4.id,\n onChange = _this$props4.onChange;\n onChange(id, items);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(AssociationField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props5 = this.props,\n fetchSelectedOptions = _this$props5.fetchSelectedOptions,\n field = _this$props5.field,\n value = _this$props5.value,\n setState = _this$props5.setState;\n setState({\n options: field.options.options,\n totalOptionsCount: field.options.total_options\n });\n\n if (value) {\n fetchSelectedOptions();\n }\n }\n /**\n * Handles the change of search.\n *\n * @param {string} queryTerm\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props6 = this.props,\n name = _this$props6.name,\n value = _this$props6.value,\n field = _this$props6.field,\n totalOptionsCount = _this$props6.totalOptionsCount,\n selectedOptions = _this$props6.selectedOptions,\n queryTerm = _this$props6.queryTerm;\n var options = this.props.options;\n\n if (!field.duplicates_allowed) {\n options = immer__WEBPACK_IMPORTED_MODULE_10___default()(options, function (draft) {\n draft.map(function (option) {\n option.disabled = !!Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"find\"])(value, function (selectedOption) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isMatch\"])(selectedOption, {\n id: option.id,\n type: option.type,\n subtype: option.subtype\n });\n });\n return option;\n });\n });\n }\n\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Fragment\"], null, wp.element.createElement(\"div\", {\n className: \"cf-association__bar\"\n }, wp.element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n value: queryTerm,\n onChange: this.handleSearchChange\n }), wp.element.createElement(\"span\", {\n className: \"cf-association__counter\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Showing %1$d of %2$d results', 'carbon-fields-ui'), Number(options.length), Number(totalOptionsCount)))), wp.element.createElement(\"div\", {\n className: \"cf-association__cols\"\n }, wp.element.createElement(\"div\", {\n className: \"cf-association__col\"\n }, options.map(function (option, index) {\n return wp.element.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_16___default()('cf-association__option', {\n 'cf-association__option--selected': option.disabled\n }),\n key: index\n }, option.thumbnail && wp.element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: option.thumbnail\n }), wp.element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, option.title), wp.element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, option.type)), wp.element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, wp.element.createElement(\"a\", {\n className: \"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit\",\n href: option.edit_link\n }), !option.disabled && (field.max < 0 || value.length < field.max) && wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-plus-alt\",\n onClick: function onClick() {\n return _this2.handleAddItem(option);\n }\n })));\n })), wp.element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n forwardedRef: this.selectedList,\n items: value,\n options: {\n axis: 'y',\n forceHelperSize: true,\n forcePlaceholderSize: true,\n scroll: true,\n handle: '.cf-association__option-sort'\n },\n onUpdate: this.handleSort\n }, wp.element.createElement(\"div\", {\n className: \"cf-association__col\",\n ref: this.selectedList\n }, !!selectedOptions.length && value.map(function (option, index) {\n var optionData = selectedOptions.find(function (selectedOption) {\n return selectedOption.id === option.id && selectedOption.type === option.type && selectedOption.subtype === option.subtype;\n });\n return wp.element.createElement(\"div\", {\n className: \"cf-association__option\",\n key: index\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-sort dashicons dashicons-menu\"\n }), optionData.thumbnail && wp.element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: optionData.thumbnail\n }), wp.element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, optionData.title), wp.element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, optionData.type)), wp.element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-dismiss\",\n onClick: function onClick() {\n return _this2.handleRemoveItem(option);\n }\n })), wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[\").concat(index, \"]\"),\n value: \"\".concat(optionData.type, \":\").concat(optionData.subtype, \":\").concat(optionData.id),\n readOnly: true\n }));\n })))));\n }\n }]);\n\n return AssociationField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var actions = [{\n event: 'fetchOptionsEvent',\n prop: 'fetchOptions',\n type: 'FETCH_OPTIONS'\n }, {\n event: 'fetchSelectedOptionsEvent',\n prop: 'fetchSelectedOptions',\n type: 'FETCH_SELECTED_OPTIONS'\n }].map(function (actionData) {\n var _component$useEvent = component.useEvent(actionData.event),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_component$useEvent, 2),\n actionChannel$ = _component$useEvent2[0],\n action = _component$useEvent2[1];\n\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, actionData, {\n action: action,\n channel$: actionChannel$\n });\n });\n var combined$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"combine\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref) {\n var action = _ref.action,\n prop = _ref.prop;\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_19__[\"default\"])({\n action: action,\n prop: prop\n });\n }))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (combinedActions) {\n return Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"toProps\"])(combinedActions.reduce(function (acc, curr) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, acc, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()({}, curr.prop, curr.action));\n }, {}));\n }));\n return callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"merge\"].apply(void 0, [combined$].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref2) {\n var channel$ = _ref2.channel$,\n type = _ref2.type;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(channel$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (payload) {\n return {\n type: type,\n payload: payload\n };\n }));\n }))));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var setState = props.setState,\n selectedOptions = props.selectedOptions,\n hierarchyResolver = props.hierarchyResolver;\n\n switch (type) {\n case 'FETCH_OPTIONS':\n // eslint-disable-next-line\n var request = window.jQuery.get(window.ajaxurl, {\n action: 'carbon_fields_fetch_association_options',\n term: payload.queryTerm,\n container_id: props.containerId,\n field_name: hierarchyResolver()\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('An error occurred while trying to fetch association options.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n setState({\n options: response.data.options,\n totalOptionsCount: response.data.total_options\n });\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n break;\n\n case 'FETCH_SELECTED_OPTIONS':\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/association/\"), 'get', {\n container_id: props.containerId,\n options: props.value,\n field_id: hierarchyResolver()\n }).then(function (response) {\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(response))\n });\n });\n break;\n }\n };\n}\n\nvar applyWithState = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"withState\"])({\n options: [],\n selectedOptions: [],\n totalOptionsCount: 0,\n queryTerm: ''\n});\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"withEffects\"])(aperture, {\n handler: handler\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__[\"addFilter\"])('carbon-fields.association.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('This field is required.', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Minimum number of items not reached (%s items)', 'carbon-fields-ui'), [field.min]);\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"compose\"])(applyWithState, applyWithEffects)(AssociationField));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/association/index.js?"); /***/ }), @@ -3200,7 +3200,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../registry/fields */ \"./packages/core/registry/fields.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar ComplexGroup =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexGroup, _Component);\n\n function ComplexGroup() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexGroup);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexGroup)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleClick\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onToggle = _this$props.onToggle;\n onToggle(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneClick\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n onClone = _this$props2.onClone;\n onClone(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveClick\", function () {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n onRemove = _this$props3.onRemove;\n onRemove(id);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexGroup, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n index = _this$props4.index,\n label = _this$props4.label,\n name = _this$props4.name,\n prefix = _this$props4.prefix,\n tabbed = _this$props4.tabbed,\n hidden = _this$props4.hidden,\n collapsed = _this$props4.collapsed,\n allowClone = _this$props4.allowClone,\n fields = _this$props4.fields,\n context = _this$props4.context,\n onFieldSetup = _this$props4.onFieldSetup;\n var groupClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group', {\n 'cf-complex__group--collapsed': collapsed\n });\n var toggleClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('dashicons-before', 'cf-complex__group-action-icon', {\n 'dashicons-arrow-up': !collapsed,\n 'dashicons-arrow-down': collapsed\n });\n var actionsClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group-actions', {\n 'cf-complex__group-actions--tabbed': tabbed\n });\n return wp.element.createElement(\"div\", {\n className: groupClasses,\n hidden: hidden\n }, name && wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(prefix, \"[value]\"),\n value: name\n }), !tabbed && wp.element.createElement(\"div\", {\n className: \"cf-complex__group-head\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-complex__group-index\"\n }, index + 1), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-title\"\n }, label)), wp.element.createElement(\"div\", {\n className: \"cf-complex__group-body\",\n hidden: !tabbed && collapsed\n }, fields.map(function (field) {\n var FieldEdit = Object(_registry_fields__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, context);\n\n if (!FieldEdit) {\n return null;\n }\n\n var _onFieldSetup = onFieldSetup(field, {}, _this2.props),\n _onFieldSetup2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_onFieldSetup, 2),\n Field = _onFieldSetup2[0],\n props = _onFieldSetup2[1];\n\n return (// The `key` will be assigned via `onFieldSetup`.\n // eslint-disable-next-line react/jsx-key\n wp.element.createElement(Field, props, wp.element.createElement(FieldEdit, props))\n );\n })), wp.element.createElement(\"div\", {\n className: actionsClasses\n }, allowClone && wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleCloneClick\n }, wp.element.createElement(\"span\", {\n className: \"dashicons-before dashicons-admin-page cf-complex__group-action-icon\"\n }), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Duplicate', 'carbon-fields-ui'))), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleRemoveClick\n }, wp.element.createElement(\"span\", {\n className: \"dashicons-before dashicons-trash cf-complex__group-action-icon\"\n }), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Remove', 'carbon-fields-ui'))), !tabbed && wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleToggleClick\n }, wp.element.createElement(\"span\", {\n className: toggleClasses\n }), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Collapse', 'carbon-fields-ui')))));\n }\n }]);\n\n return ComplexGroup;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexGroup);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/group.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../registry/fields */ \"./packages/core/registry/fields.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar ComplexGroup =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(ComplexGroup, _Component);\n\n function ComplexGroup() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComplexGroup);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(ComplexGroup)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleToggleClick\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onToggle = _this$props.onToggle;\n onToggle(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleCloneClick\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n onClone = _this$props2.onClone;\n onClone(id);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleRemoveClick\", function () {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n onRemove = _this$props3.onRemove;\n onRemove(id);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComplexGroup, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n index = _this$props4.index,\n label = _this$props4.label,\n name = _this$props4.name,\n prefix = _this$props4.prefix,\n tabbed = _this$props4.tabbed,\n hidden = _this$props4.hidden,\n dragged = _this$props4.dragged,\n collapsed = _this$props4.collapsed,\n allowClone = _this$props4.allowClone,\n fields = _this$props4.fields,\n context = _this$props4.context,\n onFieldSetup = _this$props4.onFieldSetup;\n var groupClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group', {\n 'cf-complex__group--grid': !tabbed,\n 'cf-complex__group--tabbed': tabbed,\n 'cf-complex__group--collapsed': collapsed,\n 'cf-complex__group--dragged': dragged\n });\n var toggleClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('dashicons-before', 'cf-complex__group-action-icon', {\n 'dashicons-arrow-up': !collapsed,\n 'dashicons-arrow-down': collapsed\n });\n var actionsClasses = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-complex__group-actions', {\n 'cf-complex__group-actions--grid': !tabbed,\n 'cf-complex__group-actions--tabbed': tabbed\n });\n return wp.element.createElement(\"div\", {\n className: groupClasses,\n hidden: hidden\n }, name && wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(prefix, \"[value]\"),\n value: name\n }), !tabbed && wp.element.createElement(\"div\", {\n className: \"cf-complex__group-head\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-complex__group-index\"\n }, index + 1), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-title\"\n }, label)), !dragged && wp.element.createElement(\"div\", {\n className: \"cf-complex__group-body\",\n hidden: !tabbed && collapsed\n }, fields.map(function (field) {\n var FieldEdit = Object(_registry_fields__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, context);\n\n if (!FieldEdit) {\n return null;\n }\n\n var _onFieldSetup = onFieldSetup(field, {}, _this2.props),\n _onFieldSetup2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_onFieldSetup, 2),\n Field = _onFieldSetup2[0],\n props = _onFieldSetup2[1];\n\n return (// The `key` will be assigned via `onFieldSetup`.\n // eslint-disable-next-line react/jsx-key\n wp.element.createElement(Field, props, wp.element.createElement(FieldEdit, props))\n );\n })), wp.element.createElement(\"div\", {\n className: actionsClasses\n }, allowClone && wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleCloneClick\n }, wp.element.createElement(\"span\", {\n className: \"dashicons-before dashicons-admin-page cf-complex__group-action-icon\"\n }), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Duplicate', 'carbon-fields-ui'))), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleRemoveClick\n }, wp.element.createElement(\"span\", {\n className: \"dashicons-before dashicons-trash cf-complex__group-action-icon\"\n }), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Remove', 'carbon-fields-ui'))), !tabbed && wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-complex__group-action\",\n onClick: this.handleToggleClick\n }, wp.element.createElement(\"span\", {\n className: toggleClasses\n }), wp.element.createElement(\"span\", {\n className: \"cf-complex__group-action-text\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Collapse', 'carbon-fields-ui')))));\n }\n }]);\n\n return ComplexGroup;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexGroup);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/group.js?"); /***/ }), @@ -3212,7 +3212,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./tabs */ \"./packages/core/fields/complex/tabs.js\");\n/* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./inserter */ \"./packages/core/fields/complex/inserter.js\");\n/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./group */ \"./packages/core/fields/complex/group.js\");\n/* harmony import */ var _placeholder__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./placeholder */ \"./packages/core/fields/complex/placeholder.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"groupsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"tabsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"state\", {\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(_this.props.value, \"0.\".concat(_this.props.groupIdKey), null)\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddGroup\", function (selection) {\n var _this$props = _this.props,\n groupIdKey = _this$props.groupIdKey,\n onAddGroup = _this$props.onAddGroup;\n onAddGroup(selection, function (group) {\n if (_this.isTabbed) {\n _this.handleTabsChange(group[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleCloneGroup\", function (groupId) {\n var _this$props2 = _this.props,\n groupIdKey = _this$props2.groupIdKey,\n onCloneGroup = _this$props2.onCloneGroup;\n\n var group = _this.findGroup(groupId);\n\n onCloneGroup(group, function (clonedGroup) {\n if (_this.isTabbed) {\n _this.handleTabsChange(clonedGroup[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveGroup\", function (groupId) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n groupIdKey = _this$props3.groupIdKey,\n onRemoveGroup = _this$props3.onRemoveGroup;\n\n var group = _this.findGroup(groupId);\n\n if (_this.isTabbed) {\n var currentIndex = value.indexOf(group);\n var nextIndex = currentIndex > 0 ? currentIndex - 1 : 1;\n\n _this.setState({\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(value, \"\".concat(nextIndex, \".\").concat(groupIdKey), null)\n });\n }\n\n onRemoveGroup(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleToggleAllClick\", function () {\n var _this$props4 = _this.props,\n allGroupsAreCollapsed = _this$props4.allGroupsAreCollapsed,\n onToggleAllGroups = _this$props4.onToggleAllGroups;\n onToggleAllGroups(!allGroupsAreCollapsed);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSortGroups\", function (groups) {\n var _this$props5 = _this.props,\n id = _this$props5.id,\n onChange = _this$props5.onChange;\n onChange(id, groups);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleTabsChange\", function (groupId) {\n _this.setState({\n currentTab: groupId\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, [{\n key: \"findGroup\",\n\n /**\n * Finds a group.\n *\n * @param {string} groupId\n * @return {?Object}\n */\n value: function findGroup(groupId) {\n var _this$props6 = this.props,\n value = _this$props6.value,\n groupIdKey = _this$props6.groupIdKey;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(value, [groupIdKey, groupId]);\n }\n /**\n * Returns a list of groups that can be added if the field\n * doesn't allow duplicating of groups.\n *\n * @param {string} key\n * @return {Object[]}\n */\n\n }, {\n key: \"getAvailableGroups\",\n value: function getAvailableGroups(key) {\n var _this$props7 = this.props,\n field = _this$props7.field,\n value = _this$props7.value;\n\n if (field.duplicate_groups_allowed) {\n return field.groups;\n }\n\n var existingGroupNames = value.map(function (group) {\n return group[key];\n });\n return field.groups.filter(function (_ref) {\n var name = _ref.name;\n return existingGroupNames.indexOf(name) === -1;\n });\n }\n /**\n * Returns a list of labels of existing groups.\n *\n * @return {string[]}\n */\n\n }, {\n key: \"getGroupLabels\",\n value: function getGroupLabels() {\n var _this$props8 = this.props,\n field = _this$props8.field,\n groupValues = _this$props8.groupValues;\n return groupValues.map(function (_ref2, index) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_ref2, 2),\n name = _ref3[0],\n values = _ref3[1];\n\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(field.groups, ['name', name]);\n\n if (!group) {\n return 'N/A';\n }\n\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isString\"])(group.label_template)) {\n return group.label;\n }\n\n try {\n var label = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"template\"])(group.label_template)(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({\n $_index: index\n }, values));\n return label || group.label;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Couldn't create the label of group - \".concat(e.message));\n return 'N/A';\n }\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} selection\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var _this$props9 = this.props,\n value = _this$props9.value,\n field = _this$props9.field,\n groupIdKey = _this$props9.groupIdKey,\n groupFilterKey = _this$props9.groupFilterKey,\n allGroupsAreCollapsed = _this$props9.allGroupsAreCollapsed,\n onGroupSetup = _this$props9.onGroupSetup,\n onGroupFieldSetup = _this$props9.onGroupFieldSetup,\n onToggleGroup = _this$props9.onToggleGroup;\n var availableGroups = this.getAvailableGroups(groupFilterKey);\n var groupLabels = this.getGroupLabels(); // TODO: Move this to a memoized function.\n\n var tabs = value.map(function (group, index) {\n var id = group[groupIdKey];\n var label = groupLabels[index];\n return {\n id: id,\n label: label\n };\n });\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Fragment\"], null, this.isTabbed && !!value.length && wp.element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n forwardedRef: this.tabsList,\n options: {\n axis: field.layout === 'tabbed-vertical' ? 'y' : 'x',\n forcePlaceholderSize: true\n },\n onUpdate: this.handleSortGroups\n }, wp.element.createElement(_tabs__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n ref: this.tabsList,\n items: tabs,\n current: currentTab,\n onChange: this.handleTabsChange\n }, !!availableGroups.length && !this.isMaximumReached && wp.element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: \"+\",\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }))), !value.length && wp.element.createElement(_placeholder__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n label: \"There are no entries yet.\"\n }, wp.element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n })), !!value.length && wp.element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n options: {\n axis: 'y',\n handle: '.cf-complex__group-head',\n placeholder: 'cf-complex__group-placeholder',\n forcePlaceholderSize: true\n },\n forwardedRef: this.groupsList,\n onUpdate: this.handleSortGroups\n }, wp.element.createElement(\"div\", {\n className: \"cf-complex__groups\",\n ref: this.groupsList\n }, value.map(function (group, index) {\n return (// The `key` will be assigned via `onGroupSetup`.\n // eslint-disable-next-line react/jsx-key\n wp.element.createElement(_group__WEBPACK_IMPORTED_MODULE_18__[\"default\"], onGroupSetup(group, {\n index: index,\n label: groupLabels[index],\n tabbed: _this2.isTabbed,\n hidden: _this2.isTabbed && group[groupIdKey] !== currentTab,\n allowClone: field.duplicate_groups_allowed && !_this2.isMaximumReached,\n onFieldSetup: onGroupFieldSetup,\n onClone: _this2.handleCloneGroup,\n onRemove: _this2.handleRemoveGroup,\n onToggle: onToggleGroup\n }))\n );\n }))), !this.isTabbed && !!value.length && wp.element.createElement(\"div\", {\n className: \"cf-complex__actions\"\n }, !!availableGroups.length && !this.isMaximumReached && wp.element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-complex__toggler\",\n onClick: this.handleToggleAllClick\n }, allGroupsAreCollapsed ? 'Expand All' : 'Collapse All')));\n }\n }, {\n key: \"isTabbed\",\n\n /**\n * Returns true if the field is using tabs for the layout.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.props.field.layout.indexOf('tabbed') > -1;\n }\n /**\n * Returns true if the maximum number of entries is reached.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isMaximumReached\",\n get: function get() {\n var _this$props10 = this.props,\n field = _this$props10.field,\n value = _this$props10.value;\n return field.max > 0 && value.length >= field.max;\n }\n /**\n * Returns the text used in \"Add Entry\" button.\n *\n * @return {string}\n */\n\n }, {\n key: \"inserterButtonText\",\n get: function get() {\n var field = this.props.field;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Add %s', 'carbon-fields-ui'), field.labels.singular_name);\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.field-wrapper', 'carbon-fields/core', function (OriginalField) {\n return function (props) {\n var field = props.field;\n\n if (field.type !== 'complex') {\n return wp.element.createElement(OriginalField, props);\n }\n\n return wp.element.createElement(OriginalField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n className: \"cf-complex--\".concat(field.layout)\n }, props));\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n labels = field.labels,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n var label = min === 1 ? labels.singular_name : labels.plural_name;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Minimum number of rows not reached (%1$d %2$s)', 'carbon-fields-ui'), Number(min), label.toLowerCase());\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./tabs */ \"./packages/core/fields/complex/tabs.js\");\n/* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./inserter */ \"./packages/core/fields/complex/inserter.js\");\n/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./group */ \"./packages/core/fields/complex/group.js\");\n/* harmony import */ var _placeholder__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./placeholder */ \"./packages/core/fields/complex/placeholder.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"groupsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"tabsList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"state\", {\n currentDraggedGroup: null,\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(_this.props.value, \"0.\".concat(_this.props.groupIdKey), null)\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddGroup\", function (selection) {\n var _this$props = _this.props,\n groupIdKey = _this$props.groupIdKey,\n onAddGroup = _this$props.onAddGroup;\n onAddGroup(selection, function (group) {\n if (_this.isTabbed) {\n _this.handleTabsChange(group[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleCloneGroup\", function (groupId) {\n var _this$props2 = _this.props,\n groupIdKey = _this$props2.groupIdKey,\n onCloneGroup = _this$props2.onCloneGroup;\n\n var group = _this.findGroup(groupId);\n\n onCloneGroup(group, function (clonedGroup) {\n if (_this.isTabbed) {\n _this.handleTabsChange(clonedGroup[groupIdKey]);\n }\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveGroup\", function (groupId) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n groupIdKey = _this$props3.groupIdKey,\n onRemoveGroup = _this$props3.onRemoveGroup;\n\n var group = _this.findGroup(groupId);\n\n if (_this.isTabbed) {\n var currentIndex = value.indexOf(group);\n var nextIndex = currentIndex > 0 ? currentIndex - 1 : 1;\n\n _this.setState({\n currentTab: Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(value, \"\".concat(nextIndex, \".\").concat(groupIdKey), null)\n });\n }\n\n onRemoveGroup(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleToggleAllClick\", function () {\n var _this$props4 = _this.props,\n allGroupsAreCollapsed = _this$props4.allGroupsAreCollapsed,\n onToggleAllGroups = _this$props4.onToggleAllGroups;\n onToggleAllGroups(!allGroupsAreCollapsed);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleGroupsSortStart\", function (e, ui) {\n var _this$props5 = _this.props,\n value = _this$props5.value,\n groupIdKey = _this$props5.groupIdKey;\n var index = ui.item.index();\n var id = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"get\"])(value, \"\".concat(index, \".\").concat(groupIdKey), null);\n\n _this.setState({\n currentDraggedGroup: id\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleGroupsSortUpdate\", function (groups) {\n var _this$props6 = _this.props,\n id = _this$props6.id,\n onChange = _this$props6.onChange;\n onChange(id, groups);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleGroupsSortStop\", function () {\n _this.setState({\n currentDraggedGroup: null\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleTabsChange\", function (groupId) {\n _this.setState({\n currentTab: groupId\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, [{\n key: \"findGroup\",\n\n /**\n * Finds a group.\n *\n * @param {string} groupId\n * @return {?Object}\n */\n value: function findGroup(groupId) {\n var _this$props7 = this.props,\n value = _this$props7.value,\n groupIdKey = _this$props7.groupIdKey;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(value, [groupIdKey, groupId]);\n }\n /**\n * Returns a list of groups that can be added if the field\n * doesn't allow duplicating of groups.\n *\n * @param {string} key\n * @return {Object[]}\n */\n\n }, {\n key: \"getAvailableGroups\",\n value: function getAvailableGroups(key) {\n var _this$props8 = this.props,\n field = _this$props8.field,\n value = _this$props8.value;\n\n if (field.duplicate_groups_allowed) {\n return field.groups;\n }\n\n var existingGroupNames = value.map(function (group) {\n return group[key];\n });\n return field.groups.filter(function (_ref) {\n var name = _ref.name;\n return existingGroupNames.indexOf(name) === -1;\n });\n }\n /**\n * Returns a list of labels of existing groups.\n *\n * @return {string[]}\n */\n\n }, {\n key: \"getGroupLabels\",\n value: function getGroupLabels() {\n var _this$props9 = this.props,\n field = _this$props9.field,\n groupValues = _this$props9.groupValues;\n return groupValues.map(function (_ref2, index) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_ref2, 2),\n name = _ref3[0],\n values = _ref3[1];\n\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"find\"])(field.groups, ['name', name]);\n\n if (!group) {\n return 'N/A';\n }\n\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isString\"])(group.label_template)) {\n return group.label;\n }\n\n try {\n var label = Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"template\"])(group.label_template)(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({\n $_index: index\n }, values));\n return label || group.label;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Couldn\\'t create the label of group - %s', 'carbon-fields-ui'), e.message));\n return 'N/A';\n }\n });\n }\n /**\n * Handles adding of group.\n *\n * @param {Object} selection\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$state = this.state,\n currentDraggedGroup = _this$state.currentDraggedGroup,\n currentTab = _this$state.currentTab;\n var _this$props10 = this.props,\n value = _this$props10.value,\n field = _this$props10.field,\n groupIdKey = _this$props10.groupIdKey,\n groupFilterKey = _this$props10.groupFilterKey,\n allGroupsAreCollapsed = _this$props10.allGroupsAreCollapsed,\n onGroupSetup = _this$props10.onGroupSetup,\n onGroupFieldSetup = _this$props10.onGroupFieldSetup,\n onToggleGroup = _this$props10.onToggleGroup;\n var availableGroups = this.getAvailableGroups(groupFilterKey);\n var groupLabels = this.getGroupLabels(); // TODO: Move this to a memoized function.\n\n var tabs = value.map(function (group, index) {\n var id = group[groupIdKey];\n var label = groupLabels[index];\n return {\n id: id,\n label: label\n };\n });\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Fragment\"], null, this.isTabbed && !!value.length && wp.element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n forwardedRef: this.tabsList,\n options: {\n axis: field.layout === 'tabbed-vertical' ? 'y' : 'x',\n forcePlaceholderSize: true\n },\n onUpdate: this.handleGroupsSortUpdate\n }, wp.element.createElement(_tabs__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n ref: this.tabsList,\n items: tabs,\n current: currentTab,\n layout: field.layout,\n onChange: this.handleTabsChange\n }, !!availableGroups.length && !this.isMaximumReached && wp.element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: \"+\",\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }))), !value.length && wp.element.createElement(_placeholder__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n label: \"There are no entries yet.\"\n }, wp.element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n })), !!value.length && wp.element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n items: value,\n options: {\n // axis: 'y',\n helper: 'clone',\n handle: '.cf-complex__group-head',\n placeholder: 'cf-complex__group-placeholder',\n forceHelperSize: true,\n forcePlaceholderSize: true\n },\n forwardedRef: this.groupsList,\n onStart: this.handleGroupsSortStart,\n onUpdate: this.handleGroupsSortUpdate,\n onStop: this.handleGroupsSortStop\n }, wp.element.createElement(\"div\", {\n className: \"cf-complex__groups\",\n ref: this.groupsList\n }, value.map(function (group, index) {\n return (// The `key` will be assigned via `onGroupSetup`.\n // eslint-disable-next-line react/jsx-key\n wp.element.createElement(_group__WEBPACK_IMPORTED_MODULE_18__[\"default\"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n key: \"\".concat(group[groupFilterKey], \"-\").concat(index)\n }, onGroupSetup(group, {\n index: index,\n label: groupLabels[index],\n dragged: group[groupIdKey] === currentDraggedGroup,\n tabbed: _this2.isTabbed,\n hidden: _this2.isTabbed && group[groupIdKey] !== currentTab,\n allowClone: field.duplicate_groups_allowed && !_this2.isMaximumReached,\n onFieldSetup: onGroupFieldSetup,\n onClone: _this2.handleCloneGroup,\n onRemove: _this2.handleRemoveGroup,\n onToggle: onToggleGroup\n })))\n );\n }))), !this.isTabbed && !!value.length && wp.element.createElement(\"div\", {\n className: \"cf-complex__actions\"\n }, !!availableGroups.length && !this.isMaximumReached && wp.element.createElement(_inserter__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n buttonText: this.inserterButtonText,\n groups: availableGroups,\n onSelect: this.handleAddGroup\n }), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-complex__toggler\",\n onClick: this.handleToggleAllClick\n }, allGroupsAreCollapsed ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Expand All', 'carbon-fields-ui') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Collapse All', 'carbon-fields-ui'))));\n }\n }, {\n key: \"isTabbed\",\n\n /**\n * Returns true if the field is using tabs for the layout.\n *\n * @return {boolean}\n */\n get: function get() {\n return this.props.field.layout.indexOf('tabbed') > -1;\n }\n /**\n * Returns true if the maximum number of entries is reached.\n *\n * @return {boolean}\n */\n\n }, {\n key: \"isMaximumReached\",\n get: function get() {\n var _this$props11 = this.props,\n field = _this$props11.field,\n value = _this$props11.value;\n return field.max > 0 && value.length >= field.max;\n }\n /**\n * Returns the text used in \"Add Entry\" button.\n *\n * @return {string}\n */\n\n }, {\n key: \"inserterButtonText\",\n get: function get() {\n var field = this.props.field;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Add %s', 'carbon-fields-ui'), field.labels.singular_name);\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__[\"Component\"]);\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.field-wrapper', 'carbon-fields/core', function (OriginalField) {\n return function (props) {\n var field = props.field;\n\n if (field.type !== 'complex') {\n return wp.element.createElement(OriginalField, props);\n }\n\n return wp.element.createElement(OriginalField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n className: \"cf-complex--\".concat(field.layout)\n }, props));\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__[\"addFilter\"])('carbon-fields.complex.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n labels = field.labels,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('This field is required.', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n var label = min === 1 ? labels.singular_name : labels.plural_name;\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__[\"__\"])('Minimum number of rows not reached (%1$d %2$s)', 'carbon-fields-ui'), Number(min), label.toLowerCase());\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ComplexField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/index.js?"); /***/ }), @@ -3259,7 +3259,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Renders the tabs navigation.\n *\n * @param {Object} props\n * @param {Object[]} props.items\n * @param {string} props.current\n * @param {mixed} props.children\n * @param {Function} props.onChange\n * @param {Object} ref\n * @return {void}\n */\n\nfunction ComplexTabs(_ref, ref) {\n var items = _ref.items,\n current = _ref.current,\n children = _ref.children,\n onChange = _ref.onChange;\n return wp.element.createElement(\"div\", {\n className: \"cf-complex__tabs\"\n }, wp.element.createElement(\"ul\", {\n className: \"cf-complex__tabs-list\",\n ref: ref\n }, items.map(function (item, index) {\n var classes = classnames__WEBPACK_IMPORTED_MODULE_0___default()('cf-complex__tabs-item', {\n 'cf-complex__tabs-item--current': item.id === current\n });\n return wp.element.createElement(\"li\", {\n key: item.id,\n className: classes,\n onClick: function onClick() {\n return onChange(item.id);\n }\n }, item.label ? wp.element.createElement(\"span\", {\n className: \"cf-complex__tabs-title\",\n dangerouslySetInnerHTML: {\n __html: item.label\n }\n }) : wp.element.createElement(\"span\", {\n className: \"cf-complex__tabs-index\"\n }, index + 1));\n })), children);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"])(ComplexTabs));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/tabs.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Renders the tabs navigation.\n *\n * @param {Object} props\n * @param {Object[]} props.items\n * @param {string} props.current\n * @param {string} props.layout\n * @param {mixed} props.children\n * @param {Function} props.onChange\n * @param {Object} ref\n * @return {void}\n */\n\nfunction ComplexTabs(_ref, ref) {\n var items = _ref.items,\n current = _ref.current,\n layout = _ref.layout,\n children = _ref.children,\n onChange = _ref.onChange;\n return wp.element.createElement(\"div\", {\n className: \"cf-complex__tabs cf-complex__tabs--\".concat(layout)\n }, wp.element.createElement(\"ul\", {\n className: \"cf-complex__tabs-list\",\n ref: ref\n }, items.map(function (item, index) {\n var classes = classnames__WEBPACK_IMPORTED_MODULE_0___default()('cf-complex__tabs-item', \"cf-complex__tabs-item--\".concat(layout), {\n 'cf-complex__tabs-item--current': item.id === current\n });\n return wp.element.createElement(\"li\", {\n key: item.id,\n className: classes,\n onClick: function onClick() {\n return onChange(item.id);\n }\n }, item.label ? wp.element.createElement(\"span\", {\n className: \"cf-complex__tabs-title\",\n dangerouslySetInnerHTML: {\n __html: item.label\n }\n }) : wp.element.createElement(\"span\", {\n className: \"cf-complex__tabs-index\"\n }, index + 1));\n })), children);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"])(ComplexTabs));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/complex/tabs.js?"); /***/ }), @@ -3306,7 +3306,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/file/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _components_media_library__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/media-library */ \"./packages/core/components/media-library/index.js\");\n/* harmony import */ var _utils_fetch_attachments_data__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/fetch-attachments-data */ \"./packages/core/utils/fetch-attachments-data.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar FileField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(FileField, _Component);\n\n function FileField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, FileField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(FileField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n data: {}\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFileDataChange\", function (data) {\n _this.setState({\n data: data\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleClear\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, '');\n\n _this.handleFileDataChange({});\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSelect\", function (files) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field,\n onChange = _this$props2.onChange;\n\n var _files = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(files, 1),\n file = _files[0];\n\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"get\"])(file, field.value_type, file.id));\n\n _this.handleFileDataChange(file);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(FileField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle Hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this2 = this;\n\n var _this$props3 = this.props,\n value = _this$props3.value,\n field = _this$props3.field;\n\n if (value) {\n Object(_utils_fetch_attachments_data__WEBPACK_IMPORTED_MODULE_12__[\"default\"])([field.value_meta.id]).then(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 1),\n _ref2$ = _ref2[0],\n data = _ref2$ === void 0 ? {} : _ref2$;\n\n _this2.handleFileDataChange(data);\n });\n }\n }\n /**\n * Returns an URL to the attachment's thumbnail.\n *\n * @return {string}\n */\n\n }, {\n key: \"getThumb\",\n value: function getThumb() {\n var data = this.state.data;\n\n if (data.sizes) {\n var size = data.sizes.thumbnail || data.sizes.full;\n\n if (size) {\n return size.url;\n }\n }\n\n return data.icon;\n }\n /**\n * Handles the file meta set.\n *\n * @param {Object} data\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this3 = this;\n\n var data = this.state.data;\n var _this$props4 = this.props,\n value = _this$props4.value,\n name = _this$props4.name,\n field = _this$props4.field,\n buttonLabel = _this$props4.buttonLabel,\n mediaLibraryButtonLabel = _this$props4.mediaLibraryButtonLabel,\n mediaLibraryTitle = _this$props4.mediaLibraryTitle;\n return wp.element.createElement(_components_media_library__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n onSelect: this.handleSelect,\n multiple: false,\n title: mediaLibraryTitle,\n buttonLabel: mediaLibraryButtonLabel,\n typeFilter: field.type_filter\n }, function (_ref3) {\n var openMediaBrowser = _ref3.openMediaBrowser;\n return wp.element.createElement(\"div\", {\n className: \"cf-file__inner\"\n }, wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: name,\n value: value,\n readOnly: true\n }), value && data.id && wp.element.createElement(\"div\", {\n className: \"cf-file__content\"\n }, wp.element.createElement(\"div\", {\n className: \"cf-file__preview\"\n }, wp.element.createElement(\"img\", {\n src: _this3.getThumb(),\n className: \"cf-file__image\"\n }), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-file__remove dashicons-before dashicons-no-alt\",\n onClick: _this3.handleClear\n })), wp.element.createElement(\"span\", {\n className: \"cf-file__name\",\n title: data.filename\n }, data.filename)), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-file__browse\",\n onClick: openMediaBrowser\n }, buttonLabel));\n });\n }\n }]);\n\n return FileField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FileField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/file/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/file/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _components_media_library__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/media-library */ \"./packages/core/components/media-library/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar FileField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(FileField, _Component);\n\n function FileField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, FileField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(FileField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n data: {}\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFileDataChange\", function (data) {\n _this.setState({\n data: data\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleClear\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, '');\n\n _this.handleFileDataChange({});\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSelect\", function (files) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field,\n onChange = _this$props2.onChange;\n\n var _files = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(files, 1),\n file = _files[0];\n\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"get\"])(file, field.value_type, file.id));\n\n _this.handleFileDataChange(file);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(FileField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle Hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props3 = this.props,\n value = _this$props3.value,\n field = _this$props3.field;\n\n if (value) {\n // TODO: Refactor this to use `@wordpress/api-fetch` package.\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/attachment/?type=\").concat(field.value_type, \"&value=\").concat(value), 'get').then(this.handleFileDataChange);\n }\n }\n /**\n * Returns an URL to the attachment's thumbnail.\n *\n * @return {string}\n */\n\n }, {\n key: \"getThumb\",\n value: function getThumb() {\n var data = this.state.data;\n\n if (data.sizes) {\n var size = data.sizes.thumbnail || data.sizes.full;\n\n if (size) {\n return size.url;\n }\n }\n\n if (data.thumb_url) {\n return data.thumb_url;\n }\n\n return data.icon;\n }\n /**\n * Handles the file meta set.\n *\n * @param {Object} data\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var data = this.state.data;\n var _this$props4 = this.props,\n value = _this$props4.value,\n name = _this$props4.name,\n field = _this$props4.field,\n buttonLabel = _this$props4.buttonLabel,\n mediaLibraryButtonLabel = _this$props4.mediaLibraryButtonLabel,\n mediaLibraryTitle = _this$props4.mediaLibraryTitle;\n return wp.element.createElement(_components_media_library__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n onSelect: this.handleSelect,\n multiple: false,\n title: mediaLibraryTitle,\n buttonLabel: mediaLibraryButtonLabel,\n typeFilter: field.type_filter\n }, function (_ref) {\n var openMediaBrowser = _ref.openMediaBrowser;\n return wp.element.createElement(\"div\", {\n className: \"cf-file__inner\"\n }, wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: name,\n value: value,\n readOnly: true\n }), value && data.id && wp.element.createElement(\"div\", {\n className: \"cf-file__content\"\n }, wp.element.createElement(\"div\", {\n className: \"cf-file__preview\"\n }, wp.element.createElement(\"img\", {\n src: _this2.getThumb(),\n className: \"cf-file__image\"\n }), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-file__remove dashicons-before dashicons-no-alt\",\n onClick: _this2.handleClear\n })), wp.element.createElement(\"span\", {\n className: \"cf-file__name\",\n title: data.filename || data.file_name\n }, data.filename || data.file_name)), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-file__browse\",\n onClick: openMediaBrowser\n }, buttonLabel));\n });\n }\n }]);\n\n return FileField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FileField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/file/index.js?"); /***/ }), @@ -3377,7 +3377,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/map/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _google_map__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./google-map */ \"./packages/core/fields/map/google-map.js\");\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\nvar MapField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(MapField, _Component);\n\n function MapField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, MapField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(MapField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleSearchChange\", Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"debounce\"])(function (address) {\n if (address) {\n _this.props.onGeocodeAddress({\n address: address\n });\n }\n }, 250));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleMapChange\", function (location) {\n var _this$props = _this.props,\n id = _this$props.id,\n value = _this$props.value,\n onChange = _this$props.onChange;\n onChange(id, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, value, location));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(MapField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value;\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Fragment\"], null, wp.element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n id: id,\n className: \"cf-map__search\",\n name: \"\".concat(name, \"[address]\"),\n value: value.address,\n onChange: this.handleSearchChange\n }), wp.element.createElement(_google_map__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n className: \"cf-map__canvas\",\n lat: value.lat,\n lng: value.lng,\n zoom: value.zoom,\n onChange: this.handleMapChange\n }), wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[lat]\"),\n value: value.lat\n }), wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[lng]\"),\n value: value.lng,\n readOnly: true\n }), wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[zoom]\"),\n value: value.zoom,\n readOnly: true\n }));\n }\n }]);\n\n return MapField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var _component$useEvent = component.useEvent('geocodeAddress'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n geocodeAddress$ = _component$useEvent2[0],\n geocodeAddress = _component$useEvent2[1];\n\n var geocodeAddressProps$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({\n onGeocodeAddress: geocodeAddress\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_12__[\"toProps\"]));\n var geocodeAddressEffect$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"pipe\"])(geocodeAddress$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(function (payload) {\n return {\n type: 'GEOCODE_ADDRESS',\n payload: payload\n };\n }));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"merge\"])(geocodeAddressProps$, geocodeAddressEffect$);\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var id = props.id,\n value = props.value,\n onChange = props.onChange;\n\n switch (type) {\n case 'GEOCODE_ADDRESS':\n var geocode = function geocode(address) {\n return new Promise(function (resolve, reject) {\n var geocoder = new window.google.maps.Geocoder();\n geocoder.geocode({\n address: address\n }, function (results, status) {\n if (status === window.google.maps.GeocoderStatus.OK) {\n var location = results[0].geometry.location;\n resolve({\n lat: location.lat(),\n lng: location.lng()\n });\n } else if (status === 'ZERO_RESULTS') {\n reject(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('The address could not be found. ', 'carbon-fields-ui'));\n } else {\n reject(\"\".concat(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Geocode was not successful for the following reason: ', 'carbon-fields-ui'), \" \").concat(status));\n }\n });\n });\n };\n\n geocode(payload.address).then(function (_ref) {\n var lat = _ref.lat,\n lng = _ref.lng;\n onChange(id, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, value, {\n address: payload.address,\n value: \"\".concat(lat, \",\").concat(lng),\n lat: lat,\n lng: lng\n }));\n }).catch(function (alert) {\n // eslint-disable-next-line\n console.log('Error alert'); // eslint-disable-next-line\n\n console.log(alert);\n });\n break;\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_12__[\"withEffects\"])(aperture, {\n handler: handler\n})(MapField));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/map/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/map/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _google_map__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./google-map */ \"./packages/core/fields/map/google-map.js\");\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * The internal dependencies.\n */\n\n\n\n\n\nvar MapField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(MapField, _Component);\n\n function MapField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, MapField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(MapField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleSearchChange\", Object(lodash__WEBPACK_IMPORTED_MODULE_13__[\"debounce\"])(function (address) {\n if (address) {\n _this.props.onGeocodeAddress({\n address: address\n });\n }\n }, 250));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleMapChange\", function (location) {\n var _this$props = _this.props,\n id = _this$props.id,\n value = _this$props.value,\n onChange = _this$props.onChange;\n onChange(id, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, value, location));\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(MapField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value;\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Fragment\"], null, wp.element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n id: id,\n className: \"cf-map__search\",\n name: \"\".concat(name, \"[address]\"),\n value: value.address,\n onChange: this.handleSearchChange\n }), wp.element.createElement(_google_map__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n className: \"cf-map__canvas\",\n lat: value.lat,\n lng: value.lng,\n zoom: value.zoom,\n onChange: this.handleMapChange\n }), wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[lat]\"),\n value: value.lat\n }), wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[lng]\"),\n value: value.lng,\n readOnly: true\n }), wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[zoom]\"),\n value: value.zoom,\n readOnly: true\n }));\n }\n }]);\n\n return MapField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var _component$useEvent = component.useEvent('geocodeAddress'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n geocodeAddress$ = _component$useEvent2[0],\n geocodeAddress = _component$useEvent2[1];\n\n var geocodeAddressProps$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({\n onGeocodeAddress: geocodeAddress\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_12__[\"toProps\"]));\n var geocodeAddressEffect$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"pipe\"])(geocodeAddress$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"map\"])(function (payload) {\n return {\n type: 'GEOCODE_ADDRESS',\n payload: payload\n };\n }));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_14__[\"merge\"])(geocodeAddressProps$, geocodeAddressEffect$);\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var id = props.id,\n value = props.value,\n onChange = props.onChange;\n\n switch (type) {\n case 'GEOCODE_ADDRESS':\n var geocode = function geocode(address) {\n return new Promise(function (resolve, reject) {\n var geocoder = new window.google.maps.Geocoder();\n geocoder.geocode({\n address: address\n }, function (results, status) {\n if (status === window.google.maps.GeocoderStatus.OK) {\n var location = results[0].geometry.location;\n resolve({\n lat: location.lat(),\n lng: location.lng()\n });\n } else if (status === 'ZERO_RESULTS') {\n reject(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('The address could not be found.', 'carbon-fields-ui'));\n } else {\n reject(\"\".concat(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Geocode was not successful for the following reason: ', 'carbon-fields-ui'), \" \").concat(status));\n }\n });\n });\n };\n\n geocode(payload.address).then(function (_ref) {\n var lat = _ref.lat,\n lng = _ref.lng;\n onChange(id, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, value, {\n address: payload.address,\n value: \"\".concat(lat, \",\").concat(lng),\n lat: lat,\n lng: lng\n }));\n }).catch(function (alert) {\n // eslint-disable-next-line\n console.log(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Error alert', 'carbon-fields-ui')); // eslint-disable-next-line\n\n console.log(alert);\n });\n break;\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_12__[\"withEffects\"])(aperture, {\n handler: handler\n})(MapField));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/map/index.js?"); /***/ }), @@ -3608,7 +3608,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_13__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\nvar SidebarField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(SidebarField, _Component);\n\n function SidebarField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, SidebarField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(SidebarField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (e) {\n var _this$props = _this.props,\n id = _this$props.id,\n onAdd = _this$props.onAdd,\n onChange = _this$props.onChange;\n var value = e.target.value;\n\n if (value !== '__add_new') {\n onChange(id, value);\n } else {\n onAdd(id);\n }\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(SidebarField, [{\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return wp.element.createElement(\"select\", {\n id: id,\n name: name,\n value: value,\n onChange: this.handleChange\n }, wp.element.createElement(\"option\", {\n value: \"0\",\n disabled: true\n }, \"Please choose\"), field.options.map(function (option) {\n return wp.element.createElement(\"option\", {\n key: option.value,\n value: option.value\n }, option.label);\n }));\n }\n }]);\n\n return SidebarField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var _component$useEvent = component.useEvent('addSidebar'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n addSidebar$ = _component$useEvent2[0],\n addSidebar = _component$useEvent2[1];\n\n var addSidebarProps$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({\n onAdd: addSidebar\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"toProps\"]));\n var addSidebarEffect$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"pipe\"])(addSidebar$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"map\"])(function (fieldKey) {\n return {\n type: 'ADD_SIDEBAR',\n payload: {\n fieldKey: fieldKey\n }\n };\n }));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"merge\"])(addSidebarProps$, addSidebarEffect$);\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n switch (effect.type) {\n case 'ADD_SIDEBAR':\n /* eslint-disable-next-line no-alert */\n var name = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"trim\"])(window.prompt(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Please enter the name of the new sidebar:', 'carbon-fields-ui')));\n\n if (!name) {\n return;\n }\n\n var isExisting = props.field.options.some(function (option) {\n return option.label === name;\n });\n\n if (isExisting) {\n return;\n }\n\n var request = window.jQuery.post(window.ajaxurl, {\n action: 'carbon_fields_add_sidebar',\n name: name\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('An error occurred while trying to create the sidebar.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n var onAdded = props.onAdded,\n onChange = props.onChange;\n var sidebar = {\n value: response.data.id,\n label: response.data.name\n };\n onAdded(sidebar);\n onChange(effect.payload.fieldKey, sidebar.value);\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n break;\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"withEffects\"])(aperture, {\n handler: handler\n})(SidebarField));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/sidebar/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_13__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\nvar SidebarField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(SidebarField, _Component);\n\n function SidebarField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, SidebarField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(SidebarField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (e) {\n var _this$props = _this.props,\n id = _this$props.id,\n onAdd = _this$props.onAdd,\n onChange = _this$props.onChange;\n var value = e.target.value;\n\n if (value !== '__add_new') {\n onChange(id, value);\n } else {\n onAdd(id);\n }\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(SidebarField, [{\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return wp.element.createElement(\"select\", {\n id: id,\n name: name,\n value: value,\n onChange: this.handleChange\n }, wp.element.createElement(\"option\", {\n value: \"0\",\n disabled: true\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Please choose', 'carbon-fields-ui')), field.options.map(function (option) {\n return wp.element.createElement(\"option\", {\n key: option.value,\n value: option.value\n }, option.label);\n }));\n }\n }]);\n\n return SidebarField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var _component$useEvent = component.useEvent('addSidebar'),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_component$useEvent, 2),\n addSidebar$ = _component$useEvent2[0],\n addSidebar = _component$useEvent2[1];\n\n var addSidebarProps$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"pipe\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({\n onAdd: addSidebar\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"map\"])(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"toProps\"]));\n var addSidebarEffect$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"pipe\"])(addSidebar$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"map\"])(function (fieldKey) {\n return {\n type: 'ADD_SIDEBAR',\n payload: {\n fieldKey: fieldKey\n }\n };\n }));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_13__[\"merge\"])(addSidebarProps$, addSidebarEffect$);\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n switch (effect.type) {\n case 'ADD_SIDEBAR':\n /* eslint-disable-next-line no-alert */\n var name = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"trim\"])(window.prompt(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Please enter the name of the new sidebar:', 'carbon-fields-ui')));\n\n if (!name) {\n return;\n }\n\n var isExisting = props.field.options.some(function (option) {\n return option.label === name;\n });\n\n if (isExisting) {\n return;\n }\n\n var request = window.jQuery.post(window.ajaxurl, {\n action: 'carbon_fields_add_sidebar',\n name: name\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('An error occurred while trying to create the sidebar.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n var onAdded = props.onAdded,\n onChange = props.onChange;\n var sidebar = {\n value: response.data.id,\n label: response.data.name\n };\n onAdded(sidebar);\n onChange(effect.payload.fieldKey, sidebar.value);\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n break;\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_11__[\"withEffects\"])(aperture, {\n handler: handler\n})(SidebarField));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/sidebar/index.js?"); /***/ }), @@ -3690,7 +3690,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return withConditionalLogic; });\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _compare__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./compare */ \"./packages/core/hocs/with-conditional-logic/compare.js\");\n/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Creates a high-order components which adds ability to evalute\n * the conditional logic of fields.\n *\n * @param {Function} input\n * @param {Function} output\n * @return {Function}\n */\n\nfunction withConditionalLogic(input, output) {\n /**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @param {Object} props\n * @return {Object}\n */\n function aperture(component, props) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"isEmpty\"])(props.field.conditional_logic)) {\n return;\n }\n\n return input(props, component);\n }\n /**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\n function handler(props) {\n return function (effect) {\n var _props$field$conditio = props.field.conditional_logic,\n relation = _props$field$conditio.relation,\n rules = _props$field$conditio.rules;\n var data = output(props, effect);\n var results = rules.reduce(function (accumulator, rule) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"has\"])(data, rule.field)) {\n // eslint-disable-next-line\n console.error(\"An unknown field is used in condition - \\\"\".concat(rule.field, \"\\\".\"));\n return accumulator.concat(false);\n } // TODO: Handle the conditional logic for chained fields. Probably we'll need the id of each sibling.\n // See https://github.com/htmlburger/carbon-fields/commit/3628a86c8840c8323f45c829a96c512a9985ad10#diff-b1aea524a4b1ab510e28e01a54c25fcd\n\n\n var result = Object(_compare__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(data[rule.field], rule.compare, rule.value);\n return accumulator.concat(result);\n }, []);\n var isVisible = false;\n\n switch (relation) {\n case 'AND':\n isVisible = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"every\"])(results);\n break;\n\n case 'OR':\n isVisible = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"some\"])(results);\n break;\n }\n\n if (isVisible) {\n props.showField(props.id);\n } else {\n props.hideField(props.id);\n }\n };\n }\n\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"createHigherOrderComponent\"])(function (OriginalComponent) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/core'),\n showField = _dispatch.showField,\n hideField = _dispatch.hideField;\n\n return {\n showField: showField,\n hideField: hideField\n };\n }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withSelect\"])(function (select, props) {\n return {\n visible: select('carbon-fields/core').isFieldVisible(props.id)\n };\n }), Object(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"withEffects\"])(aperture, {\n handler: handler\n }))(OriginalComponent);\n }, 'withConditionalLogic');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-conditional-logic/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return withConditionalLogic; });\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _compare__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./compare */ \"./packages/core/hocs/with-conditional-logic/compare.js\");\n/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Creates a high-order components which adds ability to evalute\n * the conditional logic of fields.\n *\n * @param {Function} input\n * @param {Function} output\n * @return {Function}\n */\n\nfunction withConditionalLogic(input, output) {\n /**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @param {Object} props\n * @return {Object}\n */\n function aperture(component, props) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isEmpty\"])(props.field.conditional_logic)) {\n return;\n }\n\n return input(props, component);\n }\n /**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\n function handler(props) {\n return function (effect) {\n var _props$field$conditio = props.field.conditional_logic,\n relation = _props$field$conditio.relation,\n rules = _props$field$conditio.rules;\n var data = output(props, effect);\n var results = rules.reduce(function (accumulator, rule) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"has\"])(data, rule.field)) {\n // eslint-disable-next-line\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('An unknown field is used in condition - \"%s\"', 'carbon-fields-ui'), rule.field));\n return accumulator.concat(false);\n } // TODO: Handle the conditional logic for chained fields. Probably we'll need the id of each sibling.\n // See https://github.com/htmlburger/carbon-fields/commit/3628a86c8840c8323f45c829a96c512a9985ad10#diff-b1aea524a4b1ab510e28e01a54c25fcd\n\n\n var result = Object(_compare__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(data[rule.field], rule.compare, rule.value);\n return accumulator.concat(result);\n }, []);\n var isVisible = false;\n\n switch (relation) {\n case 'AND':\n isVisible = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"every\"])(results);\n break;\n\n case 'OR':\n isVisible = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"some\"])(results);\n break;\n }\n\n if (isVisible) {\n props.showField(props.id);\n } else {\n props.hideField(props.id);\n }\n };\n }\n\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"createHigherOrderComponent\"])(function (OriginalComponent) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/core'),\n showField = _dispatch.showField,\n hideField = _dispatch.hideField;\n\n return {\n showField: showField,\n hideField: hideField\n };\n }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withSelect\"])(function (select, props) {\n return {\n visible: select('carbon-fields/core').isFieldVisible(props.id)\n };\n }), Object(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"withEffects\"])(aperture, {\n handler: handler\n }))(OriginalComponent);\n }, 'withConditionalLogic');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-conditional-logic/index.js?"); /***/ }), @@ -3738,7 +3738,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return required; });\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Validates the given value.\n *\n * @param {mixed} value\n * @return {?string}\n */\n\nfunction required(value) {\n var isObjectValue = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isObject\"])(value);\n\n if (isObjectValue && !Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(value) || !isObjectValue && !!value) {\n return null;\n }\n\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('This field is required. ', 'carbon-fields-ui');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-validation/required.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return required; });\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Validates the given value.\n *\n * @param {mixed} value\n * @return {?string}\n */\n\nfunction required(value) {\n var isObjectValue = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isObject\"])(value);\n\n if (isObjectValue && !Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(value) || !isObjectValue && !!value) {\n return null;\n }\n\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('This field is required.', 'carbon-fields-ui');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/hocs/with-validation/required.js?"); /***/ }), @@ -3774,7 +3774,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createRegistry\", function() { return createRegistry; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Creates a new registry.\n *\n * @param {string} domain\n * @param {string[]} supportedContexts\n * @return {boolean}\n */\n\nfunction createRegistry(domain, supportedContexts) {\n var _ref;\n\n var domainStartCased = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"startCase\"])(domain);\n /**\n * Keeps track of registered types.\n *\n * @type {Object}\n */\n\n var types = {};\n /**\n * Registers a new type.\n *\n * @param {string} type\n * @param {Function} component\n * @return {boolean}\n */\n\n function registerType(type, component) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isString\"])(type)) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('%1$s type must be a string.', 'carbon-fields-ui'), domainStartCased));\n return false;\n }\n\n if (types[type]) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('%1$s %2$s is already registered.', 'carbon-fields-ui'), domainStartCased, type));\n return false;\n }\n\n if (!component || !Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isFunction\"])(component)) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('The \"component\" param must be a function.', 'carbon-fields-ui'));\n return false;\n }\n\n types[type] = supportedContexts.reduce(function (accumulator, context) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, accumulator, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, context, Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"applyFilters\"])(\"carbon-fields.register-\".concat(domain, \"-type\"), type, context, component)));\n }, {});\n return true;\n }\n /**\n * Returns a registered type.\n *\n * @param {string} type\n * @param {string} context\n * @return {?Object}\n */\n\n\n function getType(type, context) {\n if (!supportedContexts.includes(context)) {\n console.error(\"The provided context isn't a valid one. Must be one of - \".concat(supportedContexts.join(', '), \" .\"));\n return;\n }\n\n if (!types[type]) {\n console.error(\"\".concat(domainStartCased, \" \").concat(type, \" isn't registered.\"));\n return;\n }\n\n return types[type][context];\n }\n\n return _ref = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_ref, \"register\".concat(domainStartCased, \"Type\"), registerType), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_ref, \"get\".concat(domainStartCased, \"Type\"), getType), _ref;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/registry/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createRegistry\", function() { return createRegistry; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Creates a new registry.\n *\n * @param {string} domain\n * @param {string[]} supportedContexts\n * @return {boolean}\n */\n\nfunction createRegistry(domain, supportedContexts) {\n var _ref;\n\n var domainStartCased = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"startCase\"])(domain);\n /**\n * Keeps track of registered types.\n *\n * @type {Object}\n */\n\n var types = {};\n /**\n * Registers a new type.\n *\n * @param {string} type\n * @param {Function} component\n * @return {boolean}\n */\n\n function registerType(type, component) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isString\"])(type)) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('%1$s type must be a string.', 'carbon-fields-ui'), domainStartCased));\n return false;\n }\n\n if (types[type]) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('%1$s %2$s is already registered.', 'carbon-fields-ui'), domainStartCased, type));\n return false;\n }\n\n if (!component || !Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"isFunction\"])(component)) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('The \"component\" param must be a function.', 'carbon-fields-ui'));\n return false;\n }\n\n types[type] = supportedContexts.reduce(function (accumulator, context) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, accumulator, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, context, Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"applyFilters\"])(\"carbon-fields.register-\".concat(domain, \"-type\"), type, context, component)));\n }, {});\n return true;\n }\n /**\n * Returns a registered type.\n *\n * @param {string} type\n * @param {string} context\n * @return {?Object}\n */\n\n\n function getType(type, context) {\n if (!supportedContexts.includes(context)) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('The provided context isn\\'t a valid one. Must be one of - %s .', 'carbon-fields-ui'), supportedContexts.join(', ')));\n return;\n }\n\n if (!types[type]) {\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('%s %s isn\\'t registered.', 'carbon-fields-ui'), domainStartCased, type));\n return;\n }\n\n return types[type][context];\n }\n\n return _ref = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_ref, \"register\".concat(domainStartCased, \"Type\"), registerType), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_ref, \"get\".concat(domainStartCased, \"Type\"), getType), _ref;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/registry/index.js?"); /***/ }), diff --git a/build/gutenberg/core.min.css b/build/gutenberg/core.min.css index a33c63153..c24e9d673 100644 --- a/build/gutenberg/core.min.css +++ b/build/gutenberg/core.min.css @@ -1 +1 @@ -.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{position:relative;z-index:0}.cf-complex--tabbed-vertical .cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex--grid .cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex--grid .cf-complex__group-actions{position:absolute;top:12px;right:12px}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex--tabbed-horizontal .cf-complex__tabs{display:inline-flex;margin-bottom:-5px}.cf-complex--tabbed-vertical .cf-complex__tabs{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex--tabbed-horizontal .cf-complex__tabs-item{margin:0 4px 4px 0}.cf-complex--tabbed-vertical .cf-complex__tabs-item~.cf-complex__tabs-item{border-top-width:0}.cf-complex__tabs-item--current,.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex--tabbed-horizontal .cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex--tabbed-vertical .cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label{margin:8px 0 12px}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%;margin:0}.cf-textarea__input{display:block;width:100%;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file +.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{position:relative;z-index:0}.cf-complex--tabbed-vertical>.cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex__group--grid>.cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex__tabs--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex__tabs--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--grid{position:absolute;top:12px;right:12px}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex__tabs--tabbed-horizontal{display:inline-flex;margin-bottom:-5px}.cf-complex__tabs--tabbed-vertical{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex__tabs--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex__tabs--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal{margin:0 4px 4px 0}.cf-complex__tabs-item--tabbed-vertical~.cf-complex__tabs-item--tabbed-vertical{border-top-width:0}.cf-complex__tabs-item--current{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal.cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex__tabs-item--tabbed-vertical.cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label.cf-complex__placeholder-label{margin:8px 0 12px}.cf-container-term-meta .cf-complex__placeholder-label{font-style:normal;color:inherit}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%!important;margin:0}.cf-textarea__input{display:block;width:100%!important;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file diff --git a/build/gutenberg/core.min.js b/build/gutenberg/core.min.js index d1ab43909..3704b585a 100644 --- a/build/gutenberg/core.min.js +++ b/build/gutenberg/core.min.js @@ -1,10 +1,10 @@ -this.cf=this.cf||{},this.cf.core=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=278)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.cf.vendor.react}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n1?t-1:0),a=1;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(61),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,u=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=u}).call(this,n(48)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(67)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(36),o=n(145),i=n(146),a=n(147),u=n(148),s=n(149);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(30)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(154),o=n(161),i=n(163),a=n(164),u=n(165);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&ec))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=c}function w(){var e=o();if(y(e))return E(e);f=setTimeout(w,function(e){var n=t-(e-d);return g?u(n,c-(e-h)):n}(e))}function E(e){return f=void 0,v&&s?b(e):(s=l=void 0,p)}function x(){var e=o(),n=y(e);if(s=arguments,l=this,d=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,t),m?b(e):p}(d);if(g)return f=setTimeout(w,t),b(d)}return void 0===f&&(f=setTimeout(w,t)),p}return t=i(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?a(i(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=d=l=f=void 0},x.flush=function(){return void 0===f?p:E(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=i(n(239)),o=i(n(241));function i(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),i=n.toHsv(),a=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,i.h=t||0),{hsl:r,hex:"000000"===u&&0===a.a?"transparent":"#"+u,rgb:a,hsv:i,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,l=[],c=!1,p=-1;function f(){c&&s&&(c=!1,s.length?l=s.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=u(f);c=!0;for(var t=l.length;t;){for(s=l,l=[];++p1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var i=o.default.Children.only(n);return o.default.cloneElement(i,r)},r}(o.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,a.polyfill)(f);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==u){var s=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},i=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=i;var a=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),i=n(95),a=n(266);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),i=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?i:o.default.createElement(t,r,i)},r}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,i.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){var r=n(116);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(120))&&r.__esModule?r:{default:r};t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0;i--){var a=o[i],u=n[a];u!==r[a]&&(-1===c.indexOf(a)||Array.isArray(u)||(u=[u]),this.flatpickr.set(a,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);c.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,i=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return c.forEach(function(e){delete u[e]}),n.wrap?a.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),i):a.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();p.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},p.defaultProps={options:{}},t.default=p},function(e,t,n){var r=n(251),o=n(252),i=n(256);r(".__observe-resize__ { position: absolute; left: 0; top: -100%; width: 100%; height: 100%; margin: 1px 0 0; border: none; opacity: 0; visibility: hidden; pointer-events: none; }"),e.exports=function(e,t){if(o.ok(i(e),"observe-resize: el should be a valid DOM element"),o.equal(typeof t,"function","observe-resize: cb should be type function"),"object"==typeof window){var n=!1,r=document.createElement("iframe");return r.setAttribute("class","__observe-resize__"),e.appendChild(r),o.ok(r.contentWindow,"observe-resize: no contentWindow detected - cannot start observing"),r.contentWindow.onresize=function(){n||(n=!0,window.requestAnimationFrame(function(){n=!1,t(e)}))},function(){r.parentNode&&r.parentNode.removeChild(r)}}}},function(e,t,n){(function(t){for(var r=n(259),o="undefined"==typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",u=o["request"+a],s=o["cancel"+a]||o["cancelRequest"+a],l=0;!u&&l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},o,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){var r=n(276),o=n(277);e.exports=function(e,t){return o(r,e,t)}},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var u=0;for(e=0===a?"":e[0]+" ";ur&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),a=1;a=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===p.inserted[v]&&(n="",h(e,t),p.inserted[v]=n)}var O=function(){var e=E.apply(this,arguments),t=i+"-"+v;return void 0===p.registered[t]&&(p.registered[t]=b),x("."+t,e),t};function C(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):n+=t+" "}),n}function _(e,t){var n=[],r=C(n,e);return n.length<2?e:r+O(n,t)}function k(e){p.inserted[e]=!0}if(c){var S=document.querySelectorAll("[data-emotion-"+i+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+i).split(" ").forEach(k)})}var D={flush:function(){c&&(d.flush(),d.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=l(n(1)),o=l(n(21)),i=l(n(25)),a=n(44),u=l(n(244)),s=l(n(245));function l(e){return e&&e.__esModule?e:{default:e}}var c=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,l=e.hsv,c=e.hsl,p=e.onChange,f=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,i.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(a.Saturation,{style:b.Saturation,hsl:c,hsv:l,onChange:p})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(a.Hue,{style:b.Hue,hsl:c,onChange:p})),r.default.createElement("div",{style:b.alpha},r.default.createElement(a.Alpha,{style:b.Alpha,rgb:n,hsl:c,renderers:m,onChange:p}))),r.default.createElement("div",{style:b.color},r.default.createElement(a.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:c,hex:o,onChange:p,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:p,onSwatchHover:f}))};c.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},c.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,a.ColorWrap)(c)},function(e,t,n){"use strict";var r=n(122);function o(){}e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(124)),o=u(n(46)),i=u(n(135)),a=u(n(136));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,a.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,i.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(29),o=n(23),i=n(26);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(33),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(128)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),u=a.length;u--;){var s=a[e?u:++o];if(!1===n(i[s],s,i))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(37);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(36);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(36),o=n(56),i=n(57);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(68),o=n(151),i=n(27),a=n(72),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,p=l.hasOwnProperty,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?f:u).test(a(e))}},function(e,t,n){var r,o=n(152),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(155),o=n(36),i=n(56);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(156),o=n(157),i=n(158),a=n(159),u=n(160);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=i({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(199);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(54),o=n(85),i=n(86),a=n(201),u=n(202),s=n(205),l=n(206),c=n(207),p=n(208),f=n(76),d=n(209),h=n(40),m=n(210),g=n(211),v=n(216),b=n(23),y=n(47),w=n(218),E=n(27),x=n(220),O=n(34),C="[object Arguments]",_="[object Function]",k="[object Object]",S={};S[C]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[_]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,D,j,A,M){var F,T=1&n,P=2&n,N=4&n;if(D&&(F=A?D(t,j,A,M):D(t)),void 0!==F)return F;if(!E(t))return t;var I=b(t);if(I){if(F=m(t),!T)return l(t,F)}else{var R=h(t),L=R==_||"[object GeneratorFunction]"==R;if(y(t))return s(t,T);if(R==k||R==C||L&&!A){if(F=P||L?{}:v(t),!T)return P?p(t,u(F,t)):c(t,a(F,t))}else{if(!S[R])return A?t:{};F=g(t,R,T)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,F),x(t))return t.forEach(function(r){F.add(e(r,n,D,r,t,M))}),F;if(w(t))return t.forEach(function(r,o){F.set(o,e(r,n,D,o,t,M))}),F;var B=N?P?d:f:P?keysIn:O,V=I?void 0:B(t);return o(V||t,function(r,o){V&&(r=t[o=r]),i(F,o,e(r,n,D,o,t,M))}),F}},function(e,t,n){var r=n(30),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(43),o=n(34);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(43),o=n(88);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(27),o=n(52),i=n(204),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&a.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(48)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ti?1:Math.round(100*l/i)/100,n.hsl.a!==c)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:c,source:"rgb"}}else{var p;if(p=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==p)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:p,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var i=o.getContext("2d");return i?(i.fillStyle=e,i.fillRect(0,0,o.width,o.height),i.fillStyle=t,i.fillRect(0,0,n,n),i.translate(n,n),i.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,i){var a=e+"-"+t+"-"+n+(i?"-server":""),u=o(e,t,n,i);return r[a]?r[a]:(r[a]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var i=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+i),e):n.props.onChange&&n.props.onChange(o+i,e),r?n.setState({value:o+i+"%"}):n.setState({value:o+i})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-i),e):n.props.onChange&&n.props.onChange(o-i,e),r?n.setState({value:o-i+"%"}):n.setState({value:o-i}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,a.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return i.default.createElement("div",{style:t.wrap},i.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?i.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;ni?0:360*(-100*l/i+100)/100,n.hsl.h!==c)return{h:c,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var p=void 0;if(p=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==p)return{h:p,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=a(n(1)),o=a(n(21)),i=a(n(25));function a(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,a=e.children,u=(0,i.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},a))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;ni?l=i:c<0?c=0:c>a&&(c=a);var p=100*l/i,f=-100*c/a+100;return{h:n.hsl.h,s:p,v:f,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=T(e,360),t=T(t,100),n=T(n,100),0===t)r=o=i=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=a(s,u,e+1/3),o=a(s,u,e),i=a(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,p,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=F(s),{ok:h,format:e.format||m,r:l(255,c(u.r,0)),g:l(255,c(u.g,0)),b:l(255,c(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r,o,i=c(e,t,n),a=l(e,t,n),u=(i+a)/2;if(i==a)r=o=0;else{var s=i-a;switch(o=u>.5?s/(2-i-a):s/(i+a),i){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(f(r));return i}function j(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],u=1/t;t--;)a.push(f({h:r,s:o,v:i})),i=(i+u)%1;return a}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(L(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*T(this._r,255))+"%",g:s(100*T(this._g,255))+"%",b:s(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%)":"rgba("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(j,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:R(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:p(),g:p(),b:p()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),i=n/100;return f({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,i=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},f.mostReadable=function(e,t,n){var r,o,i,a,u=null,s=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var l=0;ls&&(s=r,u=f(t[l]));return f.isReadable(e,u,{level:i,size:a})||!o?u:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var A=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return l(1,c(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function L(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var B,V,U,z=(V="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",U="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+V),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+V),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+V),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,i=Array(o),a=0;a100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:c.fields,className:"flexbox-fix"},r.default.createElement("div",{style:c.double},r.default.createElement(a.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:s.replace("#",""),onChange:p})),r.default.createElement("div",{style:c.single},r.default.createElement(a.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(a.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(a.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.alpha},r.default.createElement(a.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:p,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t1?t-1:0),i=1;i-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(61),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(48)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(67)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(36),o=n(145),a=n(146),i=n(147),u=n(148),s=n(149);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(30)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(154),o=n(161),a=n(163),i=n(164),u=n(165);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&ec))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=c}function w(){var e=o();if(y(e))return E(e);f=setTimeout(w,function(e){var n=t-(e-d);return g?u(n,c-(e-h)):n}(e))}function E(e){return f=void 0,v&&s?b(e):(s=l=void 0,p)}function x(){var e=o(),n=y(e);if(s=arguments,l=this,d=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,t),m?b(e):p}(d);if(g)return f=setTimeout(w,t),b(d)}return void 0===f&&(f=setTimeout(w,t)),p}return t=a(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?i(a(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=d=l=f=void 0},x.flush=function(){return void 0===f?p:E(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(239)),o=a(n(241));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],c=!1,p=-1;function f(){c&&s&&(c=!1,s.length?l=s.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=u(f);c=!0;for(var t=l.length;t;){for(s=l,l=[];++p1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,i.polyfill)(f);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(95),i=n(266);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,a.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){var r=n(116);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(120))&&r.__esModule?r:{default:r};t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===c.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);c.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return c.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();p.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},p.defaultProps={options:{}},t.default=p},function(e,t,n){var r=n(251),o=n(252),a=n(256);r(".__observe-resize__ { position: absolute; left: 0; top: -100%; width: 100%; height: 100%; margin: 1px 0 0; border: none; opacity: 0; visibility: hidden; pointer-events: none; }"),e.exports=function(e,t){if(o.ok(a(e),"observe-resize: el should be a valid DOM element"),o.equal(typeof t,"function","observe-resize: cb should be type function"),"object"==typeof window){var n=!1,r=document.createElement("iframe");return r.setAttribute("class","__observe-resize__"),e.appendChild(r),o.ok(r.contentWindow,"observe-resize: no contentWindow detected - cannot start observing"),r.contentWindow.onresize=function(){n||(n=!0,window.requestAnimationFrame(function(){n=!1,t(e)}))},function(){r.parentNode&&r.parentNode.removeChild(r)}}}},function(e,t,n){(function(t){for(var r=n(259),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],l=0;!u&&l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){var r=n(276),o=n(277);e.exports=function(e,t){return o(r,e,t)}},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var u=0;for(e=0===i?"":e[0]+" ";ur&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===p.inserted[v]&&(n="",h(e,t),p.inserted[v]=n)}var O=function(){var e=E.apply(this,arguments),t=a+"-"+v;return void 0===p.registered[t]&&(p.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){p.inserted[e]=!0}if(c){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){c&&(d.flush(),d.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=l(n(1)),o=l(n(21)),a=l(n(25)),i=n(44),u=l(n(244)),s=l(n(245));function l(e){return e&&e.__esModule?e:{default:e}}var c=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,l=e.hsv,c=e.hsl,p=e.onChange,f=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:c,hsv:l,onChange:p})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:c,onChange:p})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:c,renderers:m,onChange:p}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:c,hex:o,onChange:p,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:p,onSwatchHover:f}))};c.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},c.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(c)},function(e,t,n){"use strict";var r=n(122);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(124)),o=u(n(46)),a=u(n(135)),i=u(n(136));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(29),o=n(23),a=n(26);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(33),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(128)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(37);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(36);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(36),o=n(56),a=n(57);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(68),o=n(151),a=n(27),i=n(72),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,p=l.hasOwnProperty,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:u).test(i(e))}},function(e,t,n){var r,o=n(152),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(155),o=n(36),a=n(56);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(156),o=n(157),a=n(158),i=n(159),u=n(160);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(199);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(54),o=n(85),a=n(86),i=n(201),u=n(202),s=n(205),l=n(206),c=n(207),p=n(208),f=n(76),d=n(209),h=n(40),m=n(210),g=n(211),v=n(216),b=n(23),y=n(47),w=n(218),E=n(27),x=n(220),O=n(34),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var T,F=1&n,P=2&n,N=4&n;if(j&&(T=A?j(t,D,A,M):j(t)),void 0!==T)return T;if(!E(t))return t;var I=b(t);if(I){if(T=m(t),!F)return l(t,T)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,F);if(L==k||L==_||R&&!A){if(T=P||R?{}:v(t),!F)return P?p(t,u(T,t)):c(t,i(T,t))}else{if(!S[L])return A?t:{};T=g(t,L,F)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,T),x(t))return t.forEach(function(r){T.add(e(r,n,j,r,t,M))}),T;if(w(t))return t.forEach(function(r,o){T.set(o,e(r,n,j,o,t,M))}),T;var V=N?P?d:f:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(T,o,e(r,n,j,o,t,M))}),T}},function(e,t,n){var r=n(30),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(43),o=n(34);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(43),o=n(88);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(27),o=n(52),a=n(204),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(48)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*l/a)/100,n.hsl.a!==c)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:c,source:"rgb"}}else{var p;if(p=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==p)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:p,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*l/a+100)/100,n.hsl.h!==c)return{h:c,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var p=void 0;if(p=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==p)return{h:p,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?l=a:c<0?c=0:c>i&&(c=i);var p=100*l/a,f=-100*c/i+100;return{h:n.hsl.h,s:p,v:f,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=F(e,360),t=F(t,100),n=F(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,p,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=T(s),{ok:h,format:e.format||m,r:l(255,c(u.r,0)),g:l(255,c(u.g,0)),b:l(255,c(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r,o,a=c(e,t,n),i=l(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(f(r));return a}function D(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(f({h:r,s:o,v:a})),a=(a+u)%1;return i}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*F(this._r,255))+"%",g:s(100*F(this._g,255))+"%",b:s(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%)":"rgba("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:p(),g:p(),b:p()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),a=n/100;return f({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,a=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},f.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var l=0;ls&&(s=r,u=f(t[l]));return f.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var A=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return l(1,c(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:c.fields,className:"flexbox-fix"},r.default.createElement("div",{style:c.double},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:s.replace("#",""),onChange:p})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.alpha},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:p,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t11)]},M:function(e,t){return i(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},c=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r){var i=r||o;return void 0!==n.formatDate?n.formatDate(e,t,i):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,i,n):"\\"!==t?t:""}).join("")}},p=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r,i){if(0===e||e){var s,l=i||o,c=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var p=t||(n||g).dateFormat,f=String(e).trim();if("today"===f)s=new Date,r=!0;else if(/Z$/.test(f)||/GMT$/.test(f))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,p);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function w(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),i=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(o),n.appendChild(i),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ra&&(c=o===s.hourElement?c-a-t(!s.amPM):i,f&&N(void 0,1,s.hourElement)),s.amPM&&p&&(1===u?c+l===23:Math.abs(c-l)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(c)}}(n);var r=s._input.value;_(),ge(),s._input.value!==r&&s._debouncedChange()}}function _(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,i=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var a=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(i=Math.min(i,u.getSeconds()))}if(a){var l=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,l.getHours()))===l.getHours()&&(o=Math.max(o,l.getMinutes())),o===l.getMinutes()&&(i=Math.max(i,l.getSeconds()))}D(r,o,i)}}function k(e){var t=e||s.latestSelectedDateObj;t&&D(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var i=s.config.maxDate.getHours(),a=s.config.maxDate.getMinutes();(e=Math.min(e,i))===i&&(t=Math.min(a,t)),e===i&&t===a&&(n=s.config.maxDate.getSeconds())}D(e,t,n)}function D(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function j(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function F(){pe("onChange")}function T(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var a=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!a&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function R(e,t,n,r){var o=J(t,!0),i=b("span","flatpickr-day "+e,t.getDate().toString());return i.dateObj=t,i.$i=r,i.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===f(t,s.now)&&(s.todayDateElem=i,i.classList.add("today"),i.setAttribute("aria-current","date")),o?(i.tabIndex=-1,de(t)&&(i.classList.add("selected"),s.selectedDateElem=i,"range"===s.config.mode&&(v(i,"startRange",s.selectedDates[0]&&0===f(t,s.selectedDates[0],!0)),v(i,"endRange",s.selectedDates[1]&&0===f(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&i.classList.add("inRange")))):i.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&f(e,s.selectedDates[0])>=0&&f(e,s.selectedDates[1])<=0}(t)&&!de(t)&&i.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),pe("onDayCreate",i),i}function L(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],i=e>0?0:o.children.length-1,a=e>0?o.children.length:-1,u=i;u!=a;u+=e){var l=o.children[u];if(-1===l.className.indexOf("hidden")&&J(l.dateObj))return l}}function B(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,i=n-s.currentMonth;i!=r;i+=o)for(var a=s.daysContainer.children[i],u=n-s.currentMonth===i?e.$i+t:t<0?a.children.length-1:0,l=a.children.length,c=u;c>=0&&c0?l:-1);c+=o){var p=a.children[c];if(-1===p.className.indexOf("hidden")&&J(p.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return L(p)}s.changeMonth(o),B(H(o),0)}(r,t):L(r)}function V(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),i=window.document.createDocumentFragment(),a=s.config.showMonths>1,u=a?"prevMonthDay hidden":"prevMonthDay",l=a?"nextMonthDay hidden":"nextMonthDay",c=r+1-n,p=0;c<=r;c++,p++)i.appendChild(R(u,new Date(e,t-1,c),c,p));for(c=1;c<=o;c++,p++)i.appendChild(R("",new Date(e,t,c),c,p));for(var f=o+1;f<=42-n&&(1===s.config.showMonths||p%7!=0);f++,p++)i.appendChild(R(l,new Date(e,t+1,f%o),f,p));var d=b("div","dayContainer");return d.appendChild(i),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,pe("onYearChange")),U(),pe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),pe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&f(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&f(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,i=o?s.config.enable:s.config.disable,a=0;a=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var i=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:i?O():ue(e);break;case 27:e.preventDefault(),ae();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(i)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var a=39===e.keyCode?1:-1;e.ctrlKey?(q(a),B(H(1),0)):B(void 0,a)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),B(H(1),0)):i||B(void 0,7*u):s.config.enableTime&&(!i&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!i){s.element.focus();break}var l=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),c=l.indexOf(e.target);if(-1!==c){var p=l[c+(e.shiftKey?-1:1)];void 0!==p?(e.preventDefault(),p.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],_(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],_(),ge()}pe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),i=s.daysContainer.lastChild.lastChild.dateObj.getTime(),a=!1,u=0,l=0,c=r;cr&&cu)?u=c:c>n&&(!l||c0&&c0&&c>l;return h?(i.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){i.classList.remove(e)}),"continue"):a&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){i.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=c||(nt&&c===n&&i.classList.add("endRange"),c>=u&&(0===l||c<=l)&&d(c,n,t)&&i.classList.add("inRange")))))},v=0,b=f.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ie(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===C.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},C.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?C.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=c(s),s.parseDate=p({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){pe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),i=o[0],a=o.length>1?o[1]:null,u=t.getBoundingClientRect(),l=window.innerHeight-u.bottom,c="above"===i||"below"!==i&&ln,p=window.pageYOffset+u.top+(c?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!c),v(s.calendarContainer,"arrowBottom",c),!s.config.inline){var f=window.pageXOffset+u.left-(null!=a&&"center"===a?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=f+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=p+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=f+"px",s.calendarContainer.style.right="auto"))}}}function ie(){s.config.noCalendar||s.isMobile||(he(),U())}function ae(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var i=de(r);i?s.selectedDates.splice(parseInt(i),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==f(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(_(),o){var a=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),a&&pe("onYearChange"),pe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():L(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,l="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||l)&&ae()}F()}}s.parseDate=p({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&pe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),pe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&pe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=T,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void pe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),pe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ie,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),T(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);le(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),T(),k(),ge(t),t&&pe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function le(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ce(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function pe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&pe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},a,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=ce(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=ce(e)}});var i="time"===t.mode;t.dateFormat||!t.enableTime&&!i||(n.dateFormat=t.noCalendar||i?"H:i"+(t.enableSeconds?":S":""):C.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||i)&&!t.altFormat&&(n.altFormat=t.noCalendar||i?"h:i"+(t.enableSeconds?":S K":" K"):C.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var l=0;l-1?s.config[f]=r(p[f]).map(g).concat(s.config[f]):void 0===t[f]&&(s.config[f]=p[f])}pe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&le(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),pe("onChange"),pe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(F,E),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],j),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),F()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),pe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},c=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},p=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r,a){if(0===e||e){var s,l=a||o,c=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var p=t||(n||g).dateFormat,f=String(e).trim();if("today"===f)s=new Date,r=!0;else if(/Z$/.test(f)||/GMT$/.test(f))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,p);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function w(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(c=o===s.hourElement?c-i-t(!s.amPM):a,f&&N(void 0,1,s.hourElement)),s.amPM&&p&&(1===u?c+l===23:Math.abs(c-l)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(c)}}(n);var r=s._input.value;C(),ge(),s._input.value!==r&&s._debouncedChange()}}function C(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var l=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,l.getHours()))===l.getHours()&&(o=Math.max(o,l.getMinutes())),o===l.getMinutes()&&(a=Math.max(a,l.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function T(){pe("onChange")}function F(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function L(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===f(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===f(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===f(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&f(e,s.selectedDates[0])>=0&&f(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),pe("onDayCreate",a),a}function R(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var l=o.children[u];if(-1===l.className.indexOf("hidden")&&J(l.dateObj))return l}}function V(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,l=i.children.length,c=u;c>=0&&c0?l:-1);c+=o){var p=i.children[c];if(-1===p.className.indexOf("hidden")&&J(p.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return R(p)}s.changeMonth(o),V(H(o),0)}(r,t):R(r)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",l=i?"nextMonthDay hidden":"nextMonthDay",c=r+1-n,p=0;c<=r;c++,p++)a.appendChild(L(u,new Date(e,t-1,c),c,p));for(c=1;c<=o;c++,p++)a.appendChild(L("",new Date(e,t,c),c,p));for(var f=o+1;f<=42-n&&(1===s.config.showMonths||p%7!=0);f++,p++)a.appendChild(L(l,new Date(e,t+1,f%o),f,p));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,pe("onYearChange")),U(),pe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),pe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&f(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&f(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),V(H(1),0)):V(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),V(H(1),0)):a||V(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var l=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),c=l.indexOf(e.target);if(-1!==c){var p=l[c+(e.shiftKey?-1:1)];void 0!==p?(e.preventDefault(),p.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],C(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],C(),ge()}pe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,l=0,c=r;cr&&cu)?u=c:c>n&&(!l||c0&&c0&&c>l;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=c||(nt&&c===n&&a.classList.add("endRange"),c>=u&&(0===l||c<=l)&&d(c,n,t)&&a.classList.add("inRange")))))},v=0,b=f.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===_.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},_.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?_.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=c(s),s.parseDate=p({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){pe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),l=window.innerHeight-u.bottom,c="above"===a||"below"!==a&&ln,p=window.pageYOffset+u.top+(c?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!c),v(s.calendarContainer,"arrowBottom",c),!s.config.inline){var f=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=f+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=p+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=f+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==f(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&pe("onYearChange"),pe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():R(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,l="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||l)&&ie()}T()}}s.parseDate=p({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&pe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),pe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&pe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=F,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void pe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),pe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),F(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);le(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),F(),k(),ge(t),t&&pe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function le(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ce(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function pe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&pe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=ce(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=ce(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):_.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):_.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var l=0;l-1?s.config[f]=r(p[f]).map(g).concat(s.config[f]):void 0===t[f]&&(s.config[f]=p[f])}pe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&le(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),pe("onChange"),pe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(T,E),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),T()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),pe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o=0;l--)if(c[l]!==p[l])return!1;for(l=c.length-1;l>=0;l--)if(!b(e[s=c[l]],t[s],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var a="string"==typeof r,u=!e&&o&&!n;if((!e&&i.isError(o)&&a&&w(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),i=r.indexOf("\n"+o);if(i>=0){var a=r.indexOf("\n",i+1);r=r.substring(a+1)}this.stack=r}}},i.inherits(p.AssertionError,Error),p.fail=g,p.ok=v,p.equal=function(e,t,n){e!=t&&g(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){E(!0,e,t,n)},p.doesNotThrow=function(e,t,n){E(!1,e,t,n)},p.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(31))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),c(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=c(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(i)return i;var a=Object.keys(n),u=function(e){var t={};return a.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),x(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(n);if(0===a.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return p(n)}var l,w="",C=!1,_=["{","}"];return d(n)&&(C=!0,_=["[","]"]),O(n)&&(w=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),x(n)&&(w=" "+p(n)),0!==a.length||C&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=C?function(e,t,n,r,o){for(var i=[],a=0,u=t.length;a60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,w,_)):_[0]+w+_[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,o,i){var a,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(a="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?c(e,s.value,null):c(e,s.value,n-1)).indexOf("\n")>-1&&(u=i?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return u;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===C(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===C(e)}function x(e){return w(e)&&("[object Error]"===C(e)||e instanceof Error)}function O(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(i)&&(i=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var n=r.pid;a[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else a[e]=function(){};return a[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=w,t.isDate=E,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(254);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[_((e=new Date).getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(255),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(31),n(93))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,i,a,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,i=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),a=i-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(93))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(261)),o=u(n(264)),i=u(n(1)),a=u(n(94));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),a=r.default.Children.toArray(t),u=a[0],s=a[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(i.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},a}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=i,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=i(t,u);return Object.keys(s).forEach(function(o){var i=s[o];if((0,r.isValidElement)(i)){var l=o in t,c=o in u,p=t[o],f=(0,r.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,r.isValidElement)(p)&&(s[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:p.props.in,exit:a(i,"exit",e),enter:a(i,"enter",e)})):s[o]=(0,r.cloneElement)(i,{in:!1}):s[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:a(i,"exit",e),enter:a(i,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function i(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(p.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return c()({},e,s()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(p.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function d(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function h(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function m(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function g(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function v(e,t){return e.validation[t]||null}function b(e,t){return-1===e.hiddenFields.indexOf(t)}Object(a.registerStore)("carbon-fields/core",{reducer:f,actions:r,selectors:o});var y=n(15),w=n.n(y),E=n(14),x=n(19),O=n(5),C=n.n(O),_=n(6),k=n.n(_),S=n(7),D=n.n(S),j=n(8),A=n.n(j),M=n(9),F=n.n(M),T=n(0),P=n.n(T),N=n(3),I=16;function R(e){return Object(E.createHigherOrderComponent)(function(t){return function(n){function r(n){var o;return C()(this,r),(o=D()(this,A()(r).call(this,n))).onHooksUpdated=o.onHooksUpdated.bind(P()(P()(o))),o.Component=Object(x.applyFilters)(e,t),o.namespace=Object(p.uniqueId)("core/with-filters/component-"),o.throttledForceUpdate=Object(p.debounce)(function(){o.Component=Object(x.applyFilters)(e,t),o.forceUpdate()},I),Object(x.addAction)("hookRemoved",o.namespace,o.onHooksUpdated),Object(x.addAction)("hookAdded",o.namespace,o.onHooksUpdated),o}return F()(r,n),k()(r,[{key:"componentWillUnmount",value:function(){this.throttledForceUpdate.cancel(),Object(x.removeAction)("hookRemoved",this.namespace),Object(x.removeAction)("hookAdded",this.namespace)}},{key:"onHooksUpdated",value:function(t){t===e&&this.throttledForceUpdate()}},{key:"render",value:function(){return wp.element.createElement(this.Component,this.props)}}]),r}(N.Component)},"withFilters")}function L(e,t){var n,r=Object(p.startCase)(e),o={};return n={},s()(n,"register".concat(r,"Type"),function(n,a){return Object(p.isString)(n)?o[n]?(console.error(Object(i.sprintf)(Object(i.__)("%1$s %2$s is already registered.","carbon-fields-ui"),r,n)),!1):a&&Object(p.isFunction)(a)?(o[n]=t.reduce(function(t,r){return c()({},t,s()({},r,Object(x.applyFilters)("carbon-fields.register-".concat(e,"-type"),n,r,a)))},{}),!0):(console.error(Object(i.__)('The "component" param must be a function.',"carbon-fields-ui")),!1):(console.error(Object(i.sprintf)(Object(i.__)("%1$s type must be a string.","carbon-fields-ui"),r)),!1)}),s()(n,"get".concat(r,"Type"),function(e,n){if(t.includes(n)){if(o[e])return o[e][n];console.error("".concat(r," ").concat(e," isn't registered."))}else console.error("The provided context isn't a valid one. Must be one of - ".concat(t.join(", ")," ."))}),n}var H=L("field",["metabox","block"]),B=H.registerFieldType,V=H.getFieldType,U=n(17),z=n.n(U),W=n(32),Y=n.n(W),G=n(18),q=n(20),K=n.n(q),X=n(11),J=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i.length>=r.max||(a(o,w()(i).concat([Object(p.pick)(e,"id","type","subtype")])),u({selectedOptions:w()(s).concat([e])}))}),s()(P()(P()(n)),"handleRemoveItem",function(e){var t=n.props,r=t.value,o=t.id,i=t.onChange,a=t.setState,u=t.selectedOptions;i(o,Object(p.without)(r,e)),a({selectedOptions:Object(p.without)(u,e)})}),s()(P()(P()(n)),"handleSort",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),n}return F()(t,e),k()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.value,o=t.field,a=t.totalOptionsCount,u=t.selectedOptions,s=t.queryTerm,l=this.props.options;return o.duplicates_allowed||(l=Y()(l,function(e){e.map(function(e){return e.disabled=!!Object(p.find)(r,function(t){return Object(p.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),wp.element.createElement(N.Fragment,null,wp.element.createElement("div",{className:"cf-association__bar"},wp.element.createElement(oe,{value:s,onChange:this.handleSearchChange}),wp.element.createElement("span",{className:"cf-association__counter"},Object(i.sprintf)(Object(i.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(l.length),Number(a)))),wp.element.createElement("div",{className:"cf-association__cols"},wp.element.createElement("div",{className:"cf-association__col"},l.map(function(t,n){return wp.element.createElement("div",{className:K()("cf-association__option",{"cf-association__option--selected":t.disabled}),key:n},t.thumbnail&&wp.element.createElement("img",{className:"cf-association__option-thumb",src:t.thumbnail}),wp.element.createElement("div",{className:"cf-association__option-content"},wp.element.createElement("span",{className:"cf-association__option-title"},t.title),wp.element.createElement("span",{className:"cf-association__option-type"},t.type)),wp.element.createElement("div",{className:"cf-association__option-actions"},wp.element.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:t.edit_link}),!t.disabled&&(o.max<0||r.length2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(t,r){var o=window.jQuery.ajax({url:e,type:"get",data:n});o.done(function(e){t(e)}),o.fail(function(){r(Object(i.__)("An error occured.","carbon-fields-ui"))})})}("".concat(window.wpApiSettings.root,"carbon-fields/v1/association/"),"get",c()({container_id:e.container_id,field_id:e.base_name},t))})(o,{options:e.value}).then(function(e){a({selectedOptions:w()(u).concat(w()(e))})})}}}});Object(x.addFilter)("carbon-fields.association.validate","carbon-fields/core",function(e,t){var n=e.min;return e.required&&Object(p.isEmpty)(t)?Object(i.__)("This field is required. ","carbon-fields-ui"):n>0&&t.length=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(de.createElement)(e,n)},i}(de.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r},ke=_e(function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i1?n.setState(function(e){return{menuVisible:!e.menuVisible}}):r(t[0])}),s()(P()(P()(n)),"handleItemClick",function(e){n.setState({menuVisible:!1}),n.props.onSelect(e)}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.buttonText,r=t.groups;return wp.element.createElement("div",{className:"cf-complex__inserter"},wp.element.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},n),r.length>1&&wp.element.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},r.map(function(t,n){return wp.element.createElement("li",{className:"cf-complex__inserter-item",key:n,onClick:function(){return e.handleItemClick(t)}},t.label)})))}}]),t}(N.Component)),Pe=function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0?u-1:1;n.setState({currentTab:Object(p.get)(r,"".concat(s,".").concat(o),null)})}i(a)}),s()(P()(P()(n)),"handleToggleAllClick",function(){var e=n.props,t=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!t)}),s()(P()(P()(n)),"handleSortGroups",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),s()(P()(P()(n)),"handleTabsChange",function(e){n.setState({currentTab:e})}),n}return F()(t,e),k()(t,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(p.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=z()(e,2),o=r[0],i=r[1],a=Object(p.find)(t.groups,["name",o]);if(!a)return"N/A";if(!Object(p.isString)(a.label_template))return a.label;try{return Object(p.template)(a.label_template)(c()({$_index:n},i))||a.label}catch(e){return console.error("Couldn't create the label of group - ".concat(e.message)),"N/A"}})}},{key:"render",value:function(){var e=this,t=this.state.currentTab,n=this.props,r=n.value,o=n.field,i=n.groupIdKey,a=n.groupFilterKey,u=n.allGroupsAreCollapsed,s=n.onGroupSetup,l=n.onGroupFieldSetup,c=n.onToggleGroup,p=this.getAvailableGroups(a),f=this.getGroupLabels(),d=r.map(function(e,t){return{id:e[i],label:f[t]}});return wp.element.createElement(N.Fragment,null,this.isTabbed&&!!r.length&&wp.element.createElement(ie,{items:r,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===o.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleSortGroups},wp.element.createElement(Fe,{ref:this.tabsList,items:d,current:t,onChange:this.handleTabsChange},!!p.length&&!this.isMaximumReached&&wp.element.createElement(Te,{buttonText:"+",groups:p,onSelect:this.handleAddGroup}))),!r.length&&wp.element.createElement(Ne,{label:"There are no entries yet."},wp.element.createElement(Te,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup})),!!r.length&&wp.element.createElement(ie,{items:r,options:{axis:"y",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forcePlaceholderSize:!0},forwardedRef:this.groupsList,onUpdate:this.handleSortGroups},wp.element.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},r.map(function(n,r){return wp.element.createElement(Pe,s(n,{index:r,label:f[r],tabbed:e.isTabbed,hidden:e.isTabbed&&n[i]!==t,allowClone:o.duplicate_groups_allowed&&!e.isMaximumReached,onFieldSetup:l,onClone:e.handleCloneGroup,onRemove:e.handleRemoveGroup,onToggle:c}))}))),!this.isTabbed&&!!r.length&&wp.element.createElement("div",{className:"cf-complex__actions"},!!p.length&&!this.isMaximumReached&&wp.element.createElement(Te,{buttonText:this.inserterButtonText,groups:p,onSelect:this.handleAddGroup}),wp.element.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},u?"Expand All":"Collapse All")))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(i.sprintf)(Object(i.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),t}(N.Component);Object(x.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(e){return function(t){var n=t.field;return"complex"!==n.type?wp.element.createElement(e,t):wp.element.createElement(e,Q()({className:"cf-complex--".concat(n.layout)},t))}}),Object(x.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(p.isEmpty)(t))return Object(i.__)("This field is required. ","carbon-fields-ui");if(n>0&&t.length=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Et=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},xt=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Ot=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function Dt(e){return St(e)?window.pageYOffset:e.scrollTop}function jt(e,t){St(e)?window.scrollTo(0,t):e.scrollTop=t}function At(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ct,o=Dt(e),i=t-o,a=0;!function t(){var u,s=i*((u=(u=a+=10)/n-1)*u*u+1)+o;jt(e,s),a=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!a)return i&&At(s,C,160),{placement:"bottom",maxHeight:t};if(!a&&O>=r||a&&E>=r)return i&&At(s,C,160),{placement:"bottom",maxHeight:a?E-b:O-b};if("auto"===o||a){var k=t;return(!a&&x>=r||a&&w>=r)&&(k=a?w-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return jt(s,C),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(x>=d&&!a)return i&&At(s,_,160),{placement:"top",maxHeight:t};if(!a&&x>=r||a&&w>=r){var S=t;return(!a&&x>=r||a&&w>=r)&&(S=a?w-y:x-y),i&&At(s,_,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:i,shouldScroll:u&&!c,isFixedPosition:c,theme:s});l&&l(p),r.setState(p)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||Ft(e);return bt({},r.props,{placement:t,maxHeight:r.state.maxHeight})},Et(r,n)}return yt(t,e),gt(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(de.Component);Tt.contextTypes={getPortalPlacement:st.a.func};var Pt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},Nt=Pt,It=Pt,Rt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return he.a.createElement("div",bt({className:r(Object(at.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};Rt.defaultProps={children:"No options"};var Lt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return he.a.createElement("div",bt({className:r(Object(at.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};Lt.defaultProps={children:"Loading..."};var Ht=function(e){function t(){var e,n,r;mt(this,t);for(var o=arguments.length,i=Array(o),a=0;a0,h=c-p-l,m=!1;h>t&&r.isBottom&&(i&&i(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),f.scrollTop=c,m=!0,r.isBottom=!0):!d&&-t>l&&(a&&!r.isTop&&a(e),f.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},Et(r,n)}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return he.a.createElement(Xt,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(de.Component),ln=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=wt(e,["isEnabled"]);return t?he.a.createElement(sn,n):this.props.children}}]),t}(de.Component);ln.defaultProps={isEnabled:!0};var cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,i=e.getStyles,a=e.hasValue;return he.a.createElement("div",{className:r(Object(at.a)(i("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},t)}}]),t}(de.Component),pn=function(e){var t=e.size,n=wt(e,["size"]);return he.a.createElement("svg",bt({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(at.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},fn=function(e){return he.a.createElement(pn,bt({size:20},e),he.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},dn=function(e){return he.a.createElement(pn,bt({size:20},e),he.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},hn=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},mn=hn,gn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return he.a.createElement("div",bt({},i,{className:r(Object(at.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};gn.defaultProps={children:he.a.createElement(dn,null)};var vn=hn,bn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return he.a.createElement("div",bt({},i,{className:r(Object(at.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};bn.defaultProps={children:he.a.createElement(fn,null)};var yn=function(e){var t=e.color,n=e.delay,r=e.offset;return he.a.createElement("span",{className:Object(at.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(at.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var wn=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,i=e.isFocused,a=e.isRtl,u=e.theme.colors,s=i?u.neutral80:u.neutral20;return he.a.createElement("div",bt({},o,{className:n(Object(at.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),he.a.createElement(yn,{color:s,delay:0,offset:a}),he.a.createElement(yn,{color:s,delay:160,offset:!0}),he.a.createElement(yn,{color:s,delay:320,offset:!a}))};wn.defaultProps={size:4};var En=function(e){var t=e.children,n=e.innerProps;return he.a.createElement("div",n,t)},xn=En,On=En,Cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return he.a.createElement("div",n,t)}}]),t}(de.Component);Cn.defaultProps={children:he.a.createElement(fn,{size:14})};var _n=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,u=e.innerProps,s=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove,h=bt({className:o(Object(at.a)(a("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),m={className:o(Object(at.a)(a("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=bt({className:o(Object(at.a)(a("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return he.a.createElement(p,{data:i,innerProps:h,selectProps:c},he.a.createElement(f,{data:i,innerProps:m,selectProps:c},t),he.a.createElement(d,{data:i,innerProps:g,selectProps:c}))}}]),t}(de.Component);_n.defaultProps={cropWithEllipsis:!0};var kn={ClearIndicator:bn,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,u=e.innerRef,s=e.innerProps;return he.a.createElement("div",bt({ref:u,className:n(Object(at.a)(r("control",e)),{control:!0,"control--is-disabled":i,"control--is-focused":a},o)},s),t)},DropdownIndicator:gn,DownChevron:dn,CrossIcon:fn,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.headingProps,u=e.label,s=e.theme;return he.a.createElement("div",{className:r(Object(at.a)(o("group",e)),{group:!0},n)},he.a.createElement(i,bt({},a,{theme:s,getStyles:o,cx:r}),u),he.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,i=wt(e,["className","cx","getStyles","theme"]);return he.a.createElement("div",bt({className:n(Object(at.a)(r("groupHeading",bt({theme:o},i))),{"group-heading":!0},t)},i))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return he.a.createElement("div",{className:r(Object(at.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return he.a.createElement("span",bt({},o,{className:n(Object(at.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,i=e.isHidden,a=e.isDisabled,u=e.theme,s=wt(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return he.a.createElement("div",{className:Object(at.a)(r("input",bt({theme:u},s)))},he.a.createElement(ct.a,bt({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:i?0:1,outline:0,padding:0,color:"inherit"},disabled:a},s)))},LoadingIndicator:wn,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerRef,a=e.innerProps,u=r(Object(at.a)(o("menu",e)),{menu:!0},n);return he.a.createElement("div",bt({className:u},a,{ref:i}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isMulti,a=e.innerRef;return he.a.createElement("div",{className:r(Object(at.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":i},n),ref:a},t)},MenuPortal:Ht,LoadingMessage:Lt,NoOptionsMessage:Rt,MultiValue:_n,MultiValueContainer:xn,MultiValueLabel:On,MultiValueRemove:Cn,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,u=e.isSelected,s=e.innerRef,l=e.innerProps;return he.a.createElement("div",bt({ref:s,className:r(Object(at.a)(o("option",e)),{option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":u},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return he.a.createElement("div",bt({className:r(Object(at.a)(o("placeholder",e)),{placeholder:!0},n)},i),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isDisabled,u=e.isRtl;return he.a.createElement("div",bt({className:r(Object(at.a)(o("container",e)),{"--is-disabled":a,"--is-rtl":u},n)},i),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.innerProps;return he.a.createElement("div",bt({className:r(Object(at.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":i},n)},a),t)},ValueContainer:cn},Sn=function(e){return bt({},kn,e.components)},Dn={clearIndicator:vn,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:mn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:It,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return vt(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),vt(t,"backgroundColor",a.neutral0),vt(t,"borderRadius",o),vt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),vt(t,"marginBottom",i.menuGutter),vt(t,"marginTop",i.menuGutter),vt(t,"position","absolute"),vt(t,"width","100%"),vt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Nt,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*i.baseUnit+"px "+3*i.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?a.primary:a.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},jn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},An={backspaceRemovesValue:!0,blurInputOnSelect:Mt(),captureMenuScroll:!Mt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=bt({ignoreCase:!0,ignoreAccents:!0,stringify:qt,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,u=n.matchFrom,s=a?Gt(t):t,l=a?Gt(i(e)):i(e);return r&&(s=s.toLowerCase(),l=l.toLowerCase()),o&&(s=Yt(s),l=Yt(l)),"start"===u?l.substr(0,s.length)===s:l.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Mn=1,Fn=function(e){function t(e){mt(this,t);var n=Et(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Tn.call(n);var r=e.value;n.cacheComponents=ft(n.cacheComponents,zt).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Mn);var o=kt(r),i=n.buildMenuOptions(e,o);return n.state.menuOptions=i,n.state.selectValue=o,n}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var i=kt(e.value),a=this.buildMenuOptions(e,i),u=this.getNextFocusedValue(i),s=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:i,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,i,a=this.props,u=a.isDisabled,s=a.menuIsOpen,l=this.state.isFocused;(l&&!u&&e.isDisabled||l&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),i=n.offsetHeight/3,o.bottom+i>r.bottom?jt(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+i,t.scrollHeight)):o.top-i-1&&(i=a)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[i]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var u=i.indexOf(a);a||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=i.length-1,l=-1;if(i.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var i=0,a=o.indexOf(r);r||(a=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?i=a>0?a-1:o.length-1:"down"===e?i=(a+1)%o.length:"pageup"===e?(i=a-t)<0&&(i=0):"pagedown"===e?(i=a+t)>o.length-1&&(i=o.length-1):"last"===e&&(i=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[i],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(jn):bt({},jn,this.props.theme):jn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,i=o.classNamePrefix,a=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var i in n)n.hasOwnProperty(i)&&n[i]&&o.push(""+_t(e,i));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,i),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:a,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,i=e.options,a=function(e,r){var i=n.isOptionDisabled(e,t),a=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&a||!n.filterOption({label:u,value:s,data:e},o))){var l=i?void 0:function(){return n.onOptionHover(e)},c=i?void 0:function(){return n.selectOption(e)},p=n.getElementId("option")+"-"+r;return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,role:"option",tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:p,label:u,type:"option",value:s}}};return i.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=a(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var i=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:i,data:t,options:o})}}else{var u=a(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,u=i.menuIsOpen,s=i.inputValue,l=i.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:l({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=this.components.Input,u=this.state.inputIsHidden,s=r||this.getElementId("input");if(!n)return he.a.createElement(Kt,{id:s,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ct,onFocus:this.onInputFocus,readOnly:!0,tabIndex:i,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps,p=c.cx,f=c.theme;return he.a.createElement(a,bt({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:s,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,theme:f,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,u=t.Placeholder,s=this.commonProps,l=this.props,c=l.controlShouldRenderValue,p=l.isDisabled,f=l.isMulti,d=l.inputValue,h=l.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue;if(!this.hasValue()||!c)return d?null:he.a.createElement(u,bt({},s,{key:"placeholder",isDisabled:p}),h);if(f)return g.map(function(t){var a=t===v;return he.a.createElement(n,bt({},s,{components:{Container:r,Label:o,Remove:i},isFocused:a,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(d)return null;var b=g[0];return he.a.createElement(a,bt({},s,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return he.a.createElement(e,bt({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;return e&&o?he.a.createElement(e,bt({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return he.a.createElement(n,bt({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return he.a.createElement(e,bt({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,u=t.LoadingMessage,s=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,f=p.focusedOption,d=p.menuOptions,h=this.props,m=h.captureMenuScroll,g=h.inputValue,v=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,E=h.menuIsOpen,x=h.menuPlacement,O=h.menuPosition,C=h.menuPortalTarget,_=h.menuShouldBlockScroll,k=h.menuShouldScrollIntoView,S=h.noOptionsMessage,D=h.onMenuScrollToTop,j=h.onMenuScrollToBottom;if(!E)return null;var A=function(t){var n=f===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,he.a.createElement(l,bt({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},M=void 0;if(this.hasOptions())M=d.render.map(function(t){if("group"===t.type){t.type;var o=wt(t,["type"]),i=t.key+"-heading";return he.a.createElement(n,bt({},c,o,{Heading:r,headingProps:{id:i},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return A(e)}))}if("option"===t.type)return A(t)});else if(v){var F=b({inputValue:g});if(null===F)return null;M=he.a.createElement(u,c,F)}else{var T=S({inputValue:g});if(null===T)return null;M=he.a.createElement(s,c,T)}var P={minMenuHeight:y,maxMenuHeight:w,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:k},N=he.a.createElement(Tt,bt({},c,P),function(t){var n=t.ref,r=t.placerProps,a=r.placement,u=r.maxHeight;return he.a.createElement(o,bt({},c,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:a}),he.a.createElement(ln,{isEnabled:m,onTopArrive:D,onBottomArrive:j},he.a.createElement(un,{isEnabled:_},he.a.createElement(i,bt({},c,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:u}),M))))});return C||"fixed"===O?he.a.createElement(a,bt({},c,{appendTo:C,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var u=a.map(function(t){return e.getOptionValue(t)}).join(n);return he.a.createElement("input",{name:i,type:"hidden",value:u})}var s=a.length>0?a.map(function(t,n){return he.a.createElement("input",{key:"i-"+n,name:i,type:"hidden",value:e.getOptionValue(t)})}):he.a.createElement("input",{name:i,type:"hidden"});return he.a.createElement("div",null,s)}var l=a[0]?this.getOptionValue(a[0]):"";return he.a.createElement("input",{name:i,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?he.a.createElement($t,{"aria-live":"assertive"},he.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),he.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,u=i.id,s=i.isDisabled,l=this.state.isFocused,c=this.commonProps=this.getCommonProps();return he.a.createElement(r,bt({},c,{className:a,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),he.a.createElement(t,bt({},c,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l}),he.a.createElement(o,bt({},c,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),he.a.createElement(n,bt({},c,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(de.Component);Fn.defaultProps=An;var Tn=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=Sn({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,i=o.closeMenuOnSelect,a=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),i&&(e.inputIsHiddenAfterUpdate=!a,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var i=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==i}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(Ot(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=Dn[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var i=r.focusable.indexOf(o),a=r.render[i];return a&&a.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,bt({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&St(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=xt(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=xt(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,u=n.isClearable,s=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof c&&(c(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||a)return;e.focusValue("previous");break;case"ArrowRight":if(!r||a)return;e.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!l||!p||!m||f&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(l){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":l?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&i&&e.clearValue();break;case" ":if(a)return;if(!l){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":l?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":l?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!l)return;e.focusOption("pageup");break;case"PageDown":if(!l)return;e.focusOption("pagedown");break;case"Home":if(!l)return;e.focusOption("first");break;case"End":if(!l)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Pn=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;mt(this,n);for(var o=arguments.length,i=Array(o),a=0;a1?n-1:0),o=1;o-1})}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.field;return o.options.length>0?wp.element.createElement(Yn,{id:t,name:n,value:this.filterValues(r),options:o.options,delimiter:o.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):wp.element.createElement(Gn,null)}}]),t}(N.Component),$n=(n(267),function(e){function t(){var e;return C()(this,t),(e=D()(this,A()(t).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(P()(P()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(P()(P()(e))),e}return F()(t,e),k()(t,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,i=r.width,a=r.height,u=this.state,s=u.width,l=u.height;"resize"!==o||s===i&&l===a||this.setState({width:i,height:a})}}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"cf-oembed__preview"},wp.element.createElement("iframe",{ref:function(t){return e.iframe=t},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var e="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",t="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(e,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),n=wp.element.createElement("html",{lang:document.documentElement.lang},wp.element.createElement("head",null,wp.element.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),wp.element.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),wp.element.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:t}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(N.renderToString)(n)),this.iframe.contentWindow.document.close()}}}]),t}(N.Component)),Kn=function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.embedCode,i=e.embedType,a=e.provider;return wp.element.createElement("div",{ref:this.node},wp.element.createElement(oe,{id:t,value:r,onChange:this.handleChange}),o?wp.element.createElement($n,{html:o,type:i,provider:a}):null,wp.element.createElement("input",{type:"hidden",name:n,value:r,readOnly:!0}))}}]),t}(N.Component),Xn=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),Jn=Object(G.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=z()(t,2),r=n[0],o=n[1],i=Object(X.pipe)(J({onFetchEmbedCode:o}),Object(X.map)(G.toProps)),a=Object(X.pipe)(r,Object(X.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(X.merge)(i,a)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(i.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(i.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}}),Zn=Object(E.compose)(Xn,Jn)(Kn),Qn=(n(268),function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0?this.renderOptions():wp.element.createElement(Gn,null)}}]),t}(N.Component)),er=(n(269),Le(function(e){return c()({},e,{field:c()({},e.field,{options:e.field.options.map(function(e){return c()({},e,{label:wp.element.createElement("img",{className:"cf-radio-image__image",src:e.label})})})})})})(Qn)),tr=function(e){function t(){var e;return C()(this,t),e=D()(this,A()(t).call(this)),s()(P()(P()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(p.isString)(t)?t:t.target.value)}),s()(P()(P()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=c()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=c()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return F()(t,e),k()(t,[{key:"componentDidMount",value:function(){setTimeout(this.initEditor,100)}},{key:"componentWillUnmount",value:function(){this.destroyEditor()}},{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,a=t.field,u=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":a.rich_editing},{"html-active":!a.rich_editing}],s=a.media_buttons?Object(p.template)(a.media_buttons)({id:n}):null;return wp.element.createElement("div",{id:"wp-".concat(n,"-wrap"),className:K()(u),ref:function(t){return e.editorNode=t}},a.media_buttons&&wp.element.createElement("div",{id:"wp-".concat(n,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:s}})),a.rich_editing&&wp.element.createElement("div",{className:"wp-editor-tabs"},wp.element.createElement("button",{type:"button",id:"".concat(n,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":n},Object(i.__)("Visual","carbon-fields-ui")),wp.element.createElement("button",{type:"button",id:"".concat(n,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":n},Object(i.__)("Text","carbon-fields-ui"))),wp.element.createElement("div",{id:"wp-".concat(n,"-editor-container"),className:"wp-editor-container"},wp.element.createElement("textarea",Q()({style:{width:"100%"},className:"regular-text",id:n,name:r,value:o,onChange:this.handleChange},a.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),t}(N.Component),nr=(n(270),function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0?wp.element.createElement("select",{id:t,name:n,value:r||Object(p.get)(o.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},o.options.map(function(e){return wp.element.createElement("option",{key:e.value,value:e.value},e.label)})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),rr=(n(271),function(e){function t(){return C()(this,t),D()(this,A()(t).apply(this,arguments))}return F()(t,e),k()(t,[{key:"render",value:function(){return wp.element.createElement("h3",null,this.props.field.label)}}]),t}(N.Component)),or=(n(272),function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,i=t.field;return i.options.length>0?wp.element.createElement("ul",{className:"cf-set__list"},i.options.map(function(t,a){return wp.element.createElement("li",{className:"cf-set__list-item",key:a},wp.element.createElement("input",Q()({type:"checkbox",id:"".concat(n,"-").concat(t.value),name:"".concat(r,"[]"),checked:e.isChecked(o,t),value:t.value,className:"cf-set__input",onChange:e.handleChange},i.attributes)),wp.element.createElement("label",{className:"cf-set__label",htmlFor:"".concat(n,"-").concat(t.value)},t.label))})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),ir=function(e){function t(){var e,n;C()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(p.some)(n,function(t){return t==e});case"NOT IN":return Object(p.every)(n,function(t){return t!=e});case"INCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(a[t.field],t.compare,t.value);return e.concat(n)},[]),s=!1;switch(o){case"AND":s=Object(p.every)(u);break;case"OR":s=Object(p.some)(u)}s?e.showField(e.id):e.hideField(e.id)}}return Object(E.createHigherOrderComponent)(function(e){return Object(E.compose)(Object(a.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(a.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(G.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var xr=n(105),Or=n.n(xr),Cr="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function _r(){return"cf-".concat(Or()(Cr,21))}function kr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;l--)if(c[l]!==p[l])return!1;for(l=c.length-1;l>=0;l--)if(!b(e[s=c[l]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&w(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(p.AssertionError,Error),p.fail=g,p.ok=v,p.equal=function(e,t,n){e!=t&&g(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){E(!0,e,t,n)},p.doesNotThrow=function(e,t,n){E(!1,e,t,n)},p.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(31))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),c(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=c(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return p(n)}var l,w="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(w=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),x(n)&&(w=" "+p(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,w,C)):C[0]+w+C[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?c(e,s.value,null):c(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function x(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=w,t.isDate=E,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(254);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(255),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(31),n(93))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(93))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(261)),o=u(n(264)),a=u(n(1)),i=u(n(94));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var l=o in t,c=o in u,p=t[o],f=(0,r.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,r.isValidElement)(p)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:p.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(p.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return c()({},e,s()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(p.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function d(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function h(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function m(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function g(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function v(e,t){return e.validation[t]||null}function b(e,t){return-1===e.hiddenFields.indexOf(t)}Object(i.registerStore)("carbon-fields/core",{reducer:f,actions:r,selectors:o});var y=n(18),w=n.n(y),E=n(14),x=n(19),O=n(6),_=n.n(O),C=n(7),k=n.n(C),S=n(8),j=n.n(S),D=n(9),A=n.n(D),M=n(10),T=n.n(M),F=n(0),P=n.n(F),N=n(3),I=16;function L(e){return Object(E.createHigherOrderComponent)(function(t){return function(n){function r(n){var o;return _()(this,r),(o=j()(this,A()(r).call(this,n))).onHooksUpdated=o.onHooksUpdated.bind(P()(P()(o))),o.Component=Object(x.applyFilters)(e,t),o.namespace=Object(p.uniqueId)("core/with-filters/component-"),o.throttledForceUpdate=Object(p.debounce)(function(){o.Component=Object(x.applyFilters)(e,t),o.forceUpdate()},I),Object(x.addAction)("hookRemoved",o.namespace,o.onHooksUpdated),Object(x.addAction)("hookAdded",o.namespace,o.onHooksUpdated),o}return T()(r,n),k()(r,[{key:"componentWillUnmount",value:function(){this.throttledForceUpdate.cancel(),Object(x.removeAction)("hookRemoved",this.namespace),Object(x.removeAction)("hookAdded",this.namespace)}},{key:"onHooksUpdated",value:function(t){t===e&&this.throttledForceUpdate()}},{key:"render",value:function(){return wp.element.createElement(this.Component,this.props)}}]),r}(N.Component)},"withFilters")}function R(e,t){var n,r=Object(p.startCase)(e),o={};return n={},s()(n,"register".concat(r,"Type"),function(n,i){return Object(p.isString)(n)?o[n]?(console.error(Object(a.sprintf)(Object(a.__)("%1$s %2$s is already registered.","carbon-fields-ui"),r,n)),!1):i&&Object(p.isFunction)(i)?(o[n]=t.reduce(function(t,r){return c()({},t,s()({},r,Object(x.applyFilters)("carbon-fields.register-".concat(e,"-type"),n,r,i)))},{}),!0):(console.error(Object(a.__)('The "component" param must be a function.',"carbon-fields-ui")),!1):(console.error(Object(a.sprintf)(Object(a.__)("%1$s type must be a string.","carbon-fields-ui"),r)),!1)}),s()(n,"get".concat(r,"Type"),function(e,n){if(t.includes(n)){if(o[e])return o[e][n];console.error(Object(a.sprintf)(Object(a.__)("%s %s isn't registered.","carbon-fields-ui"),r,e))}else console.error(Object(a.sprintf)(Object(a.__)("The provided context isn't a valid one. Must be one of - %s .","carbon-fields-ui"),t.join(", ")))}),n}var H=R("field",["metabox","block"]),V=H.registerFieldType,B=H.getFieldType,U=n(16),z=n.n(U),W=n(32),Y=n.n(W),G=n(17),q=n(20),K=n.n(q),X=n(11),J=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(r,o){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){r(e)}),i.fail(function(){o(Object(a.__)("An error occured.","carbon-fields-ui"))})})},ue=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&i.length>=r.max?alert(Object(a.sprintf)(Object(a.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(u(o,w()(i).concat([Object(p.pick)(e,"id","type","subtype")])),s({selectedOptions:w()(l).concat([e])})))}),s()(P()(P()(n)),"handleRemoveItem",function(e){var t=n.props,r=t.value,o=t.id,a=t.onChange,i=t.setState,u=t.selectedOptions;a(o,Object(p.without)(r,e)),i({selectedOptions:Object(p.without)(u,e)})}),s()(P()(P()(n)),"handleSort",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),n}return T()(t,e),k()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.value,o=t.field,i=t.totalOptionsCount,u=t.selectedOptions,s=t.queryTerm,l=this.props.options;return o.duplicates_allowed||(l=Y()(l,function(e){e.map(function(e){return e.disabled=!!Object(p.find)(r,function(t){return Object(p.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),wp.element.createElement(N.Fragment,null,wp.element.createElement("div",{className:"cf-association__bar"},wp.element.createElement(oe,{value:s,onChange:this.handleSearchChange}),wp.element.createElement("span",{className:"cf-association__counter"},Object(a.sprintf)(Object(a.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(l.length),Number(i)))),wp.element.createElement("div",{className:"cf-association__cols"},wp.element.createElement("div",{className:"cf-association__col"},l.map(function(t,n){return wp.element.createElement("div",{className:K()("cf-association__option",{"cf-association__option--selected":t.disabled}),key:n},t.thumbnail&&wp.element.createElement("img",{className:"cf-association__option-thumb",src:t.thumbnail}),wp.element.createElement("div",{className:"cf-association__option-content"},wp.element.createElement("span",{className:"cf-association__option-title"},t.title),wp.element.createElement("span",{className:"cf-association__option-type"},t.type)),wp.element.createElement("div",{className:"cf-association__option-actions"},wp.element.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:t.edit_link}),!t.disabled&&(o.max<0||r.length0&&t.length=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(he.createElement)(e,n)},a}(he.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r},Se=ke(function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a1?n.setState(function(e){return{menuVisible:!e.menuVisible}}):r(t[0])}),s()(P()(P()(n)),"handleItemClick",function(e){n.setState({menuVisible:!1}),n.props.onSelect(e)}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.buttonText,r=t.groups;return wp.element.createElement("div",{className:"cf-complex__inserter"},wp.element.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},n),r.length>1&&wp.element.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},r.map(function(t,n){return wp.element.createElement("li",{className:"cf-complex__inserter-item",key:n,onClick:function(){return e.handleItemClick(t)}},t.label)})))}}]),t}(N.Component)),Ne=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;n.setState({currentTab:Object(p.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),s()(P()(P()(n)),"handleToggleAllClick",function(){var e=n.props,t=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!t)}),s()(P()(P()(n)),"handleGroupsSortStart",function(e,t){var r=n.props,o=r.value,a=r.groupIdKey,i=t.item.index(),u=Object(p.get)(o,"".concat(i,".").concat(a),null);n.setState({currentDraggedGroup:u})}),s()(P()(P()(n)),"handleGroupsSortUpdate",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),s()(P()(P()(n)),"handleGroupsSortStop",function(){n.setState({currentDraggedGroup:null})}),s()(P()(P()(n)),"handleTabsChange",function(e){n.setState({currentTab:e})}),n}return T()(t,e),k()(t,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(p.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=z()(e,2),o=r[0],i=r[1],u=Object(p.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(p.isString)(u.label_template))return u.label;try{return Object(p.template)(u.label_template)(c()({$_index:n},i))||u.label}catch(e){return console.error(Object(a.sprintf)(Object(a.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var e=this,t=this.state,n=t.currentDraggedGroup,r=t.currentTab,o=this.props,i=o.value,u=o.field,s=o.groupIdKey,l=o.groupFilterKey,c=o.allGroupsAreCollapsed,p=o.onGroupSetup,f=o.onGroupFieldSetup,d=o.onToggleGroup,h=this.getAvailableGroups(l),m=this.getGroupLabels(),g=i.map(function(e,t){return{id:e[s],label:m[t]}});return wp.element.createElement(N.Fragment,null,this.isTabbed&&!!i.length&&wp.element.createElement(ae,{items:i,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===u.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},wp.element.createElement(Fe,{ref:this.tabsList,items:g,current:r,layout:u.layout,onChange:this.handleTabsChange},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Pe,{buttonText:"+",groups:h,onSelect:this.handleAddGroup}))),!i.length&&wp.element.createElement(Ie,{label:"There are no entries yet."},wp.element.createElement(Pe,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup})),!!i.length&&wp.element.createElement(ae,{items:i,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},wp.element.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},i.map(function(t,o){return wp.element.createElement(Ne,Q()({key:"".concat(t[l],"-").concat(o)},p(t,{index:o,label:m[o],dragged:t[s]===n,tabbed:e.isTabbed,hidden:e.isTabbed&&t[s]!==r,allowClone:u.duplicate_groups_allowed&&!e.isMaximumReached,onFieldSetup:f,onClone:e.handleCloneGroup,onRemove:e.handleRemoveGroup,onToggle:d})))}))),!this.isTabbed&&!!i.length&&wp.element.createElement("div",{className:"cf-complex__actions"},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Pe,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup}),wp.element.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},c?Object(a.__)("Expand All","carbon-fields-ui"):Object(a.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(a.sprintf)(Object(a.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),t}(N.Component);Object(x.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(e){return function(t){var n=t.field;return"complex"!==n.type?wp.element.createElement(e,t):wp.element.createElement(e,Q()({className:"cf-complex--".concat(n.layout)},t))}}),Object(x.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(p.isEmpty)(t))return Object(a.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Et=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},xt=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Ot=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function jt(e){return St(e)?window.pageYOffset:e.scrollTop}function Dt(e,t){St(e)?window.scrollTo(0,t):e.scrollTop=t}function At(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_t,o=jt(e),a=t-o,i=0;!function t(){var u,s=a*((u=(u=i+=10)/n-1)*u*u+1)+o;Dt(e,s),i=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&At(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&E>=r)return a&&At(s,_,160),{placement:"bottom",maxHeight:i?E-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&w>=r)&&(k=i?w-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return Dt(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&At(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&w>=r){var S=t;return(!i&&x>=r||i&&w>=r)&&(S=i?w-y:x-y),a&&At(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!c,isFixedPosition:c,theme:s});l&&l(p),r.setState(p)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||Tt(e);return bt({},r.props,{placement:t,maxHeight:r.state.maxHeight})},Et(r,n)}return yt(t,e),gt(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(he.Component);Ft.contextTypes={getPortalPlacement:st.a.func};var Pt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},Nt=Pt,It=Pt,Lt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};Lt.defaultProps={children:"No options"};var Rt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};Rt.defaultProps={children:"Loading..."};var Ht=function(e){function t(){var e,n,r;mt(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=c-p-l,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),f.scrollTop=c,m=!0,r.isBottom=!0):!d&&-t>l&&(i&&!r.isTop&&i(e),f.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},Et(r,n)}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return me.a.createElement(Xt,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(he.Component),ln=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=wt(e,["isEnabled"]);return t?me.a.createElement(sn,n):this.props.children}}]),t}(he.Component);ln.defaultProps={isEnabled:!0};var cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,i=e.hasValue;return me.a.createElement("div",{className:r(Object(it.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i},n)},t)}}]),t}(he.Component),pn=function(e){var t=e.size,n=wt(e,["size"]);return me.a.createElement("svg",bt({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(it.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},fn=function(e){return me.a.createElement(pn,bt({size:20},e),me.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},dn=function(e){return me.a.createElement(pn,bt({size:20},e),me.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},hn=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},mn=hn,gn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({},a,{className:r(Object(it.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};gn.defaultProps={children:me.a.createElement(dn,null)};var vn=hn,bn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({},a,{className:r(Object(it.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};bn.defaultProps={children:me.a.createElement(fn,null)};var yn=function(e){var t=e.color,n=e.delay,r=e.offset;return me.a.createElement("span",{className:Object(it.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(it.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var wn=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,i=e.isRtl,u=e.theme.colors,s=a?u.neutral80:u.neutral20;return me.a.createElement("div",bt({},o,{className:n(Object(it.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),me.a.createElement(yn,{color:s,delay:0,offset:i}),me.a.createElement(yn,{color:s,delay:160,offset:!0}),me.a.createElement(yn,{color:s,delay:320,offset:!i}))};wn.defaultProps={size:4};var En=function(e){var t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)},xn=En,On=En,_n=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)}}]),t}(he.Component);_n.defaultProps={children:me.a.createElement(fn,{size:14})};var Cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,i=e.getStyles,u=e.innerProps,s=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove,h=bt({className:o(Object(it.a)(i("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),m={className:o(Object(it.a)(i("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=bt({className:o(Object(it.a)(i("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return me.a.createElement(p,{data:a,innerProps:h,selectProps:c},me.a.createElement(f,{data:a,innerProps:m,selectProps:c},t),me.a.createElement(d,{data:a,innerProps:g,selectProps:c}))}}]),t}(he.Component);Cn.defaultProps={cropWithEllipsis:!0};var kn={ClearIndicator:bn,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,i=e.isFocused,u=e.innerRef,s=e.innerProps;return me.a.createElement("div",bt({ref:u,className:n(Object(it.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":i},o)},s),t)},DropdownIndicator:gn,DownChevron:dn,CrossIcon:fn,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,i=e.headingProps,u=e.label,s=e.theme;return me.a.createElement("div",{className:r(Object(it.a)(o("group",e)),{group:!0},n)},me.a.createElement(a,bt({},i,{theme:s,getStyles:o,cx:r}),u),me.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=wt(e,["className","cx","getStyles","theme"]);return me.a.createElement("div",bt({className:n(Object(it.a)(r("groupHeading",bt({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return me.a.createElement("div",{className:r(Object(it.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return me.a.createElement("span",bt({},o,{className:n(Object(it.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,i=e.isDisabled,u=e.theme,s=wt(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return me.a.createElement("div",{className:Object(it.a)(r("input",bt({theme:u},s)))},me.a.createElement(ct.a,bt({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:i},s)))},LoadingIndicator:wn,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,i=e.innerProps,u=r(Object(it.a)(o("menu",e)),{menu:!0},n);return me.a.createElement("div",bt({className:u},i,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,i=e.innerRef;return me.a.createElement("div",{className:r(Object(it.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:i},t)},MenuPortal:Ht,LoadingMessage:Rt,NoOptionsMessage:Lt,MultiValue:Cn,MultiValueContainer:xn,MultiValueLabel:On,MultiValueRemove:_n,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.isFocused,u=e.isSelected,s=e.innerRef,l=e.innerProps;return me.a.createElement("div",bt({ref:s,className:r(Object(it.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":i,"option--is-selected":u},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,i=e.isDisabled,u=e.isRtl;return me.a.createElement("div",bt({className:r(Object(it.a)(o("container",e)),{"--is-disabled":i,"--is-rtl":u},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},i),t)},ValueContainer:cn},Sn=function(e){return bt({},kn,e.components)},jn={clearIndicator:vn,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:mn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:It,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return vt(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),vt(t,"backgroundColor",i.neutral0),vt(t,"borderRadius",o),vt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),vt(t,"marginBottom",a.menuGutter),vt(t,"marginTop",a.menuGutter),vt(t,"position","absolute"),vt(t,"width","100%"),vt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Nt,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Dn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},An={backspaceRemovesValue:!0,blurInputOnSelect:Mt(),captureMenuScroll:!Mt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=bt({ignoreCase:!0,ignoreAccents:!0,stringify:qt,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?Gt(t):t,l=i?Gt(a(e)):a(e);return r&&(s=s.toLowerCase(),l=l.toLowerCase()),o&&(s=Yt(s),l=Yt(l)),"start"===u?l.substr(0,s.length)===s:l.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Mn=1,Tn=function(e){function t(e){mt(this,t);var n=Et(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Fn.call(n);var r=e.value;n.cacheComponents=ft(n.cacheComponents,zt).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Mn);var o=kt(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=kt(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,l=this.state.isFocused;(l&&!u&&e.isDisabled||l&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?Dt(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,l=-1;if(a.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Dn):bt({},Dn,this.props.theme):Dn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+Ct(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var l=a?void 0:function(){return n.onOptionHover(e)},c=a?void 0:function(){return n.selectOption(e)},p=n.getElementId("option")+"-"+r;return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:p,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,l=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:l({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=this.components.Input,u=this.state.inputIsHidden,s=r||this.getElementId("input");if(!n)return me.a.createElement(Kt,{id:s,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:_t,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps,p=c.cx,f=c.theme;return me.a.createElement(i,bt({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:s,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:f,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,u=t.Placeholder,s=this.commonProps,l=this.props,c=l.controlShouldRenderValue,p=l.isDisabled,f=l.isMulti,d=l.inputValue,h=l.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue;if(!this.hasValue()||!c)return d?null:me.a.createElement(u,bt({},s,{key:"placeholder",isDisabled:p}),h);if(f)return g.map(function(t){var i=t===v;return me.a.createElement(n,bt({},s,{components:{Container:r,Label:o,Remove:a},isFocused:i,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(d)return null;var b=g[0];return me.a.createElement(i,bt({},s,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,bt({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?me.a.createElement(e,bt({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return me.a.createElement(n,bt({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,bt({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,u=t.LoadingMessage,s=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,f=p.focusedOption,d=p.menuOptions,h=this.props,m=h.captureMenuScroll,g=h.inputValue,v=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,E=h.menuIsOpen,x=h.menuPlacement,O=h.menuPosition,_=h.menuPortalTarget,C=h.menuShouldBlockScroll,k=h.menuShouldScrollIntoView,S=h.noOptionsMessage,j=h.onMenuScrollToTop,D=h.onMenuScrollToBottom;if(!E)return null;var A=function(t){var n=f===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,me.a.createElement(l,bt({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},M=void 0;if(this.hasOptions())M=d.render.map(function(t){if("group"===t.type){t.type;var o=wt(t,["type"]),a=t.key+"-heading";return me.a.createElement(n,bt({},c,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return A(e)}))}if("option"===t.type)return A(t)});else if(v){var T=b({inputValue:g});if(null===T)return null;M=me.a.createElement(u,c,T)}else{var F=S({inputValue:g});if(null===F)return null;M=me.a.createElement(s,c,F)}var P={minMenuHeight:y,maxMenuHeight:w,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:k},N=me.a.createElement(Ft,bt({},c,P),function(t){var n=t.ref,r=t.placerProps,i=r.placement,u=r.maxHeight;return me.a.createElement(o,bt({},c,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:i}),me.a.createElement(ln,{isEnabled:m,onTopArrive:j,onBottomArrive:D},me.a.createElement(un,{isEnabled:C},me.a.createElement(a,bt({},c,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:u}),M))))});return _||"fixed"===O?me.a.createElement(i,bt({},c,{appendTo:_,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=this.state.selectValue;if(a&&!r){if(o){if(n){var u=i.map(function(t){return e.getOptionValue(t)}).join(n);return me.a.createElement("input",{name:a,type:"hidden",value:u})}var s=i.length>0?i.map(function(t,n){return me.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):me.a.createElement("input",{name:a,type:"hidden"});return me.a.createElement("div",null,s)}var l=i[0]?this.getOptionValue(i[0]):"";return me.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?me.a.createElement($t,{"aria-live":"assertive"},me.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),me.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,u=a.id,s=a.isDisabled,l=this.state.isFocused,c=this.commonProps=this.getCommonProps();return me.a.createElement(r,bt({},c,{className:i,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),me.a.createElement(t,bt({},c,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l}),me.a.createElement(o,bt({},c,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),me.a.createElement(n,bt({},c,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(he.Component);Tn.defaultProps=An;var Fn=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=Sn({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(Ot(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=jn[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,bt({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&St(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=xt(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=xt(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof c&&(c(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!l||!p||!m||f&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(l){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":l?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!l){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":l?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":l?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!l)return;e.focusOption("pageup");break;case"PageDown":if(!l)return;e.focusOption("pagedown");break;case"Home":if(!l)return;e.focusOption("first");break;case"End":if(!l)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Pn=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;mt(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o-1})}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.field;return o.options.length>0?wp.element.createElement(Yn,{id:t,name:n,value:this.filterValues(r),options:o.options,delimiter:o.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):wp.element.createElement(Gn,null)}}]),t}(N.Component),$n=(n(267),function(e){function t(){var e;return _()(this,t),(e=j()(this,A()(t).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(P()(P()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(P()(P()(e))),e}return T()(t,e),k()(t,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,l=u.height;"resize"!==o||s===a&&l===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"cf-oembed__preview"},wp.element.createElement("iframe",{ref:function(t){return e.iframe=t},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var e="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",t="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(e,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),n=wp.element.createElement("html",{lang:document.documentElement.lang},wp.element.createElement("head",null,wp.element.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),wp.element.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),wp.element.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:t}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(N.renderToString)(n)),this.iframe.contentWindow.document.close()}}}]),t}(N.Component)),Kn=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.embedCode,a=e.embedType,i=e.provider;return wp.element.createElement("div",{ref:this.node},wp.element.createElement(oe,{id:t,value:r,onChange:this.handleChange}),o?wp.element.createElement($n,{html:o,type:a,provider:i}):null,wp.element.createElement("input",{type:"hidden",name:n,value:r,readOnly:!0}))}}]),t}(N.Component),Xn=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),Jn=Object(G.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=z()(t,2),r=n[0],o=n[1],a=Object(X.pipe)(J({onFetchEmbedCode:o}),Object(X.map)(G.toProps)),i=Object(X.pipe)(r,Object(X.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(X.merge)(a,i)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(a.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(a.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}}),Zn=Object(E.compose)(Xn,Jn)(Kn),Qn=(n(268),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():wp.element.createElement(Gn,null)}}]),t}(N.Component)),er=(n(269),He(function(e){return c()({},e,{field:c()({},e.field,{options:e.field.options.map(function(e){return c()({},e,{label:wp.element.createElement("img",{className:"cf-radio-image__image",src:e.label})})})})})})(Qn)),tr=function(e){function t(){var e;return _()(this,t),e=j()(this,A()(t).call(this)),s()(P()(P()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(p.isString)(t)?t:t.target.value)}),s()(P()(P()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=c()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=c()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return T()(t,e),k()(t,[{key:"componentDidMount",value:function(){setTimeout(this.initEditor,100)}},{key:"componentWillUnmount",value:function(){this.destroyEditor()}},{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,i=t.field,u=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":i.rich_editing},{"html-active":!i.rich_editing}],s=i.media_buttons?Object(p.template)(i.media_buttons)({id:n}):null;return wp.element.createElement("div",{id:"wp-".concat(n,"-wrap"),className:K()(u),ref:function(t){return e.editorNode=t}},i.media_buttons&&wp.element.createElement("div",{id:"wp-".concat(n,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:s}})),i.rich_editing&&wp.element.createElement("div",{className:"wp-editor-tabs"},wp.element.createElement("button",{type:"button",id:"".concat(n,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":n},Object(a.__)("Visual","carbon-fields-ui")),wp.element.createElement("button",{type:"button",id:"".concat(n,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":n},Object(a.__)("Text","carbon-fields-ui"))),wp.element.createElement("div",{id:"wp-".concat(n,"-editor-container"),className:"wp-editor-container"},wp.element.createElement("textarea",Q()({style:{width:"100%"},className:"regular-text",id:n,name:r,value:o,onChange:this.handleChange},i.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),t}(N.Component),nr=(n(270),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?wp.element.createElement("select",{id:t,name:n,value:r||Object(p.get)(o.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},o.options.map(function(e){return wp.element.createElement("option",{key:e.value,value:e.value},e.label)})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),rr=(n(271),function(e){function t(){return _()(this,t),j()(this,A()(t).apply(this,arguments))}return T()(t,e),k()(t,[{key:"render",value:function(){return wp.element.createElement("h3",null,this.props.field.label)}}]),t}(N.Component)),or=(n(272),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a-1}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?wp.element.createElement("ul",{className:"cf-set__list"},a.options.map(function(t,i){return wp.element.createElement("li",{className:"cf-set__list-item",key:i},wp.element.createElement("input",Q()({type:"checkbox",id:"".concat(n,"-").concat(t.value),name:"".concat(r,"[]"),checked:e.isChecked(o,t),value:t.value,className:"cf-set__input",onChange:e.handleChange},a.attributes)),wp.element.createElement("label",{className:"cf-set__label",htmlFor:"".concat(n,"-").concat(t.value)},t.label))})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),ar=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(p.some)(n,function(t){return t==e});case"NOT IN":return Object(p.every)(n,function(t){return t!=e});case"INCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),l=!1;switch(o){case"AND":l=Object(p.every)(s);break;case"OR":l=Object(p.some)(s)}l?e.showField(e.id):e.hideField(e.id)}}return Object(E.createHigherOrderComponent)(function(e){return Object(E.compose)(Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(i.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(G.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var xr=n(105),Or=n.n(xr),_r="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function Cr(){return"cf-".concat(Or()(_r,21))}function kr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r .cf-field > .cf-field__head, +.cf-container-user-meta .cf-container__fields > .cf-field > .cf-field__head { + position: absolute; + left: 0; + font-weight: 600; } + +.cf-container .cf-field__label { padding-bottom: 5px; font-weight: 600; color: #23282d; } +.cf-container-term-meta .cf-field__label, +.cf-container-user-meta .cf-field__label { + margin: 0 !important; } + .cf-field__help { display: inline-block; color: #666; margin-top: 10px; } -/* ========================================================================== - Multiselect - ========================================================================== */ - /* ========================================================================== Colors ========================================================================== */ @@ -244,47 +250,6 @@ .cf-container-widget .cf-field { margin: 1em 0 .2em; } -/* ========================================================================== - Colors - ========================================================================== */ -/* ========================================================================== - WordPress Colors - https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ - ========================================================================== */ -/* ========================================================================== - Gutenberg Colors - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_colors.scss - ========================================================================== */ -/* ========================================================================== - Fonts - ========================================================================== */ -/* ========================================================================== - Variables - ========================================================================== */ -/* ========================================================================== - WordPress Variables - ========================================================================== */ -/* ========================================================================== - Gutenberg Variables - https://github.com/WordPress/gutenberg/blob/master/assets/stylesheets/_variables.scss - ========================================================================== */ -/* ========================================================================== - Term Meta - ========================================================================== */ -.cf-container-term-meta { - margin-bottom: 13px; } - .carbon-table-row .cf-container-term-meta { - margin-bottom: 0; } - .cf-container-term-meta .cf-field { - margin-top: 13px; } - .cf-container-term-meta .cf-field:first-child { - margin-top: 0; } - -.carbon-table-row .cf-field__head { - position: absolute; - left: 0; - font-weight: 600; } - -.carbon-table-row .cf-field__body { - width: 95%; } - /* ========================================================================== Colors ========================================================================== */ @@ -377,11 +342,18 @@ .cf-container__fields { display: flex; flex-wrap: wrap; - margin: -1px -1px 0 0; } + margin: -1px -1px 0 0; + background-color: #fff; } .cf-container__fields[hidden] { display: none; } .block-editor .cf-container__fields { border-left: 1px solid #e2e4e7; } + .cf-container-term-meta .cf-container__fields, + .cf-container-user-meta .cf-container__fields { + border-width: 0 0 1px 1px; + border-style: solid; + border-color: #e2e4e7; + margin: 0; } .cf-container__tabs { position: relative; diff --git a/build/gutenberg/metaboxes.js b/build/gutenberg/metaboxes.js index bf0c2e0a0..d7c841aa6 100644 --- a/build/gutenberg/metaboxes.js +++ b/build/gutenberg/metaboxes.js @@ -385,7 +385,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n\nconst startWith = (...xs) = /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/container/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../field */ \"./packages/metaboxes/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar Container =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(Container, _Component);\n\n function Container() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Container);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Container)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n currentTab: null\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleTabClick\", function (tab) {\n _this.setState({\n currentTab: tab\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Container, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var container = this.props.container;\n\n if (this.isTabbed(container)) {\n this.setState({\n currentTab: Object.keys(container.settings.tabs)[0]\n });\n }\n }\n /**\n * Returns whether the container uses tabs.\n *\n * @param {Object} container\n * @return {boolean}\n */\n\n }, {\n key: \"isTabbed\",\n value: function isTabbed(container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"isPlainObject\"])(container.settings.tabs);\n }\n /**\n * Renders the given field.\n *\n * @param {Object} field\n * @return {Object}\n */\n\n }, {\n key: \"renderField\",\n value: function renderField(field) {\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, 'metabox');\n\n if (!FieldEdit) {\n return null;\n }\n\n return wp.element.createElement(_field__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n key: field.id,\n id: field.id\n }, wp.element.createElement(FieldEdit, {\n id: field.id\n }));\n }\n /**\n * Handles click on the tabs.\n *\n * @param {string} tab\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var container = this.props.container;\n var hasTabs = this.isTabbed(container);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()(['cf-container', \"cf-container-\".concat(container.id), \"cf-container-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"kebabCase\"])(container.type))].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(container.classes), [{\n 'cf-container--plain': !hasTabs\n }]));\n return wp.element.createElement(\"div\", {\n className: classes\n }, wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: container.nonce.name,\n value: container.nonce.value\n }), hasTabs && wp.element.createElement(\"div\", {\n className: \"cf-container__tabs\"\n }, wp.element.createElement(\"ul\", {\n className: \"cf-container__tabs-list\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n // eslint-disable-next-line no-shadow\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-container__tabs-item', {\n 'cf-container__tabs-item--current': tabName === currentTab\n });\n return wp.element.createElement(\"li\", {\n key: tabName,\n className: classes,\n onClick: function onClick() {\n return _this2.handleTabClick(tabName);\n }\n }, tabName);\n }))), hasTabs && Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n return wp.element.createElement(\"div\", {\n className: \"cf-container__fields\",\n key: tabName,\n hidden: tabName !== currentTab\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(fieldNames, function (fieldName) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"find\"])(container.fields, ['name', fieldName]);\n return _this2.renderField(field);\n }));\n }), !hasTabs && wp.element.createElement(\"div\", {\n className: \"cf-container__fields\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.fields, this.renderField)));\n }\n }]);\n\n return Container;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Container);\n\n//# sourceURL=webpack:///./packages/metaboxes/components/container/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/container/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../field */ \"./packages/metaboxes/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar Container =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(Container, _Component);\n\n function Container() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Container);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Container)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n currentTab: null\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"renderField\", function (field) {\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, 'metabox');\n\n if (!FieldEdit) {\n return null;\n }\n\n return wp.element.createElement(_field__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n key: field.id,\n id: field.id\n }, wp.element.createElement(FieldEdit, {\n id: field.id,\n containerId: _this.props.id\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleTabClick\", function (tab) {\n _this.setState({\n currentTab: tab\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Container, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var container = this.props.container;\n\n if (this.isTabbed(container)) {\n this.setState({\n currentTab: Object.keys(container.settings.tabs)[0]\n });\n }\n }\n /**\n * Returns whether the container uses tabs.\n *\n * @param {Object} container\n * @return {boolean}\n */\n\n }, {\n key: \"isTabbed\",\n value: function isTabbed(container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"isPlainObject\"])(container.settings.tabs);\n }\n /**\n * Renders the given field.\n *\n * @param {Object} field\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var container = this.props.container;\n var hasTabs = this.isTabbed(container);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()(['cf-container', \"cf-container-\".concat(container.id), \"cf-container-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"kebabCase\"])(container.type))].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(container.classes), [{\n 'cf-container--plain': !hasTabs\n }]));\n return wp.element.createElement(\"div\", {\n className: classes\n }, wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: container.nonce.name,\n value: container.nonce.value\n }), hasTabs && wp.element.createElement(\"div\", {\n className: \"cf-container__tabs\"\n }, wp.element.createElement(\"ul\", {\n className: \"cf-container__tabs-list\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n // eslint-disable-next-line no-shadow\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-container__tabs-item', {\n 'cf-container__tabs-item--current': tabName === currentTab\n });\n return wp.element.createElement(\"li\", {\n key: tabName,\n className: classes,\n onClick: function onClick() {\n return _this2.handleTabClick(tabName);\n }\n }, tabName);\n }))), hasTabs && Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n return wp.element.createElement(\"div\", {\n className: \"cf-container__fields\",\n key: tabName,\n hidden: tabName !== currentTab\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(fieldNames, function (fieldName) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"find\"])(container.fields, ['name', fieldName]);\n return _this2.renderField(field);\n }));\n }), !hasTabs && wp.element.createElement(\"div\", {\n className: \"cf-container__fields\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.fields, this.renderField)));\n }\n }]);\n\n return Container;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Container);\n\n//# sourceURL=webpack:///./packages/metaboxes/components/container/index.js?"); /***/ }), @@ -467,18 +467,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_from_ajax_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/from-ajax-event */ \"./packages/metaboxes/utils/from-ajax-event.js\");\n/* harmony import */ var _store_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../store/helpers */ \"./packages/metaboxes/store/helpers.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/term-meta/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_ajax_event__WEBPACK_IMPORTED_MODULE_5__[\"default\"])('ajaxSuccess', 'add-tag'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var settings = _ref.settings,\n data = _ref.data;\n return settings.data.indexOf('carbon_fields_container') > -1 && !data.documentElement.querySelector('wp_error');\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function () {\n // Collects identifiers of current fields so we can remove them later.\n var oldFieldIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(props.container.fields, 'id'); // Get a fresh copy of the container and fields.\n\n\n var _normalizePreloadedSt = Object(_store_helpers__WEBPACK_IMPORTED_MODULE_6__[\"normalizePreloadedState\"])(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\n var container = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(containers, ['id', props.id]);\n\n var containerFields = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(fields, ['container_id', props.id]); // Replace the container and add the new fields.\n\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"dispatch\"])('carbon-fields/metaboxes'),\n updateState = _dispatch.updateState,\n removeFields = _dispatch.removeFields;\n\n updateState(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy([container], 'id'), lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy(containerFields, 'id'));\n removeFields(oldFieldIds);\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.term_meta.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/term-meta/index.js?"); - -/***/ }), - -/***/ "./packages/metaboxes/containers/term-meta/style.scss": -/*!************************************************************!*\ - !*** ./packages/metaboxes/containers/term-meta/style.scss ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/term-meta/style.scss?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/from-event-pattern */ \"./packages/metaboxes/utils/from-event-pattern.js\");\n/* harmony import */ var _store_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../store/helpers */ \"./packages/metaboxes/store/helpers.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (handler) {\n return window.jQuery(document).on('ajaxSuccess', handler);\n }, function (handler) {\n return window.jQuery(document).off('ajaxSuccess', handler);\n }, function (e, xhr, options, data) {\n return {\n options: options,\n data: data\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var options = _ref.options,\n data = _ref.data;\n return options.data.indexOf('carbon_fields_container') > -1 && options.data.indexOf('add-tag') > -1 && !data.documentElement.querySelector('wp_error');\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function () {\n // Collects identifiers of current fields so we can remove them later.\n var oldFieldIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(props.container.fields, 'id'); // Get a fresh copy of the container and fields.\n\n\n var _normalizePreloadedSt = Object(_store_helpers__WEBPACK_IMPORTED_MODULE_6__[\"normalizePreloadedState\"])(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\n var container = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(containers, ['id', props.id]);\n\n var containerFields = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(fields, ['container_id', props.id]); // Replace the container and add the new fields.\n\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"dispatch\"])('carbon-fields/metaboxes'),\n updateState = _dispatch.updateState,\n removeFields = _dispatch.removeFields;\n\n updateState(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy([container], 'id'), lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy(containerFields, 'id'));\n removeFields(oldFieldIds);\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.term_meta.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/term-meta/index.js?"); /***/ }), @@ -551,6 +540,18 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ }), +/***/ "./packages/metaboxes/fields/association/index.js": +/*!********************************************************!*\ + !*** ./packages/metaboxes/fields/association/index.js ***! + \********************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_strip_compact_input_prefix__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/strip-compact-input-prefix */ \"./packages/metaboxes/utils/strip-compact-input-prefix.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Returns a field with the given name.\n *\n * @param {Object[]} fields\n * @param {string} name\n * @return {?Object}\n */\n\nfunction findFieldByName(fields, name) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"find\"])(fields, function (field) {\n return field.name.indexOf(name) === 0;\n });\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.association.metabox', 'carbon-fields/metaboxes', Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withProps\"])(function (props) {\n return {\n hierarchyResolver: function hierarchyResolver() {\n // Get all fields.\n var fields = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getFieldsByContainerId(props.containerId); // Get a clean version of field's name.\n\n var fieldName = Object(_utils_strip_compact_input_prefix__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(props.name); // Get the path.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove chunks that are empty.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Get the root field.\n\n var rootFieldName = path.shift();\n var rootField = findFieldByName(fields, rootFieldName); // Get the hierarchy.\n\n var accessor = fields.indexOf(rootField);\n var hierarchy = rootField.base_name; // Visit every branch in the tree so we can get the full hierarchy.\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isSameField = chunk === props.field.base_name;\n var isNestedComplex = !isGroup && !isSameField;\n\n if (isGroup) {\n accessor = \"\".concat(accessor, \".value.\").concat(chunk, \".name\");\n hierarchy = \"\".concat(hierarchy, \"[\").concat(chunk, \"]:\").concat(Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(fields, accessor), \"/\");\n }\n\n if (isNestedComplex) {\n var field = findFieldByName(fields, chunk);\n accessor = fields.indexOf(field);\n hierarchy = \"\".concat(hierarchy).concat(field.base_name);\n }\n\n if (isSameField) {\n hierarchy = \"\".concat(hierarchy).concat(chunk);\n }\n }\n\n return hierarchy;\n }\n };\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/association/index.js?"); + +/***/ }), + /***/ "./packages/metaboxes/fields/complex/index.js": /*!****************************************************!*\ !*** ./packages/metaboxes/fields/complex/index.js ***! @@ -559,7 +560,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/field */ \"./packages/metaboxes/components/field/index.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n field = _this$props.field,\n value = _this$props.value,\n addFields = _this$props.addFields,\n onChange = _this$props.onChange; // Create a copy of the group to prevent\n // incidentally modifications.\n\n group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group); // Get a flat list of all fields for this group.\n\n var fields = [];\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n group.container_id = field.container_id;\n group.fields = group.fields.map(function (groupField) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(groupField, field.container_id, fields);\n }); // Push the group to the field.\n\n addFields(fields);\n onChange(id, value.concat(group));\n callback(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n cloneFields = _this$props2.cloneFields,\n onChange = _this$props2.onChange;\n var originFieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n var cloneFieldIds = originFieldIds.map(function () {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n });\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group);\n clonedGroup.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n clonedGroup.fields.forEach(function (groupField, index) {\n groupField.id = cloneFieldIds[index];\n });\n cloneFields(originFieldIds, cloneFieldIds);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.splice(value.indexOf(group) + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n removeFields = _this$props3.removeFields,\n onChange = _this$props3.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"without\"])(value, group)); // Delay removal of fields because React will complain\n // about missing objects.\n // TODO: Investigate why this is necessary.\n\n setTimeout(function () {\n var fieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n removeFields(fieldIds);\n }, 1);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleGroup\", function (groupId) {\n var _this$props4 = _this.props,\n field = _this$props4.field,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"find\"])(draft, ['id', groupId]);\n group.collapsed = !group.collapsed;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleAllGroups\", function (collapsed) {\n var _this$props5 = _this.props,\n field = _this$props5.field,\n value = _this$props5.value,\n onChange = _this$props5.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.forEach(function (group) {\n group.collapsed = collapsed;\n });\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupSetup\", function (group, props) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n key: group.id,\n id: group.id,\n name: group.name,\n prefix: \"\".concat(_this.props.name, \"[\").concat(props.index, \"]\"),\n fields: group.fields,\n collapsed: group.collapsed,\n context: 'metabox'\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n return [_components_field__WEBPACK_IMPORTED_MODULE_15__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n key: field.id,\n id: field.id,\n name: \"\".concat(groupProps.prefix, \"[\").concat(field.name, \"]\")\n })];\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ComplexField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props6 = this.props,\n value = _this$props6.value,\n children = _this$props6.children;\n var allGroupsAreCollapsed = value.every(function (_ref) {\n var collapsed = _ref.collapsed;\n return collapsed;\n });\n return children({\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withSelect\"])(function (select, props) {\n var _select = select('carbon-fields/metaboxes'),\n getComplexGroupValues = _select.getComplexGroupValues;\n\n var groupValues = props.value.map(function (group) {\n var fieldIds = group.fields.map(function (field) {\n return field.id;\n });\n return [group.name, getComplexGroupValues(fieldIds)];\n });\n return {\n groupValues: groupValues\n };\n});\nvar applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n addFields = _dispatch.addFields,\n cloneFields = _dispatch.cloneFields,\n removeFields = _dispatch.removeFields;\n\n return {\n addFields: addFields,\n cloneFields: cloneFields,\n removeFields: removeFields\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"addFilter\"])('carbon-fields.complex.metabox', 'carbon-fields/metaboxes', function (OriginalComplexField) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[\"compose\"])(applyWithSelect, applyWithDispatch)(function (props) {\n var id = props.id,\n field = props.field,\n name = props.name,\n value = props.value,\n groupValues = props.groupValues;\n return wp.element.createElement(ComplexField, props, function (_ref2) {\n var allGroupsAreCollapsed = _ref2.allGroupsAreCollapsed,\n handleGroupSetup = _ref2.handleGroupSetup,\n handleGroupFieldSetup = _ref2.handleGroupFieldSetup,\n handleAddGroup = _ref2.handleAddGroup,\n handleCloneGroup = _ref2.handleCloneGroup,\n handleRemoveGroup = _ref2.handleRemoveGroup,\n handleToggleGroup = _ref2.handleToggleGroup,\n handleToggleAllGroups = _ref2.handleToggleAllGroups;\n return wp.element.createElement(OriginalComplexField, {\n groupIdKey: \"id\",\n groupFilterKey: \"name\",\n id: id,\n field: field,\n name: name,\n value: value,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n });\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/complex/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/field */ \"./packages/metaboxes/components/field/index.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n field = _this$props.field,\n value = _this$props.value,\n addFields = _this$props.addFields,\n onChange = _this$props.onChange; // Create a copy of the group to prevent\n // incidentally modifications.\n\n group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group); // Get a flat list of all fields for this group.\n\n var fields = [];\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n group.container_id = field.container_id;\n group.fields = group.fields.map(function (groupField) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(groupField, field.container_id, fields);\n }); // Make sure that the group is expanded even\n // `set_collapsed(true)` is used.\n\n group.collapsed = false; // Push the group to the field.\n\n addFields(fields);\n onChange(id, value.concat(group));\n callback(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n cloneFields = _this$props2.cloneFields,\n onChange = _this$props2.onChange;\n var originFieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n var cloneFieldIds = originFieldIds.map(function () {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n });\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group);\n clonedGroup.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n clonedGroup.fields.forEach(function (groupField, index) {\n groupField.id = cloneFieldIds[index];\n });\n cloneFields(originFieldIds, cloneFieldIds);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.splice(value.indexOf(group) + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n removeFields = _this$props3.removeFields,\n onChange = _this$props3.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"without\"])(value, group)); // Delay removal of fields because React will complain\n // about missing objects.\n // TODO: Investigate why this is necessary.\n\n setTimeout(function () {\n var fieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n removeFields(fieldIds);\n }, 1);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleGroup\", function (groupId) {\n var _this$props4 = _this.props,\n field = _this$props4.field,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"find\"])(draft, ['id', groupId]);\n group.collapsed = !group.collapsed;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleAllGroups\", function (collapsed) {\n var _this$props5 = _this.props,\n field = _this$props5.field,\n value = _this$props5.value,\n onChange = _this$props5.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.forEach(function (group) {\n group.collapsed = collapsed;\n });\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupSetup\", function (group, props) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n id: group.id,\n name: group.name,\n prefix: \"\".concat(_this.props.name, \"[\").concat(props.index, \"]\"),\n fields: group.fields,\n collapsed: group.collapsed,\n context: 'metabox'\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n return [_components_field__WEBPACK_IMPORTED_MODULE_15__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n key: field.id,\n id: field.id,\n containerId: _this.props.containerId,\n name: \"\".concat(groupProps.prefix, \"[\").concat(field.name, \"]\")\n })];\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ComplexField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props6 = this.props,\n value = _this$props6.value,\n children = _this$props6.children;\n var allGroupsAreCollapsed = value.every(function (_ref) {\n var collapsed = _ref.collapsed;\n return collapsed;\n });\n return children({\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withSelect\"])(function (select, props) {\n var _select = select('carbon-fields/metaboxes'),\n getComplexGroupValues = _select.getComplexGroupValues;\n\n var groupValues = props.value.map(function (group) {\n var fieldIds = group.fields.map(function (field) {\n return field.id;\n });\n return [group.name, getComplexGroupValues(fieldIds)];\n });\n return {\n groupValues: groupValues\n };\n});\nvar applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n addFields = _dispatch.addFields,\n cloneFields = _dispatch.cloneFields,\n removeFields = _dispatch.removeFields;\n\n return {\n addFields: addFields,\n cloneFields: cloneFields,\n removeFields: removeFields\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"addFilter\"])('carbon-fields.complex.metabox', 'carbon-fields/metaboxes', function (OriginalComplexField) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[\"compose\"])(applyWithSelect, applyWithDispatch)(function (props) {\n var id = props.id,\n field = props.field,\n name = props.name,\n value = props.value,\n groupValues = props.groupValues;\n return wp.element.createElement(ComplexField, props, function (_ref2) {\n var allGroupsAreCollapsed = _ref2.allGroupsAreCollapsed,\n handleGroupSetup = _ref2.handleGroupSetup,\n handleGroupFieldSetup = _ref2.handleGroupFieldSetup,\n handleAddGroup = _ref2.handleAddGroup,\n handleCloneGroup = _ref2.handleCloneGroup,\n handleRemoveGroup = _ref2.handleRemoveGroup,\n handleToggleGroup = _ref2.handleToggleGroup,\n handleToggleAllGroups = _ref2.handleToggleAllGroups;\n return wp.element.createElement(OriginalComplexField, {\n groupIdKey: \"id\",\n groupFilterKey: \"name\",\n id: id,\n field: field,\n name: name,\n value: value,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n });\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/complex/index.js?"); /***/ }), @@ -618,7 +619,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./multiselect */ \"./packages/metaboxes/fields/multiselect/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./association */ \"./packages/metaboxes/fields/association/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./multiselect */ \"./packages/metaboxes/fields/multiselect/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/index.js?"); /***/ }), @@ -711,7 +712,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.field.container_id)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"fromSelector\"])(getFieldsByContainerId, props.field.container_id)), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.field.container_id);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(fields, function (field) {\n return field.container_id === props.field.container_id && Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-conditional-logic/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.containerId)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"fromSelector\"])(getFieldsByContainerId, props.containerId)), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.containerId);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(fields, function (field) {\n return field.container_id === props.containerId && Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-conditional-logic/index.js?"); /***/ }), @@ -1171,18 +1172,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ }), -/***/ "./packages/metaboxes/utils/from-ajax-event.js": -/*!*****************************************************!*\ - !*** ./packages/metaboxes/utils/from-ajax-event.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return fromAjaxEvent; });\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-create */ \"./node_modules/callbag-create/index.js\");\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(callbag_create__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\nfunction fromAjaxEvent(eventName, action) {\n return callbag_create__WEBPACK_IMPORTED_MODULE_0___default()(function (sink) {\n // Emit the AJAX event through the channel.\n var _ref = function _ref(event, xhr, settings, data) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isString\"])(settings.data) && settings.data.indexOf(action) > -1) {\n sink(1, {\n event: event,\n xhr: xhr,\n settings: settings,\n data: data\n });\n }\n },\n handler = _ref.handler; // Cancel the subscription.\n\n\n var unsubscribe = function unsubscribe() {\n window.jQuery(document).off(eventName, {\n handler: handler\n });\n }; // Setup the subscription.\n\n\n window.jQuery(document).on(eventName, {\n handler: handler\n });\n return unsubscribe;\n });\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/from-ajax-event.js?"); - -/***/ }), - /***/ "./packages/metaboxes/utils/from-event-pattern.js": /*!********************************************************!*\ !*** ./packages/metaboxes/utils/from-event-pattern.js ***! @@ -1207,6 +1196,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ }), +/***/ "./packages/metaboxes/utils/strip-compact-input-prefix.js": +/*!****************************************************************!*\ + !*** ./packages/metaboxes/utils/strip-compact-input-prefix.js ***! + \****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return stripCompactInputPrefix; });\n/**\n * Removes the prefix used to compact the input of Carbon Fields.\n *\n * @param {string} str\n * @return {string}\n */\nfunction stripCompactInputPrefix(str) {\n var _window$cf$config = window.cf.config,\n compactInput = _window$cf$config.compactInput,\n compactInputKey = _window$cf$config.compactInputKey;\n\n if (!compactInput || str.indexOf(compactInputKey) !== 0) {\n return str;\n }\n\n return str.replace(new RegExp(\"^\".concat(compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1');\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/strip-compact-input-prefix.js?"); + +/***/ }), + /***/ "./packages/metaboxes/utils/urldecode.js": /*!***********************************************!*\ !*** ./packages/metaboxes/utils/urldecode.js ***! diff --git a/build/gutenberg/metaboxes.min.css b/build/gutenberg/metaboxes.min.css index d7aa7c483..992c10cbd 100644 --- a/build/gutenberg/metaboxes.min.css +++ b/build/gutenberg/metaboxes.min.css @@ -1 +1 @@ -.postbox .cf-complex__inserter-menu{margin:0;border-radius:3px;background-color:#191e23}.postbox .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-color:transparent #191e23;border-style:solid;border-width:5px 5px 5px 0;margin-top:-5px;content:""}.postbox .cf-complex__inserter-item{font-weight:600;color:#fff;transition:color .1s linear}.postbox .cf-complex__inserter-item:hover{color:#00a0d2}.postbox .cf-complex__tabs-item,.postbox .cf-complex__tabs .cf-complex__inserter-button{font-weight:600;color:#23282d}.postbox .cf-field{flex:1 1 100%;padding:12px;border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.postbox .cf-field__label{padding-bottom:5px;font-weight:600;color:#23282d}.cf-field__help{display:inline-block;color:#666;margin-top:10px}.postbox .cf-multiselect__control{border-color:#ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.postbox .cf-multiselect__control--is-focused,.postbox .cf-multiselect__control--is-focused:hover{box-shadow:0 0 2px rgba(0,115,170,.8)}.postbox .cf-media-gallery__inner{border:1px solid #e2e4e7}.postbox .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__actions{padding-left:0}.cf-container-term-meta .cf-media-gallery__list{margin:0 -8px;max-height:285px}.cf-container-term-meta .cf-media-gallery__item{flex-basis:20%}.cf-container-term-meta .cf-media-gallery__item-inner,.postbox .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__item-preview,.postbox .cf-media-gallery__item-preview{background-color:#f3f4f5}.cf-container-term-meta .cf-media-gallery__item-name,.postbox .cf-media-gallery__item-name{border-top:1px solid #e2e4e7;background-color:#f3f4f5}.inside .cf-radio-image .cf-radio__input:focus~.cf-radio__label{box-shadow:0 0 2px rgba(0,160,210,.8)}.inside .cf-radio-image__image{border:1px solid #b5bcc2}.inside .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.inside .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-container-widget .cf-field{margin:1em 0 .2em}.cf-container-term-meta{margin-bottom:13px}.carbon-table-row .cf-container-term-meta{margin-bottom:0}.cf-container-term-meta .cf-field{margin-top:13px}.cf-container-term-meta .cf-field:first-child{margin-top:0}.carbon-table-row .cf-field__head{position:absolute;left:0;font-weight:600}.carbon-table-row .cf-field__body{width:95%}.carbon-network #post-body.columns-2 #postbox-container-1.fixed,.carbon-theme-options #post-body.columns-2 #postbox-container-1.fixed{position:fixed;right:0;margin-right:20px}.cf-container-user-meta{max-width:600px}.carbon-box.hide-if-js:not([hidden]){display:block}#poststuff .carbon-box .inside,.carbon-box .inside{padding:0;margin:0}.cf-container__fields{display:flex;flex-wrap:wrap;margin:-1px -1px 0 0}.cf-container__fields[hidden]{display:none}.block-editor .cf-container__fields{border-left:1px solid #e2e4e7}.cf-container__tabs{position:relative;z-index:1;padding:12px 12px 0;border-bottom:1px solid #e2e4e7;background-color:#fbfbfc}.cf-container__tabs-list{display:flex;flex-wrap:wrap;margin:0 0 -1px}.cf-container__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0 8px 0 0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-container__tabs-item:hover{background-color:#fff}.cf-container__tabs-item--current{background-color:#fff;border-bottom-color:#fff} \ No newline at end of file +.postbox .cf-complex__inserter-menu{margin:0;border-radius:3px;background-color:#191e23}.postbox .cf-complex__inserter-menu:before{position:absolute;top:50%;right:100%;width:0;height:0;border-color:transparent #191e23;border-style:solid;border-width:5px 5px 5px 0;margin-top:-5px;content:""}.postbox .cf-complex__inserter-item{font-weight:600;color:#fff;transition:color .1s linear}.postbox .cf-complex__inserter-item:hover{color:#00a0d2}.postbox .cf-complex__tabs-item,.postbox .cf-complex__tabs .cf-complex__inserter-button{font-weight:600;color:#23282d}.cf-container .cf-field{flex:1 1 100%;padding:12px;border-color:#e2e4e7;border-style:solid;border-width:1px 1px 0 0}.cf-container-user-meta .cf-container__fields>.cf-field>.cf-field__head,.term-php .cf-container__fields>.cf-field>.cf-field__head{position:absolute;left:0;font-weight:600}.cf-container .cf-field__label{padding-bottom:5px;font-weight:600;color:#23282d}.cf-container-term-meta .cf-field__label,.cf-container-user-meta .cf-field__label{margin:0!important}.cf-field__help{display:inline-block;color:#666;margin-top:10px}.postbox .cf-multiselect__control{border-color:#ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.postbox .cf-multiselect__control--is-focused,.postbox .cf-multiselect__control--is-focused:hover{box-shadow:0 0 2px rgba(0,115,170,.8)}.postbox .cf-media-gallery__inner{border:1px solid #e2e4e7}.postbox .cf-media-gallery__actions{border-top:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__actions{padding-left:0}.cf-container-term-meta .cf-media-gallery__list{margin:0 -8px;max-height:285px}.cf-container-term-meta .cf-media-gallery__item{flex-basis:20%}.cf-container-term-meta .cf-media-gallery__item-inner,.postbox .cf-media-gallery__item-inner{border:1px solid #e2e4e7}.cf-container-term-meta .cf-media-gallery__item-preview,.postbox .cf-media-gallery__item-preview{background-color:#f3f4f5}.cf-container-term-meta .cf-media-gallery__item-name,.postbox .cf-media-gallery__item-name{border-top:1px solid #e2e4e7;background-color:#f3f4f5}.inside .cf-radio-image .cf-radio__input:focus~.cf-radio__label{box-shadow:0 0 2px rgba(0,160,210,.8)}.inside .cf-radio-image__image{border:1px solid #b5bcc2}.inside .cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.inside .cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-container-widget .cf-field{margin:1em 0 .2em}.carbon-network #post-body.columns-2 #postbox-container-1.fixed,.carbon-theme-options #post-body.columns-2 #postbox-container-1.fixed{position:fixed;right:0;margin-right:20px}.cf-container-user-meta{max-width:600px}.carbon-box.hide-if-js:not([hidden]){display:block}#poststuff .carbon-box .inside,.carbon-box .inside{padding:0;margin:0}.cf-container__fields{display:flex;flex-wrap:wrap;margin:-1px -1px 0 0;background-color:#fff}.cf-container__fields[hidden]{display:none}.block-editor .cf-container__fields{border-left:1px solid #e2e4e7}.cf-container-term-meta .cf-container__fields,.cf-container-user-meta .cf-container__fields{border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;margin:0}.cf-container__tabs{position:relative;z-index:1;padding:12px 12px 0;border-bottom:1px solid #e2e4e7;background-color:#fbfbfc}.cf-container__tabs-list{display:flex;flex-wrap:wrap;margin:0 0 -1px}.cf-container__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0 8px 0 0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-container__tabs-item:hover{background-color:#fff}.cf-container__tabs-item--current{background-color:#fff;border-bottom-color:#fff} \ No newline at end of file diff --git a/build/gutenberg/metaboxes.min.js b/build/gutenberg/metaboxes.min.js index 452b7241f..6e888a83a 100644 --- a/build/gutenberg/metaboxes.min.js +++ b/build/gutenberg/metaboxes.min.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=42)}([function(e,t){e.exports=lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=wp.data},function(e,t){e.exports=wp.hooks},function(e,t){e.exports=cf.core},function(e,t){e.exports=wp.i18n},function(e,t,n){var r=n(8);e.exports=function(e){for(var t=1;t(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=cf.vendor.classnames},function(e,t){e.exports=(e=>t=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return b()(e,function(e){Object(a.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return b()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(a.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return b()(e,function(e){Object(a.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return b()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return b()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return b()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(a.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(m.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(m.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(a.assign)(e,Object(a.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(a.omit)(e,n);case"RECEIVE_SIDEBAR":return b()(e,function(e){Object(a.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return f()({},e,d()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(a.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function O(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function g(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function y(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function h(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function w(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function E(e){return{type:"ADD_CONTAINER",payload:e}}function x(e){return{type:"REMOVE_CONTAINER",payload:e}}function S(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function F(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function I(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function T(e){return e.containers}function C(e,t){return e.containers[t]}function A(e){return e.fields}function D(e,t){return Object(a.filter)(e.fields,["container_id",t])}function N(e,t){return e.fields[t]}function k(e){return Object.keys(e.savingLock).length>0}function G(e){return e.isDirty}function L(e,t){var n=Object(a.pick)(A(e),t);return n=Object(a.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(a.mapValues)(n,function(e){return e.value})}function P(e,t,n){return(e=Object(a.cloneDeep)(e)).id=Object(m.uniqueId)(),e.container_id=t,"complex"===e.type&&e.value.forEach(function(e){e.id=Object(m.uniqueId)(),e.container_id=t,e.fields=e.fields.map(function(e){return P(e,t,n)})}),n.push(e),Object(a.pick)(e,["id","type","name","base_name"])}function V(e){var t=[];return{containers:e.filter(function(e){var t=e.id;return!Object(a.endsWith)(t,"__i__")}).map(function(e){return Object(a.assign)({},e,{fields:e.fields.map(function(n){return P(n,e.id,t)})})}),fields:t}}Object(c.registerStore)("carbon-fields/metaboxes",{reducer:v,actions:r,selectors:o});var B=V(Object(a.get)(window.cf,"preloaded.containers",[])),R=B.containers,q=B.fields;Object(c.dispatch)("carbon-fields/metaboxes").setupState(Object(a.keyBy)(R,"id"),Object(a.keyBy)(q,"id"));var U=n(10),M=n(3),Q=Object(U.createHigherOrderComponent)(function(e){var t=Object(c.withSelect)(function(e,t){var n=window.cf.config,r=n.compactInput,o=n.compactInputKey,i=e("carbon-fields/metaboxes").getFieldById(t.id),c=i.value,a=t.name||i.name;return r&&!t.name&&-1===a.indexOf("widget-carbon_fields")&&(a="".concat(o,"[").concat(a,"]")),{field:i,name:a,value:c}}),n=Object(c.withDispatch)(function(e){return{onChange:e("carbon-fields/metaboxes").updateFieldValue}});return Object(U.compose)(t,n)(e)},"withField"),K=n(15),W=n.n(K),$=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:[];return Object(a.pick)(t,Object(a.difference)(Object(a.map)(e.fields,"id"),n))}function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(a.map)(e,function(e){return[e.id,"".concat(Object(a.repeat)("parent.",t)).concat(e.base_name)]})}var Z=Object(m.withConditionalLogic)(function(e){var t=Object(c.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(J.pipe)(Object(J.merge)($(t(e.field.container_id)),Object(m.fromSelector)(t,e.field.container_id)),H(a.isEqual))},function(e,t){t=Object(a.keyBy)(t,"id");var n=Object(c.select)("carbon-fields/metaboxes").getContainerById(e.field.container_id),r=[];if(Object(a.some)(n.fields,["id",e.id]))r=Y(r=X(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(a.find)(t,function(t){return t.container_id===e.field.container_id&&Object(a.startsWith)(o,t.name)}),u=o.split(/\[|\]/g);u.shift(),(u=u.filter(function(e){return""!==e})).pop();var l=u.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=Y(r=X(n,t,[i.id]),l+1);for(var d="".concat(i.id,".value");u.length>0;){var s=u.shift(),f=!isNaN(s),p=!f;if(f){d="".concat(d,"[").concat(s,"]");var b=X(Object(a.get)(t,d),t,[e.id]);r=r.concat(Y(b,l)),d="".concat(d,".fields")}if(p){var m=Object(a.find)(Object(a.get)(t,d),["name",s]);d="".concat(m.id,".value"),l--}}}return r=r.map(function(e){var n=W()(e,2),r=n[0];return[n[1],Object(a.get)(t,"".concat(r,".value"))]}),Object(a.fromPairs)(r)});function ee(){return!Object(a.isUndefined)(window._wpLoadGutenbergEditor)||!Object(a.isUndefined)(window._wpLoadBlockEditor)}var te=n(16),ne=n.n(te),re=n(17),oe=n.n(re),ie=n(18),ce=n.n(ie),ae=n(19),ue=n.n(ae),le=n(20),de=n.n(le),se=n(7),fe=n.n(se),pe=n(11),be=(n(29),n(30),Object(U.compose)(Q,Object(m.withFilters)("carbon-fields.field-wrapper.metabox"))(m.Field)),me=function(e){function t(){var e,n;ne()(this,t);for(var r=arguments.length,o=new Array(r),i=0;it=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})};function we(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function Ee(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function xe(e){for(var t=[],n=e,r=Ee(e);r>0&&n;)if(Ee(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var Se={post_ancestors:[],post_parent_id:0,post_level:1};function Fe(e){var t=e.options[e.selectedIndex];return{post_ancestors:xe(t),post_parent_id:we(t),post_level:Ee(t)+1}}Object(M.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Fe(e.target)}),_e(Fe(e))):$(Se)}),Object(M.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(c.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(J.pipe)(Object(J.combine)(Object(m.fromSelector)(Object(c.select)("core/editor").getCurrentPostId),Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"type"),Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"parent")),H(a.isEqual),Object(J.map)(function(e){var r=W()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return Se;var u=t(i);if(!Object(a.get)(u,["hierarchical"],!1))return Se;var l=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(a.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:l,post_parent_id:c,post_level:l.length+1}}))});var Ie=n(23),Te=n.n(Ie),Ce=(e,t,n)=>Te()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),Ae={post_format:"standard"};function De(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(M.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(J.pipe)(Ce(e,"input.post-format","change"),Object(J.map)(function(e){return De(e.target)}),_e(De(e.querySelector("input.post-format:checked")))):$(Ae)}),Object(M.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"format"),H(),Object(J.filter)(Boolean),Object(J.map)(function(e){return{post_format:e}}),_e(Ae))});var Ne={post_template:""};function ke(e){return{post_template:e.value}}Object(M.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return ke(e.target)}),_e(ke(e))):$(Ne)}),Object(M.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"template"),H(),Object(J.filter)(a.isString),Object(J.map)(function(e){return{post_template:e}}),_e(Ne))});var Ge=n(14),Le=n.n(Ge);function Pe(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(Pe(window.tagBox,"parseTags"),Pe(window.tagBox,"flushTags")),Object(M.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(J.pipe)(J.merge.apply(void 0,Le()((e=document.querySelectorAll('div[id^="taxonomy-"]'),Le()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(J.pipe)(Ce(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(J.scan)(function(e,n){var r=n.target;return b()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(a.pull)(e[t],n)})},d()({},t,[])),_e(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return Le()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},d()({},e,[]))}(t)))}))).concat(Le()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return Le()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(J.pipe)(Object(J.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(J.map)(function(e){var n=e.target;return d()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),_e(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return d()({},e,n)}(t)))})}()))),Object(J.scan)(function(e,t){return{post_term:f()({},e.post_term,t)}},{post_term:{}}));var e}),Object(M.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(c.select)("core").getTaxonomies,t=Object(c.select)("core/editor").getEditedPostAttribute;return Object(J.pipe)(Object(m.fromSelector)(e,{per_page:-1}),Object(J.filter)(Boolean),Object(J.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(a.fromPairs)(n)}}))});var Ve={term_ancestors:[],term_parent:0,term_level:1};function Be(e){var t=e.options[e.selectedIndex];return{term_ancestors:xe(t),term_parent:we(t),term_level:Ee(t)+1}}Object(M.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Be(e.target)}),_e(Be(e))):$(Ve)});var Re={user_role:""};function qe(e){return{user_role:e.value}}Object(M.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return $(t?{user_role:t.dataset.profileRole}:Re)}return Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return qe(e.target)}),_e(qe(e)))});var Ue=Object(U.createHigherOrderComponent)(function(e){return Object(c.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(M.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(U.compose)(Ue,Object(m.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)}),n(37),Object(M.addFilter)("carbon-fields.widget.classic","carbon-fields/metaboxes",Object(ye.withEffects)(function(e){var t=e.mount;return Object(J.pipe)(t,Object(J.map)(function(){return{type:"COMPONENT_MOUNTED"}}))},{handler:function(e){return function(t){switch(t.type){case"COMPONENT_MOUNTED":var n=e.container,r=window.jQuery(".container-".concat(n.id));r.trigger("change"),r.closest(".widget").find(".widget-action").on("click",function(){setTimeout(function(){r.trigger("change")},500)})}}}}));var Me=n(21),Qe=n.n(Me);n(38),Object(M.addFilter)("carbon-fields.term_meta.classic","carbon-fields/metaboxes",Object(ye.withEffects)(function(){return Object(J.pipe)((e="ajaxSuccess","add-tag",Qe()(function(t){var n=function(e,n,r,o){Object(a.isString)(r.data)&&r.data.indexOf("add-tag")>-1&&t(1,{event:e,xhr:n,settings:r,data:o})}.handler;return window.jQuery(document).on(e,{handler:n}),function(){window.jQuery(document).off(e,{handler:n})}})),Object(J.filter)(function(e){var t=e.settings,n=e.data;return t.data.indexOf("carbon_fields_container")>-1&&!n.documentElement.querySelector("wp_error")}));var e},{handler:function(e){return function(){var t=u.a.map(e.container.fields,"id"),n=V(u.a.get(window.cf,"preloaded.containers",[])),r=n.containers,o=n.fields,i=u.a.find(r,["id",e.id]),a=u.a.filter(o,["container_id",e.id]),l=Object(c.dispatch)("carbon-fields/metaboxes"),d=l.updateState,s=l.removeFields;d(u.a.keyBy([i],"id"),u.a.keyBy(a,"id")),s(t)}}})),n(39),Object(M.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(ye.withEffects)(function(){return Object(J.pipe)(Object(J.fromEvent)(window,"scroll"),Object(J.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}})),n(40);var Ke=n(22),We=n.n(Ke),$e=(n(41),function(e){function t(){var e,n;ne()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1},evaluate:function(){return!1}},Ze={comparers:[f()({},Ye,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),f()({},Ye,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),f()({},Ye,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(a.intersection)(e,n).length;default:return!1}}}),ot={boolean:et,post_term:nt,post_ancestor_id:f()({},Ze,{comparers:[tt,rt],getEnvironmentValue:function(e,t){return Object(a.get)(t,"post_ancestors",[])}}),post_parent_id:Ze,post_level:Ze,post_format:Ze,post_template:Ze,term_level:Ze,term_parent:f()({},Ze,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(a.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(a.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:f()({},Ze,{comparers:[tt,rt],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(a.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(a.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(a.get)(t,"term_ancestors",[])}}),user_role:Ze},it=Object(c.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),ct=Object(ye.withEffects)(function(e,t){var n=t.context,r=Object(M.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(M.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(M.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),c=Object(M.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),u=Object(M.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),l=Object(M.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(J.pipe)(Object(J.merge)(r,o,i,c,u,l),Object(J.scan)(function(e,t){return b()(e,function(e){Object(a.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(a.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(a.get)(ot,t.type);return r?r.isFulfiled(t,n):(console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=W()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o));c&&(c.hidden=!i),a&&(i&&!a.dataset.mounted&&(a.dataset.mounted=!0,Xe(t[o],n)),!i&&a.dataset.mounted&&(delete a.dataset.mounted,Object(pe.unmountComponentAtNode)(a)))})}}}),at=Object(U.compose)(it,ct)(function(){return null});function ut(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}function lt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n-1}var pt=Object(ye.withEffects)(function(){return Object(J.merge)(Object(J.pipe)(lt(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(J.filter)(function(e){return ft(e.$widget[0].id)}),Object(J.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(J.pipe)(lt(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(J.filter)(function(e){var t=e.data;return Object(a.startsWith)(t,"deleted:")&&ft(t)}),Object(J.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(c.select)("carbon-fields/metaboxes").getContainerById,n=Object(c.dispatch)("carbon-fields/metaboxes"),r=n.addContainer,o=n.removeContainer,i=n.addFields,u=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var l,d=e.payload,s=d.event,f=d.$widget,p=Object(a.flow)(ut,JSON.parse)(f.find("[data-json]").data("json")),b=[];if("widget-updated"===s.type&&(l=t(p.id).fields.map(function(e){return e.id})),p.fields=p.fields.map(function(e){return P(e,p,b)}),i(b),r(p),"widget-updated"===s.type&&u(l),Xe(p,"classic"),window.cf.config.pagenow===dt&&"widget-added"===s.type){var m=f.find('[name="widget-id"]').val();f.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(m).liveUpdateMode=!1}break;case"WIDGET_DELETED":var v=e.payload.data.replace("deleted:",""),O="".concat("carbon_fields_container_").concat(v),j=t(O);Object(pe.unmountComponentAtNode)(document.querySelector(".container-".concat(O)));var g=_.map(j.fields,"id");o(O),u(g)}}}})(function(){return null}),bt=Object(c.withSelect)(function(e){return{isDirty:e("carbon-fields/metaboxes").isDirty()}})(function(e){return wp.element.createElement("input",{type:"hidden",name:window.cf.config.revisionsInputKey,disabled:!e.isDirty,value:"1"})});Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var mt,vt,Ot=ee()?"gutenberg":"classic";mt=Ot,vt=Object(c.select)("carbon-fields/metaboxes").getContainers(),Object(a.forEach)(vt,function(e){Xe(e,mt)}),function(e){var t=window.cf.config.pagenow;Object(pe.render)(wp.element.createElement(pe.Fragment,null,!ee()&&wp.element.createElement(he,null),("widgets.php"===t||t===dt)&&wp.element.createElement(pt,null),wp.element.createElement(at,{context:e})),document.createElement("div"));var n=document.querySelector("#poststuff");n&&Object(pe.render)(wp.element.createElement(bt,null),n.appendChild(document.createElement("div")))}(Ot)}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=41)}([function(e,t){e.exports=lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=wp.data},function(e,t){e.exports=wp.hooks},function(e,t){e.exports=cf.core},function(e,t){e.exports=wp.i18n},function(e,t,n){var r=n(8);e.exports=function(e){for(var t=1;tt=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return b()(e,function(e){Object(a.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return b()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(a.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return b()(e,function(e){Object(a.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return b()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return b()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return b()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(a.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(m.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(m.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(a.assign)(e,Object(a.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(a.omit)(e,n);case"RECEIVE_SIDEBAR":return b()(e,function(e){Object(a.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return f()({},e,s()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(a.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function O(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function g(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function y(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function h(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function w(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function E(e){return{type:"ADD_CONTAINER",payload:e}}function x(e){return{type:"REMOVE_CONTAINER",payload:e}}function S(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function I(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function F(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function T(e){return e.containers}function C(e,t){return e.containers[t]}function A(e){return e.fields}function D(e,t){return Object(a.filter)(e.fields,["container_id",t])}function N(e,t){return e.fields[t]}function k(e){return Object.keys(e.savingLock).length>0}function G(e){return e.isDirty}function L(e,t){var n=Object(a.pick)(A(e),t);return n=Object(a.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(a.mapValues)(n,function(e){return e.value})}function P(e,t,n){return(e=Object(a.cloneDeep)(e)).id=Object(m.uniqueId)(),e.container_id=t,"complex"===e.type&&e.value.forEach(function(e){e.id=Object(m.uniqueId)(),e.container_id=t,e.fields=e.fields.map(function(e){return P(e,t,n)})}),n.push(e),Object(a.pick)(e,["id","type","name","base_name"])}function R(e){var t=[];return{containers:e.filter(function(e){var t=e.id;return!Object(a.endsWith)(t,"__i__")}).map(function(e){return Object(a.assign)({},e,{fields:e.fields.map(function(n){return P(n,e.id,t)})})}),fields:t}}Object(c.registerStore)("carbon-fields/metaboxes",{reducer:v,actions:r,selectors:o});var V=R(Object(a.get)(window.cf,"preloaded.containers",[])),B=V.containers,q=V.fields;Object(c.dispatch)("carbon-fields/metaboxes").setupState(Object(a.keyBy)(B,"id"),Object(a.keyBy)(q,"id"));var U=n(10),M=n(3),Q=Object(U.createHigherOrderComponent)(function(e){var t=Object(c.withSelect)(function(e,t){var n=window.cf.config,r=n.compactInput,o=n.compactInputKey,i=e("carbon-fields/metaboxes").getFieldById(t.id),c=i.value,a=t.name||i.name;return r&&!t.name&&-1===a.indexOf("widget-carbon_fields")&&(a="".concat(o,"[").concat(a,"]")),{field:i,name:a,value:c}}),n=Object(c.withDispatch)(function(e){return{onChange:e("carbon-fields/metaboxes").updateFieldValue}});return Object(U.compose)(t,n)(e)},"withField"),K=n(15),W=n.n(K),$=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:[];return Object(a.pick)(t,Object(a.difference)(Object(a.map)(e.fields,"id"),n))}function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(a.map)(e,function(e){return[e.id,"".concat(Object(a.repeat)("parent.",t)).concat(e.base_name)]})}var Z=Object(m.withConditionalLogic)(function(e){var t=Object(c.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(J.pipe)(Object(J.merge)($(t(e.containerId)),Object(m.fromSelector)(t,e.containerId)),H(a.isEqual))},function(e,t){t=Object(a.keyBy)(t,"id");var n=Object(c.select)("carbon-fields/metaboxes").getContainerById(e.containerId),r=[];if(Object(a.some)(n.fields,["id",e.id]))r=Y(r=X(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(a.find)(t,function(t){return t.container_id===e.containerId&&Object(a.startsWith)(o,t.name)}),u=o.split(/\[|\]/g);u.shift(),(u=u.filter(function(e){return""!==e})).pop();var l=u.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=Y(r=X(n,t,[i.id]),l+1);for(var s="".concat(i.id,".value");u.length>0;){var d=u.shift(),f=!isNaN(d),p=!f;if(f){s="".concat(s,"[").concat(d,"]");var b=X(Object(a.get)(t,s),t,[e.id]);r=r.concat(Y(b,l)),s="".concat(s,".fields")}if(p){var m=Object(a.find)(Object(a.get)(t,s),["name",d]);s="".concat(m.id,".value"),l--}}}return r=r.map(function(e){var n=W()(e,2),r=n[0];return[n[1],Object(a.get)(t,"".concat(r,".value"))]}),Object(a.fromPairs)(r)});function ee(){return!Object(a.isUndefined)(window._wpLoadGutenbergEditor)||!Object(a.isUndefined)(window._wpLoadBlockEditor)}function te(e,t){return Object(a.find)(e,function(e){return 0===e.name.indexOf(t)})}Object(M.addFilter)("carbon-fields.association.metabox","carbon-fields/metaboxes",Object(m.withProps)(function(e){return{hierarchyResolver:function(){for(var t,n,r,o,i=Object(c.select)("carbon-fields/metaboxes").getFieldsByContainerId(e.containerId),u=(t=e.name,n=window.cf.config,r=n.compactInput,o=n.compactInputKey,r&&0===t.indexOf(o)?t.replace(new RegExp("^".concat(o,"\\[(.+?)\\]")),"$1"):t).split(/\[|\]/g),l=te(i,(u=u.filter(function(e){return""!==e})).shift()),s=i.indexOf(l),d=l.base_name;u.length>0;){var f=u.shift(),p=!isNaN(f),b=f===e.field.base_name,m=!p&&!b;if(p&&(s="".concat(s,".value.").concat(f,".name"),d="".concat(d,"[").concat(f,"]:").concat(Object(a.get)(i,s),"/")),m){var v=te(i,f);s=i.indexOf(v),d="".concat(d).concat(v.base_name)}b&&(d="".concat(d).concat(f))}return d}}}));var ne=n(16),re=n.n(ne),oe=n(17),ie=n.n(oe),ce=n(18),ae=n.n(ce),ue=n(19),le=n.n(ue),se=n(20),de=n.n(se),fe=n(7),pe=n.n(fe),be=n(11),me=(n(29),n(30),Object(U.compose)(Q,Object(m.withFilters)("carbon-fields.field-wrapper.metabox"))(m.Field)),ve=function(e){function t(){var e,n;re()(this,t);for(var r=arguments.length,o=new Array(r),i=0;it=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})};function Ee(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function xe(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function Se(e){for(var t=[],n=e,r=xe(e);r>0&&n;)if(xe(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var Ie={post_ancestors:[],post_parent_id:0,post_level:1};function Fe(e){var t=e.options[e.selectedIndex];return{post_ancestors:Se(t),post_parent_id:Ee(t),post_level:xe(t)+1}}Object(M.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Fe(e.target)}),we(Fe(e))):$(Ie)}),Object(M.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(c.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(J.pipe)(Object(J.combine)(Object(m.fromSelector)(Object(c.select)("core/editor").getCurrentPostId),Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"type"),Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"parent")),H(a.isEqual),Object(J.map)(function(e){var r=W()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return Ie;var u=t(i);if(!Object(a.get)(u,["hierarchical"],!1))return Ie;var l=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(a.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:l,post_parent_id:c,post_level:l.length+1}}))});var Te=n(22),Ce=n.n(Te),Ae=(e,t,n)=>Ce()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),De={post_format:"standard"};function Ne(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(M.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(J.pipe)(Ae(e,"input.post-format","change"),Object(J.map)(function(e){return Ne(e.target)}),we(Ne(e.querySelector("input.post-format:checked")))):$(De)}),Object(M.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"format"),H(),Object(J.filter)(Boolean),Object(J.map)(function(e){return{post_format:e}}),we(De))});var ke={post_template:""};function Ge(e){return{post_template:e.value}}Object(M.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Ge(e.target)}),we(Ge(e))):$(ke)}),Object(M.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"template"),H(),Object(J.filter)(a.isString),Object(J.map)(function(e){return{post_template:e}}),we(ke))});var Le=n(14),Pe=n.n(Le);function Re(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(Re(window.tagBox,"parseTags"),Re(window.tagBox,"flushTags")),Object(M.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(J.pipe)(J.merge.apply(void 0,Pe()((e=document.querySelectorAll('div[id^="taxonomy-"]'),Pe()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(J.pipe)(Ae(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(J.scan)(function(e,n){var r=n.target;return b()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(a.pull)(e[t],n)})},s()({},t,[])),we(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return Pe()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},s()({},e,[]))}(t)))}))).concat(Pe()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return Pe()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(J.pipe)(Object(J.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(J.map)(function(e){var n=e.target;return s()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),we(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return s()({},e,n)}(t)))})}()))),Object(J.scan)(function(e,t){return{post_term:f()({},e.post_term,t)}},{post_term:{}}));var e}),Object(M.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(c.select)("core").getTaxonomies,t=Object(c.select)("core/editor").getEditedPostAttribute;return Object(J.pipe)(Object(m.fromSelector)(e,{per_page:-1}),Object(J.filter)(Boolean),Object(J.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(a.fromPairs)(n)}}))});var Ve={term_ancestors:[],term_parent:0,term_level:1};function Be(e){var t=e.options[e.selectedIndex];return{term_ancestors:Se(t),term_parent:Ee(t),term_level:xe(t)+1}}Object(M.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Be(e.target)}),we(Be(e))):$(Ve)});var qe={user_role:""};function Ue(e){return{user_role:e.value}}Object(M.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return $(t?{user_role:t.dataset.profileRole}:qe)}return Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Ue(e.target)}),we(Ue(e)))});var Me=Object(U.createHigherOrderComponent)(function(e){return Object(c.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(M.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(U.compose)(Me,Object(m.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)}),n(37),Object(M.addFilter)("carbon-fields.widget.classic","carbon-fields/metaboxes",Object(he.withEffects)(function(e){var t=e.mount;return Object(J.pipe)(t,Object(J.map)(function(){return{type:"COMPONENT_MOUNTED"}}))},{handler:function(e){return function(t){switch(t.type){case"COMPONENT_MOUNTED":var n=e.container,r=window.jQuery(".container-".concat(n.id));r.trigger("change"),r.closest(".widget").find(".widget-action").on("click",function(){setTimeout(function(){r.trigger("change")},500)})}}}}));var Qe=n(23),Ke=n.n(Qe);function We(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n-1&&t.data.indexOf("add-tag")>-1&&!n.documentElement.querySelector("wp_error")}))},{handler:function(e){return function(){var t=u.a.map(e.container.fields,"id"),n=R(u.a.get(window.cf,"preloaded.containers",[])),r=n.containers,o=n.fields,i=u.a.find(r,["id",e.id]),a=u.a.filter(o,["container_id",e.id]),l=Object(c.dispatch)("carbon-fields/metaboxes"),s=l.updateState,d=l.removeFields;s(u.a.keyBy([i],"id"),u.a.keyBy(a,"id")),d(t)}}})),n(38),Object(M.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(he.withEffects)(function(){return Object(J.pipe)(Object(J.fromEvent)(window,"scroll"),Object(J.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}})),n(39);var $e=n(21),ze=n.n($e),He=(n(40),function(e){function t(){var e,n;re()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1},evaluate:function(){return!1}},tt={comparers:[f()({},et,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),f()({},et,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),f()({},et,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(a.intersection)(e,n).length;default:return!1}}}),ct={boolean:nt,post_term:ot,post_ancestor_id:f()({},tt,{comparers:[rt,it],getEnvironmentValue:function(e,t){return Object(a.get)(t,"post_ancestors",[])}}),post_parent_id:tt,post_level:tt,post_format:tt,post_template:tt,term_level:tt,term_parent:f()({},tt,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(a.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(a.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:f()({},tt,{comparers:[rt,it],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(a.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(a.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(a.get)(t,"term_ancestors",[])}}),user_role:tt},at=Object(c.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),ut=Object(he.withEffects)(function(e,t){var n=t.context,r=Object(M.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(M.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(M.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),c=Object(M.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),u=Object(M.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),l=Object(M.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(J.pipe)(Object(J.merge)(r,o,i,c,u,l),Object(J.scan)(function(e,t){return b()(e,function(e){Object(a.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(a.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(a.get)(ct,t.type);return r?r.isFulfiled(t,n):(console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=W()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o));c&&(c.hidden=!i),a&&(i&&!a.dataset.mounted&&(a.dataset.mounted=!0,Ze(t[o],n)),!i&&a.dataset.mounted&&(delete a.dataset.mounted,Object(be.unmountComponentAtNode)(a)))})}}}),lt=Object(U.compose)(at,ut)(function(){return null});function st(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var dt="customize.php",ft="carbon_fields_";function pt(e){return e.indexOf(ft)>-1}var bt=Object(he.withEffects)(function(){return Object(J.merge)(Object(J.pipe)(We(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(J.filter)(function(e){return pt(e.$widget[0].id)}),Object(J.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(J.pipe)(We(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(J.filter)(function(e){var t=e.data;return Object(a.startsWith)(t,"deleted:")&&pt(t)}),Object(J.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(c.select)("carbon-fields/metaboxes").getContainerById,n=Object(c.dispatch)("carbon-fields/metaboxes"),r=n.addContainer,o=n.removeContainer,i=n.addFields,u=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var l,s=e.payload,d=s.event,f=s.$widget,p=Object(a.flow)(st,JSON.parse)(f.find("[data-json]").data("json")),b=[];if("widget-updated"===d.type&&(l=t(p.id).fields.map(function(e){return e.id})),p.fields=p.fields.map(function(e){return P(e,p,b)}),i(b),r(p),"widget-updated"===d.type&&u(l),Ze(p,"classic"),window.cf.config.pagenow===dt&&"widget-added"===d.type){var m=f.find('[name="widget-id"]').val();f.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(m).liveUpdateMode=!1}break;case"WIDGET_DELETED":var v=e.payload.data.replace("deleted:",""),O="".concat("carbon_fields_container_").concat(v),j=t(O);Object(be.unmountComponentAtNode)(document.querySelector(".container-".concat(O)));var g=_.map(j.fields,"id");o(O),u(g)}}}})(function(){return null}),mt=Object(c.withSelect)(function(e){return{isDirty:e("carbon-fields/metaboxes").isDirty()}})(function(e){return wp.element.createElement("input",{type:"hidden",name:window.cf.config.revisionsInputKey,disabled:!e.isDirty,value:"1"})});Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var vt,Ot,jt=ee()?"gutenberg":"classic";vt=jt,Ot=Object(c.select)("carbon-fields/metaboxes").getContainers(),Object(a.forEach)(Ot,function(e){Ze(e,vt)}),function(e){var t=window.cf.config.pagenow;Object(be.render)(wp.element.createElement(be.Fragment,null,!ee()&&wp.element.createElement(_e,null),("widgets.php"===t||t===dt)&&wp.element.createElement(bt,null),wp.element.createElement(lt,{context:e})),document.createElement("div"));var n=document.querySelector("#poststuff");n&&Object(be.render)(wp.element.createElement(mt,null),n.appendChild(document.createElement("div")))}(jt)}]); \ No newline at end of file From 9da8d25bd417cd3be7107ff0a53b4687a6818c6c Mon Sep 17 00:00:00 2001 From: Viktor Vasilev Date: Thu, 20 Dec 2018 17:26:51 +0200 Subject: [PATCH 06/11] Add bundles --- build/classic/core.js | 10 +++++----- build/classic/core.min.js | 4 ++-- build/classic/metaboxes.js | 2 +- build/classic/metaboxes.min.js | 2 +- build/gutenberg/core.js | 10 +++++----- build/gutenberg/core.min.js | 4 ++-- build/gutenberg/metaboxes.js | 2 +- build/gutenberg/metaboxes.min.js | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/build/classic/core.js b/build/classic/core.js index 700c56323..c056d5241 100644 --- a/build/classic/core.js +++ b/build/classic/core.js @@ -3142,7 +3142,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/checkbox/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_9__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar CheckboxField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(CheckboxField, _Component);\n\n function CheckboxField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, CheckboxField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(CheckboxField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n field = _this$props.field,\n value = _this$props.value,\n onChange = _this$props.onChange;\n onChange(id, value === field.option_value ? '' : field.option_value);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(CheckboxField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Fragment\"], null, __webpack_provided_wp_dot_element.createElement(\"input\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n type: \"checkbox\",\n id: id,\n name: name,\n checked: value,\n value: field.option_value,\n className: \"cf-checkbox__input\",\n onChange: this.handleChange\n }, field.attributes)), __webpack_provided_wp_dot_element.createElement(\"label\", {\n className: \"cf-checkbox__label\",\n htmlFor: id\n }, field.option_label));\n }\n }]);\n\n return CheckboxField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (CheckboxField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/checkbox/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/checkbox/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_9__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar CheckboxField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(CheckboxField, _Component);\n\n function CheckboxField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, CheckboxField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(CheckboxField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (e) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, e.target.checked);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(CheckboxField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Fragment\"], null, __webpack_provided_wp_dot_element.createElement(\"input\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n type: \"checkbox\",\n id: id,\n name: name,\n checked: value,\n value: value ? field.option_value : '',\n className: \"cf-checkbox__input\",\n onChange: this.handleChange\n }, field.attributes)), __webpack_provided_wp_dot_element.createElement(\"label\", {\n className: \"cf-checkbox__label\",\n htmlFor: id\n }, field.option_label));\n }\n }]);\n\n return CheckboxField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (CheckboxField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/checkbox/index.js?"); /***/ }), @@ -3306,7 +3306,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/file/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _components_media_library__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/media-library */ \"./packages/core/components/media-library/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar FileField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(FileField, _Component);\n\n function FileField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, FileField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(FileField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n data: {}\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFileDataChange\", function (data) {\n _this.setState({\n data: data\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleClear\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, '');\n\n _this.handleFileDataChange({});\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSelect\", function (files) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field,\n onChange = _this$props2.onChange;\n\n var _files = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(files, 1),\n file = _files[0];\n\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"get\"])(file, field.value_type, file.id));\n\n _this.handleFileDataChange(file);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(FileField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle Hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props3 = this.props,\n value = _this$props3.value,\n field = _this$props3.field;\n\n if (value) {\n // TODO: Refactor this to use `@wordpress/api-fetch` package.\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/attachment/?type=\").concat(field.value_type, \"&value=\").concat(value), 'get').then(this.handleFileDataChange);\n }\n }\n /**\n * Returns an URL to the attachment's thumbnail.\n *\n * @return {string}\n */\n\n }, {\n key: \"getThumb\",\n value: function getThumb() {\n var data = this.state.data;\n\n if (data.sizes) {\n var size = data.sizes.thumbnail || data.sizes.full;\n\n if (size) {\n return size.url;\n }\n }\n\n if (data.thumb_url) {\n return data.thumb_url;\n }\n\n return data.icon;\n }\n /**\n * Handles the file meta set.\n *\n * @param {Object} data\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var data = this.state.data;\n var _this$props4 = this.props,\n value = _this$props4.value,\n name = _this$props4.name,\n field = _this$props4.field,\n buttonLabel = _this$props4.buttonLabel,\n mediaLibraryButtonLabel = _this$props4.mediaLibraryButtonLabel,\n mediaLibraryTitle = _this$props4.mediaLibraryTitle;\n return __webpack_provided_wp_dot_element.createElement(_components_media_library__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n onSelect: this.handleSelect,\n multiple: false,\n title: mediaLibraryTitle,\n buttonLabel: mediaLibraryButtonLabel,\n typeFilter: field.type_filter\n }, function (_ref) {\n var openMediaBrowser = _ref.openMediaBrowser;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__inner\"\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: name,\n value: value,\n readOnly: true\n }), value && data.id && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__content\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__preview\"\n }, __webpack_provided_wp_dot_element.createElement(\"img\", {\n src: _this2.getThumb(),\n className: \"cf-file__image\"\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-file__remove dashicons-before dashicons-no-alt\",\n onClick: _this2.handleClear\n })), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-file__name\",\n title: data.filename || data.file_name\n }, data.filename || data.file_name)), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-file__browse\",\n onClick: openMediaBrowser\n }, buttonLabel));\n });\n }\n }]);\n\n return FileField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FileField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/file/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/file/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _components_media_library__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/media-library */ \"./packages/core/components/media-library/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar FileField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(FileField, _Component);\n\n function FileField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, FileField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(FileField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n data: {}\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFileDataChange\", function (data) {\n _this.setState({\n data: data\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleClear\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, '');\n\n _this.handleFileDataChange({});\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSelect\", function (files) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field,\n onChange = _this$props2.onChange;\n\n var _files = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(files, 1),\n file = _files[0];\n\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"get\"])(file, field.value_type, file.id));\n\n _this.handleFileDataChange(file);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(FileField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle Hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props3 = this.props,\n value = _this$props3.value,\n field = _this$props3.field;\n\n if (value) {\n // TODO: Refactor this to use `@wordpress/api-fetch` package.\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/attachment/?type=\").concat(field.value_type, \"&value=\").concat(value), 'get').then(this.handleFileDataChange);\n }\n }\n /**\n * Returns an URL to the attachment's thumbnail.\n *\n * @return {string}\n */\n\n }, {\n key: \"getThumb\",\n value: function getThumb() {\n var data = this.state.data;\n\n if (data.sizes) {\n var size = data.sizes.thumbnail || data.sizes.full;\n\n if (size) {\n return size.url;\n }\n }\n\n if (data.thumb_url) {\n return data.thumb_url;\n }\n\n return data.icon;\n }\n /**\n * Handles the file meta set.\n *\n * @param {Object} data\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var data = this.state.data;\n var _this$props4 = this.props,\n value = _this$props4.value,\n name = _this$props4.name,\n field = _this$props4.field,\n buttonLabel = _this$props4.buttonLabel,\n mediaLibraryButtonLabel = _this$props4.mediaLibraryButtonLabel,\n mediaLibraryTitle = _this$props4.mediaLibraryTitle;\n return __webpack_provided_wp_dot_element.createElement(_components_media_library__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n onSelect: this.handleSelect,\n multiple: false,\n title: mediaLibraryTitle,\n buttonLabel: mediaLibraryButtonLabel,\n typeFilter: field.type_filter\n }, function (_ref) {\n var openMediaBrowser = _ref.openMediaBrowser;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__inner\"\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: name,\n value: value,\n readOnly: true\n }), value && !!data.id && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__content\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__preview\"\n }, __webpack_provided_wp_dot_element.createElement(\"img\", {\n src: _this2.getThumb(),\n className: \"cf-file__image\"\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-file__remove dashicons-before dashicons-no-alt\",\n onClick: _this2.handleClear\n })), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-file__name\",\n title: data.filename || data.file_name\n }, data.filename || data.file_name)), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-file__browse\",\n onClick: openMediaBrowser\n }, buttonLabel));\n });\n }\n }]);\n\n return FileField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FileField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/file/index.js?"); /***/ }), @@ -3527,7 +3527,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_12__);\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\nvar RichTextField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(RichTextField, _Component);\n\n /**\n * Define the project base properties\n *\n * @return {void}\n */\n function RichTextField() {\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, RichTextField);\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(RichTextField).call(this));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleChange\", function (eventOrValue) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"isString\"])(eventOrValue) ? eventOrValue : eventOrValue.target.value);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"initEditor\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field;\n\n if (field.rich_editing) {\n var editorSetup = function editorSetup(editor) {\n _this.editor = editor;\n editor.on('blur Change', function () {\n editor.save();\n\n _this.handleChange(editor.getContent());\n });\n };\n\n var editorOptions = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, window.tinyMCEPreInit.mceInit.carbon_settings, {\n selector: \"#\".concat(id),\n setup: editorSetup\n });\n\n window.tinymce.init(editorOptions);\n }\n\n var quickTagsOptions = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, window.tinyMCEPreInit, {\n id: id\n });\n\n window.quicktags(quickTagsOptions); // Force the initialization of the quick tags.\n\n window.QTags._buttonsInit();\n });\n\n _this.node = null;\n _this.editor = null;\n _this.cancelResizeObserver = null;\n return _this;\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(RichTextField, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // Required for adequate initialization\n setTimeout(this.initEditor, 100);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.destroyEditor();\n }\n /**\n * Handles the change of the input.\n *\n * @param {Object|string} eventOrValue\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props3 = this.props,\n id = _this$props3.id,\n name = _this$props3.name,\n value = _this$props3.value,\n field = _this$props3.field;\n var classes = ['carbon-wysiwyg', 'wp-editor-wrap', {\n 'tmce-active': field.rich_editing\n }, {\n 'html-active': !field.rich_editing\n }];\n var mediaButtonsHTML = field.media_buttons ? Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"template\"])(field.media_buttons)({\n id: id\n }) : null;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-wrap\"),\n className: classnames__WEBPACK_IMPORTED_MODULE_12___default()(classes),\n ref: function ref(node) {\n return _this2.editorNode = node;\n }\n }, field.media_buttons && __webpack_provided_wp_dot_element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-media-buttons\"),\n className: \"hide-if-no-js wp-media-buttons\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: mediaButtonsHTML\n }\n })), field.rich_editing && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"wp-editor-tabs\"\n }, __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n id: \"\".concat(id, \"-tmce\"),\n className: \"wp-switch-editor switch-tmce\",\n \"data-wp-editor-id\": id\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Visual', 'carbon-fields-ui')), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n id: \"\".concat(id, \"-html\"),\n className: \"wp-switch-editor switch-html\",\n \"data-wp-editor-id\": id\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Text', 'carbon-fields-ui'))), __webpack_provided_wp_dot_element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-editor-container\"),\n className: \"wp-editor-container\"\n }, __webpack_provided_wp_dot_element.createElement(\"textarea\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n style: {\n width: '100%'\n },\n className: \"regular-text\",\n id: id,\n name: name,\n value: value,\n onChange: this.handleChange\n }, field.attributes))));\n }\n /**\n * Initialize the WYSIWYG editor.\n *\n * @return {void}\n */\n\n }, {\n key: \"destroyEditor\",\n\n /**\n * Destroy the instance of the WYSIWYG editor.\n *\n * @return {void}\n */\n value: function destroyEditor() {\n if (this.editor) {\n this.editor.remove();\n this.node = null;\n this.editor = null;\n }\n\n delete window.QTags.instances[this.props.id];\n }\n }]);\n\n return RichTextField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RichTextField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/rich-text/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_12__);\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\nvar RichTextField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(RichTextField, _Component);\n\n /**\n * Define the project base properties\n *\n * @return {void}\n */\n function RichTextField() {\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, RichTextField);\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(RichTextField).call(this));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleChange\", function (eventOrValue) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"isString\"])(eventOrValue) ? eventOrValue : eventOrValue.target.value);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"initEditor\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field;\n\n if (field.rich_editing) {\n var editorSetup = function editorSetup(editor) {\n _this.editor = editor;\n editor.on('blur Change', function () {\n editor.save();\n\n _this.handleChange(editor.getContent());\n });\n };\n\n var editorOptions = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, window.tinyMCEPreInit.mceInit.carbon_settings, {\n selector: \"#\".concat(id),\n setup: editorSetup\n });\n\n window.tinymce.init(editorOptions);\n }\n\n var quickTagsOptions = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, window.tinyMCEPreInit, {\n id: id\n });\n\n window.quicktags(quickTagsOptions); // Force the initialization of the quick tags.\n\n window.QTags._buttonsInit();\n });\n\n _this.node = null;\n _this.editor = null;\n _this.cancelResizeObserver = null;\n return _this;\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(RichTextField, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.props.visible) {\n this.timer = setTimeout(this.initEditor, 250);\n }\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n clearTimeout(this.timer);\n this.destroyEditor();\n }\n /**\n * Handles the change of the input.\n *\n * @param {Object|string} eventOrValue\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props3 = this.props,\n id = _this$props3.id,\n name = _this$props3.name,\n value = _this$props3.value,\n field = _this$props3.field;\n var classes = ['carbon-wysiwyg', 'wp-editor-wrap', {\n 'tmce-active': field.rich_editing\n }, {\n 'html-active': !field.rich_editing\n }];\n var mediaButtonsHTML = field.media_buttons ? Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"template\"])(field.media_buttons)({\n id: id\n }) : null;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-wrap\"),\n className: classnames__WEBPACK_IMPORTED_MODULE_12___default()(classes),\n ref: function ref(node) {\n return _this2.editorNode = node;\n }\n }, field.media_buttons && __webpack_provided_wp_dot_element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-media-buttons\"),\n className: \"hide-if-no-js wp-media-buttons\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: mediaButtonsHTML\n }\n })), field.rich_editing && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"wp-editor-tabs\"\n }, __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n id: \"\".concat(id, \"-tmce\"),\n className: \"wp-switch-editor switch-tmce\",\n \"data-wp-editor-id\": id\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Visual', 'carbon-fields-ui')), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n id: \"\".concat(id, \"-html\"),\n className: \"wp-switch-editor switch-html\",\n \"data-wp-editor-id\": id\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Text', 'carbon-fields-ui'))), __webpack_provided_wp_dot_element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-editor-container\"),\n className: \"wp-editor-container\"\n }, __webpack_provided_wp_dot_element.createElement(\"textarea\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n style: {\n width: '100%'\n },\n className: \"regular-text\",\n id: id,\n name: name,\n value: value,\n onChange: this.handleChange\n }, field.attributes))));\n }\n /**\n * Initialize the WYSIWYG editor.\n *\n * @return {void}\n */\n\n }, {\n key: \"destroyEditor\",\n\n /**\n * Destroy the instance of the WYSIWYG editor.\n *\n * @return {void}\n */\n value: function destroyEditor() {\n if (this.editor) {\n this.editor.remove();\n this.node = null;\n this.editor = null;\n }\n\n delete window.QTags.instances[this.props.id];\n }\n }]);\n\n return RichTextField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RichTextField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/rich-text/index.js?"); /***/ }), @@ -3746,11 +3746,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /*!********************************!*\ !*** ./packages/core/index.js ***! \********************************/ -/*! exports provided: createRegistry, getFieldType, registerFieldType, Field, withFilters, withProps, withValidation, withConditionalLogic, uniqueId, fromSelector */ +/*! exports provided: createRegistry, getFieldType, registerFieldType, Field, withFilters, withProps, withValidation, withConditionalLogic, uniqueId, fromSelector, initialize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./store */ \"./packages/core/store/index.js\");\n/* harmony import */ var _fields__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fields */ \"./packages/core/fields/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./registry */ \"./packages/core/registry/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createRegistry\", function() { return _registry__WEBPACK_IMPORTED_MODULE_3__[\"createRegistry\"]; });\n\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./registry/fields */ \"./packages/core/registry/fields.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getFieldType\", function() { return _registry_fields__WEBPACK_IMPORTED_MODULE_4__[\"getFieldType\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"registerFieldType\", function() { return _registry_fields__WEBPACK_IMPORTED_MODULE_4__[\"registerFieldType\"]; });\n\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/field */ \"./packages/core/components/field/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Field\", function() { return _components_field__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_filters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hocs/with-filters */ \"./packages/core/hocs/with-filters/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withFilters\", function() { return _hocs_with_filters__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_props__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./hocs/with-props */ \"./packages/core/hocs/with-props/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withProps\", function() { return _hocs_with_props__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_validation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./hocs/with-validation */ \"./packages/core/hocs/with-validation/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withValidation\", function() { return _hocs_with_validation__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./hocs/with-conditional-logic */ \"./packages/core/hocs/with-conditional-logic/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withConditionalLogic\", function() { return _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _utils_unique_id__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/unique-id */ \"./packages/core/utils/unique-id.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uniqueId\", function() { return _utils_unique_id__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _utils_from_selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/from-selector */ \"./packages/core/utils/from-selector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fromSelector\", function() { return _utils_from_selector__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * Sets the locale data for the package type\n */\n\nObject(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"setLocaleData\"])(window.cf.config.locale, 'carbon-fields-ui');\n/**\n * Public API.\n */\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initialize\", function() { return initialize; });\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./store */ \"./packages/core/store/index.js\");\n/* harmony import */ var _fields__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fields */ \"./packages/core/fields/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./registry */ \"./packages/core/registry/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createRegistry\", function() { return _registry__WEBPACK_IMPORTED_MODULE_4__[\"createRegistry\"]; });\n\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./registry/fields */ \"./packages/core/registry/fields.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getFieldType\", function() { return _registry_fields__WEBPACK_IMPORTED_MODULE_5__[\"getFieldType\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"registerFieldType\", function() { return _registry_fields__WEBPACK_IMPORTED_MODULE_5__[\"registerFieldType\"]; });\n\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/field */ \"./packages/core/components/field/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Field\", function() { return _components_field__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_filters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./hocs/with-filters */ \"./packages/core/hocs/with-filters/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withFilters\", function() { return _hocs_with_filters__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_props__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./hocs/with-props */ \"./packages/core/hocs/with-props/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withProps\", function() { return _hocs_with_props__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_validation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./hocs/with-validation */ \"./packages/core/hocs/with-validation/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withValidation\", function() { return _hocs_with_validation__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./hocs/with-conditional-logic */ \"./packages/core/hocs/with-conditional-logic/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withConditionalLogic\", function() { return _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _utils_unique_id__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/unique-id */ \"./packages/core/utils/unique-id.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uniqueId\", function() { return _utils_unique_id__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _utils_from_selector__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/from-selector */ \"./packages/core/utils/from-selector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fromSelector\", function() { return _utils_from_selector__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * Sets the locale data for the package type\n */\n\nObject(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"setLocaleData\"])(window.cf.config.locale, 'carbon-fields-ui');\n/**\n * Public API.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * Triggers the initialization of Carbon Fields.\n *\n * @return {void}\n */\n\nfunction initialize() {\n Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"doAction\"])('carbon-fields.init');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/index.js?"); /***/ }), diff --git a/build/classic/core.min.js b/build/classic/core.min.js index 73113abde..875616d6d 100644 --- a/build/classic/core.min.js +++ b/build/classic/core.min.js @@ -1,4 +1,4 @@ -this.cf=this.cf||{},this.cf.core=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=323)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.cf.vendor.react}()},function(e,t){!function(){e.exports=this.cf.vendor["@wordpress/element"]}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.cf.vendor.lodash}()},function(e,t){!function(){e.exports=this.cf.vendor["@wordpress/i18n"]}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n1?t-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(o,a){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){o(e)}),i.fail(function(){a(Object(r.__)("An error occured.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";var r=n(1),o=n(30);function a(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var i,u,s=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}},c=(void 0===i&&(i=0),function(){return++i}),l={},f={},p=["touchstart","touchmove"];function d(e,t){var n=null;return-1!==p.indexOf(t)&&u&&(n={passive:!e.props.preventDefault}),n}t.a=function(e,t){var n,i;return i=n=function(n){var i,p;function h(e){var t;return(t=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof t.__clickOutsideHandlerProp){var n=t.getInstance();if("function"!=typeof n.props.handleClickOutside){if("function"!=typeof n.handleClickOutside)throw new Error("WrappedComponent lacks a handleClickOutside(event) function for processing outside click events.");n.handleClickOutside(e)}else n.props.handleClickOutside(e)}else t.__clickOutsideHandlerProp(e)},t.enableOnClickOutside=function(){if("undefined"!=typeof document&&!f[t._uid]){void 0===u&&(u=s()),f[t._uid]=!0;var e=t.props.eventTypes;e.forEach||(e=[e]),l[t._uid]=function(e){var n;t.props.disableOnClickOutside||null!==t.componentNode&&(t.props.preventDefault&&e.preventDefault(),t.props.stopPropagation&&e.stopPropagation(),t.props.excludeScrollbar&&(n=e,document.documentElement.clientWidth<=n.clientX||document.documentElement.clientHeight<=n.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode;){if(a(e,t,n))return!0;e=e.parentNode}return e}(e.target,t.componentNode,t.props.outsideClickIgnoreClass)===document&&t.__outsideClickHandler(e))},e.forEach(function(e){document.addEventListener(e,l[t._uid],d(t,e))})}},t.disableOnClickOutside=function(){delete f[t._uid];var e=l[t._uid];if(e&&"undefined"!=typeof document){var n=t.props.eventTypes;n.forEach||(n=[n]),n.forEach(function(n){return document.removeEventListener(n,e,d(t,n))}),delete l[t._uid]}},t.getRef=function(e){return t.instanceRef=e},t._uid=c(),t}p=n,(i=h).prototype=Object.create(p.prototype),i.prototype.constructor=i,i.__proto__=p;var m=h.prototype;return m.getInstance=function(){if(!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},m.componentDidMount=function(){if("undefined"!=typeof document&&document.createElement){var e=this.getInstance();if(t&&"function"==typeof t.handleClickOutside&&(this.__clickOutsideHandlerProp=t.handleClickOutside(e),"function"!=typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=Object(o.findDOMNode)(this.getInstance()),this.enableOnClickOutside()}},m.componentDidUpdate=function(){this.componentNode=Object(o.findDOMNode)(this.getInstance())},m.componentWillUnmount=function(){this.disableOnClickOutside()},m.render=function(){var t=this.props,n=(t.excludeScrollbar,function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},h}(r.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},i}},function(e,t,n){"use strict";var r=n(16),o=n.n(r),a=n(14),i=n(17),u=n(11),s=n(26),c=Object(i.withEffects)(function(e){var t=e.mount,n=e.unmount,r=e.useEvent("openMediaBrowserEvent"),a=o()(r,2),c=a[0],l=a[1];return Object(u.merge)(Object(u.pipe)(t,Object(u.map)(function(){return{type:"INIT"}})),Object(u.pipe)(n,Object(u.map)(function(){return{type:"DESTROY"}})),Object(u.pipe)(Object(s.a)({openMediaBrowser:l}),Object(u.map)(i.toProps)),Object(u.pipe)(c,Object(u.map)(function(e){return{type:"OPEN",payload:e}})))},{handler:function(e){var t=null;return function(n){switch(n.type){case"INIT":var r=e.onSelect,o=e.typeFilter;(t=wp.media({title:e.title,library:{type:o},button:{text:e.buttonLabel},multiple:e.multiple})).on("select",function(){var e=t.state().get("selection").toJSON();r(e)});break;case"OPEN":t&&t.open();break;case"DESTROY":t=null}}}});t.a=Object(a.compose)(c)(function(e){return(0,e.children)({openMediaBrowser:e.openMediaBrowser})})},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(313),n(31)),w=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():e.createElement(E.a,null)}}]),n}(y.Component);t.a=w}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(3),g=n.n(m),v=n(55),b=function(t){function n(){var e,t;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i1?t.setState(function(e){return{menuVisible:!e.menuVisible}}):r(n[0])}),g()(h()(h()(t)),"handleItemClick",function(e){t.setState({menuVisible:!1}),t.props.onSelect(e)}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.buttonText,o=n.groups;return e.createElement("div",{className:"cf-complex__inserter"},e.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},r),o.length>1&&e.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},o.map(function(n,r){return e.createElement("li",{className:"cf-complex__inserter-item",key:r,onClick:function(){return t.handleItemClick(n)}},n.label)})))}}]),n}(n(2).Component);t.a=Object(v.a)(b)}).call(this,n(2))},function(e,t,n){"use strict";var r=u(n(305)),o=u(n(310)),a=u(n(115)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:a.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(319),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(79),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(63)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(85)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(44),o=n(190),a=n(191),i=n(192),u=n(193),s=n(194);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(33)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(199),o=n(206),a=n(208),i=n(209),u=n(210);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0?e.createElement("select",{id:n,name:r,value:o||Object(b.get)(a.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},a.options.map(function(t){return e.createElement("option",{key:t.value,value:t.value},t.label)})):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return i});var r=n(2),o=Object(r.createContext)(!1),a=o.Provider,i=o.Consumer},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(37))},function(e,t,n){var r=n(172),o=n(42);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(174),o=n(82),a=n(23),i=n(62),u=n(83),s=n(84),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,h=d?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||h.push(g);return h}},function(e,t,n){var r=n(175),o=n(27),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&el))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=l}function E(){var e=o();if(y(e))return w(e);p=setTimeout(E,function(e){var n=t-(e-d);return g?u(n,l-(e-h)):n}(e))}function w(e){return p=void 0,v&&s?b(e):(s=c=void 0,f)}function x(){var e=o(),n=y(e);if(s=arguments,c=this,d=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(E,t),m?b(e):f}(d);if(g)return p=setTimeout(E,t),b(d)}return void 0===p&&(p=setTimeout(E,t)),f}return t=a(t)||0,r(n)&&(m=!!n.leading,l=(g="maxWait"in n)?i(a(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,s=d=c=p=void 0},x.flush=function(){return void 0===p?f:w(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(284)),o=a(n(286));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,i.polyfill)(p);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(113),i=n(311);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";(function(e){var r=n(18),o=n.n(r),a=n(20),i=n.n(a),u=n(14),s=n(22),c=n(4),l=(n(320),n(148)),f=n(35);t.a=Object(u.compose)(Object(s.withSelect)(function(e,t){var n=e("carbon-fields/core"),r=n.getValidationError,o=n.isFieldVisible;return{error:r(t.id),hidden:!o(t.id)}}),Object(f.a)("carbon-fields.field-wrapper"))(function(t){var n=t.id,r=t.field,a=t.error,u=t.hidden,s=t.className,f=t.children,p=r.width?{flexBasis:"".concat(r.width,"%")}:null,d=["cf-field","cf-".concat(Object(c.kebabCase)(r.type)),{"cf-field--has-width":!!r.width,"cf-field--invalid":!!a},s].concat(o()(r.classes));return e.createElement("div",{className:i()(d),style:p,hidden:u},e.createElement("div",{className:"cf-field__head"},r.label&&e.createElement("label",{className:"cf-field__label",htmlFor:n},r.label,r.required&&e.createElement("span",{className:"cf-field__asterisk"},"*"))),!u&&e.createElement("div",{className:"cf-field__body"},f),u&&e.createElement(l.a,{className:"cf-field__body"},f),r.help_text&&e.createElement("em",{className:"cf-field__help",dangerouslySetInnerHTML:{__html:r.help_text}}),a&&e.createElement("span",{className:"cf-field__error"},a))})}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(16),i=n.n(a),u=n(18),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(10),b=n.n(v),y=n(0),E=n.n(y),w=n(3),x=n.n(w),O=n(38),_=n.n(O),C=n(5),k=n(2),S=n(14),j=n(19),D=n(17),A=n(20),M=n.n(A),T=n(4),F=n(11),P=n(26),N=(n(160),n(39)),I=n(36),L=n(54),R=function(t){function n(){var e,t;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&a.length>=r.max?alert(Object(C.sprintf)(Object(C.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(i(o,s()(a).concat([Object(T.pick)(e,"id","type","subtype")])),u({selectedOptions:s()(c).concat([e])})))}),x()(E()(E()(t)),"handleRemoveItem",function(e){var n=t.props,r=n.value,o=n.id,a=n.onChange,i=n.setState,u=n.selectedOptions;a(o,Object(T.without)(r,e)),i({selectedOptions:Object(T.without)(u,e)})}),x()(E()(E()(t)),"handleSort",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),t}return b()(n,t),p()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var t=this,n=this.props,r=n.name,o=n.value,a=n.field,i=n.totalOptionsCount,u=n.selectedOptions,s=n.queryTerm,c=this.props.options;return a.duplicates_allowed||(c=_()(c,function(e){e.map(function(e){return e.disabled=!!Object(T.find)(o,function(t){return Object(T.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),e.createElement(k.Fragment,null,e.createElement("div",{className:"cf-association__bar"},e.createElement(N.a,{value:s,onChange:this.handleSearchChange}),e.createElement("span",{className:"cf-association__counter"},Object(C.sprintf)(Object(C.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(c.length),Number(i)))),e.createElement("div",{className:"cf-association__cols"},e.createElement("div",{className:"cf-association__col"},c.map(function(n,r){return e.createElement("div",{className:M()("cf-association__option",{"cf-association__option--selected":n.disabled}),key:r},n.thumbnail&&e.createElement("img",{className:"cf-association__option-thumb",src:n.thumbnail}),e.createElement("div",{className:"cf-association__option-content"},e.createElement("span",{className:"cf-association__option-title"},n.title),e.createElement("span",{className:"cf-association__option-type"},n.type)),e.createElement("div",{className:"cf-association__option-actions"},e.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:n.edit_link}),!n.disabled&&(a.max<0||o.length0&&t.length=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(163),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;t.setState({currentTab:Object(k.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),x()(E()(E()(t)),"handleToggleAllClick",function(){var e=t.props,n=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!n)}),x()(E()(E()(t)),"handleGroupsSortStart",function(e,n){var r=t.props,o=r.value,a=r.groupIdKey,i=n.item.index(),u=Object(k.get)(o,"".concat(i,".").concat(a),null);t.setState({currentDraggedGroup:u})}),x()(E()(E()(t)),"handleGroupsSortUpdate",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),x()(E()(E()(t)),"handleGroupsSortStop",function(){t.setState({currentDraggedGroup:null})}),x()(E()(E()(t)),"handleTabsChange",function(e){t.setState({currentTab:e})}),t}return b()(n,t),p()(n,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(k.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=s()(e,2),o=r[0],a=r[1],u=Object(k.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(k.isString)(u.label_template))return u.label;try{return Object(k.template)(u.label_template)(i()({$_index:n},a))||u.label}catch(e){return console.error(Object(C.sprintf)(Object(C.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var t=this,n=this.state,r=n.currentDraggedGroup,a=n.currentTab,i=this.props,u=i.value,s=i.field,c=i.groupIdKey,l=i.groupFilterKey,f=i.allGroupsAreCollapsed,p=i.onGroupSetup,d=i.onGroupFieldSetup,h=i.onToggleGroup,m=this.getAvailableGroups(l),g=this.getGroupLabels(),v=u.map(function(e,t){return{id:e[c],label:g[t]}});return e.createElement(_.Fragment,null,this.isTabbed&&!!u.length&&e.createElement(S.a,{items:u,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===s.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},e.createElement(j.a,{ref:this.tabsList,items:v,current:a,layout:s.layout,onChange:this.handleTabsChange},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:"+",groups:m,onSelect:this.handleAddGroup}))),!u.length&&e.createElement(M.a,{label:"There are no entries yet."},e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup})),!!u.length&&e.createElement(S.a,{items:u,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},e.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},u.map(function(n,i){return e.createElement(A.a,o()({key:"".concat(n[l],"-").concat(i)},p(n,{index:i,label:g[i],dragged:n[c]===r,tabbed:t.isTabbed,hidden:t.isTabbed&&n[c]!==a,allowClone:s.duplicate_groups_allowed&&!t.isMaximumReached,onFieldSetup:d,onClone:t.handleCloneGroup,onRemove:t.handleRemoveGroup,onToggle:h})))}))),!this.isTabbed&&!!u.length&&e.createElement("div",{className:"cf-complex__actions"},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup}),e.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},f?Object(C.__)("Expand All","carbon-fields-ui"):Object(C.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(C.sprintf)(Object(C.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),n}(_.Component);Object(O.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(t){return function(n){var r=n.field;return"complex"!==r.type?e.createElement(t,n):e.createElement(t,o()({className:"cf-complex--".concat(r.layout)},n))}}),Object(O.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(k.isEmpty)(t))return Object(C.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===l.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);l.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return l.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();f.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},f.defaultProps={options:{}},t.default=f},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=function(t){function n(){return i()(this,n),l()(this,p()(n).apply(this,arguments))}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.value,a=t.field;return e.createElement("input",o()({type:"hidden",name:n,value:r,className:"hidden-text"},a.attributes))}}]),n}(n(2).Component);t.a=m}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(2);t.a=function(t){var n=t.field;return e.createElement(r.RawHTML,{className:"cf-html__content"},n.html)}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(26),x=n(2),O=n(5),_=n(17),C=n(4),k=n(11),S=(n(295),n(39)),j=n(132),D=function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1})}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?e.createElement(b.a,{id:n,name:r,value:this.filterValues(o),options:a.options,delimiter:a.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){(function(t){for(var r=n(304),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],c=0;!u&&c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(14),w=n(5),x=n(17),O=n(11),_=n(26),C=n(4),k=(n(312),n(39)),S=n(141),j=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.embedCode,i=t.embedType,u=t.provider;return e.createElement("div",{ref:this.node},e.createElement(k.a,{id:n,value:o,onChange:this.handleChange}),a?e.createElement(S.a,{html:a,type:i,provider:u}):null,e.createElement("input",{type:"hidden",name:r,value:o,readOnly:!0}))}}]),n}(y.Component),D=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),A=Object(x.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=o()(t,2),r=n[0],a=n[1],i=Object(O.pipe)(Object(_.a)({onFetchEmbedCode:a}),Object(O.map)(x.toProps)),u=Object(O.pipe)(r,Object(O.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(O.merge)(i,u)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(w.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(w.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}});t.a=Object(E.compose)(D,A)(j)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(2),g=function(t){function n(){var e;return o()(this,n),(e=s()(this,l()(n).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(h()(h()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(h()(h()(e))),e}return p()(n,t),i()(n,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,c=u.height;"resize"!==o||s===a&&c===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var t=this;return e.createElement("div",{className:"cf-oembed__preview"},e.createElement("iframe",{ref:function(e){return t.iframe=e},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var t="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",n="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(t,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),r=e.createElement("html",{lang:document.documentElement.lang},e.createElement("head",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),e.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},e.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),e.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:n}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(m.renderToString)(r)),this.iframe.contentWindow.document.close()}}}]),n}(m.Component);t.a=g}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(29),i=n(57);n(314),t.a=Object(a.a)(function(t){return o()({},t,{field:o()({},t.field,{options:t.field.options.map(function(t){return o()({},t,{label:e.createElement("img",{className:"cf-radio-image__image",src:t.label})})})})})})(i.a)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(5),O=n(4),_=n(20),C=n.n(_),k=function(t){function n(){var e;return s()(this,n),e=p()(this,h()(n).call(this)),E()(b()(b()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(O.isString)(t)?t:t.target.value)}),E()(b()(b()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=i()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=i()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return g()(n,t),l()(n,[{key:"componentDidMount",value:function(){setTimeout(this.initEditor,100)}},{key:"componentWillUnmount",value:function(){this.destroyEditor()}},{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field,s=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":u.rich_editing},{"html-active":!u.rich_editing}],c=u.media_buttons?Object(O.template)(u.media_buttons)({id:r}):null;return e.createElement("div",{id:"wp-".concat(r,"-wrap"),className:C()(s),ref:function(e){return t.editorNode=e}},u.media_buttons&&e.createElement("div",{id:"wp-".concat(r,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},e.createElement("span",{dangerouslySetInnerHTML:{__html:c}})),u.rich_editing&&e.createElement("div",{className:"wp-editor-tabs"},e.createElement("button",{type:"button",id:"".concat(r,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":r},Object(x.__)("Visual","carbon-fields-ui")),e.createElement("button",{type:"button",id:"".concat(r,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":r},Object(x.__)("Text","carbon-fields-ui"))),e.createElement("div",{id:"wp-".concat(r,"-editor-container"),className:"wp-editor-container"},e.createElement("textarea",o()({style:{width:"100%"},className:"regular-text",id:r,name:a,value:i,onChange:this.handleChange},u.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),n}(w.Component);t.a=k}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(2),h=(n(316),function(t){function n(){return o()(this,n),s()(this,l()(n).apply(this,arguments))}return p()(n,t),i()(n,[{key:"render",value:function(){return e.createElement("h3",null,this.props.field.label)}}]),n}(d.Component));t.a=h}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(4),w=(n(317),n(31)),x=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1}),t}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field;return u.options.length>0?e.createElement("ul",{className:"cf-set__list"},u.options.map(function(n,s){return e.createElement("li",{className:"cf-set__list-item",key:s},e.createElement("input",o()({type:"checkbox",id:"".concat(r,"-").concat(n.value),name:"".concat(a,"[]"),checked:t.isChecked(i,n),value:n.value,className:"cf-set__input",onChange:t.handleChange},u.attributes)),e.createElement("label",{className:"cf-set__label",htmlFor:"".concat(r,"-").concat(n.value)},n.label))})):e.createElement(w.a,null)}}]),n}(y.Component);t.a=x}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(26),E=n(2),w=n(5),x=n(17),O=n(4),_=n(11),C=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;ar&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===f.inserted[v]&&(n="",h(e,t),f.inserted[v]=n)}var O=function(){var e=w.apply(this,arguments),t=a+"-"+v;return void 0===f.registered[t]&&(f.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){f.inserted[e]=!0}if(l){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){l&&(d.flush(),d.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},C=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function A(e){return D(e)?window.pageYOffset:e.scrollTop}function M(e,t){D(e)?window.scrollTo(0,t):e.scrollTop=t}function T(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k,a=A(e),i=t-a,u=0;!function t(){var s,c=i*((s=(s=u+=10)/n-1)*s*s+1)+a;M(e,c),u=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&T(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&w>=r)return a&&T(s,_,160),{placement:"bottom",maxHeight:i?w-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&E>=r)&&(k=i?E-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return M(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&T(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&E>=r){var S=t;return(!i&&x>=r||i&&E>=r)&&(S=i?E-y:x-y),a&&T(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!l,isFixedPosition:l,theme:s});c&&c(f),r.setState(f)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||P(e);return E({},r.props,{placement:t,maxHeight:r.state.maxHeight})},O(r,n)}return w(t,e),b(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(a.Component);N.contextTypes={getPortalPlacement:l.a.func};var I=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},L=I,R=I,H=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};H.defaultProps={children:"No options"};var V=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};V.defaultProps={children:"Loading..."};var B=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=l-f-c,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),p.scrollTop=l,m=!0,r.isBottom=!0):!d&&-t>c&&(i&&!r.isTop&&i(e),p.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},O(r,n)}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return i.a.createElement(Z,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(a.Component),le=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=x(e,["isEnabled"]);return t?i.a.createElement(ce,n):this.props.children}}]),t}(a.Component);le.defaultProps={isEnabled:!0};var fe=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,s=e.hasValue;return i.a.createElement("div",{className:r(Object(u.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s},n)},t)}}]),t}(a.Component),pe=function(e){var t=e.size,n=x(e,["size"]);return i.a.createElement("svg",E({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(u.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},de=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},he=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},me=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},ge=me,ve=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};ve.defaultProps={children:i.a.createElement(he,null)};var be=me,ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};ye.defaultProps={children:i.a.createElement(de,null)};var Ee=function(e){var t=e.color,n=e.delay,r=e.offset;return i.a.createElement("span",{className:Object(u.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(u.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var we=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,s=e.isRtl,c=e.theme.colors,l=a?c.neutral80:c.neutral20;return i.a.createElement("div",E({},o,{className:n(Object(u.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),i.a.createElement(Ee,{color:l,delay:0,offset:s}),i.a.createElement(Ee,{color:l,delay:160,offset:!0}),i.a.createElement(Ee,{color:l,delay:320,offset:!s}))};we.defaultProps={size:4};var xe=function(e){var t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)},Oe=xe,_e=xe,Ce=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)}}]),t}(a.Component);Ce.defaultProps={children:i.a.createElement(de,{size:14})};var ke=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,s=e.getStyles,c=e.innerProps,l=e.isDisabled,f=e.removeProps,p=e.selectProps,d=r.Container,h=r.Label,m=r.Remove,g=E({className:o(Object(u.a)(s("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":l},n)},c),v={className:o(Object(u.a)(s("multiValueLabel",this.props)),{"multi-value__label":!0},n)},b=E({className:o(Object(u.a)(s("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},f);return i.a.createElement(d,{data:a,innerProps:g,selectProps:p},i.a.createElement(h,{data:a,innerProps:v,selectProps:p},t),i.a.createElement(m,{data:a,innerProps:b,selectProps:p}))}}]),t}(a.Component);ke.defaultProps={cropWithEllipsis:!0};var Se={ClearIndicator:ye,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,c=e.innerRef,l=e.innerProps;return i.a.createElement("div",E({ref:c,className:n(Object(u.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":s},o)},l),t)},DropdownIndicator:ve,DownChevron:he,CrossIcon:de,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,c=e.label,l=e.theme;return i.a.createElement("div",{className:r(Object(u.a)(o("group",e)),{group:!0},n)},i.a.createElement(a,E({},s,{theme:l,getStyles:o,cx:r}),c),i.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=x(e,["className","cx","getStyles","theme"]);return i.a.createElement("div",E({className:n(Object(u.a)(r("groupHeading",E({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return i.a.createElement("div",{className:r(Object(u.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return i.a.createElement("span",E({},o,{className:n(Object(u.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,s=e.isDisabled,c=e.theme,l=x(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return i.a.createElement("div",{className:Object(u.a)(r("input",E({theme:c},l)))},i.a.createElement(p.a,E({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:s},l)))},LoadingIndicator:we,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps,c=r(Object(u.a)(o("menu",e)),{menu:!0},n);return i.a.createElement("div",E({className:c},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef;return i.a.createElement("div",{className:r(Object(u.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:s},t)},MenuPortal:B,LoadingMessage:V,NoOptionsMessage:H,MultiValue:ke,MultiValueContainer:Oe,MultiValueLabel:_e,MultiValueRemove:Ce,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,c=e.isSelected,l=e.innerRef,f=e.innerProps;return i.a.createElement("div",E({ref:l,className:r(Object(u.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":c},n)},f),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,c=e.isRtl;return i.a.createElement("div",E({className:r(Object(u.a)(o("container",e)),{"--is-disabled":s,"--is-rtl":c},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:fe},je=function(e){return E({},Se,e.components)},De={clearIndicator:be,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:ge,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:R,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return y(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),y(t,"backgroundColor",i.neutral0),y(t,"borderRadius",o),y(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),y(t,"marginBottom",a.menuGutter),y(t,"marginTop",a.menuGutter),y(t,"position","absolute"),y(t,"width","100%"),y(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:L,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ae={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Me={backspaceRemovesValue:!0,blurInputOnSelect:F(),captureMenuScroll:!F(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=E({ignoreCase:!0,ignoreAccents:!0,stringify:K,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?$(t):t,c=i?$(a(e)):a(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=q(s),c=q(c)),"start"===u?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Te=1,Fe=function(e){function t(e){v(this,t);var n=O(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pe.call(n);var r=e.value;n.cacheComponents=h(n.cacheComponents,Y).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Te);var o=j(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=j(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!u&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?M(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,c=-1;if(a.length){switch(e){case"previous":c=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ae):E({},Ae,this.props.theme):Ae}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,c=this.state.selectValue,l=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+S(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:l,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var c=a?void 0:function(){return n.onOptionHover(e)},l=a?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:l,onMouseMove:c,onMouseOver:c,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:f,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,c=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,c=r||this.getElementId("input");if(!n)return i.a.createElement(J,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:k,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,d=f.theme;return i.a.createElement(u,E({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,f=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,h=l.inputValue,m=l.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue;if(!this.hasValue()||!f)return h?null:i.a.createElement(s,E({},c,{key:"placeholder",isDisabled:p}),m);if(d)return v.map(function(t){var u=t===b;return i.a.createElement(n,E({},c,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var y=v[0];return i.a.createElement(u,E({},c,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:u,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?i.a.createElement(e,E({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.a.createElement(n,E({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,O=m.maxMenuHeight,_=m.menuIsOpen,C=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,j=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,A=m.noOptionsMessage,M=m.onMenuScrollToTop,T=m.onMenuScrollToBottom;if(!_)return null;var F=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,i.a.createElement(l,E({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},P=void 0;if(this.hasOptions())P=h.render.map(function(t){if("group"===t.type){t.type;var o=x(t,["type"]),a=t.key+"-heading";return i.a.createElement(n,E({},f,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return F(e)}))}if("option"===t.type)return F(t)});else if(b){var I=y({inputValue:v});if(null===I)return null;P=i.a.createElement(s,f,I)}else{var L=A({inputValue:v});if(null===L)return null;P=i.a.createElement(c,f,L)}var R={minMenuHeight:w,maxMenuHeight:O,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:D},H=i.a.createElement(N,E({},f,R),function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return i.a.createElement(o,E({},f,R,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),i.a.createElement(le,{isEnabled:g,onTopArrive:M,onBottomArrive:T},i.a.createElement(se,{isEnabled:j},i.a.createElement(a,E({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),P))))});return S||"fixed"===k?i.a.createElement(u,E({},f,{appendTo:S,controlElement:this.controlRef,menuPlacement:C,menuPosition:k}),H):H}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(o){if(n){var s=u.map(function(t){return e.getOptionValue(t)}).join(n);return i.a.createElement("input",{name:a,type:"hidden",value:s})}var c=u.length>0?u.map(function(t,n){return i.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):i.a.createElement("input",{name:a,type:"hidden"});return i.a.createElement("div",null,c)}var l=u[0]?this.getOptionValue(u[0]):"";return i.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?i.a.createElement(X,{"aria-live":"assertive"},i.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),i.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,u=a.className,s=a.id,c=a.isDisabled,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.a.createElement(r,E({},f,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:l}),this.renderLiveRegion(),i.a.createElement(t,E({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:l}),i.a.createElement(o,E({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),i.a.createElement(n,E({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(a.Component);Fe.defaultProps=Me;var Pe=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=je({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(C(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=De[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,E({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=_(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=_(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof l&&(l(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!c||!f||!m||p&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(c){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":c?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!c){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":c?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":c?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!c)return;e.focusOption("pageup");break;case"PageDown":if(!c)return;e.focusOption("pagedown");break;case"Home":if(!c)return;e.focusOption("first");break;case"End":if(!c)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Ne=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;v(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=c(n(1)),o=c(n(21)),a=c(n(25)),i=n(52),u=c(n(289)),s=c(n(290));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,c=e.hsv,l=e.hsl,f=e.onChange,p=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:l,hsv:c,onChange:f})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:l,onChange:f})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:l,renderers:m,onChange:f}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:l,hex:o,onChange:f,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:f,onSwatchHover:p}))};l.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},l.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(l)},function(e,t,n){"use strict";var r=n(167);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(169)),o=u(n(61)),a=u(n(180)),i=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(32),o=n(23),a=n(27);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(41),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(173)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(45);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(44);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(44),o=n(71),a=n(72);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(86),o=n(196),a=n(28),i=n(90),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t,n){var r,o=n(197),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(200),o=n(44),a=n(71);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(201),o=n(202),a=n(203),i=n(204),u=n(205);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(244);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(69),o=n(103),a=n(104),i=n(246),u=n(247),s=n(250),c=n(251),l=n(252),f=n(253),p=n(94),d=n(254),h=n(48),m=n(255),g=n(256),v=n(261),b=n(23),y=n(62),E=n(263),w=n(28),x=n(265),O=n(42),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var T,F=1&n,P=2&n,N=4&n;if(j&&(T=A?j(t,D,A,M):j(t)),void 0!==T)return T;if(!w(t))return t;var I=b(t);if(I){if(T=m(t),!F)return c(t,T)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,F);if(L==k||L==_||R&&!A){if(T=P||R?{}:v(t),!F)return P?f(t,u(T,t)):l(t,i(T,t))}else{if(!S[L])return A?t:{};T=g(t,L,F)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,T),x(t))return t.forEach(function(r){T.add(e(r,n,j,r,t,M))}),T;if(E(t))return t.forEach(function(r,o){T.set(o,e(r,n,j,o,t,M))}),T;var V=N?P?d:p:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(T,o,e(r,n,j,o,t,M))}),T}},function(e,t,n){var r=n(33),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(51),o=n(42);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(51),o=n(106);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(28),o=n(67),a=n(249),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(63)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*c/a)/100,n.hsl.a!==l)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:l,source:"rgb"}}else{var f;if(f=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==f)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*c/a+100)/100,n.hsl.h!==l)return{h:l,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==f)return{h:f,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?c=a:l<0?l=0:l>i&&(l=i);var f=100*c/a,p=-100*l/i+100;return{h:n.hsl.h,s:f,v:p,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=F(e,360),t=F(t,100),n=F(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,f,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=T(s),{ok:h,format:e.format||m,r:c(255,l(u.r,0)),g:c(255,l(u.g,0)),b:c(255,l(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r,o,a=l(e,t,n),i=c(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(p(r));return a}function D(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(p({h:r,s:o,v:a})),a=(a+u)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*F(this._r,255))+"%",g:s(100*F(this._g,255))+"%",b:s(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%)":"rgba("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),a=n/100;return p({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,a=p.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},p.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;cs&&(s=r,u=p(t[c]));return p.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var A=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,l(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:l.fields,className:"flexbox-fix"},r.default.createElement("div",{style:l.double},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"hex",value:s.replace("#",""),onChange:f})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.alpha},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:f,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t1?t-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(o,a){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){o(e)}),i.fail(function(){a(Object(r.__)("An error occured.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";var r=n(1),o=n(30);function a(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var i,u,s=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}},c=(void 0===i&&(i=0),function(){return++i}),l={},f={},p=["touchstart","touchmove"];function d(e,t){var n=null;return-1!==p.indexOf(t)&&u&&(n={passive:!e.props.preventDefault}),n}t.a=function(e,t){var n,i;return i=n=function(n){var i,p;function h(e){var t;return(t=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof t.__clickOutsideHandlerProp){var n=t.getInstance();if("function"!=typeof n.props.handleClickOutside){if("function"!=typeof n.handleClickOutside)throw new Error("WrappedComponent lacks a handleClickOutside(event) function for processing outside click events.");n.handleClickOutside(e)}else n.props.handleClickOutside(e)}else t.__clickOutsideHandlerProp(e)},t.enableOnClickOutside=function(){if("undefined"!=typeof document&&!f[t._uid]){void 0===u&&(u=s()),f[t._uid]=!0;var e=t.props.eventTypes;e.forEach||(e=[e]),l[t._uid]=function(e){var n;t.props.disableOnClickOutside||null!==t.componentNode&&(t.props.preventDefault&&e.preventDefault(),t.props.stopPropagation&&e.stopPropagation(),t.props.excludeScrollbar&&(n=e,document.documentElement.clientWidth<=n.clientX||document.documentElement.clientHeight<=n.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode;){if(a(e,t,n))return!0;e=e.parentNode}return e}(e.target,t.componentNode,t.props.outsideClickIgnoreClass)===document&&t.__outsideClickHandler(e))},e.forEach(function(e){document.addEventListener(e,l[t._uid],d(t,e))})}},t.disableOnClickOutside=function(){delete f[t._uid];var e=l[t._uid];if(e&&"undefined"!=typeof document){var n=t.props.eventTypes;n.forEach||(n=[n]),n.forEach(function(n){return document.removeEventListener(n,e,d(t,n))}),delete l[t._uid]}},t.getRef=function(e){return t.instanceRef=e},t._uid=c(),t}p=n,(i=h).prototype=Object.create(p.prototype),i.prototype.constructor=i,i.__proto__=p;var m=h.prototype;return m.getInstance=function(){if(!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},m.componentDidMount=function(){if("undefined"!=typeof document&&document.createElement){var e=this.getInstance();if(t&&"function"==typeof t.handleClickOutside&&(this.__clickOutsideHandlerProp=t.handleClickOutside(e),"function"!=typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=Object(o.findDOMNode)(this.getInstance()),this.enableOnClickOutside()}},m.componentDidUpdate=function(){this.componentNode=Object(o.findDOMNode)(this.getInstance())},m.componentWillUnmount=function(){this.disableOnClickOutside()},m.render=function(){var t=this.props,n=(t.excludeScrollbar,function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},h}(r.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},i}},function(e,t,n){"use strict";var r=n(16),o=n.n(r),a=n(14),i=n(17),u=n(11),s=n(26),c=Object(i.withEffects)(function(e){var t=e.mount,n=e.unmount,r=e.useEvent("openMediaBrowserEvent"),a=o()(r,2),c=a[0],l=a[1];return Object(u.merge)(Object(u.pipe)(t,Object(u.map)(function(){return{type:"INIT"}})),Object(u.pipe)(n,Object(u.map)(function(){return{type:"DESTROY"}})),Object(u.pipe)(Object(s.a)({openMediaBrowser:l}),Object(u.map)(i.toProps)),Object(u.pipe)(c,Object(u.map)(function(e){return{type:"OPEN",payload:e}})))},{handler:function(e){var t=null;return function(n){switch(n.type){case"INIT":var r=e.onSelect,o=e.typeFilter;(t=wp.media({title:e.title,library:{type:o},button:{text:e.buttonLabel},multiple:e.multiple})).on("select",function(){var e=t.state().get("selection").toJSON();r(e)});break;case"OPEN":t&&t.open();break;case"DESTROY":t=null}}}});t.a=Object(a.compose)(c)(function(e){return(0,e.children)({openMediaBrowser:e.openMediaBrowser})})},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(313),n(31)),w=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():e.createElement(E.a,null)}}]),n}(y.Component);t.a=w}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(3),g=n.n(m),v=n(55),b=function(t){function n(){var e,t;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i1?t.setState(function(e){return{menuVisible:!e.menuVisible}}):r(n[0])}),g()(h()(h()(t)),"handleItemClick",function(e){t.setState({menuVisible:!1}),t.props.onSelect(e)}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.buttonText,o=n.groups;return e.createElement("div",{className:"cf-complex__inserter"},e.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},r),o.length>1&&e.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},o.map(function(n,r){return e.createElement("li",{className:"cf-complex__inserter-item",key:r,onClick:function(){return t.handleItemClick(n)}},n.label)})))}}]),n}(n(2).Component);t.a=Object(v.a)(b)}).call(this,n(2))},function(e,t,n){"use strict";var r=u(n(305)),o=u(n(310)),a=u(n(115)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:a.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(319),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(79),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(63)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(85)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(44),o=n(190),a=n(191),i=n(192),u=n(193),s=n(194);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(33)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(199),o=n(206),a=n(208),i=n(209),u=n(210);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0?e.createElement("select",{id:n,name:r,value:o||Object(b.get)(a.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},a.options.map(function(t){return e.createElement("option",{key:t.value,value:t.value},t.label)})):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return i});var r=n(2),o=Object(r.createContext)(!1),a=o.Provider,i=o.Consumer},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(37))},function(e,t,n){var r=n(172),o=n(42);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(174),o=n(82),a=n(23),i=n(62),u=n(83),s=n(84),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,h=d?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||h.push(g);return h}},function(e,t,n){var r=n(175),o=n(27),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&el))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=l}function E(){var e=o();if(y(e))return w(e);p=setTimeout(E,function(e){var n=t-(e-d);return g?u(n,l-(e-h)):n}(e))}function w(e){return p=void 0,v&&s?b(e):(s=c=void 0,f)}function x(){var e=o(),n=y(e);if(s=arguments,c=this,d=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(E,t),m?b(e):f}(d);if(g)return p=setTimeout(E,t),b(d)}return void 0===p&&(p=setTimeout(E,t)),f}return t=a(t)||0,r(n)&&(m=!!n.leading,l=(g="maxWait"in n)?i(a(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,s=d=c=p=void 0},x.flush=function(){return void 0===p?f:w(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(284)),o=a(n(286));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,i.polyfill)(p);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(113),i=n(311);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";(function(e){var r=n(19),o=n.n(r),a=n(20),i=n.n(a),u=n(14),s=n(22),c=n(4),l=(n(320),n(148)),f=n(35);t.a=Object(u.compose)(Object(s.withSelect)(function(e,t){var n=e("carbon-fields/core"),r=n.getValidationError,o=n.isFieldVisible;return{error:r(t.id),hidden:!o(t.id)}}),Object(f.a)("carbon-fields.field-wrapper"))(function(t){var n=t.id,r=t.field,a=t.error,u=t.hidden,s=t.className,f=t.children,p=r.width?{flexBasis:"".concat(r.width,"%")}:null,d=["cf-field","cf-".concat(Object(c.kebabCase)(r.type)),{"cf-field--has-width":!!r.width,"cf-field--invalid":!!a},s].concat(o()(r.classes));return e.createElement("div",{className:i()(d),style:p,hidden:u},e.createElement("div",{className:"cf-field__head"},r.label&&e.createElement("label",{className:"cf-field__label",htmlFor:n},r.label,r.required&&e.createElement("span",{className:"cf-field__asterisk"},"*"))),!u&&e.createElement("div",{className:"cf-field__body"},f),u&&e.createElement(l.a,{className:"cf-field__body"},f),r.help_text&&e.createElement("em",{className:"cf-field__help",dangerouslySetInnerHTML:{__html:r.help_text}}),a&&e.createElement("span",{className:"cf-field__error"},a))})}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(16),i=n.n(a),u=n(19),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(10),b=n.n(v),y=n(0),E=n.n(y),w=n(3),x=n.n(w),O=n(38),_=n.n(O),C=n(5),k=n(2),S=n(14),j=n(18),D=n(17),A=n(20),M=n.n(A),T=n(4),F=n(11),P=n(26),N=(n(160),n(39)),I=n(36),L=n(54),R=function(t){function n(){var e,t;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&a.length>=r.max?alert(Object(C.sprintf)(Object(C.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(i(o,s()(a).concat([Object(T.pick)(e,"id","type","subtype")])),u({selectedOptions:s()(c).concat([e])})))}),x()(E()(E()(t)),"handleRemoveItem",function(e){var n=t.props,r=n.value,o=n.id,a=n.onChange,i=n.setState,u=n.selectedOptions;a(o,Object(T.without)(r,e)),i({selectedOptions:Object(T.without)(u,e)})}),x()(E()(E()(t)),"handleSort",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),t}return b()(n,t),p()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var t=this,n=this.props,r=n.name,o=n.value,a=n.field,i=n.totalOptionsCount,u=n.selectedOptions,s=n.queryTerm,c=this.props.options;return a.duplicates_allowed||(c=_()(c,function(e){e.map(function(e){return e.disabled=!!Object(T.find)(o,function(t){return Object(T.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),e.createElement(k.Fragment,null,e.createElement("div",{className:"cf-association__bar"},e.createElement(N.a,{value:s,onChange:this.handleSearchChange}),e.createElement("span",{className:"cf-association__counter"},Object(C.sprintf)(Object(C.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(c.length),Number(i)))),e.createElement("div",{className:"cf-association__cols"},e.createElement("div",{className:"cf-association__col"},c.map(function(n,r){return e.createElement("div",{className:M()("cf-association__option",{"cf-association__option--selected":n.disabled}),key:r},n.thumbnail&&e.createElement("img",{className:"cf-association__option-thumb",src:n.thumbnail}),e.createElement("div",{className:"cf-association__option-content"},e.createElement("span",{className:"cf-association__option-title"},n.title),e.createElement("span",{className:"cf-association__option-type"},n.type)),e.createElement("div",{className:"cf-association__option-actions"},e.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:n.edit_link}),!n.disabled&&(a.max<0||o.length0&&t.length=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(163),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;t.setState({currentTab:Object(k.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),x()(E()(E()(t)),"handleToggleAllClick",function(){var e=t.props,n=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!n)}),x()(E()(E()(t)),"handleGroupsSortStart",function(e,n){var r=t.props,o=r.value,a=r.groupIdKey,i=n.item.index(),u=Object(k.get)(o,"".concat(i,".").concat(a),null);t.setState({currentDraggedGroup:u})}),x()(E()(E()(t)),"handleGroupsSortUpdate",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),x()(E()(E()(t)),"handleGroupsSortStop",function(){t.setState({currentDraggedGroup:null})}),x()(E()(E()(t)),"handleTabsChange",function(e){t.setState({currentTab:e})}),t}return b()(n,t),p()(n,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(k.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=s()(e,2),o=r[0],a=r[1],u=Object(k.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(k.isString)(u.label_template))return u.label;try{return Object(k.template)(u.label_template)(i()({$_index:n},a))||u.label}catch(e){return console.error(Object(C.sprintf)(Object(C.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var t=this,n=this.state,r=n.currentDraggedGroup,a=n.currentTab,i=this.props,u=i.value,s=i.field,c=i.groupIdKey,l=i.groupFilterKey,f=i.allGroupsAreCollapsed,p=i.onGroupSetup,d=i.onGroupFieldSetup,h=i.onToggleGroup,m=this.getAvailableGroups(l),g=this.getGroupLabels(),v=u.map(function(e,t){return{id:e[c],label:g[t]}});return e.createElement(_.Fragment,null,this.isTabbed&&!!u.length&&e.createElement(S.a,{items:u,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===s.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},e.createElement(j.a,{ref:this.tabsList,items:v,current:a,layout:s.layout,onChange:this.handleTabsChange},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:"+",groups:m,onSelect:this.handleAddGroup}))),!u.length&&e.createElement(M.a,{label:"There are no entries yet."},e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup})),!!u.length&&e.createElement(S.a,{items:u,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},e.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},u.map(function(n,i){return e.createElement(A.a,o()({key:"".concat(n[l],"-").concat(i)},p(n,{index:i,label:g[i],dragged:n[c]===r,tabbed:t.isTabbed,hidden:t.isTabbed&&n[c]!==a,allowClone:s.duplicate_groups_allowed&&!t.isMaximumReached,onFieldSetup:d,onClone:t.handleCloneGroup,onRemove:t.handleRemoveGroup,onToggle:h})))}))),!this.isTabbed&&!!u.length&&e.createElement("div",{className:"cf-complex__actions"},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup}),e.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},f?Object(C.__)("Expand All","carbon-fields-ui"):Object(C.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(C.sprintf)(Object(C.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),n}(_.Component);Object(O.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(t){return function(n){var r=n.field;return"complex"!==r.type?e.createElement(t,n):e.createElement(t,o()({className:"cf-complex--".concat(r.layout)},n))}}),Object(O.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(k.isEmpty)(t))return Object(C.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===l.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);l.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return l.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();f.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},f.defaultProps={options:{}},t.default=f},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=function(t){function n(){return i()(this,n),l()(this,p()(n).apply(this,arguments))}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.value,a=t.field;return e.createElement("input",o()({type:"hidden",name:n,value:r,className:"hidden-text"},a.attributes))}}]),n}(n(2).Component);t.a=m}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(2);t.a=function(t){var n=t.field;return e.createElement(r.RawHTML,{className:"cf-html__content"},n.html)}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(26),x=n(2),O=n(5),_=n(17),C=n(4),k=n(11),S=(n(295),n(39)),j=n(132),D=function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1})}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?e.createElement(b.a,{id:n,name:r,value:this.filterValues(o),options:a.options,delimiter:a.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){(function(t){for(var r=n(304),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],c=0;!u&&c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(14),w=n(5),x=n(17),O=n(11),_=n(26),C=n(4),k=(n(312),n(39)),S=n(141),j=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.embedCode,i=t.embedType,u=t.provider;return e.createElement("div",{ref:this.node},e.createElement(k.a,{id:n,value:o,onChange:this.handleChange}),a?e.createElement(S.a,{html:a,type:i,provider:u}):null,e.createElement("input",{type:"hidden",name:r,value:o,readOnly:!0}))}}]),n}(y.Component),D=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),A=Object(x.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=o()(t,2),r=n[0],a=n[1],i=Object(O.pipe)(Object(_.a)({onFetchEmbedCode:a}),Object(O.map)(x.toProps)),u=Object(O.pipe)(r,Object(O.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(O.merge)(i,u)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(w.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(w.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}});t.a=Object(E.compose)(D,A)(j)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(2),g=function(t){function n(){var e;return o()(this,n),(e=s()(this,l()(n).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(h()(h()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(h()(h()(e))),e}return p()(n,t),i()(n,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,c=u.height;"resize"!==o||s===a&&c===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var t=this;return e.createElement("div",{className:"cf-oembed__preview"},e.createElement("iframe",{ref:function(e){return t.iframe=e},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var t="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",n="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(t,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),r=e.createElement("html",{lang:document.documentElement.lang},e.createElement("head",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),e.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},e.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),e.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:n}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(m.renderToString)(r)),this.iframe.contentWindow.document.close()}}}]),n}(m.Component);t.a=g}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(29),i=n(57);n(314),t.a=Object(a.a)(function(t){return o()({},t,{field:o()({},t.field,{options:t.field.options.map(function(t){return o()({},t,{label:e.createElement("img",{className:"cf-radio-image__image",src:t.label})})})})})})(i.a)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(5),O=n(4),_=n(20),C=n.n(_),k=function(t){function n(){var e;return s()(this,n),e=p()(this,h()(n).call(this)),E()(b()(b()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(O.isString)(t)?t:t.target.value)}),E()(b()(b()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=i()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=i()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return g()(n,t),l()(n,[{key:"componentDidMount",value:function(){this.props.visible&&(this.timer=setTimeout(this.initEditor,250))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.destroyEditor()}},{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field,s=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":u.rich_editing},{"html-active":!u.rich_editing}],c=u.media_buttons?Object(O.template)(u.media_buttons)({id:r}):null;return e.createElement("div",{id:"wp-".concat(r,"-wrap"),className:C()(s),ref:function(e){return t.editorNode=e}},u.media_buttons&&e.createElement("div",{id:"wp-".concat(r,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},e.createElement("span",{dangerouslySetInnerHTML:{__html:c}})),u.rich_editing&&e.createElement("div",{className:"wp-editor-tabs"},e.createElement("button",{type:"button",id:"".concat(r,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":r},Object(x.__)("Visual","carbon-fields-ui")),e.createElement("button",{type:"button",id:"".concat(r,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":r},Object(x.__)("Text","carbon-fields-ui"))),e.createElement("div",{id:"wp-".concat(r,"-editor-container"),className:"wp-editor-container"},e.createElement("textarea",o()({style:{width:"100%"},className:"regular-text",id:r,name:a,value:i,onChange:this.handleChange},u.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),n}(w.Component);t.a=k}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(2),h=(n(316),function(t){function n(){return o()(this,n),s()(this,l()(n).apply(this,arguments))}return p()(n,t),i()(n,[{key:"render",value:function(){return e.createElement("h3",null,this.props.field.label)}}]),n}(d.Component));t.a=h}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(4),w=(n(317),n(31)),x=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1}),t}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field;return u.options.length>0?e.createElement("ul",{className:"cf-set__list"},u.options.map(function(n,s){return e.createElement("li",{className:"cf-set__list-item",key:s},e.createElement("input",o()({type:"checkbox",id:"".concat(r,"-").concat(n.value),name:"".concat(a,"[]"),checked:t.isChecked(i,n),value:n.value,className:"cf-set__input",onChange:t.handleChange},u.attributes)),e.createElement("label",{className:"cf-set__label",htmlFor:"".concat(r,"-").concat(n.value)},n.label))})):e.createElement(w.a,null)}}]),n}(y.Component);t.a=x}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(26),E=n(2),w=n(5),x=n(17),O=n(4),_=n(11),C=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;ar&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===f.inserted[v]&&(n="",h(e,t),f.inserted[v]=n)}var O=function(){var e=w.apply(this,arguments),t=a+"-"+v;return void 0===f.registered[t]&&(f.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){f.inserted[e]=!0}if(l){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){l&&(d.flush(),d.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},C=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function A(e){return D(e)?window.pageYOffset:e.scrollTop}function M(e,t){D(e)?window.scrollTo(0,t):e.scrollTop=t}function T(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k,a=A(e),i=t-a,u=0;!function t(){var s,c=i*((s=(s=u+=10)/n-1)*s*s+1)+a;M(e,c),u=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&T(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&w>=r)return a&&T(s,_,160),{placement:"bottom",maxHeight:i?w-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&E>=r)&&(k=i?E-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return M(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&T(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&E>=r){var S=t;return(!i&&x>=r||i&&E>=r)&&(S=i?E-y:x-y),a&&T(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!l,isFixedPosition:l,theme:s});c&&c(f),r.setState(f)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||P(e);return E({},r.props,{placement:t,maxHeight:r.state.maxHeight})},O(r,n)}return w(t,e),b(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(a.Component);N.contextTypes={getPortalPlacement:l.a.func};var I=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},L=I,R=I,H=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};H.defaultProps={children:"No options"};var V=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};V.defaultProps={children:"Loading..."};var B=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=l-f-c,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),p.scrollTop=l,m=!0,r.isBottom=!0):!d&&-t>c&&(i&&!r.isTop&&i(e),p.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},O(r,n)}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return i.a.createElement(Z,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(a.Component),le=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=x(e,["isEnabled"]);return t?i.a.createElement(ce,n):this.props.children}}]),t}(a.Component);le.defaultProps={isEnabled:!0};var fe=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,s=e.hasValue;return i.a.createElement("div",{className:r(Object(u.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s},n)},t)}}]),t}(a.Component),pe=function(e){var t=e.size,n=x(e,["size"]);return i.a.createElement("svg",E({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(u.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},de=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},he=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},me=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},ge=me,ve=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};ve.defaultProps={children:i.a.createElement(he,null)};var be=me,ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};ye.defaultProps={children:i.a.createElement(de,null)};var Ee=function(e){var t=e.color,n=e.delay,r=e.offset;return i.a.createElement("span",{className:Object(u.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(u.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var we=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,s=e.isRtl,c=e.theme.colors,l=a?c.neutral80:c.neutral20;return i.a.createElement("div",E({},o,{className:n(Object(u.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),i.a.createElement(Ee,{color:l,delay:0,offset:s}),i.a.createElement(Ee,{color:l,delay:160,offset:!0}),i.a.createElement(Ee,{color:l,delay:320,offset:!s}))};we.defaultProps={size:4};var xe=function(e){var t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)},Oe=xe,_e=xe,Ce=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)}}]),t}(a.Component);Ce.defaultProps={children:i.a.createElement(de,{size:14})};var ke=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,s=e.getStyles,c=e.innerProps,l=e.isDisabled,f=e.removeProps,p=e.selectProps,d=r.Container,h=r.Label,m=r.Remove,g=E({className:o(Object(u.a)(s("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":l},n)},c),v={className:o(Object(u.a)(s("multiValueLabel",this.props)),{"multi-value__label":!0},n)},b=E({className:o(Object(u.a)(s("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},f);return i.a.createElement(d,{data:a,innerProps:g,selectProps:p},i.a.createElement(h,{data:a,innerProps:v,selectProps:p},t),i.a.createElement(m,{data:a,innerProps:b,selectProps:p}))}}]),t}(a.Component);ke.defaultProps={cropWithEllipsis:!0};var Se={ClearIndicator:ye,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,c=e.innerRef,l=e.innerProps;return i.a.createElement("div",E({ref:c,className:n(Object(u.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":s},o)},l),t)},DropdownIndicator:ve,DownChevron:he,CrossIcon:de,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,c=e.label,l=e.theme;return i.a.createElement("div",{className:r(Object(u.a)(o("group",e)),{group:!0},n)},i.a.createElement(a,E({},s,{theme:l,getStyles:o,cx:r}),c),i.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=x(e,["className","cx","getStyles","theme"]);return i.a.createElement("div",E({className:n(Object(u.a)(r("groupHeading",E({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return i.a.createElement("div",{className:r(Object(u.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return i.a.createElement("span",E({},o,{className:n(Object(u.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,s=e.isDisabled,c=e.theme,l=x(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return i.a.createElement("div",{className:Object(u.a)(r("input",E({theme:c},l)))},i.a.createElement(p.a,E({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:s},l)))},LoadingIndicator:we,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps,c=r(Object(u.a)(o("menu",e)),{menu:!0},n);return i.a.createElement("div",E({className:c},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef;return i.a.createElement("div",{className:r(Object(u.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:s},t)},MenuPortal:B,LoadingMessage:V,NoOptionsMessage:H,MultiValue:ke,MultiValueContainer:Oe,MultiValueLabel:_e,MultiValueRemove:Ce,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,c=e.isSelected,l=e.innerRef,f=e.innerProps;return i.a.createElement("div",E({ref:l,className:r(Object(u.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":c},n)},f),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,c=e.isRtl;return i.a.createElement("div",E({className:r(Object(u.a)(o("container",e)),{"--is-disabled":s,"--is-rtl":c},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:fe},je=function(e){return E({},Se,e.components)},De={clearIndicator:be,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:ge,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:R,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return y(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),y(t,"backgroundColor",i.neutral0),y(t,"borderRadius",o),y(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),y(t,"marginBottom",a.menuGutter),y(t,"marginTop",a.menuGutter),y(t,"position","absolute"),y(t,"width","100%"),y(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:L,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ae={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Me={backspaceRemovesValue:!0,blurInputOnSelect:F(),captureMenuScroll:!F(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=E({ignoreCase:!0,ignoreAccents:!0,stringify:K,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?$(t):t,c=i?$(a(e)):a(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=q(s),c=q(c)),"start"===u?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Te=1,Fe=function(e){function t(e){v(this,t);var n=O(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pe.call(n);var r=e.value;n.cacheComponents=h(n.cacheComponents,Y).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Te);var o=j(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=j(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!u&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?M(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,c=-1;if(a.length){switch(e){case"previous":c=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ae):E({},Ae,this.props.theme):Ae}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,c=this.state.selectValue,l=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+S(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:l,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var c=a?void 0:function(){return n.onOptionHover(e)},l=a?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:l,onMouseMove:c,onMouseOver:c,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:f,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,c=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,c=r||this.getElementId("input");if(!n)return i.a.createElement(J,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:k,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,d=f.theme;return i.a.createElement(u,E({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,f=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,h=l.inputValue,m=l.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue;if(!this.hasValue()||!f)return h?null:i.a.createElement(s,E({},c,{key:"placeholder",isDisabled:p}),m);if(d)return v.map(function(t){var u=t===b;return i.a.createElement(n,E({},c,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var y=v[0];return i.a.createElement(u,E({},c,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:u,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?i.a.createElement(e,E({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.a.createElement(n,E({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,O=m.maxMenuHeight,_=m.menuIsOpen,C=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,j=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,A=m.noOptionsMessage,M=m.onMenuScrollToTop,T=m.onMenuScrollToBottom;if(!_)return null;var F=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,i.a.createElement(l,E({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},P=void 0;if(this.hasOptions())P=h.render.map(function(t){if("group"===t.type){t.type;var o=x(t,["type"]),a=t.key+"-heading";return i.a.createElement(n,E({},f,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return F(e)}))}if("option"===t.type)return F(t)});else if(b){var I=y({inputValue:v});if(null===I)return null;P=i.a.createElement(s,f,I)}else{var L=A({inputValue:v});if(null===L)return null;P=i.a.createElement(c,f,L)}var R={minMenuHeight:w,maxMenuHeight:O,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:D},H=i.a.createElement(N,E({},f,R),function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return i.a.createElement(o,E({},f,R,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),i.a.createElement(le,{isEnabled:g,onTopArrive:M,onBottomArrive:T},i.a.createElement(se,{isEnabled:j},i.a.createElement(a,E({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),P))))});return S||"fixed"===k?i.a.createElement(u,E({},f,{appendTo:S,controlElement:this.controlRef,menuPlacement:C,menuPosition:k}),H):H}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(o){if(n){var s=u.map(function(t){return e.getOptionValue(t)}).join(n);return i.a.createElement("input",{name:a,type:"hidden",value:s})}var c=u.length>0?u.map(function(t,n){return i.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):i.a.createElement("input",{name:a,type:"hidden"});return i.a.createElement("div",null,c)}var l=u[0]?this.getOptionValue(u[0]):"";return i.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?i.a.createElement(X,{"aria-live":"assertive"},i.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),i.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,u=a.className,s=a.id,c=a.isDisabled,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.a.createElement(r,E({},f,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:l}),this.renderLiveRegion(),i.a.createElement(t,E({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:l}),i.a.createElement(o,E({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),i.a.createElement(n,E({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(a.Component);Fe.defaultProps=Me;var Pe=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=je({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(C(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=De[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,E({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=_(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=_(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof l&&(l(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!c||!f||!m||p&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(c){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":c?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!c){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":c?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":c?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!c)return;e.focusOption("pageup");break;case"PageDown":if(!c)return;e.focusOption("pagedown");break;case"Home":if(!c)return;e.focusOption("first");break;case"End":if(!c)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Ne=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;v(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=c(n(1)),o=c(n(21)),a=c(n(25)),i=n(52),u=c(n(289)),s=c(n(290));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,c=e.hsv,l=e.hsl,f=e.onChange,p=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:l,hsv:c,onChange:f})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:l,onChange:f})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:l,renderers:m,onChange:f}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:l,hex:o,onChange:f,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:f,onSwatchHover:p}))};l.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},l.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(l)},function(e,t,n){"use strict";var r=n(167);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(169)),o=u(n(61)),a=u(n(180)),i=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(32),o=n(23),a=n(27);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(41),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(173)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(45);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(44);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(44),o=n(71),a=n(72);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(86),o=n(196),a=n(28),i=n(90),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t,n){var r,o=n(197),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(200),o=n(44),a=n(71);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(201),o=n(202),a=n(203),i=n(204),u=n(205);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(244);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(69),o=n(103),a=n(104),i=n(246),u=n(247),s=n(250),c=n(251),l=n(252),f=n(253),p=n(94),d=n(254),h=n(48),m=n(255),g=n(256),v=n(261),b=n(23),y=n(62),E=n(263),w=n(28),x=n(265),O=n(42),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var T,F=1&n,P=2&n,N=4&n;if(j&&(T=A?j(t,D,A,M):j(t)),void 0!==T)return T;if(!w(t))return t;var I=b(t);if(I){if(T=m(t),!F)return c(t,T)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,F);if(L==k||L==_||R&&!A){if(T=P||R?{}:v(t),!F)return P?f(t,u(T,t)):l(t,i(T,t))}else{if(!S[L])return A?t:{};T=g(t,L,F)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,T),x(t))return t.forEach(function(r){T.add(e(r,n,j,r,t,M))}),T;if(E(t))return t.forEach(function(r,o){T.set(o,e(r,n,j,o,t,M))}),T;var V=N?P?d:p:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(T,o,e(r,n,j,o,t,M))}),T}},function(e,t,n){var r=n(33),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(51),o=n(42);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(51),o=n(106);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(28),o=n(67),a=n(249),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(63)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*c/a)/100,n.hsl.a!==l)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:l,source:"rgb"}}else{var f;if(f=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==f)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*c/a+100)/100,n.hsl.h!==l)return{h:l,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==f)return{h:f,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?c=a:l<0?l=0:l>i&&(l=i);var f=100*c/a,p=-100*l/i+100;return{h:n.hsl.h,s:f,v:p,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=F(e,360),t=F(t,100),n=F(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,f,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=T(s),{ok:h,format:e.format||m,r:c(255,l(u.r,0)),g:c(255,l(u.g,0)),b:c(255,l(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r,o,a=l(e,t,n),i=c(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(p(r));return a}function D(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(p({h:r,s:o,v:a})),a=(a+u)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*F(this._r,255))+"%",g:s(100*F(this._g,255))+"%",b:s(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%)":"rgba("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),a=n/100;return p({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,a=p.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},p.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;cs&&(s=r,u=p(t[c]));return p.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var A=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,l(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:l.fields,className:"flexbox-fix"},r.default.createElement("div",{style:l.double},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"hex",value:s.replace("#",""),onChange:f})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.alpha},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:f,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},c={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},l=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},f=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r,a){if(0===e||e){var s,c=a||o,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var f=t||(n||g).dateFormat,p=String(e).trim();if("today"===p)s=new Date,r=!0;else if(/Z$/.test(p)||/GMT$/.test(p))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,f);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function E(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(l=o===s.hourElement?l-i-t(!s.amPM):a,p&&N(void 0,1,s.hourElement)),s.amPM&&f&&(1===u?l+c===23:Math.abs(l-c)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(l)}}(n);var r=s._input.value;C(),ge(),s._input.value!==r&&s._debouncedChange()}}function C(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var c=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,c.getHours()))===c.getHours()&&(o=Math.max(o,c.getMinutes())),o===c.getMinutes()&&(a=Math.max(a,c.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function T(){fe("onChange")}function F(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function L(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===p(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===p(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===p(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&p(e,s.selectedDates[0])>=0&&p(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),fe("onDayCreate",a),a}function R(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var c=o.children[u];if(-1===c.className.indexOf("hidden")&&J(c.dateObj))return c}}function V(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,c=i.children.length,l=u;l>=0&&l0?c:-1);l+=o){var f=i.children[l];if(-1===f.className.indexOf("hidden")&&J(f.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return R(f)}s.changeMonth(o),V(H(o),0)}(r,t):R(r)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",c=i?"nextMonthDay hidden":"nextMonthDay",l=r+1-n,f=0;l<=r;l++,f++)a.appendChild(L(u,new Date(e,t-1,l),l,f));for(l=1;l<=o;l++,f++)a.appendChild(L("",new Date(e,t,l),l,f));for(var p=o+1;p<=42-n&&(1===s.config.showMonths||f%7!=0);p++,f++)a.appendChild(L(c,new Date(e,t+1,p%o),p,f));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,fe("onYearChange")),U(),fe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),fe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&p(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&p(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),V(H(1),0)):V(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),V(H(1),0)):a||V(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var c=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),l=c.indexOf(e.target);if(-1!==l){var f=c[l+(e.shiftKey?-1:1)];void 0!==f?(e.preventDefault(),f.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],C(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],C(),ge()}fe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,c=0,l=r;lr&&lu)?u=l:l>n&&(!c||l0&&l0&&l>c;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=l||(nt&&l===n&&a.classList.add("endRange"),l>=u&&(0===c||l<=c)&&d(l,n,t)&&a.classList.add("inRange")))))},v=0,b=p.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===_.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},_.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?_.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=l(s),s.parseDate=f({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){fe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),c=window.innerHeight-u.bottom,l="above"===a||"below"!==a&&cn,f=window.pageYOffset+u.top+(l?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!l),v(s.calendarContainer,"arrowBottom",l),!s.config.inline){var p=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=p+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=f+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=p+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==p(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&fe("onYearChange"),fe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():R(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,c="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||c)&&ie()}T()}}s.parseDate=f({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&fe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),fe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&fe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=F,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void fe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),fe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),F(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);ce(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),F(),k(),ge(t),t&&fe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function ce(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function le(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function fe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&fe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=le(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=le(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):_.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):_.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var c=0;c-1?s.config[p]=r(f[p]).map(g).concat(s.config[p]):void 0===t[p]&&(s.config[p]=f[p])}fe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&ce(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),fe("onChange"),fe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(T,w),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),T()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),fe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(e[s=l[c]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&E(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!E(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=g,f.ok=v,f.equal=function(e,t,n){e!=t&&g(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(37))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var c,E="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(E=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(E=" "+RegExp.prototype.toString.call(n)),w(n)&&(E=" "+Date.prototype.toUTCString.call(n)),x(n)&&(E=" "+f(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,C)):C[0]+E+C[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return E(e)&&"[object RegExp]"===_(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===_(e)}function x(e){return E(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=E,t.isDate=w,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(299);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(300),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(37),n(111))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(111))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(306)),o=u(n(309)),a=u(n(1)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var c=o in t,l=o in u,f=t[o],p=(0,r.isValidElement)(f)&&!f.props.in;!l||c&&!p?l||!c||p?l&&c&&(0,r.isValidElement)(f)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:f.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(f.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return l()({},e,s()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(f.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function d(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function h(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function m(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function g(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function v(e,t){return e.validation[t]||null}function b(e,t){return-1===e.hiddenFields.indexOf(t)}Object(i.registerStore)("carbon-fields/core",{reducer:p,actions:r,selectors:o});var y=n(18),E=n.n(y),w=n(14),x=n(19),O=n(35),_=n(34),C=n(117),k=n(119),S=n(120),j=n(124),D=n(29),A=n(40),M=Object(D.a)(function(e){return l()({},e,{buttonText:Object(a.__)("Select Date","carbon-fields-ui")})})(A.a),T=n(76),F=n(129),P=n(130),N=n(131),I=n(134),L=n(136),R=n(140),H=n(57),V=n(142),B=n(143),U=n(77),z=n(144),W=n(145),Y=n(146),G=n(147),q=n(60),$=Object(D.a)(function(e){return l()({},e,{icon:"clock",buttonText:Object(a.__)("Select Time","carbon-fields-ui")})})(A.a);Object(x.addFilter)("carbon-fields.register-field-type","carbon-fields/core",function(e,t,n){return Object(w.compose)(Object(O.a)("carbon-fields.field-edit.".concat(t)),Object(O.a)("carbon-fields.".concat(e,".").concat(t)))(n)}),[["association",C.a],["checkbox",k.a],["color",S.a],["complex",j.a],["date",M],["date_time",A.a],["file",T.a],["footer_scripts",q.a],["gravity_form",U.a],["header_scripts",q.a],["hidden",F.a],["html",P.a],["image",T.a],["map",N.a],["multiselect",L.a],["media_gallery",I.a],["oembed",R.a],["radio",H.a],["radio_image",V.a],["rich_text",B.a],["select",U.a],["separator",z.a],["set",W.a],["sidebar",Y.a],["text",G.a],["textarea",q.a],["time",$]].forEach(function(e){return _.b.apply(void 0,E()(e))});var K=n(53),X=n(116),J=n(16),Z=n.n(J),Q=function(e,t){return e===t},ee=n(17),te=n(11),ne=Object(ee.withEffects)(function(e,t){if(t.field.required){var n=e.mount,r=e.unmount,o=e.observe("value"),a=e.observe("visible");return Object(te.merge)(Object(te.pipe)(Object(te.combine)(o,a,n),Object(te.filter)(function(e){return Z()(e,2)[1]}),Object(te.take)(1),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:Z()(e,1)[0],transient:!0}}})),Object(te.pipe)(o,function(e){return function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(o=n,e(0,function(e,t){0===e?(a=t)(1):1===e&&(i=!0,a(2))})),1===t?i?r(1,n):o(1):r(t,n)})}}}}(n),function(e){return void 0===e&&(e=Q),function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(a=n),1===t?i&&e(o,n)?a(1):(i=!0,o=n,r(1,n)):r(t,n)})}}}}(),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:e,transient:!1}}})),Object(te.pipe)(r,Object(te.map)(function(){return{type:"RESET"}})))}},{handler:function(e){return function(t){var n=e.id,r=e.field,o=e.markAsInvalid,i=e.markAsValid,u=e.lockSaving,s=e.unlockSaving;switch(t.type){case"VALIDATE":var c=t.payload,l=c.value,p=c.transient,d="carbon-fields.".concat(r.type,".validate"),h=Object(x.hasFilter)(d)?Object(x.applyFilters)(d,r,l):function(e){var t=Object(f.isObject)(e);return t&&!Object(f.isEmpty)(e)||!t&&e?null:Object(a.__)("This field is required.","carbon-fields-ui")}(l);h?(p||o(n,h),u(n)):(p||i(n),s(n));break;case"RESET":i(n),s(n)}}}}),re=Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{markAsValid:t.markAsValid,markAsInvalid:t.markAsInvalid}}),oe=Object(w.compose)(re,ne);function ae(e,t){function n(t,n){if(!Object(f.isEmpty)(n.field.conditional_logic))return e(n,t)}function r(e){return function(n){var r=e.field.conditional_logic,o=r.relation,i=r.rules,u=t(e,n),s=i.reduce(function(e,t){if(!Object(f.has)(u,t.field))return console.error(Object(a.sprintf)(Object(a.__)('An unknown field is used in condition - "%s"',"carbon-fields-ui"),t.field)),e.concat(!1);var n=function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;case">":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(f.some)(n,function(t){return t==e});case"NOT IN":return Object(f.every)(n,function(t){return t!=e});case"INCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),c=!1;switch(o){case"AND":c=Object(f.every)(s);break;case"OR":c=Object(f.some)(s)}c?e.showField(e.id):e.hideField(e.id)}}return Object(w.createHigherOrderComponent)(function(e){return Object(w.compose)(Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(i.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(ee.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var ie=n(149),ue=n.n(ie),se="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function ce(){return"cf-".concat(ue()(se,21))}function le(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(e[s=l[c]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&E(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!E(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=g,f.ok=v,f.equal=function(e,t,n){e!=t&&g(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(37))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var c,E="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(E=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(E=" "+RegExp.prototype.toString.call(n)),w(n)&&(E=" "+Date.prototype.toUTCString.call(n)),x(n)&&(E=" "+f(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,C)):C[0]+E+C[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return E(e)&&"[object RegExp]"===_(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===_(e)}function x(e){return E(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=E,t.isDate=w,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(299);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(300),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(37),n(111))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(111))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(306)),o=u(n(309)),a=u(n(1)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var c=o in t,l=o in u,f=t[o],p=(0,r.isValidElement)(f)&&!f.props.in;!l||c&&!p?l||!c||p?l&&c&&(0,r.isValidElement)(f)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:f.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(p.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return f()({},e,c()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(p.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function h(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function m(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function g(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function v(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function b(e,t){return e.validation[t]||null}function y(e,t){return-1===e.hiddenFields.indexOf(t)}Object(u.registerStore)("carbon-fields/core",{reducer:d,actions:r,selectors:o});var E=n(19),w=n.n(E),x=n(14),O=n(35),_=n(34),C=n(117),k=n(119),S=n(120),j=n(124),D=n(29),A=n(40),M=Object(D.a)(function(e){return f()({},e,{buttonText:Object(a.__)("Select Date","carbon-fields-ui")})})(A.a),T=n(76),F=n(129),P=n(130),N=n(131),I=n(134),L=n(136),R=n(140),H=n(57),V=n(142),B=n(143),U=n(77),z=n(144),W=n(145),Y=n(146),G=n(147),q=n(60),$=Object(D.a)(function(e){return f()({},e,{icon:"clock",buttonText:Object(a.__)("Select Time","carbon-fields-ui")})})(A.a);Object(i.addFilter)("carbon-fields.register-field-type","carbon-fields/core",function(e,t,n){return Object(x.compose)(Object(O.a)("carbon-fields.field-edit.".concat(t)),Object(O.a)("carbon-fields.".concat(e,".").concat(t)))(n)}),[["association",C.a],["checkbox",k.a],["color",S.a],["complex",j.a],["date",M],["date_time",A.a],["file",T.a],["footer_scripts",q.a],["gravity_form",U.a],["header_scripts",q.a],["hidden",F.a],["html",P.a],["image",T.a],["map",N.a],["multiselect",L.a],["media_gallery",I.a],["oembed",R.a],["radio",H.a],["radio_image",V.a],["rich_text",B.a],["select",U.a],["separator",z.a],["set",W.a],["sidebar",Y.a],["text",G.a],["textarea",q.a],["time",$]].forEach(function(e){return _.b.apply(void 0,w()(e))});var K=n(53),X=n(116),J=n(16),Z=n.n(J),Q=function(e,t){return e===t},ee=n(17),te=n(11),ne=Object(ee.withEffects)(function(e,t){if(t.field.required){var n=e.mount,r=e.unmount,o=e.observe("value"),a=e.observe("visible");return Object(te.merge)(Object(te.pipe)(Object(te.combine)(o,a,n),Object(te.filter)(function(e){return Z()(e,2)[1]}),Object(te.take)(1),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:Z()(e,1)[0],transient:!0}}})),Object(te.pipe)(o,function(e){return function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(o=n,e(0,function(e,t){0===e?(a=t)(1):1===e&&(i=!0,a(2))})),1===t?i?r(1,n):o(1):r(t,n)})}}}}(n),function(e){return void 0===e&&(e=Q),function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(a=n),1===t?i&&e(o,n)?a(1):(i=!0,o=n,r(1,n)):r(t,n)})}}}}(),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:e,transient:!1}}})),Object(te.pipe)(r,Object(te.map)(function(){return{type:"RESET"}})))}},{handler:function(e){return function(t){var n=e.id,r=e.field,o=e.markAsInvalid,u=e.markAsValid,s=e.lockSaving,c=e.unlockSaving;switch(t.type){case"VALIDATE":var l=t.payload,f=l.value,d=l.transient,h="carbon-fields.".concat(r.type,".validate"),m=Object(i.hasFilter)(h)?Object(i.applyFilters)(h,r,f):function(e){var t=Object(p.isObject)(e);return t&&!Object(p.isEmpty)(e)||!t&&e?null:Object(a.__)("This field is required.","carbon-fields-ui")}(f);m?(d||o(n,m),s(n)):(d||u(n),c(n));break;case"RESET":u(n),c(n)}}}}),re=Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{markAsValid:t.markAsValid,markAsInvalid:t.markAsInvalid}}),oe=Object(x.compose)(re,ne);function ae(e,t){function n(t,n){if(!Object(p.isEmpty)(n.field.conditional_logic))return e(n,t)}function r(e){return function(n){var r=e.field.conditional_logic,o=r.relation,i=r.rules,u=t(e,n),s=i.reduce(function(e,t){if(!Object(p.has)(u,t.field))return console.error(Object(a.sprintf)(Object(a.__)('An unknown field is used in condition - "%s"',"carbon-fields-ui"),t.field)),e.concat(!1);var n=function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;case">":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(p.some)(n,function(t){return t==e});case"NOT IN":return Object(p.every)(n,function(t){return t!=e});case"INCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),c=!1;switch(o){case"AND":c=Object(p.every)(s);break;case"OR":c=Object(p.some)(s)}c?e.showField(e.id):e.hideField(e.id)}}return Object(x.createHigherOrderComponent)(function(e){return Object(x.compose)(Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(u.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(ee.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var ie=n(149),ue=n.n(ie),se="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function ce(){return"cf-".concat(ue()(se,21))}function le(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;nt=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const c=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,c),o=e((e,t)=>{r||0===e||(n(e,t),c(e))})})},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),c=n(25),i=n.n(c),a=n(26),u=n.n(a),s=n(27),l=n.n(s),d=n(28),f=n.n(d),p=n(29),b=n.n(p),m=n(8),v=n.n(m),O=n(9),j=n.n(O),g=n(31),y=n.n(g),h=n(7),_=n(0),w=n(4),E=(n(66),n(30)),x=function(t){function n(){var t,r;i()(this,n);for(var o=arguments.length,c=new Array(o),a=0;at=>(n,r)=>{if(0!==n)return;let o,c,i=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(c=[1,n]),2===t&&(i=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());i||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(c&&(o(...c),c=null));r(e,t)})},m=n(14),v=n(4);function O(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function j(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function g(e){for(var t=[],n=e,r=j(e);r>0&&n;)if(j(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var y={post_ancestors:[],post_parent_id:0,post_level:1};function h(e){var t=e.options[e.selectedIndex];return{post_ancestors:g(t),post_parent_id:O(t),post_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return h(e.target)}),b(h(e))):Object(p.a)(y)}),Object(u.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(l.pipe)(Object(l.combine)(Object(v.fromSelector)(Object(o.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"parent")),Object(m.a)(s.isEqual),Object(l.map)(function(e){var r=f()(e,3),o=r[0],c=r[1],i=r[2];if(i=parseInt(i,10),isNaN(i))return y;var a=t(c);if(!Object(s.get)(a,["hierarchical"],!1))return y;var u=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(s.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(i,n("postType",c,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:u,post_parent_id:i,post_level:u.length+1}}))});var _=n(35),w=n.n(_),E=(e,t,n)=>w()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let c=!1;const i=e=>{o(1,e)};o(0,r=>{2===r&&(c=!0,e.removeEventListener(t,i,n))}),c||e.addEventListener(t,i,n)})(e,n)),x={post_format:"standard"};function S(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(u.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(l.pipe)(E(e,"input.post-format","change"),Object(l.map)(function(e){return S(e.target)}),b(S(e.querySelector("input.post-format:checked")))):Object(p.a)(x)}),Object(u.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"format"),Object(m.a)(),Object(l.filter)(Boolean),Object(l.map)(function(e){return{post_format:e}}),b(x))});var I={post_template:""};function F(e){return{post_template:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return F(e.target)}),b(F(e))):Object(p.a)(I)}),Object(u.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"template"),Object(m.a)(),Object(l.filter)(s.isString),Object(l.map)(function(e){return{post_template:e}}),b(I))});var T=n(6),C=n.n(T),A=n(9),D=n.n(A),N=n(16),k=n.n(N);function G(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(G(window.tagBox,"parseTags"),G(window.tagBox,"flushTags")),Object(u.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(l.pipe)(l.merge.apply(void 0,k()((e=document.querySelectorAll('div[id^="taxonomy-"]'),k()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(l.pipe)(E(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(l.scan)(function(e,n){var r=n.target;return a()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(s.pull)(e[t],n)})},D()({},t,[])),b(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return k()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},D()({},e,[]))}(t)))}))).concat(k()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return k()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(l.pipe)(Object(l.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(l.map)(function(e){var n=e.target;return D()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),b(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return D()({},e,n)}(t)))})}()))),Object(l.scan)(function(e,t){return{post_term:C()({},e.post_term,t)}},{post_term:{}}));var e}),Object(u.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core").getTaxonomies,t=Object(o.select)("core/editor").getEditedPostAttribute;return Object(l.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(l.filter)(Boolean),Object(l.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(s.fromPairs)(n)}}))});var L={term_ancestors:[],term_parent:0,term_level:1};function P(e){var t=e.options[e.selectedIndex];return{term_ancestors:g(t),term_parent:O(t),term_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return P(e.target)}),b(P(e))):Object(p.a)(L)});var R={user_role:""};function V(e){return{user_role:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return t?Object(p.a)({user_role:t.dataset.profileRole}):Object(p.a)(R)}return Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return V(e.target)}),b(V(e)))});var B=n(7),q=n(5),U=n(21),M={operators:[],isOperatorSupported:function(e){return this.operators.indexOf(e)>-1},evaluate:function(){return!1}},Q={comparers:[C()({},M,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),C()({},M,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),C()({},M,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(s.intersection)(e,n).length;default:return!1}}}),H={boolean:K,post_term:$,post_ancestor_id:C()({},Q,{comparers:[W,z],getEnvironmentValue:function(e,t){return Object(s.get)(t,"post_ancestors",[])}}),post_parent_id:Q,post_level:Q,post_format:Q,post_template:Q,term_level:Q,term_parent:C()({},Q,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:C()({},Q,{comparers:[W,z],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(s.get)(t,"term_ancestors",[])}}),user_role:Q},J=Object(o.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),X=Object(c.withEffects)(function(e,t){var n=t.context,r=Object(u.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(u.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),c=Object(u.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),i=Object(u.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),d=Object(u.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),f=Object(u.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(l.pipe)(Object(l.merge)(r,o,c,i,d,f),Object(l.scan)(function(e,t){return a()(e,function(e){Object(s.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(s.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(s.get)(H,t.type);return r?r.isFulfiled(t,n):(console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=f()(e,2),o=r[0],c=r[1],i=document.getElementById(o),a=document.querySelector(".container-".concat(o));i&&(i.hidden=!c),a&&(c&&!a.dataset.mounted&&(a.dataset.mounted=!0,Object(U.b)(t[o],n)),!c&&a.dataset.mounted&&(delete a.dataset.mounted,Object(B.unmountComponentAtNode)(a)))})}}});t.a=Object(r.compose)(J,X)(function(){return null})},function(e,t,n){"use strict";var r=n(2),o=n(7),c=n(0),i=n(13),a=n(1);function u(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var s=n(18),l=n(22),d=n(21),f=n(17);function p(e){return e.indexOf(f.b)>-1}t.a=Object(i.withEffects)(function(){return Object(a.merge)(Object(a.pipe)(Object(l.a)(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(a.filter)(function(e){return p(e.$widget[0].id)}),Object(a.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(a.pipe)(Object(l.a)(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(a.filter)(function(e){var t=e.data;return Object(c.startsWith)(t,"deleted:")&&p(t)}),Object(a.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(r.select)("carbon-fields/metaboxes").getContainerById,n=Object(r.dispatch)("carbon-fields/metaboxes"),i=n.addContainer,a=n.removeContainer,l=n.addFields,p=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var b,m=e.payload,v=m.event,O=m.$widget,j=Object(c.flow)(u,JSON.parse)(O.find("[data-json]").data("json")),g=[];if("widget-updated"===v.type&&(b=t(j.id).fields.map(function(e){return e.id})),j.fields=j.fields.map(function(e){return Object(s.a)(e,j,g)}),l(g),i(j),"widget-updated"===v.type&&p(b),Object(d.b)(j,"classic"),window.cf.config.pagenow===f.c&&"widget-added"===v.type){var y=O.find('[name="widget-id"]').val();O.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(y).liveUpdateMode=!1}break;case"WIDGET_DELETED":var h=e.payload.data.replace("deleted:",""),w="".concat(f.a).concat(h),E=t(w);Object(o.unmountComponentAtNode)(document.querySelector(".container-".concat(w)));var x=_.map(E.fields,"id");a(w),p(x)}}}})(function(){return null})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";(function(e){var t=n(25),r=n.n(t),o=n(26),c=n.n(o),i=n(27),a=n.n(i),u=n(28),s=n.n(u),l=n(29),d=n.n(l),f=n(8),p=n.n(f),b=n(9),m=n.n(b),v=n(10),O=n.n(v),j=n(7),g=n(3),y=n(11),h=n(2),_=n(0),w=n(4),E=(n(47),n(30)),x=n(18),S=function(e){function t(){var e,n;r()(this,t);for(var o=arguments.length,c=new Array(o),i=0;i-1&&t.data.indexOf("add-tag")>-1&&!n.documentElement.querySelector("wp_error")}))},{handler:function(e){return function(){var t=o.a.map(e.container.fields,"id"),n=Object(l.a)(o.a.get(window.cf,"preloaded.containers",[])),r=n.containers,c=n.fields,a=o.a.find(r,["id",e.id]),u=o.a.filter(c,["container_id",e.id]),s=Object(i.dispatch)("carbon-fields/metaboxes"),d=s.updateState,f=s.removeFields;d(o.a.keyBy([a],"id"),o.a.keyBy(u,"id")),f(t)}}}))},function(e,t,n){"use strict";var r=n(3),o=n(13),c=n(1);n(63),Object(r.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(o.withEffects)(function(){return Object(c.pipe)(Object(c.fromEvent)(window,"scroll"),Object(c.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}}))},function(e,t,n){},function(e,t,n){"use strict";n(65)},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupState",function(){return v}),n.d(r,"updateState",function(){return O}),n.d(r,"updateFieldValue",function(){return j}),n.d(r,"addFields",function(){return g}),n.d(r,"cloneFields",function(){return y}),n.d(r,"removeFields",function(){return h}),n.d(r,"addContainer",function(){return _}),n.d(r,"removeContainer",function(){return w}),n.d(r,"receiveSidebar",function(){return E}),n.d(r,"lockSaving",function(){return x}),n.d(r,"unlockSaving",function(){return S});var o={};n.r(o),n.d(o,"getContainers",function(){return I}),n.d(o,"getContainerById",function(){return F}),n.d(o,"getFields",function(){return T}),n.d(o,"getFieldsByContainerId",function(){return C}),n.d(o,"getFieldById",function(){return A}),n.d(o,"isSavingLocked",function(){return D}),n.d(o,"isDirty",function(){return N}),n.d(o,"getComplexGroupValues",function(){return k});var c=n(5),i=n(2),a=n(0),u=n(9),s=n.n(u),l=n(6),d=n.n(l),f=n(10),p=n.n(f),b=n(4),m=Object(i.combineReducers)({containers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return p()(e,function(e){Object(a.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return p()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(a.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return p()(e,function(e){Object(a.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return p()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return p()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return p()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,c=r.reduce(function(t,n,r){return function e(t,n,r,o){var c=Object(a.cloneDeep)(r[t]);return c.id=n,"complex"===c.type&&c.value.forEach(function(t){t.id=Object(b.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,c=Object(b.uniqueId)();return n.id=c,e(o,c,r,t)},o)}),o.concat(c)}(n,o[r],e,t)},[]);Object(a.assign)(e,Object(a.keyBy)(c,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(a.omit)(e,n);case"RECEIVE_SIDEBAR":return p()(e,function(e){Object(a.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return d()({},e,s()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(a.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function v(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function O(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function g(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function y(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function h(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function _(e){return{type:"ADD_CONTAINER",payload:e}}function w(e){return{type:"REMOVE_CONTAINER",payload:e}}function E(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function x(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function S(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function I(e){return e.containers}function F(e,t){return e.containers[t]}function T(e){return e.fields}function C(e,t){return Object(a.filter)(e.fields,["container_id",t])}function A(e,t){return e.fields[t]}function D(e){return Object.keys(e.savingLock).length>0}function N(e){return e.isDirty}function k(e,t){var n=Object(a.pick)(T(e),t);return n=Object(a.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(a.mapValues)(n,function(e){return e.value})}var G=n(23);Object(i.registerStore)("carbon-fields/metaboxes",{reducer:m,actions:r,selectors:o});var L=Object(G.a)(Object(a.get)(window.cf,"preloaded.containers",[])),P=L.containers,R=L.fields;Object(i.dispatch)("carbon-fields/metaboxes").setupState(Object(a.keyBy)(P,"id"),Object(a.keyBy)(R,"id"));var V=n(11),B=n(3),q=n(24),U=n(19),M=n.n(U),Q=n(12),K=n(14),W=n(1);function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Object(a.pick)(t,Object(a.difference)(Object(a.map)(e.fields,"id"),n))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(a.map)(e,function(e){return[e.id,"".concat(Object(a.repeat)("parent.",t)).concat(e.base_name)]})}var H=Object(b.withConditionalLogic)(function(e){var t=Object(i.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(W.pipe)(Object(W.merge)(Object(Q.a)(t(e.containerId)),Object(b.fromSelector)(t,e.containerId)),Object(K.a)(a.isEqual))},function(e,t){t=Object(a.keyBy)(t,"id");var n=Object(i.select)("carbon-fields/metaboxes").getContainerById(e.containerId),r=[];if(Object(a.some)(n.fields,["id",e.id]))r=z(r=$(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),c=Object(a.find)(t,function(t){return t.container_id===e.containerId&&Object(a.startsWith)(o,t.name)}),u=o.split(/\[|\]/g);u.shift(),(u=u.filter(function(e){return""!==e})).pop();var s=u.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=z(r=$(n,t,[c.id]),s+1);for(var l="".concat(c.id,".value");u.length>0;){var d=u.shift(),f=!isNaN(d),p=!f;if(f){l="".concat(l,"[").concat(d,"]");var b=$(Object(a.get)(t,l),t,[e.id]);r=r.concat(z(b,s)),l="".concat(l,".fields")}if(p){var m=Object(a.find)(Object(a.get)(t,l),["name",d]);l="".concat(m.id,".value"),s--}}}return r=r.map(function(e){var n=M()(e,2),r=n[0];return[n[1],Object(a.get)(t,"".concat(r,".value"))]}),Object(a.fromPairs)(r)}),J=n(20);function X(e,t){return Object(a.find)(e,function(e){return 0===e.name.indexOf(t)})}Object(B.addFilter)("carbon-fields.association.metabox","carbon-fields/metaboxes",Object(b.withProps)(function(e){return{hierarchyResolver:function(){for(var t,n,r,o,c=Object(i.select)("carbon-fields/metaboxes").getFieldsByContainerId(e.containerId),u=(t=e.name,n=window.cf.config,r=n.compactInput,o=n.compactInputKey,r&&0===t.indexOf(o)?t.replace(new RegExp("^".concat(o,"\\[(.+?)\\]")),"$1"):t).split(/\[|\]/g),s=X(c,(u=u.filter(function(e){return""!==e})).shift()),l=c.indexOf(s),d=s.base_name;u.length>0;){var f=u.shift(),p=!isNaN(f),b=f===e.field.base_name,m=!p&&!b;if(p&&(l="".concat(l,".value.").concat(f,".name"),d="".concat(d,"[").concat(f,"]:").concat(Object(a.get)(c,l),"/")),m){var v=X(c,f);l=c.indexOf(v),d="".concat(d).concat(v.base_name)}b&&(d="".concat(d).concat(f))}return d}}})),n(44),n(49),n(50),n(51),n(52),n(53),n(55),Object(B.addFilter)("carbon-fields.sidebar.metabox","carbon-fields/metaboxes",Object(i.withDispatch)(function(e){return{onAdded:e("carbon-fields/metaboxes").receiveSidebar}})),Object(B.addFilter)("carbon-fields.field-edit.metabox","carbon-fields/metaboxes",Object(V.compose)(q.a,H,Object(i.withDispatch)(function(e){if(Object(J.a)()){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}var n=e("carbon-fields/metaboxes");return{lockSaving:n.lockSaving,unlockSaving:n.unlockSaving}}),b.withValidation));var Y=n(33),Z=n(21);Object(c.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var ee=Object(J.a)()?"gutenberg":"classic";Object(Z.a)(ee),Object(Y.a)(ee)},function(e,t,n){"use strict";var r=n(11),o=n(3),c=n(4),i=n(2),a=Object(r.createHigherOrderComponent)(function(e){return Object(i.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(o.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(r.compose)(a,Object(c.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)})}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=67)}([function(e,t){e.exports=cf.vendor.lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=cf.vendor["@wordpress/hooks"]},function(e,t){e.exports=cf.vendor["@wordpress/data"]},function(e,t){e.exports=cf.core},function(e,t){e.exports=cf.vendor["@wordpress/i18n"]},function(e,t,n){var r=n(9);e.exports=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;nt=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const c=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,c),o=e((e,t)=>{r||0===e||(n(e,t),c(e))})})},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),c=n(25),i=n.n(c),a=n(26),u=n.n(a),s=n(27),l=n.n(s),d=n(28),f=n.n(d),p=n(29),b=n.n(p),m=n(8),v=n.n(m),O=n(9),j=n.n(O),g=n(31),y=n.n(g),h=n(7),_=n(0),w=n(4),E=(n(66),n(30)),x=function(t){function n(){var t,r;i()(this,n);for(var o=arguments.length,c=new Array(o),a=0;at=>(n,r)=>{if(0!==n)return;let o,c,i=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(c=[1,n]),2===t&&(i=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());i||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(c&&(o(...c),c=null));r(e,t)})},m=n(14),v=n(4);function O(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function j(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function g(e){for(var t=[],n=e,r=j(e);r>0&&n;)if(j(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var y={post_ancestors:[],post_parent_id:0,post_level:1};function h(e){var t=e.options[e.selectedIndex];return{post_ancestors:g(t),post_parent_id:O(t),post_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return h(e.target)}),b(h(e))):Object(p.a)(y)}),Object(u.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(l.pipe)(Object(l.combine)(Object(v.fromSelector)(Object(o.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"parent")),Object(m.a)(s.isEqual),Object(l.map)(function(e){var r=f()(e,3),o=r[0],c=r[1],i=r[2];if(i=parseInt(i,10),isNaN(i))return y;var a=t(c);if(!Object(s.get)(a,["hierarchical"],!1))return y;var u=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(s.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(i,n("postType",c,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:u,post_parent_id:i,post_level:u.length+1}}))});var _=n(35),w=n.n(_),E=(e,t,n)=>w()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let c=!1;const i=e=>{o(1,e)};o(0,r=>{2===r&&(c=!0,e.removeEventListener(t,i,n))}),c||e.addEventListener(t,i,n)})(e,n)),x={post_format:"standard"};function S(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(u.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(l.pipe)(E(e,"input.post-format","change"),Object(l.map)(function(e){return S(e.target)}),b(S(e.querySelector("input.post-format:checked")))):Object(p.a)(x)}),Object(u.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"format"),Object(m.a)(),Object(l.filter)(Boolean),Object(l.map)(function(e){return{post_format:e}}),b(x))});var I={post_template:""};function F(e){return{post_template:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return F(e.target)}),b(F(e))):Object(p.a)(I)}),Object(u.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"template"),Object(m.a)(),Object(l.filter)(s.isString),Object(l.map)(function(e){return{post_template:e}}),b(I))});var T=n(6),C=n.n(T),A=n(9),D=n.n(A),N=n(16),k=n.n(N);function G(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(G(window.tagBox,"parseTags"),G(window.tagBox,"flushTags")),Object(u.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(l.pipe)(l.merge.apply(void 0,k()((e=document.querySelectorAll('div[id^="taxonomy-"]'),k()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(l.pipe)(E(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(l.scan)(function(e,n){var r=n.target;return a()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(s.pull)(e[t],n)})},D()({},t,[])),b(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return k()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},D()({},e,[]))}(t)))}))).concat(k()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return k()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(l.pipe)(Object(l.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(l.map)(function(e){var n=e.target;return D()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),b(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return D()({},e,n)}(t)))})}()))),Object(l.scan)(function(e,t){return{post_term:C()({},e.post_term,t)}},{post_term:{}}));var e}),Object(u.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core").getTaxonomies,t=Object(o.select)("core/editor").getEditedPostAttribute;return Object(l.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(l.filter)(Boolean),Object(l.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(s.fromPairs)(n)}}))});var L={term_ancestors:[],term_parent:0,term_level:1};function P(e){var t=e.options[e.selectedIndex];return{term_ancestors:g(t),term_parent:O(t),term_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return P(e.target)}),b(P(e))):Object(p.a)(L)});var R={user_role:""};function V(e){return{user_role:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return t?Object(p.a)({user_role:t.dataset.profileRole}):Object(p.a)(R)}return Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return V(e.target)}),b(V(e)))});var B=n(7),q=n(5),U=n(21),M={operators:[],isOperatorSupported:function(e){return this.operators.indexOf(e)>-1},evaluate:function(){return!1}},Q={comparers:[C()({},M,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),C()({},M,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),C()({},M,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(s.intersection)(e,n).length;default:return!1}}}),H={boolean:K,post_term:$,post_ancestor_id:C()({},Q,{comparers:[W,z],getEnvironmentValue:function(e,t){return Object(s.get)(t,"post_ancestors",[])}}),post_parent_id:Q,post_level:Q,post_format:Q,post_template:Q,term_level:Q,term_parent:C()({},Q,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:C()({},Q,{comparers:[W,z],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(s.get)(t,"term_ancestors",[])}}),user_role:Q},J=Object(o.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),X=Object(c.withEffects)(function(e,t){var n=t.context,r=Object(u.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(u.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),c=Object(u.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),i=Object(u.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),d=Object(u.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),f=Object(u.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(l.pipe)(Object(l.merge)(r,o,c,i,d,f),Object(l.scan)(function(e,t){return a()(e,function(e){Object(s.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(s.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(s.get)(H,t.type);return r?r.isFulfiled(t,n):(console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=f()(e,2),o=r[0],c=r[1],i=document.getElementById(o),a=document.querySelector(".container-".concat(o));i&&(i.hidden=!c),a&&(c&&!a.dataset.mounted&&(a.dataset.mounted=!0,Object(U.b)(t[o],n)),!c&&a.dataset.mounted&&(delete a.dataset.mounted,Object(B.unmountComponentAtNode)(a)))})}}});t.a=Object(r.compose)(J,X)(function(){return null})},function(e,t,n){"use strict";var r=n(3),o=n(7),c=n(0),i=n(13),a=n(1);function u(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var s=n(18),l=n(22),d=n(21),f=n(17);function p(e){return e.indexOf(f.b)>-1}t.a=Object(i.withEffects)(function(){return Object(a.merge)(Object(a.pipe)(Object(l.a)(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(a.filter)(function(e){return p(e.$widget[0].id)}),Object(a.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(a.pipe)(Object(l.a)(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(a.filter)(function(e){var t=e.data;return Object(c.startsWith)(t,"deleted:")&&p(t)}),Object(a.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(r.select)("carbon-fields/metaboxes").getContainerById,n=Object(r.dispatch)("carbon-fields/metaboxes"),i=n.addContainer,a=n.removeContainer,l=n.addFields,p=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var b,m=e.payload,v=m.event,O=m.$widget,j=Object(c.flow)(u,JSON.parse)(O.find("[data-json]").data("json")),g=[];if("widget-updated"===v.type&&(b=t(j.id).fields.map(function(e){return e.id})),j.fields=j.fields.map(function(e){return Object(s.a)(e,j,g)}),l(g),i(j),"widget-updated"===v.type&&p(b),Object(d.b)(j,"classic"),window.cf.config.pagenow===f.c&&"widget-added"===v.type){var y=O.find('[name="widget-id"]').val();O.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(y).liveUpdateMode=!1}break;case"WIDGET_DELETED":var h=e.payload.data.replace("deleted:",""),w="".concat(f.a).concat(h),E=t(w);Object(o.unmountComponentAtNode)(document.querySelector(".container-".concat(w)));var x=_.map(E.fields,"id");a(w),p(x)}}}})(function(){return null})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";(function(e){var t=n(25),r=n.n(t),o=n(26),c=n.n(o),i=n(27),a=n.n(i),u=n(28),s=n.n(u),l=n(29),d=n.n(l),f=n(8),p=n.n(f),b=n(9),m=n.n(b),v=n(10),O=n.n(v),j=n(7),g=n(2),y=n(11),h=n(3),_=n(0),w=n(4),E=(n(47),n(30)),x=n(18),S=function(e){function t(){var e,n;r()(this,t);for(var o=arguments.length,c=new Array(o),i=0;i-1&&t.data.indexOf("add-tag")>-1&&!n.documentElement.querySelector("wp_error")}))},{handler:function(e){return function(){var t=o.a.map(e.container.fields,"id"),n=Object(l.a)(o.a.get(window.cf,"preloaded.containers",[])),r=n.containers,c=n.fields,a=o.a.find(r,["id",e.id]),u=o.a.filter(c,["container_id",e.id]),s=Object(i.dispatch)("carbon-fields/metaboxes"),d=s.updateState,f=s.removeFields;d(o.a.keyBy([a],"id"),o.a.keyBy(u,"id")),f(t)}}}))},function(e,t,n){"use strict";var r=n(2),o=n(13),c=n(1);n(63),Object(r.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(o.withEffects)(function(){return Object(c.pipe)(Object(c.fromEvent)(window,"scroll"),Object(c.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}}))},function(e,t,n){},function(e,t,n){"use strict";n(65)},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupState",function(){return O}),n.d(r,"updateState",function(){return j}),n.d(r,"updateFieldValue",function(){return g}),n.d(r,"addFields",function(){return y}),n.d(r,"cloneFields",function(){return h}),n.d(r,"removeFields",function(){return _}),n.d(r,"addContainer",function(){return w}),n.d(r,"removeContainer",function(){return E}),n.d(r,"receiveSidebar",function(){return x}),n.d(r,"lockSaving",function(){return S}),n.d(r,"unlockSaving",function(){return I});var o={};n.r(o),n.d(o,"getContainers",function(){return F}),n.d(o,"getContainerById",function(){return T}),n.d(o,"getFields",function(){return C}),n.d(o,"getFieldsByContainerId",function(){return A}),n.d(o,"getFieldById",function(){return D}),n.d(o,"isSavingLocked",function(){return N}),n.d(o,"isDirty",function(){return k}),n.d(o,"getComplexGroupValues",function(){return G});var c=n(5),i=n(2),a=n(3),u=n(0),s=n(9),l=n.n(s),d=n(6),f=n.n(d),p=n(10),b=n.n(p),m=n(4),v=Object(a.combineReducers)({containers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return b()(e,function(e){Object(u.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return b()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(u.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return b()(e,function(e){Object(u.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return b()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return b()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return b()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,c=r.reduce(function(t,n,r){return function e(t,n,r,o){var c=Object(u.cloneDeep)(r[t]);return c.id=n,"complex"===c.type&&c.value.forEach(function(t){t.id=Object(m.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,c=Object(m.uniqueId)();return n.id=c,e(o,c,r,t)},o)}),o.concat(c)}(n,o[r],e,t)},[]);Object(u.assign)(e,Object(u.keyBy)(c,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(u.omit)(e,n);case"RECEIVE_SIDEBAR":return b()(e,function(e){Object(u.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return f()({},e,l()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(u.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function O(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function g(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function y(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function h(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function _(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function w(e){return{type:"ADD_CONTAINER",payload:e}}function E(e){return{type:"REMOVE_CONTAINER",payload:e}}function x(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function S(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function I(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function F(e){return e.containers}function T(e,t){return e.containers[t]}function C(e){return e.fields}function A(e,t){return Object(u.filter)(e.fields,["container_id",t])}function D(e,t){return e.fields[t]}function N(e){return Object.keys(e.savingLock).length>0}function k(e){return e.isDirty}function G(e,t){var n=Object(u.pick)(C(e),t);return n=Object(u.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(u.mapValues)(n,function(e){return e.value})}var L=n(23);Object(a.registerStore)("carbon-fields/metaboxes",{reducer:v,actions:r,selectors:o});var P=Object(L.a)(Object(u.get)(window.cf,"preloaded.containers",[])),R=P.containers,V=P.fields;Object(a.dispatch)("carbon-fields/metaboxes").setupState(Object(u.keyBy)(R,"id"),Object(u.keyBy)(V,"id"));var B=n(11),q=n(24),U=n(19),M=n.n(U),Q=n(12),K=n(14),W=n(1);function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Object(u.pick)(t,Object(u.difference)(Object(u.map)(e.fields,"id"),n))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(u.map)(e,function(e){return[e.id,"".concat(Object(u.repeat)("parent.",t)).concat(e.base_name)]})}var H=Object(m.withConditionalLogic)(function(e){var t=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(W.pipe)(Object(W.merge)(Object(Q.a)(t(e.containerId)),Object(m.fromSelector)(t,e.containerId)),Object(K.a)(u.isEqual))},function(e,t){t=Object(u.keyBy)(t,"id");var n=Object(a.select)("carbon-fields/metaboxes").getContainerById(e.containerId),r=[];if(Object(u.some)(n.fields,["id",e.id]))r=z(r=$(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),c=Object(u.find)(t,function(t){return t.container_id===e.containerId&&Object(u.startsWith)(o,t.name)}),i=o.split(/\[|\]/g);i.shift(),(i=i.filter(function(e){return""!==e})).pop();var s=i.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=z(r=$(n,t,[c.id]),s+1);for(var l="".concat(c.id,".value");i.length>0;){var d=i.shift(),f=!isNaN(d),p=!f;if(f){l="".concat(l,"[").concat(d,"]");var b=$(Object(u.get)(t,l),t,[e.id]);r=r.concat(z(b,s)),l="".concat(l,".fields")}if(p){var m=Object(u.find)(Object(u.get)(t,l),["name",d]);l="".concat(m.id,".value"),s--}}}return r=r.map(function(e){var n=M()(e,2),r=n[0];return[n[1],Object(u.get)(t,"".concat(r,".value"))]}),Object(u.fromPairs)(r)}),J=n(20);function X(e,t){return Object(u.find)(e,function(e){return 0===e.name.indexOf(t)})}Object(i.addFilter)("carbon-fields.association.metabox","carbon-fields/metaboxes",Object(m.withProps)(function(e){return{hierarchyResolver:function(){for(var t,n,r,o,c=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId(e.containerId),i=(t=e.name,n=window.cf.config,r=n.compactInput,o=n.compactInputKey,r&&0===t.indexOf(o)?t.replace(new RegExp("^".concat(o,"\\[(.+?)\\]")),"$1"):t).split(/\[|\]/g),s=X(c,(i=i.filter(function(e){return""!==e})).shift()),l=c.indexOf(s),d=s.base_name;i.length>0;){var f=i.shift(),p=!isNaN(f),b=f===e.field.base_name,m=!p&&!b;if(p&&(l="".concat(l,".value.").concat(f,".name"),d="".concat(d,"[").concat(f,"]:").concat(Object(u.get)(c,l),"/")),m){var v=X(c,f);l=c.indexOf(v),d="".concat(d).concat(v.base_name)}b&&(d="".concat(d).concat(f))}return d}}})),n(44),n(49),n(50),n(51),n(52),n(53),n(55),Object(i.addFilter)("carbon-fields.sidebar.metabox","carbon-fields/metaboxes",Object(a.withDispatch)(function(e){return{onAdded:e("carbon-fields/metaboxes").receiveSidebar}})),Object(i.addFilter)("carbon-fields.field-edit.metabox","carbon-fields/metaboxes",Object(B.compose)(q.a,H,Object(a.withDispatch)(function(e){if(Object(J.a)()){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}var n=e("carbon-fields/metaboxes");return{lockSaving:n.lockSaving,unlockSaving:n.unlockSaving}}),m.withValidation));var Y=n(33),Z=n(21);Object(c.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var ee=Object(J.a)()?"gutenberg":"classic";Object(i.addAction)("carbon-fields.init","carbon-fields/metaboxes",function(){Object(Z.a)(ee),Object(Y.a)(ee)})},function(e,t,n){"use strict";var r=n(11),o=n(2),c=n(4),i=n(3),a=Object(r.createHigherOrderComponent)(function(e){return Object(i.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(o.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(r.compose)(a,Object(c.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)})}]); \ No newline at end of file diff --git a/build/gutenberg/core.js b/build/gutenberg/core.js index fda91fe05..bf4ff8587 100644 --- a/build/gutenberg/core.js +++ b/build/gutenberg/core.js @@ -3142,7 +3142,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/checkbox/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_9__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar CheckboxField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(CheckboxField, _Component);\n\n function CheckboxField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, CheckboxField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(CheckboxField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n field = _this$props.field,\n value = _this$props.value,\n onChange = _this$props.onChange;\n onChange(id, value === field.option_value ? '' : field.option_value);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(CheckboxField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Fragment\"], null, wp.element.createElement(\"input\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n type: \"checkbox\",\n id: id,\n name: name,\n checked: value,\n value: field.option_value,\n className: \"cf-checkbox__input\",\n onChange: this.handleChange\n }, field.attributes)), wp.element.createElement(\"label\", {\n className: \"cf-checkbox__label\",\n htmlFor: id\n }, field.option_label));\n }\n }]);\n\n return CheckboxField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (CheckboxField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/checkbox/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/checkbox/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_9__);\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\nvar CheckboxField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(CheckboxField, _Component);\n\n function CheckboxField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, CheckboxField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(CheckboxField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleChange\", function (e) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, e.target.checked);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(CheckboxField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this$props2 = this.props,\n id = _this$props2.id,\n name = _this$props2.name,\n value = _this$props2.value,\n field = _this$props2.field;\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Fragment\"], null, wp.element.createElement(\"input\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n type: \"checkbox\",\n id: id,\n name: name,\n checked: value,\n value: value ? field.option_value : '',\n className: \"cf-checkbox__input\",\n onChange: this.handleChange\n }, field.attributes)), wp.element.createElement(\"label\", {\n className: \"cf-checkbox__label\",\n htmlFor: id\n }, field.option_label));\n }\n }]);\n\n return CheckboxField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (CheckboxField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/checkbox/index.js?"); /***/ }), @@ -3306,7 +3306,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/file/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _components_media_library__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/media-library */ \"./packages/core/components/media-library/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar FileField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(FileField, _Component);\n\n function FileField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, FileField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(FileField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n data: {}\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFileDataChange\", function (data) {\n _this.setState({\n data: data\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleClear\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, '');\n\n _this.handleFileDataChange({});\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSelect\", function (files) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field,\n onChange = _this$props2.onChange;\n\n var _files = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(files, 1),\n file = _files[0];\n\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"get\"])(file, field.value_type, file.id));\n\n _this.handleFileDataChange(file);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(FileField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle Hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props3 = this.props,\n value = _this$props3.value,\n field = _this$props3.field;\n\n if (value) {\n // TODO: Refactor this to use `@wordpress/api-fetch` package.\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/attachment/?type=\").concat(field.value_type, \"&value=\").concat(value), 'get').then(this.handleFileDataChange);\n }\n }\n /**\n * Returns an URL to the attachment's thumbnail.\n *\n * @return {string}\n */\n\n }, {\n key: \"getThumb\",\n value: function getThumb() {\n var data = this.state.data;\n\n if (data.sizes) {\n var size = data.sizes.thumbnail || data.sizes.full;\n\n if (size) {\n return size.url;\n }\n }\n\n if (data.thumb_url) {\n return data.thumb_url;\n }\n\n return data.icon;\n }\n /**\n * Handles the file meta set.\n *\n * @param {Object} data\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var data = this.state.data;\n var _this$props4 = this.props,\n value = _this$props4.value,\n name = _this$props4.name,\n field = _this$props4.field,\n buttonLabel = _this$props4.buttonLabel,\n mediaLibraryButtonLabel = _this$props4.mediaLibraryButtonLabel,\n mediaLibraryTitle = _this$props4.mediaLibraryTitle;\n return wp.element.createElement(_components_media_library__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n onSelect: this.handleSelect,\n multiple: false,\n title: mediaLibraryTitle,\n buttonLabel: mediaLibraryButtonLabel,\n typeFilter: field.type_filter\n }, function (_ref) {\n var openMediaBrowser = _ref.openMediaBrowser;\n return wp.element.createElement(\"div\", {\n className: \"cf-file__inner\"\n }, wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: name,\n value: value,\n readOnly: true\n }), value && data.id && wp.element.createElement(\"div\", {\n className: \"cf-file__content\"\n }, wp.element.createElement(\"div\", {\n className: \"cf-file__preview\"\n }, wp.element.createElement(\"img\", {\n src: _this2.getThumb(),\n className: \"cf-file__image\"\n }), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-file__remove dashicons-before dashicons-no-alt\",\n onClick: _this2.handleClear\n })), wp.element.createElement(\"span\", {\n className: \"cf-file__name\",\n title: data.filename || data.file_name\n }, data.filename || data.file_name)), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-file__browse\",\n onClick: openMediaBrowser\n }, buttonLabel));\n });\n }\n }]);\n\n return FileField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FileField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/file/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/file/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _components_media_library__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/media-library */ \"./packages/core/components/media-library/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar FileField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(FileField, _Component);\n\n function FileField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, FileField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(FileField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n data: {}\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFileDataChange\", function (data) {\n _this.setState({\n data: data\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleClear\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, '');\n\n _this.handleFileDataChange({});\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSelect\", function (files) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field,\n onChange = _this$props2.onChange;\n\n var _files = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(files, 1),\n file = _files[0];\n\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"get\"])(file, field.value_type, file.id));\n\n _this.handleFileDataChange(file);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(FileField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle Hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props3 = this.props,\n value = _this$props3.value,\n field = _this$props3.field;\n\n if (value) {\n // TODO: Refactor this to use `@wordpress/api-fetch` package.\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/attachment/?type=\").concat(field.value_type, \"&value=\").concat(value), 'get').then(this.handleFileDataChange);\n }\n }\n /**\n * Returns an URL to the attachment's thumbnail.\n *\n * @return {string}\n */\n\n }, {\n key: \"getThumb\",\n value: function getThumb() {\n var data = this.state.data;\n\n if (data.sizes) {\n var size = data.sizes.thumbnail || data.sizes.full;\n\n if (size) {\n return size.url;\n }\n }\n\n if (data.thumb_url) {\n return data.thumb_url;\n }\n\n return data.icon;\n }\n /**\n * Handles the file meta set.\n *\n * @param {Object} data\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var data = this.state.data;\n var _this$props4 = this.props,\n value = _this$props4.value,\n name = _this$props4.name,\n field = _this$props4.field,\n buttonLabel = _this$props4.buttonLabel,\n mediaLibraryButtonLabel = _this$props4.mediaLibraryButtonLabel,\n mediaLibraryTitle = _this$props4.mediaLibraryTitle;\n return wp.element.createElement(_components_media_library__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n onSelect: this.handleSelect,\n multiple: false,\n title: mediaLibraryTitle,\n buttonLabel: mediaLibraryButtonLabel,\n typeFilter: field.type_filter\n }, function (_ref) {\n var openMediaBrowser = _ref.openMediaBrowser;\n return wp.element.createElement(\"div\", {\n className: \"cf-file__inner\"\n }, wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: name,\n value: value,\n readOnly: true\n }), value && !!data.id && wp.element.createElement(\"div\", {\n className: \"cf-file__content\"\n }, wp.element.createElement(\"div\", {\n className: \"cf-file__preview\"\n }, wp.element.createElement(\"img\", {\n src: _this2.getThumb(),\n className: \"cf-file__image\"\n }), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-file__remove dashicons-before dashicons-no-alt\",\n onClick: _this2.handleClear\n })), wp.element.createElement(\"span\", {\n className: \"cf-file__name\",\n title: data.filename || data.file_name\n }, data.filename || data.file_name)), wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-file__browse\",\n onClick: openMediaBrowser\n }, buttonLabel));\n });\n }\n }]);\n\n return FileField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FileField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/file/index.js?"); /***/ }), @@ -3527,7 +3527,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_12__);\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\nvar RichTextField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(RichTextField, _Component);\n\n /**\n * Define the project base properties\n *\n * @return {void}\n */\n function RichTextField() {\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, RichTextField);\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(RichTextField).call(this));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleChange\", function (eventOrValue) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"isString\"])(eventOrValue) ? eventOrValue : eventOrValue.target.value);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"initEditor\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field;\n\n if (field.rich_editing) {\n var editorSetup = function editorSetup(editor) {\n _this.editor = editor;\n editor.on('blur Change', function () {\n editor.save();\n\n _this.handleChange(editor.getContent());\n });\n };\n\n var editorOptions = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, window.tinyMCEPreInit.mceInit.carbon_settings, {\n selector: \"#\".concat(id),\n setup: editorSetup\n });\n\n window.tinymce.init(editorOptions);\n }\n\n var quickTagsOptions = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, window.tinyMCEPreInit, {\n id: id\n });\n\n window.quicktags(quickTagsOptions); // Force the initialization of the quick tags.\n\n window.QTags._buttonsInit();\n });\n\n _this.node = null;\n _this.editor = null;\n _this.cancelResizeObserver = null;\n return _this;\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(RichTextField, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // Required for adequate initialization\n setTimeout(this.initEditor, 100);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.destroyEditor();\n }\n /**\n * Handles the change of the input.\n *\n * @param {Object|string} eventOrValue\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props3 = this.props,\n id = _this$props3.id,\n name = _this$props3.name,\n value = _this$props3.value,\n field = _this$props3.field;\n var classes = ['carbon-wysiwyg', 'wp-editor-wrap', {\n 'tmce-active': field.rich_editing\n }, {\n 'html-active': !field.rich_editing\n }];\n var mediaButtonsHTML = field.media_buttons ? Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"template\"])(field.media_buttons)({\n id: id\n }) : null;\n return wp.element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-wrap\"),\n className: classnames__WEBPACK_IMPORTED_MODULE_12___default()(classes),\n ref: function ref(node) {\n return _this2.editorNode = node;\n }\n }, field.media_buttons && wp.element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-media-buttons\"),\n className: \"hide-if-no-js wp-media-buttons\"\n }, wp.element.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: mediaButtonsHTML\n }\n })), field.rich_editing && wp.element.createElement(\"div\", {\n className: \"wp-editor-tabs\"\n }, wp.element.createElement(\"button\", {\n type: \"button\",\n id: \"\".concat(id, \"-tmce\"),\n className: \"wp-switch-editor switch-tmce\",\n \"data-wp-editor-id\": id\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Visual', 'carbon-fields-ui')), wp.element.createElement(\"button\", {\n type: \"button\",\n id: \"\".concat(id, \"-html\"),\n className: \"wp-switch-editor switch-html\",\n \"data-wp-editor-id\": id\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Text', 'carbon-fields-ui'))), wp.element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-editor-container\"),\n className: \"wp-editor-container\"\n }, wp.element.createElement(\"textarea\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n style: {\n width: '100%'\n },\n className: \"regular-text\",\n id: id,\n name: name,\n value: value,\n onChange: this.handleChange\n }, field.attributes))));\n }\n /**\n * Initialize the WYSIWYG editor.\n *\n * @return {void}\n */\n\n }, {\n key: \"destroyEditor\",\n\n /**\n * Destroy the instance of the WYSIWYG editor.\n *\n * @return {void}\n */\n value: function destroyEditor() {\n if (this.editor) {\n this.editor.remove();\n this.node = null;\n this.editor = null;\n }\n\n delete window.QTags.instances[this.props.id];\n }\n }]);\n\n return RichTextField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RichTextField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/rich-text/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_12__);\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\nvar RichTextField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(RichTextField, _Component);\n\n /**\n * Define the project base properties\n *\n * @return {void}\n */\n function RichTextField() {\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, RichTextField);\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(RichTextField).call(this));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"handleChange\", function (eventOrValue) {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"isString\"])(eventOrValue) ? eventOrValue : eventOrValue.target.value);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), \"initEditor\", function () {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field;\n\n if (field.rich_editing) {\n var editorSetup = function editorSetup(editor) {\n _this.editor = editor;\n editor.on('blur Change', function () {\n editor.save();\n\n _this.handleChange(editor.getContent());\n });\n };\n\n var editorOptions = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, window.tinyMCEPreInit.mceInit.carbon_settings, {\n selector: \"#\".concat(id),\n setup: editorSetup\n });\n\n window.tinymce.init(editorOptions);\n }\n\n var quickTagsOptions = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, window.tinyMCEPreInit, {\n id: id\n });\n\n window.quicktags(quickTagsOptions); // Force the initialization of the quick tags.\n\n window.QTags._buttonsInit();\n });\n\n _this.node = null;\n _this.editor = null;\n _this.cancelResizeObserver = null;\n return _this;\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(RichTextField, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.props.visible) {\n this.timer = setTimeout(this.initEditor, 250);\n }\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n clearTimeout(this.timer);\n this.destroyEditor();\n }\n /**\n * Handles the change of the input.\n *\n * @param {Object|string} eventOrValue\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props3 = this.props,\n id = _this$props3.id,\n name = _this$props3.name,\n value = _this$props3.value,\n field = _this$props3.field;\n var classes = ['carbon-wysiwyg', 'wp-editor-wrap', {\n 'tmce-active': field.rich_editing\n }, {\n 'html-active': !field.rich_editing\n }];\n var mediaButtonsHTML = field.media_buttons ? Object(lodash__WEBPACK_IMPORTED_MODULE_11__[\"template\"])(field.media_buttons)({\n id: id\n }) : null;\n return wp.element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-wrap\"),\n className: classnames__WEBPACK_IMPORTED_MODULE_12___default()(classes),\n ref: function ref(node) {\n return _this2.editorNode = node;\n }\n }, field.media_buttons && wp.element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-media-buttons\"),\n className: \"hide-if-no-js wp-media-buttons\"\n }, wp.element.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: mediaButtonsHTML\n }\n })), field.rich_editing && wp.element.createElement(\"div\", {\n className: \"wp-editor-tabs\"\n }, wp.element.createElement(\"button\", {\n type: \"button\",\n id: \"\".concat(id, \"-tmce\"),\n className: \"wp-switch-editor switch-tmce\",\n \"data-wp-editor-id\": id\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Visual', 'carbon-fields-ui')), wp.element.createElement(\"button\", {\n type: \"button\",\n id: \"\".concat(id, \"-html\"),\n className: \"wp-switch-editor switch-html\",\n \"data-wp-editor-id\": id\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Text', 'carbon-fields-ui'))), wp.element.createElement(\"div\", {\n id: \"wp-\".concat(id, \"-editor-container\"),\n className: \"wp-editor-container\"\n }, wp.element.createElement(\"textarea\", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n style: {\n width: '100%'\n },\n className: \"regular-text\",\n id: id,\n name: name,\n value: value,\n onChange: this.handleChange\n }, field.attributes))));\n }\n /**\n * Initialize the WYSIWYG editor.\n *\n * @return {void}\n */\n\n }, {\n key: \"destroyEditor\",\n\n /**\n * Destroy the instance of the WYSIWYG editor.\n *\n * @return {void}\n */\n value: function destroyEditor() {\n if (this.editor) {\n this.editor.remove();\n this.node = null;\n this.editor = null;\n }\n\n delete window.QTags.instances[this.props.id];\n }\n }]);\n\n return RichTextField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RichTextField);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/rich-text/index.js?"); /***/ }), @@ -3746,11 +3746,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /*!********************************!*\ !*** ./packages/core/index.js ***! \********************************/ -/*! exports provided: createRegistry, getFieldType, registerFieldType, Field, withFilters, withProps, withValidation, withConditionalLogic, uniqueId, fromSelector */ +/*! exports provided: createRegistry, getFieldType, registerFieldType, Field, withFilters, withProps, withValidation, withConditionalLogic, uniqueId, fromSelector, initialize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./store */ \"./packages/core/store/index.js\");\n/* harmony import */ var _fields__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fields */ \"./packages/core/fields/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./registry */ \"./packages/core/registry/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createRegistry\", function() { return _registry__WEBPACK_IMPORTED_MODULE_3__[\"createRegistry\"]; });\n\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./registry/fields */ \"./packages/core/registry/fields.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getFieldType\", function() { return _registry_fields__WEBPACK_IMPORTED_MODULE_4__[\"getFieldType\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"registerFieldType\", function() { return _registry_fields__WEBPACK_IMPORTED_MODULE_4__[\"registerFieldType\"]; });\n\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/field */ \"./packages/core/components/field/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Field\", function() { return _components_field__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_filters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hocs/with-filters */ \"./packages/core/hocs/with-filters/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withFilters\", function() { return _hocs_with_filters__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_props__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./hocs/with-props */ \"./packages/core/hocs/with-props/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withProps\", function() { return _hocs_with_props__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_validation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./hocs/with-validation */ \"./packages/core/hocs/with-validation/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withValidation\", function() { return _hocs_with_validation__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./hocs/with-conditional-logic */ \"./packages/core/hocs/with-conditional-logic/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withConditionalLogic\", function() { return _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _utils_unique_id__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/unique-id */ \"./packages/core/utils/unique-id.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uniqueId\", function() { return _utils_unique_id__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _utils_from_selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/from-selector */ \"./packages/core/utils/from-selector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fromSelector\", function() { return _utils_from_selector__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * Sets the locale data for the package type\n */\n\nObject(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"setLocaleData\"])(window.cf.config.locale, 'carbon-fields-ui');\n/**\n * Public API.\n */\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initialize\", function() { return initialize; });\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./store */ \"./packages/core/store/index.js\");\n/* harmony import */ var _fields__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fields */ \"./packages/core/fields/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./registry */ \"./packages/core/registry/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createRegistry\", function() { return _registry__WEBPACK_IMPORTED_MODULE_4__[\"createRegistry\"]; });\n\n/* harmony import */ var _registry_fields__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./registry/fields */ \"./packages/core/registry/fields.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getFieldType\", function() { return _registry_fields__WEBPACK_IMPORTED_MODULE_5__[\"getFieldType\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"registerFieldType\", function() { return _registry_fields__WEBPACK_IMPORTED_MODULE_5__[\"registerFieldType\"]; });\n\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/field */ \"./packages/core/components/field/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Field\", function() { return _components_field__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_filters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./hocs/with-filters */ \"./packages/core/hocs/with-filters/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withFilters\", function() { return _hocs_with_filters__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_props__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./hocs/with-props */ \"./packages/core/hocs/with-props/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withProps\", function() { return _hocs_with_props__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_validation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./hocs/with-validation */ \"./packages/core/hocs/with-validation/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withValidation\", function() { return _hocs_with_validation__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./hocs/with-conditional-logic */ \"./packages/core/hocs/with-conditional-logic/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withConditionalLogic\", function() { return _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _utils_unique_id__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/unique-id */ \"./packages/core/utils/unique-id.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uniqueId\", function() { return _utils_unique_id__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _utils_from_selector__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/from-selector */ \"./packages/core/utils/from-selector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fromSelector\", function() { return _utils_from_selector__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * Sets the locale data for the package type\n */\n\nObject(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"setLocaleData\"])(window.cf.config.locale, 'carbon-fields-ui');\n/**\n * Public API.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * Triggers the initialization of Carbon Fields.\n *\n * @return {void}\n */\n\nfunction initialize() {\n Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"doAction\"])('carbon-fields.init');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/index.js?"); /***/ }), diff --git a/build/gutenberg/core.min.js b/build/gutenberg/core.min.js index 3704b585a..3ab2c0574 100644 --- a/build/gutenberg/core.min.js +++ b/build/gutenberg/core.min.js @@ -1,4 +1,4 @@ -this.cf=this.cf||{},this.cf.core=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=278)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.cf.vendor.react}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n1?t-1:0),i=1;i-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(61),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(48)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(67)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(36),o=n(145),a=n(146),i=n(147),u=n(148),s=n(149);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(30)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(154),o=n(161),a=n(163),i=n(164),u=n(165);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&ec))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=c}function w(){var e=o();if(y(e))return E(e);f=setTimeout(w,function(e){var n=t-(e-d);return g?u(n,c-(e-h)):n}(e))}function E(e){return f=void 0,v&&s?b(e):(s=l=void 0,p)}function x(){var e=o(),n=y(e);if(s=arguments,l=this,d=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,t),m?b(e):p}(d);if(g)return f=setTimeout(w,t),b(d)}return void 0===f&&(f=setTimeout(w,t)),p}return t=a(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?i(a(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=d=l=f=void 0},x.flush=function(){return void 0===f?p:E(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(239)),o=a(n(241));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],c=!1,p=-1;function f(){c&&s&&(c=!1,s.length?l=s.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=u(f);c=!0;for(var t=l.length;t;){for(s=l,l=[];++p1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,i.polyfill)(f);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(95),i=n(266);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,a.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){var r=n(116);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(120))&&r.__esModule?r:{default:r};t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===c.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);c.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return c.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();p.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},p.defaultProps={options:{}},t.default=p},function(e,t,n){var r=n(251),o=n(252),a=n(256);r(".__observe-resize__ { position: absolute; left: 0; top: -100%; width: 100%; height: 100%; margin: 1px 0 0; border: none; opacity: 0; visibility: hidden; pointer-events: none; }"),e.exports=function(e,t){if(o.ok(a(e),"observe-resize: el should be a valid DOM element"),o.equal(typeof t,"function","observe-resize: cb should be type function"),"object"==typeof window){var n=!1,r=document.createElement("iframe");return r.setAttribute("class","__observe-resize__"),e.appendChild(r),o.ok(r.contentWindow,"observe-resize: no contentWindow detected - cannot start observing"),r.contentWindow.onresize=function(){n||(n=!0,window.requestAnimationFrame(function(){n=!1,t(e)}))},function(){r.parentNode&&r.parentNode.removeChild(r)}}}},function(e,t,n){(function(t){for(var r=n(259),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],l=0;!u&&l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){var r=n(276),o=n(277);e.exports=function(e,t){return o(r,e,t)}},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var u=0;for(e=0===i?"":e[0]+" ";ur&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===p.inserted[v]&&(n="",h(e,t),p.inserted[v]=n)}var O=function(){var e=E.apply(this,arguments),t=a+"-"+v;return void 0===p.registered[t]&&(p.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){p.inserted[e]=!0}if(c){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){c&&(d.flush(),d.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=l(n(1)),o=l(n(21)),a=l(n(25)),i=n(44),u=l(n(244)),s=l(n(245));function l(e){return e&&e.__esModule?e:{default:e}}var c=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,l=e.hsv,c=e.hsl,p=e.onChange,f=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:c,hsv:l,onChange:p})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:c,onChange:p})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:c,renderers:m,onChange:p}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:c,hex:o,onChange:p,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:p,onSwatchHover:f}))};c.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},c.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(c)},function(e,t,n){"use strict";var r=n(122);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(124)),o=u(n(46)),a=u(n(135)),i=u(n(136));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(29),o=n(23),a=n(26);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(33),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(128)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(37);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(36);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(36),o=n(56),a=n(57);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(68),o=n(151),a=n(27),i=n(72),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,p=l.hasOwnProperty,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:u).test(i(e))}},function(e,t,n){var r,o=n(152),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(155),o=n(36),a=n(56);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(156),o=n(157),a=n(158),i=n(159),u=n(160);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(199);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(54),o=n(85),a=n(86),i=n(201),u=n(202),s=n(205),l=n(206),c=n(207),p=n(208),f=n(76),d=n(209),h=n(40),m=n(210),g=n(211),v=n(216),b=n(23),y=n(47),w=n(218),E=n(27),x=n(220),O=n(34),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var T,F=1&n,P=2&n,N=4&n;if(j&&(T=A?j(t,D,A,M):j(t)),void 0!==T)return T;if(!E(t))return t;var I=b(t);if(I){if(T=m(t),!F)return l(t,T)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,F);if(L==k||L==_||R&&!A){if(T=P||R?{}:v(t),!F)return P?p(t,u(T,t)):c(t,i(T,t))}else{if(!S[L])return A?t:{};T=g(t,L,F)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,T),x(t))return t.forEach(function(r){T.add(e(r,n,j,r,t,M))}),T;if(w(t))return t.forEach(function(r,o){T.set(o,e(r,n,j,o,t,M))}),T;var V=N?P?d:f:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(T,o,e(r,n,j,o,t,M))}),T}},function(e,t,n){var r=n(30),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(43),o=n(34);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(43),o=n(88);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(27),o=n(52),a=n(204),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(48)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*l/a)/100,n.hsl.a!==c)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:c,source:"rgb"}}else{var p;if(p=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==p)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:p,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*l/a+100)/100,n.hsl.h!==c)return{h:c,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var p=void 0;if(p=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==p)return{h:p,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?l=a:c<0?c=0:c>i&&(c=i);var p=100*l/a,f=-100*c/i+100;return{h:n.hsl.h,s:p,v:f,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=F(e,360),t=F(t,100),n=F(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,p,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=T(s),{ok:h,format:e.format||m,r:l(255,c(u.r,0)),g:l(255,c(u.g,0)),b:l(255,c(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r,o,a=c(e,t,n),i=l(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(f(r));return a}function D(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(f({h:r,s:o,v:a})),a=(a+u)%1;return i}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*F(this._r,255))+"%",g:s(100*F(this._g,255))+"%",b:s(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%)":"rgba("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:p(),g:p(),b:p()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),a=n/100;return f({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,a=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},f.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var l=0;ls&&(s=r,u=f(t[l]));return f.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var A=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return l(1,c(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:c.fields,className:"flexbox-fix"},r.default.createElement("div",{style:c.double},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:s.replace("#",""),onChange:p})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.alpha},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:p,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t1?t-1:0),i=1;i-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(61),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(48)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(67)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(36),o=n(145),a=n(146),i=n(147),u=n(148),s=n(149);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(30)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(154),o=n(161),a=n(163),i=n(164),u=n(165);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&ec))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=c}function w(){var e=o();if(y(e))return E(e);f=setTimeout(w,function(e){var n=t-(e-d);return g?u(n,c-(e-h)):n}(e))}function E(e){return f=void 0,v&&s?b(e):(s=l=void 0,p)}function x(){var e=o(),n=y(e);if(s=arguments,l=this,d=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,t),m?b(e):p}(d);if(g)return f=setTimeout(w,t),b(d)}return void 0===f&&(f=setTimeout(w,t)),p}return t=a(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?i(a(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=d=l=f=void 0},x.flush=function(){return void 0===f?p:E(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(239)),o=a(n(241));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],c=!1,p=-1;function f(){c&&s&&(c=!1,s.length?l=s.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=u(f);c=!0;for(var t=l.length;t;){for(s=l,l=[];++p1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,i.polyfill)(f);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(95),i=n(266);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,a.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){var r=n(116);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(120))&&r.__esModule?r:{default:r};t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===c.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);c.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return c.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();p.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},p.defaultProps={options:{}},t.default=p},function(e,t,n){var r=n(251),o=n(252),a=n(256);r(".__observe-resize__ { position: absolute; left: 0; top: -100%; width: 100%; height: 100%; margin: 1px 0 0; border: none; opacity: 0; visibility: hidden; pointer-events: none; }"),e.exports=function(e,t){if(o.ok(a(e),"observe-resize: el should be a valid DOM element"),o.equal(typeof t,"function","observe-resize: cb should be type function"),"object"==typeof window){var n=!1,r=document.createElement("iframe");return r.setAttribute("class","__observe-resize__"),e.appendChild(r),o.ok(r.contentWindow,"observe-resize: no contentWindow detected - cannot start observing"),r.contentWindow.onresize=function(){n||(n=!0,window.requestAnimationFrame(function(){n=!1,t(e)}))},function(){r.parentNode&&r.parentNode.removeChild(r)}}}},function(e,t,n){(function(t){for(var r=n(259),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],l=0;!u&&l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){var r=n(276),o=n(277);e.exports=function(e,t){return o(r,e,t)}},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var u=0;for(e=0===i?"":e[0]+" ";ur&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===p.inserted[v]&&(n="",h(e,t),p.inserted[v]=n)}var O=function(){var e=E.apply(this,arguments),t=a+"-"+v;return void 0===p.registered[t]&&(p.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){p.inserted[e]=!0}if(c){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){c&&(d.flush(),d.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=l(n(1)),o=l(n(21)),a=l(n(25)),i=n(44),u=l(n(244)),s=l(n(245));function l(e){return e&&e.__esModule?e:{default:e}}var c=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,l=e.hsv,c=e.hsl,p=e.onChange,f=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:c,hsv:l,onChange:p})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:c,onChange:p})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:c,renderers:m,onChange:p}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:c,hex:o,onChange:p,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:p,onSwatchHover:f}))};c.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},c.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(c)},function(e,t,n){"use strict";var r=n(122);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(124)),o=u(n(46)),a=u(n(135)),i=u(n(136));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(29),o=n(23),a=n(26);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(33),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(128)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(37);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(36);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(36),o=n(56),a=n(57);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(68),o=n(151),a=n(27),i=n(72),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,p=l.hasOwnProperty,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:u).test(i(e))}},function(e,t,n){var r,o=n(152),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(155),o=n(36),a=n(56);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(156),o=n(157),a=n(158),i=n(159),u=n(160);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(199);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(54),o=n(85),a=n(86),i=n(201),u=n(202),s=n(205),l=n(206),c=n(207),p=n(208),f=n(76),d=n(209),h=n(40),m=n(210),g=n(211),v=n(216),b=n(23),y=n(47),w=n(218),E=n(27),x=n(220),O=n(34),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var T,F=1&n,P=2&n,N=4&n;if(j&&(T=A?j(t,D,A,M):j(t)),void 0!==T)return T;if(!E(t))return t;var I=b(t);if(I){if(T=m(t),!F)return l(t,T)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,F);if(L==k||L==_||R&&!A){if(T=P||R?{}:v(t),!F)return P?p(t,u(T,t)):c(t,i(T,t))}else{if(!S[L])return A?t:{};T=g(t,L,F)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,T),x(t))return t.forEach(function(r){T.add(e(r,n,j,r,t,M))}),T;if(w(t))return t.forEach(function(r,o){T.set(o,e(r,n,j,o,t,M))}),T;var V=N?P?d:f:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(T,o,e(r,n,j,o,t,M))}),T}},function(e,t,n){var r=n(30),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(43),o=n(34);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(43),o=n(88);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(27),o=n(52),a=n(204),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(48)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*l/a)/100,n.hsl.a!==c)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:c,source:"rgb"}}else{var p;if(p=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==p)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:p,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*l/a+100)/100,n.hsl.h!==c)return{h:c,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var p=void 0;if(p=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==p)return{h:p,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?l=a:c<0?c=0:c>i&&(c=i);var p=100*l/a,f=-100*c/i+100;return{h:n.hsl.h,s:p,v:f,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=F(e,360),t=F(t,100),n=F(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,p,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=T(s),{ok:h,format:e.format||m,r:l(255,c(u.r,0)),g:l(255,c(u.g,0)),b:l(255,c(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r,o,a=c(e,t,n),i=l(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(f(r));return a}function D(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(f({h:r,s:o,v:a})),a=(a+u)%1;return i}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*F(this._r,255))+"%",g:s(100*F(this._g,255))+"%",b:s(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%)":"rgba("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:p(),g:p(),b:p()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),a=n/100;return f({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,a=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},f.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var l=0;ls&&(s=r,u=f(t[l]));return f.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var A=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return l(1,c(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:c.fields,className:"flexbox-fix"},r.default.createElement("div",{style:c.double},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:s.replace("#",""),onChange:p})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.alpha},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:p,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},c=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},p=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r,a){if(0===e||e){var s,l=a||o,c=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var p=t||(n||g).dateFormat,f=String(e).trim();if("today"===f)s=new Date,r=!0;else if(/Z$/.test(f)||/GMT$/.test(f))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,p);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function w(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(c=o===s.hourElement?c-i-t(!s.amPM):a,f&&N(void 0,1,s.hourElement)),s.amPM&&p&&(1===u?c+l===23:Math.abs(c-l)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(c)}}(n);var r=s._input.value;C(),ge(),s._input.value!==r&&s._debouncedChange()}}function C(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var l=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,l.getHours()))===l.getHours()&&(o=Math.max(o,l.getMinutes())),o===l.getMinutes()&&(a=Math.max(a,l.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function T(){pe("onChange")}function F(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function L(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===f(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===f(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===f(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&f(e,s.selectedDates[0])>=0&&f(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),pe("onDayCreate",a),a}function R(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var l=o.children[u];if(-1===l.className.indexOf("hidden")&&J(l.dateObj))return l}}function V(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,l=i.children.length,c=u;c>=0&&c0?l:-1);c+=o){var p=i.children[c];if(-1===p.className.indexOf("hidden")&&J(p.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return R(p)}s.changeMonth(o),V(H(o),0)}(r,t):R(r)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",l=i?"nextMonthDay hidden":"nextMonthDay",c=r+1-n,p=0;c<=r;c++,p++)a.appendChild(L(u,new Date(e,t-1,c),c,p));for(c=1;c<=o;c++,p++)a.appendChild(L("",new Date(e,t,c),c,p));for(var f=o+1;f<=42-n&&(1===s.config.showMonths||p%7!=0);f++,p++)a.appendChild(L(l,new Date(e,t+1,f%o),f,p));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,pe("onYearChange")),U(),pe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),pe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&f(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&f(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),V(H(1),0)):V(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),V(H(1),0)):a||V(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var l=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),c=l.indexOf(e.target);if(-1!==c){var p=l[c+(e.shiftKey?-1:1)];void 0!==p?(e.preventDefault(),p.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],C(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],C(),ge()}pe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,l=0,c=r;cr&&cu)?u=c:c>n&&(!l||c0&&c0&&c>l;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=c||(nt&&c===n&&a.classList.add("endRange"),c>=u&&(0===l||c<=l)&&d(c,n,t)&&a.classList.add("inRange")))))},v=0,b=f.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===_.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},_.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?_.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=c(s),s.parseDate=p({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){pe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),l=window.innerHeight-u.bottom,c="above"===a||"below"!==a&&ln,p=window.pageYOffset+u.top+(c?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!c),v(s.calendarContainer,"arrowBottom",c),!s.config.inline){var f=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=f+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=p+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=f+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==f(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&pe("onYearChange"),pe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():R(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,l="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||l)&&ie()}T()}}s.parseDate=p({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&pe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),pe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&pe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=F,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void pe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),pe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),F(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);le(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),F(),k(),ge(t),t&&pe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function le(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ce(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function pe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&pe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=ce(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=ce(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):_.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):_.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var l=0;l-1?s.config[f]=r(p[f]).map(g).concat(s.config[f]):void 0===t[f]&&(s.config[f]=p[f])}pe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&le(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),pe("onChange"),pe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(T,E),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),T()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),pe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o=0;l--)if(c[l]!==p[l])return!1;for(l=c.length-1;l>=0;l--)if(!b(e[s=c[l]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&w(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(p.AssertionError,Error),p.fail=g,p.ok=v,p.equal=function(e,t,n){e!=t&&g(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){E(!0,e,t,n)},p.doesNotThrow=function(e,t,n){E(!1,e,t,n)},p.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(31))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),c(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=c(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return p(n)}var l,w="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(w=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),x(n)&&(w=" "+p(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,w,C)):C[0]+w+C[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?c(e,s.value,null):c(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function x(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=w,t.isDate=E,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(254);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(255),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(31),n(93))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(93))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(261)),o=u(n(264)),a=u(n(1)),i=u(n(94));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var l=o in t,c=o in u,p=t[o],f=(0,r.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,r.isValidElement)(p)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:p.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(p.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return c()({},e,s()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(p.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function d(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function h(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function m(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function g(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function v(e,t){return e.validation[t]||null}function b(e,t){return-1===e.hiddenFields.indexOf(t)}Object(i.registerStore)("carbon-fields/core",{reducer:f,actions:r,selectors:o});var y=n(18),w=n.n(y),E=n(14),x=n(19),O=n(6),_=n.n(O),C=n(7),k=n.n(C),S=n(8),j=n.n(S),D=n(9),A=n.n(D),M=n(10),T=n.n(M),F=n(0),P=n.n(F),N=n(3),I=16;function L(e){return Object(E.createHigherOrderComponent)(function(t){return function(n){function r(n){var o;return _()(this,r),(o=j()(this,A()(r).call(this,n))).onHooksUpdated=o.onHooksUpdated.bind(P()(P()(o))),o.Component=Object(x.applyFilters)(e,t),o.namespace=Object(p.uniqueId)("core/with-filters/component-"),o.throttledForceUpdate=Object(p.debounce)(function(){o.Component=Object(x.applyFilters)(e,t),o.forceUpdate()},I),Object(x.addAction)("hookRemoved",o.namespace,o.onHooksUpdated),Object(x.addAction)("hookAdded",o.namespace,o.onHooksUpdated),o}return T()(r,n),k()(r,[{key:"componentWillUnmount",value:function(){this.throttledForceUpdate.cancel(),Object(x.removeAction)("hookRemoved",this.namespace),Object(x.removeAction)("hookAdded",this.namespace)}},{key:"onHooksUpdated",value:function(t){t===e&&this.throttledForceUpdate()}},{key:"render",value:function(){return wp.element.createElement(this.Component,this.props)}}]),r}(N.Component)},"withFilters")}function R(e,t){var n,r=Object(p.startCase)(e),o={};return n={},s()(n,"register".concat(r,"Type"),function(n,i){return Object(p.isString)(n)?o[n]?(console.error(Object(a.sprintf)(Object(a.__)("%1$s %2$s is already registered.","carbon-fields-ui"),r,n)),!1):i&&Object(p.isFunction)(i)?(o[n]=t.reduce(function(t,r){return c()({},t,s()({},r,Object(x.applyFilters)("carbon-fields.register-".concat(e,"-type"),n,r,i)))},{}),!0):(console.error(Object(a.__)('The "component" param must be a function.',"carbon-fields-ui")),!1):(console.error(Object(a.sprintf)(Object(a.__)("%1$s type must be a string.","carbon-fields-ui"),r)),!1)}),s()(n,"get".concat(r,"Type"),function(e,n){if(t.includes(n)){if(o[e])return o[e][n];console.error(Object(a.sprintf)(Object(a.__)("%s %s isn't registered.","carbon-fields-ui"),r,e))}else console.error(Object(a.sprintf)(Object(a.__)("The provided context isn't a valid one. Must be one of - %s .","carbon-fields-ui"),t.join(", ")))}),n}var H=R("field",["metabox","block"]),V=H.registerFieldType,B=H.getFieldType,U=n(16),z=n.n(U),W=n(32),Y=n.n(W),G=n(17),q=n(20),K=n.n(q),X=n(11),J=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(r,o){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){r(e)}),i.fail(function(){o(Object(a.__)("An error occured.","carbon-fields-ui"))})})},ue=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&i.length>=r.max?alert(Object(a.sprintf)(Object(a.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(u(o,w()(i).concat([Object(p.pick)(e,"id","type","subtype")])),s({selectedOptions:w()(l).concat([e])})))}),s()(P()(P()(n)),"handleRemoveItem",function(e){var t=n.props,r=t.value,o=t.id,a=t.onChange,i=t.setState,u=t.selectedOptions;a(o,Object(p.without)(r,e)),i({selectedOptions:Object(p.without)(u,e)})}),s()(P()(P()(n)),"handleSort",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),n}return T()(t,e),k()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.value,o=t.field,i=t.totalOptionsCount,u=t.selectedOptions,s=t.queryTerm,l=this.props.options;return o.duplicates_allowed||(l=Y()(l,function(e){e.map(function(e){return e.disabled=!!Object(p.find)(r,function(t){return Object(p.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),wp.element.createElement(N.Fragment,null,wp.element.createElement("div",{className:"cf-association__bar"},wp.element.createElement(oe,{value:s,onChange:this.handleSearchChange}),wp.element.createElement("span",{className:"cf-association__counter"},Object(a.sprintf)(Object(a.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(l.length),Number(i)))),wp.element.createElement("div",{className:"cf-association__cols"},wp.element.createElement("div",{className:"cf-association__col"},l.map(function(t,n){return wp.element.createElement("div",{className:K()("cf-association__option",{"cf-association__option--selected":t.disabled}),key:n},t.thumbnail&&wp.element.createElement("img",{className:"cf-association__option-thumb",src:t.thumbnail}),wp.element.createElement("div",{className:"cf-association__option-content"},wp.element.createElement("span",{className:"cf-association__option-title"},t.title),wp.element.createElement("span",{className:"cf-association__option-type"},t.type)),wp.element.createElement("div",{className:"cf-association__option-actions"},wp.element.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:t.edit_link}),!t.disabled&&(o.max<0||r.length0&&t.length=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(he.createElement)(e,n)},a}(he.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r},Se=ke(function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a1?n.setState(function(e){return{menuVisible:!e.menuVisible}}):r(t[0])}),s()(P()(P()(n)),"handleItemClick",function(e){n.setState({menuVisible:!1}),n.props.onSelect(e)}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.buttonText,r=t.groups;return wp.element.createElement("div",{className:"cf-complex__inserter"},wp.element.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},n),r.length>1&&wp.element.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},r.map(function(t,n){return wp.element.createElement("li",{className:"cf-complex__inserter-item",key:n,onClick:function(){return e.handleItemClick(t)}},t.label)})))}}]),t}(N.Component)),Ne=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;n.setState({currentTab:Object(p.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),s()(P()(P()(n)),"handleToggleAllClick",function(){var e=n.props,t=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!t)}),s()(P()(P()(n)),"handleGroupsSortStart",function(e,t){var r=n.props,o=r.value,a=r.groupIdKey,i=t.item.index(),u=Object(p.get)(o,"".concat(i,".").concat(a),null);n.setState({currentDraggedGroup:u})}),s()(P()(P()(n)),"handleGroupsSortUpdate",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),s()(P()(P()(n)),"handleGroupsSortStop",function(){n.setState({currentDraggedGroup:null})}),s()(P()(P()(n)),"handleTabsChange",function(e){n.setState({currentTab:e})}),n}return T()(t,e),k()(t,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(p.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=z()(e,2),o=r[0],i=r[1],u=Object(p.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(p.isString)(u.label_template))return u.label;try{return Object(p.template)(u.label_template)(c()({$_index:n},i))||u.label}catch(e){return console.error(Object(a.sprintf)(Object(a.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var e=this,t=this.state,n=t.currentDraggedGroup,r=t.currentTab,o=this.props,i=o.value,u=o.field,s=o.groupIdKey,l=o.groupFilterKey,c=o.allGroupsAreCollapsed,p=o.onGroupSetup,f=o.onGroupFieldSetup,d=o.onToggleGroup,h=this.getAvailableGroups(l),m=this.getGroupLabels(),g=i.map(function(e,t){return{id:e[s],label:m[t]}});return wp.element.createElement(N.Fragment,null,this.isTabbed&&!!i.length&&wp.element.createElement(ae,{items:i,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===u.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},wp.element.createElement(Fe,{ref:this.tabsList,items:g,current:r,layout:u.layout,onChange:this.handleTabsChange},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Pe,{buttonText:"+",groups:h,onSelect:this.handleAddGroup}))),!i.length&&wp.element.createElement(Ie,{label:"There are no entries yet."},wp.element.createElement(Pe,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup})),!!i.length&&wp.element.createElement(ae,{items:i,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},wp.element.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},i.map(function(t,o){return wp.element.createElement(Ne,Q()({key:"".concat(t[l],"-").concat(o)},p(t,{index:o,label:m[o],dragged:t[s]===n,tabbed:e.isTabbed,hidden:e.isTabbed&&t[s]!==r,allowClone:u.duplicate_groups_allowed&&!e.isMaximumReached,onFieldSetup:f,onClone:e.handleCloneGroup,onRemove:e.handleRemoveGroup,onToggle:d})))}))),!this.isTabbed&&!!i.length&&wp.element.createElement("div",{className:"cf-complex__actions"},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Pe,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup}),wp.element.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},c?Object(a.__)("Expand All","carbon-fields-ui"):Object(a.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(a.sprintf)(Object(a.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),t}(N.Component);Object(x.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(e){return function(t){var n=t.field;return"complex"!==n.type?wp.element.createElement(e,t):wp.element.createElement(e,Q()({className:"cf-complex--".concat(n.layout)},t))}}),Object(x.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(p.isEmpty)(t))return Object(a.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Et=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},xt=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Ot=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function jt(e){return St(e)?window.pageYOffset:e.scrollTop}function Dt(e,t){St(e)?window.scrollTo(0,t):e.scrollTop=t}function At(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_t,o=jt(e),a=t-o,i=0;!function t(){var u,s=a*((u=(u=i+=10)/n-1)*u*u+1)+o;Dt(e,s),i=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&At(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&E>=r)return a&&At(s,_,160),{placement:"bottom",maxHeight:i?E-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&w>=r)&&(k=i?w-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return Dt(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&At(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&w>=r){var S=t;return(!i&&x>=r||i&&w>=r)&&(S=i?w-y:x-y),a&&At(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!c,isFixedPosition:c,theme:s});l&&l(p),r.setState(p)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||Tt(e);return bt({},r.props,{placement:t,maxHeight:r.state.maxHeight})},Et(r,n)}return yt(t,e),gt(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(he.Component);Ft.contextTypes={getPortalPlacement:st.a.func};var Pt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},Nt=Pt,It=Pt,Lt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};Lt.defaultProps={children:"No options"};var Rt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};Rt.defaultProps={children:"Loading..."};var Ht=function(e){function t(){var e,n,r;mt(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=c-p-l,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),f.scrollTop=c,m=!0,r.isBottom=!0):!d&&-t>l&&(i&&!r.isTop&&i(e),f.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},Et(r,n)}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return me.a.createElement(Xt,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(he.Component),ln=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=wt(e,["isEnabled"]);return t?me.a.createElement(sn,n):this.props.children}}]),t}(he.Component);ln.defaultProps={isEnabled:!0};var cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,i=e.hasValue;return me.a.createElement("div",{className:r(Object(it.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i},n)},t)}}]),t}(he.Component),pn=function(e){var t=e.size,n=wt(e,["size"]);return me.a.createElement("svg",bt({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(it.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},fn=function(e){return me.a.createElement(pn,bt({size:20},e),me.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},dn=function(e){return me.a.createElement(pn,bt({size:20},e),me.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},hn=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},mn=hn,gn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({},a,{className:r(Object(it.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};gn.defaultProps={children:me.a.createElement(dn,null)};var vn=hn,bn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({},a,{className:r(Object(it.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};bn.defaultProps={children:me.a.createElement(fn,null)};var yn=function(e){var t=e.color,n=e.delay,r=e.offset;return me.a.createElement("span",{className:Object(it.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(it.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var wn=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,i=e.isRtl,u=e.theme.colors,s=a?u.neutral80:u.neutral20;return me.a.createElement("div",bt({},o,{className:n(Object(it.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),me.a.createElement(yn,{color:s,delay:0,offset:i}),me.a.createElement(yn,{color:s,delay:160,offset:!0}),me.a.createElement(yn,{color:s,delay:320,offset:!i}))};wn.defaultProps={size:4};var En=function(e){var t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)},xn=En,On=En,_n=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)}}]),t}(he.Component);_n.defaultProps={children:me.a.createElement(fn,{size:14})};var Cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,i=e.getStyles,u=e.innerProps,s=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove,h=bt({className:o(Object(it.a)(i("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),m={className:o(Object(it.a)(i("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=bt({className:o(Object(it.a)(i("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return me.a.createElement(p,{data:a,innerProps:h,selectProps:c},me.a.createElement(f,{data:a,innerProps:m,selectProps:c},t),me.a.createElement(d,{data:a,innerProps:g,selectProps:c}))}}]),t}(he.Component);Cn.defaultProps={cropWithEllipsis:!0};var kn={ClearIndicator:bn,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,i=e.isFocused,u=e.innerRef,s=e.innerProps;return me.a.createElement("div",bt({ref:u,className:n(Object(it.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":i},o)},s),t)},DropdownIndicator:gn,DownChevron:dn,CrossIcon:fn,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,i=e.headingProps,u=e.label,s=e.theme;return me.a.createElement("div",{className:r(Object(it.a)(o("group",e)),{group:!0},n)},me.a.createElement(a,bt({},i,{theme:s,getStyles:o,cx:r}),u),me.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=wt(e,["className","cx","getStyles","theme"]);return me.a.createElement("div",bt({className:n(Object(it.a)(r("groupHeading",bt({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return me.a.createElement("div",{className:r(Object(it.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return me.a.createElement("span",bt({},o,{className:n(Object(it.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,i=e.isDisabled,u=e.theme,s=wt(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return me.a.createElement("div",{className:Object(it.a)(r("input",bt({theme:u},s)))},me.a.createElement(ct.a,bt({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:i},s)))},LoadingIndicator:wn,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,i=e.innerProps,u=r(Object(it.a)(o("menu",e)),{menu:!0},n);return me.a.createElement("div",bt({className:u},i,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,i=e.innerRef;return me.a.createElement("div",{className:r(Object(it.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:i},t)},MenuPortal:Ht,LoadingMessage:Rt,NoOptionsMessage:Lt,MultiValue:Cn,MultiValueContainer:xn,MultiValueLabel:On,MultiValueRemove:_n,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.isFocused,u=e.isSelected,s=e.innerRef,l=e.innerProps;return me.a.createElement("div",bt({ref:s,className:r(Object(it.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":i,"option--is-selected":u},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,i=e.isDisabled,u=e.isRtl;return me.a.createElement("div",bt({className:r(Object(it.a)(o("container",e)),{"--is-disabled":i,"--is-rtl":u},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},i),t)},ValueContainer:cn},Sn=function(e){return bt({},kn,e.components)},jn={clearIndicator:vn,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:mn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:It,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return vt(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),vt(t,"backgroundColor",i.neutral0),vt(t,"borderRadius",o),vt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),vt(t,"marginBottom",a.menuGutter),vt(t,"marginTop",a.menuGutter),vt(t,"position","absolute"),vt(t,"width","100%"),vt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Nt,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Dn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},An={backspaceRemovesValue:!0,blurInputOnSelect:Mt(),captureMenuScroll:!Mt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=bt({ignoreCase:!0,ignoreAccents:!0,stringify:qt,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?Gt(t):t,l=i?Gt(a(e)):a(e);return r&&(s=s.toLowerCase(),l=l.toLowerCase()),o&&(s=Yt(s),l=Yt(l)),"start"===u?l.substr(0,s.length)===s:l.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Mn=1,Tn=function(e){function t(e){mt(this,t);var n=Et(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Fn.call(n);var r=e.value;n.cacheComponents=ft(n.cacheComponents,zt).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Mn);var o=kt(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=kt(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,l=this.state.isFocused;(l&&!u&&e.isDisabled||l&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?Dt(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,l=-1;if(a.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Dn):bt({},Dn,this.props.theme):Dn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+Ct(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var l=a?void 0:function(){return n.onOptionHover(e)},c=a?void 0:function(){return n.selectOption(e)},p=n.getElementId("option")+"-"+r;return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:p,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,l=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:l({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=this.components.Input,u=this.state.inputIsHidden,s=r||this.getElementId("input");if(!n)return me.a.createElement(Kt,{id:s,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:_t,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps,p=c.cx,f=c.theme;return me.a.createElement(i,bt({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:s,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:f,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,u=t.Placeholder,s=this.commonProps,l=this.props,c=l.controlShouldRenderValue,p=l.isDisabled,f=l.isMulti,d=l.inputValue,h=l.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue;if(!this.hasValue()||!c)return d?null:me.a.createElement(u,bt({},s,{key:"placeholder",isDisabled:p}),h);if(f)return g.map(function(t){var i=t===v;return me.a.createElement(n,bt({},s,{components:{Container:r,Label:o,Remove:a},isFocused:i,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(d)return null;var b=g[0];return me.a.createElement(i,bt({},s,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,bt({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?me.a.createElement(e,bt({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return me.a.createElement(n,bt({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,bt({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,u=t.LoadingMessage,s=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,f=p.focusedOption,d=p.menuOptions,h=this.props,m=h.captureMenuScroll,g=h.inputValue,v=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,E=h.menuIsOpen,x=h.menuPlacement,O=h.menuPosition,_=h.menuPortalTarget,C=h.menuShouldBlockScroll,k=h.menuShouldScrollIntoView,S=h.noOptionsMessage,j=h.onMenuScrollToTop,D=h.onMenuScrollToBottom;if(!E)return null;var A=function(t){var n=f===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,me.a.createElement(l,bt({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},M=void 0;if(this.hasOptions())M=d.render.map(function(t){if("group"===t.type){t.type;var o=wt(t,["type"]),a=t.key+"-heading";return me.a.createElement(n,bt({},c,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return A(e)}))}if("option"===t.type)return A(t)});else if(v){var T=b({inputValue:g});if(null===T)return null;M=me.a.createElement(u,c,T)}else{var F=S({inputValue:g});if(null===F)return null;M=me.a.createElement(s,c,F)}var P={minMenuHeight:y,maxMenuHeight:w,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:k},N=me.a.createElement(Ft,bt({},c,P),function(t){var n=t.ref,r=t.placerProps,i=r.placement,u=r.maxHeight;return me.a.createElement(o,bt({},c,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:i}),me.a.createElement(ln,{isEnabled:m,onTopArrive:j,onBottomArrive:D},me.a.createElement(un,{isEnabled:C},me.a.createElement(a,bt({},c,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:u}),M))))});return _||"fixed"===O?me.a.createElement(i,bt({},c,{appendTo:_,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=this.state.selectValue;if(a&&!r){if(o){if(n){var u=i.map(function(t){return e.getOptionValue(t)}).join(n);return me.a.createElement("input",{name:a,type:"hidden",value:u})}var s=i.length>0?i.map(function(t,n){return me.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):me.a.createElement("input",{name:a,type:"hidden"});return me.a.createElement("div",null,s)}var l=i[0]?this.getOptionValue(i[0]):"";return me.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?me.a.createElement($t,{"aria-live":"assertive"},me.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),me.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,u=a.id,s=a.isDisabled,l=this.state.isFocused,c=this.commonProps=this.getCommonProps();return me.a.createElement(r,bt({},c,{className:i,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),me.a.createElement(t,bt({},c,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l}),me.a.createElement(o,bt({},c,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),me.a.createElement(n,bt({},c,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(he.Component);Tn.defaultProps=An;var Fn=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=Sn({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(Ot(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=jn[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,bt({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&St(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=xt(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=xt(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof c&&(c(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!l||!p||!m||f&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(l){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":l?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!l){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":l?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":l?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!l)return;e.focusOption("pageup");break;case"PageDown":if(!l)return;e.focusOption("pagedown");break;case"Home":if(!l)return;e.focusOption("first");break;case"End":if(!l)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Pn=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;mt(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o-1})}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.field;return o.options.length>0?wp.element.createElement(Yn,{id:t,name:n,value:this.filterValues(r),options:o.options,delimiter:o.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):wp.element.createElement(Gn,null)}}]),t}(N.Component),$n=(n(267),function(e){function t(){var e;return _()(this,t),(e=j()(this,A()(t).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(P()(P()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(P()(P()(e))),e}return T()(t,e),k()(t,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,l=u.height;"resize"!==o||s===a&&l===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"cf-oembed__preview"},wp.element.createElement("iframe",{ref:function(t){return e.iframe=t},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var e="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",t="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(e,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),n=wp.element.createElement("html",{lang:document.documentElement.lang},wp.element.createElement("head",null,wp.element.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),wp.element.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),wp.element.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:t}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(N.renderToString)(n)),this.iframe.contentWindow.document.close()}}}]),t}(N.Component)),Kn=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.embedCode,a=e.embedType,i=e.provider;return wp.element.createElement("div",{ref:this.node},wp.element.createElement(oe,{id:t,value:r,onChange:this.handleChange}),o?wp.element.createElement($n,{html:o,type:a,provider:i}):null,wp.element.createElement("input",{type:"hidden",name:n,value:r,readOnly:!0}))}}]),t}(N.Component),Xn=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),Jn=Object(G.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=z()(t,2),r=n[0],o=n[1],a=Object(X.pipe)(J({onFetchEmbedCode:o}),Object(X.map)(G.toProps)),i=Object(X.pipe)(r,Object(X.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(X.merge)(a,i)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(a.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(a.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}}),Zn=Object(E.compose)(Xn,Jn)(Kn),Qn=(n(268),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():wp.element.createElement(Gn,null)}}]),t}(N.Component)),er=(n(269),He(function(e){return c()({},e,{field:c()({},e.field,{options:e.field.options.map(function(e){return c()({},e,{label:wp.element.createElement("img",{className:"cf-radio-image__image",src:e.label})})})})})})(Qn)),tr=function(e){function t(){var e;return _()(this,t),e=j()(this,A()(t).call(this)),s()(P()(P()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(p.isString)(t)?t:t.target.value)}),s()(P()(P()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=c()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=c()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return T()(t,e),k()(t,[{key:"componentDidMount",value:function(){setTimeout(this.initEditor,100)}},{key:"componentWillUnmount",value:function(){this.destroyEditor()}},{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,i=t.field,u=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":i.rich_editing},{"html-active":!i.rich_editing}],s=i.media_buttons?Object(p.template)(i.media_buttons)({id:n}):null;return wp.element.createElement("div",{id:"wp-".concat(n,"-wrap"),className:K()(u),ref:function(t){return e.editorNode=t}},i.media_buttons&&wp.element.createElement("div",{id:"wp-".concat(n,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:s}})),i.rich_editing&&wp.element.createElement("div",{className:"wp-editor-tabs"},wp.element.createElement("button",{type:"button",id:"".concat(n,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":n},Object(a.__)("Visual","carbon-fields-ui")),wp.element.createElement("button",{type:"button",id:"".concat(n,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":n},Object(a.__)("Text","carbon-fields-ui"))),wp.element.createElement("div",{id:"wp-".concat(n,"-editor-container"),className:"wp-editor-container"},wp.element.createElement("textarea",Q()({style:{width:"100%"},className:"regular-text",id:n,name:r,value:o,onChange:this.handleChange},i.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),t}(N.Component),nr=(n(270),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?wp.element.createElement("select",{id:t,name:n,value:r||Object(p.get)(o.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},o.options.map(function(e){return wp.element.createElement("option",{key:e.value,value:e.value},e.label)})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),rr=(n(271),function(e){function t(){return _()(this,t),j()(this,A()(t).apply(this,arguments))}return T()(t,e),k()(t,[{key:"render",value:function(){return wp.element.createElement("h3",null,this.props.field.label)}}]),t}(N.Component)),or=(n(272),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a-1}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?wp.element.createElement("ul",{className:"cf-set__list"},a.options.map(function(t,i){return wp.element.createElement("li",{className:"cf-set__list-item",key:i},wp.element.createElement("input",Q()({type:"checkbox",id:"".concat(n,"-").concat(t.value),name:"".concat(r,"[]"),checked:e.isChecked(o,t),value:t.value,className:"cf-set__input",onChange:e.handleChange},a.attributes)),wp.element.createElement("label",{className:"cf-set__label",htmlFor:"".concat(n,"-").concat(t.value)},t.label))})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),ar=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(p.some)(n,function(t){return t==e});case"NOT IN":return Object(p.every)(n,function(t){return t!=e});case"INCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),l=!1;switch(o){case"AND":l=Object(p.every)(s);break;case"OR":l=Object(p.some)(s)}l?e.showField(e.id):e.hideField(e.id)}}return Object(E.createHigherOrderComponent)(function(e){return Object(E.compose)(Object(i.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(i.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(G.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var xr=n(105),Or=n.n(xr),_r="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function Cr(){return"cf-".concat(Or()(_r,21))}function kr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;l--)if(c[l]!==p[l])return!1;for(l=c.length-1;l>=0;l--)if(!b(e[s=c[l]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&w(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(p.AssertionError,Error),p.fail=g,p.ok=v,p.equal=function(e,t,n){e!=t&&g(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){E(!0,e,t,n)},p.doesNotThrow=function(e,t,n){E(!1,e,t,n)},p.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(31))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),c(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=c(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return p(n)}var l,w="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(w=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),x(n)&&(w=" "+p(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,w,C)):C[0]+w+C[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?c(e,s.value,null):c(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function x(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=w,t.isDate=E,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(254);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(255),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(31),n(93))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(93))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(261)),o=u(n(264)),a=u(n(1)),i=u(n(94));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var l=o in t,c=o in u,p=t[o],f=(0,r.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,r.isValidElement)(p)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:p.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(f.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return p()({},e,l()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(f.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function h(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function m(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function g(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function v(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function b(e,t){return e.validation[t]||null}function y(e,t){return-1===e.hiddenFields.indexOf(t)}Object(u.registerStore)("carbon-fields/core",{reducer:d,actions:r,selectors:o});var w=n(19),E=n.n(w),x=n(14),O=n(6),_=n.n(O),C=n(7),k=n.n(C),S=n(8),j=n.n(S),D=n(9),A=n.n(D),M=n(10),T=n.n(M),F=n(0),P=n.n(F),N=n(3),I=16;function L(e){return Object(x.createHigherOrderComponent)(function(t){return function(n){function r(n){var o;return _()(this,r),(o=j()(this,A()(r).call(this,n))).onHooksUpdated=o.onHooksUpdated.bind(P()(P()(o))),o.Component=Object(i.applyFilters)(e,t),o.namespace=Object(f.uniqueId)("core/with-filters/component-"),o.throttledForceUpdate=Object(f.debounce)(function(){o.Component=Object(i.applyFilters)(e,t),o.forceUpdate()},I),Object(i.addAction)("hookRemoved",o.namespace,o.onHooksUpdated),Object(i.addAction)("hookAdded",o.namespace,o.onHooksUpdated),o}return T()(r,n),k()(r,[{key:"componentWillUnmount",value:function(){this.throttledForceUpdate.cancel(),Object(i.removeAction)("hookRemoved",this.namespace),Object(i.removeAction)("hookAdded",this.namespace)}},{key:"onHooksUpdated",value:function(t){t===e&&this.throttledForceUpdate()}},{key:"render",value:function(){return wp.element.createElement(this.Component,this.props)}}]),r}(N.Component)},"withFilters")}function R(e,t){var n,r=Object(f.startCase)(e),o={};return n={},l()(n,"register".concat(r,"Type"),function(n,u){return Object(f.isString)(n)?o[n]?(console.error(Object(a.sprintf)(Object(a.__)("%1$s %2$s is already registered.","carbon-fields-ui"),r,n)),!1):u&&Object(f.isFunction)(u)?(o[n]=t.reduce(function(t,r){return p()({},t,l()({},r,Object(i.applyFilters)("carbon-fields.register-".concat(e,"-type"),n,r,u)))},{}),!0):(console.error(Object(a.__)('The "component" param must be a function.',"carbon-fields-ui")),!1):(console.error(Object(a.sprintf)(Object(a.__)("%1$s type must be a string.","carbon-fields-ui"),r)),!1)}),l()(n,"get".concat(r,"Type"),function(e,n){if(t.includes(n)){if(o[e])return o[e][n];console.error(Object(a.sprintf)(Object(a.__)("%s %s isn't registered.","carbon-fields-ui"),r,e))}else console.error(Object(a.sprintf)(Object(a.__)("The provided context isn't a valid one. Must be one of - %s .","carbon-fields-ui"),t.join(", ")))}),n}var H=R("field",["metabox","block"]),V=H.registerFieldType,B=H.getFieldType,U=n(16),z=n.n(U),W=n(32),Y=n.n(W),G=n(17),q=n(20),K=n.n(q),X=n(11),J=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(r,o){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){r(e)}),i.fail(function(){o(Object(a.__)("An error occured.","carbon-fields-ui"))})})},ue=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&i.length>=r.max?alert(Object(a.sprintf)(Object(a.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(u(o,E()(i).concat([Object(f.pick)(e,"id","type","subtype")])),s({selectedOptions:E()(l).concat([e])})))}),l()(P()(P()(n)),"handleRemoveItem",function(e){var t=n.props,r=t.value,o=t.id,a=t.onChange,i=t.setState,u=t.selectedOptions;a(o,Object(f.without)(r,e)),i({selectedOptions:Object(f.without)(u,e)})}),l()(P()(P()(n)),"handleSort",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),n}return T()(t,e),k()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.value,o=t.field,i=t.totalOptionsCount,u=t.selectedOptions,s=t.queryTerm,l=this.props.options;return o.duplicates_allowed||(l=Y()(l,function(e){e.map(function(e){return e.disabled=!!Object(f.find)(r,function(t){return Object(f.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),wp.element.createElement(N.Fragment,null,wp.element.createElement("div",{className:"cf-association__bar"},wp.element.createElement(oe,{value:s,onChange:this.handleSearchChange}),wp.element.createElement("span",{className:"cf-association__counter"},Object(a.sprintf)(Object(a.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(l.length),Number(i)))),wp.element.createElement("div",{className:"cf-association__cols"},wp.element.createElement("div",{className:"cf-association__col"},l.map(function(t,n){return wp.element.createElement("div",{className:K()("cf-association__option",{"cf-association__option--selected":t.disabled}),key:n},t.thumbnail&&wp.element.createElement("img",{className:"cf-association__option-thumb",src:t.thumbnail}),wp.element.createElement("div",{className:"cf-association__option-content"},wp.element.createElement("span",{className:"cf-association__option-title"},t.title),wp.element.createElement("span",{className:"cf-association__option-type"},t.type)),wp.element.createElement("div",{className:"cf-association__option-actions"},wp.element.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:t.edit_link}),!t.disabled&&(o.max<0||r.length0&&t.length=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(he.createElement)(e,n)},a}(he.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r},Se=ke(function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a1?n.setState(function(e){return{menuVisible:!e.menuVisible}}):r(t[0])}),l()(P()(P()(n)),"handleItemClick",function(e){n.setState({menuVisible:!1}),n.props.onSelect(e)}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.buttonText,r=t.groups;return wp.element.createElement("div",{className:"cf-complex__inserter"},wp.element.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},n),r.length>1&&wp.element.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},r.map(function(t,n){return wp.element.createElement("li",{className:"cf-complex__inserter-item",key:n,onClick:function(){return e.handleItemClick(t)}},t.label)})))}}]),t}(N.Component)),Ne=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;n.setState({currentTab:Object(f.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),l()(P()(P()(n)),"handleToggleAllClick",function(){var e=n.props,t=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!t)}),l()(P()(P()(n)),"handleGroupsSortStart",function(e,t){var r=n.props,o=r.value,a=r.groupIdKey,i=t.item.index(),u=Object(f.get)(o,"".concat(i,".").concat(a),null);n.setState({currentDraggedGroup:u})}),l()(P()(P()(n)),"handleGroupsSortUpdate",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),l()(P()(P()(n)),"handleGroupsSortStop",function(){n.setState({currentDraggedGroup:null})}),l()(P()(P()(n)),"handleTabsChange",function(e){n.setState({currentTab:e})}),n}return T()(t,e),k()(t,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(f.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=z()(e,2),o=r[0],i=r[1],u=Object(f.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(f.isString)(u.label_template))return u.label;try{return Object(f.template)(u.label_template)(p()({$_index:n},i))||u.label}catch(e){return console.error(Object(a.sprintf)(Object(a.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var e=this,t=this.state,n=t.currentDraggedGroup,r=t.currentTab,o=this.props,i=o.value,u=o.field,s=o.groupIdKey,l=o.groupFilterKey,c=o.allGroupsAreCollapsed,p=o.onGroupSetup,f=o.onGroupFieldSetup,d=o.onToggleGroup,h=this.getAvailableGroups(l),m=this.getGroupLabels(),g=i.map(function(e,t){return{id:e[s],label:m[t]}});return wp.element.createElement(N.Fragment,null,this.isTabbed&&!!i.length&&wp.element.createElement(ae,{items:i,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===u.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},wp.element.createElement(Fe,{ref:this.tabsList,items:g,current:r,layout:u.layout,onChange:this.handleTabsChange},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Pe,{buttonText:"+",groups:h,onSelect:this.handleAddGroup}))),!i.length&&wp.element.createElement(Ie,{label:"There are no entries yet."},wp.element.createElement(Pe,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup})),!!i.length&&wp.element.createElement(ae,{items:i,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},wp.element.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},i.map(function(t,o){return wp.element.createElement(Ne,Q()({key:"".concat(t[l],"-").concat(o)},p(t,{index:o,label:m[o],dragged:t[s]===n,tabbed:e.isTabbed,hidden:e.isTabbed&&t[s]!==r,allowClone:u.duplicate_groups_allowed&&!e.isMaximumReached,onFieldSetup:f,onClone:e.handleCloneGroup,onRemove:e.handleRemoveGroup,onToggle:d})))}))),!this.isTabbed&&!!i.length&&wp.element.createElement("div",{className:"cf-complex__actions"},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Pe,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup}),wp.element.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},c?Object(a.__)("Expand All","carbon-fields-ui"):Object(a.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(a.sprintf)(Object(a.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),t}(N.Component);Object(i.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(e){return function(t){var n=t.field;return"complex"!==n.type?wp.element.createElement(e,t):wp.element.createElement(e,Q()({className:"cf-complex--".concat(n.layout)},t))}}),Object(i.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(f.isEmpty)(t))return Object(a.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Et=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},xt=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Ot=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function jt(e){return St(e)?window.pageYOffset:e.scrollTop}function Dt(e,t){St(e)?window.scrollTo(0,t):e.scrollTop=t}function At(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_t,o=jt(e),a=t-o,i=0;!function t(){var u,s=a*((u=(u=i+=10)/n-1)*u*u+1)+o;Dt(e,s),i=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&At(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&E>=r)return a&&At(s,_,160),{placement:"bottom",maxHeight:i?E-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&w>=r)&&(k=i?w-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return Dt(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&At(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&w>=r){var S=t;return(!i&&x>=r||i&&w>=r)&&(S=i?w-y:x-y),a&&At(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!c,isFixedPosition:c,theme:s});l&&l(p),r.setState(p)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||Tt(e);return bt({},r.props,{placement:t,maxHeight:r.state.maxHeight})},Et(r,n)}return yt(t,e),gt(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(he.Component);Ft.contextTypes={getPortalPlacement:st.a.func};var Pt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},Nt=Pt,It=Pt,Lt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};Lt.defaultProps={children:"No options"};var Rt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};Rt.defaultProps={children:"Loading..."};var Ht=function(e){function t(){var e,n,r;mt(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=c-p-l,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),f.scrollTop=c,m=!0,r.isBottom=!0):!d&&-t>l&&(i&&!r.isTop&&i(e),f.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},Et(r,n)}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return me.a.createElement(Xt,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(he.Component),ln=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=wt(e,["isEnabled"]);return t?me.a.createElement(sn,n):this.props.children}}]),t}(he.Component);ln.defaultProps={isEnabled:!0};var cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,i=e.hasValue;return me.a.createElement("div",{className:r(Object(it.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i},n)},t)}}]),t}(he.Component),pn=function(e){var t=e.size,n=wt(e,["size"]);return me.a.createElement("svg",bt({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(it.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},fn=function(e){return me.a.createElement(pn,bt({size:20},e),me.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},dn=function(e){return me.a.createElement(pn,bt({size:20},e),me.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},hn=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},mn=hn,gn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({},a,{className:r(Object(it.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};gn.defaultProps={children:me.a.createElement(dn,null)};var vn=hn,bn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({},a,{className:r(Object(it.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};bn.defaultProps={children:me.a.createElement(fn,null)};var yn=function(e){var t=e.color,n=e.delay,r=e.offset;return me.a.createElement("span",{className:Object(it.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(it.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var wn=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,i=e.isRtl,u=e.theme.colors,s=a?u.neutral80:u.neutral20;return me.a.createElement("div",bt({},o,{className:n(Object(it.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),me.a.createElement(yn,{color:s,delay:0,offset:i}),me.a.createElement(yn,{color:s,delay:160,offset:!0}),me.a.createElement(yn,{color:s,delay:320,offset:!i}))};wn.defaultProps={size:4};var En=function(e){var t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)},xn=En,On=En,_n=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)}}]),t}(he.Component);_n.defaultProps={children:me.a.createElement(fn,{size:14})};var Cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,i=e.getStyles,u=e.innerProps,s=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove,h=bt({className:o(Object(it.a)(i("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),m={className:o(Object(it.a)(i("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=bt({className:o(Object(it.a)(i("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return me.a.createElement(p,{data:a,innerProps:h,selectProps:c},me.a.createElement(f,{data:a,innerProps:m,selectProps:c},t),me.a.createElement(d,{data:a,innerProps:g,selectProps:c}))}}]),t}(he.Component);Cn.defaultProps={cropWithEllipsis:!0};var kn={ClearIndicator:bn,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,i=e.isFocused,u=e.innerRef,s=e.innerProps;return me.a.createElement("div",bt({ref:u,className:n(Object(it.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":i},o)},s),t)},DropdownIndicator:gn,DownChevron:dn,CrossIcon:fn,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,i=e.headingProps,u=e.label,s=e.theme;return me.a.createElement("div",{className:r(Object(it.a)(o("group",e)),{group:!0},n)},me.a.createElement(a,bt({},i,{theme:s,getStyles:o,cx:r}),u),me.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=wt(e,["className","cx","getStyles","theme"]);return me.a.createElement("div",bt({className:n(Object(it.a)(r("groupHeading",bt({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return me.a.createElement("div",{className:r(Object(it.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return me.a.createElement("span",bt({},o,{className:n(Object(it.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,i=e.isDisabled,u=e.theme,s=wt(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return me.a.createElement("div",{className:Object(it.a)(r("input",bt({theme:u},s)))},me.a.createElement(ct.a,bt({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:i},s)))},LoadingIndicator:wn,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,i=e.innerProps,u=r(Object(it.a)(o("menu",e)),{menu:!0},n);return me.a.createElement("div",bt({className:u},i,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,i=e.innerRef;return me.a.createElement("div",{className:r(Object(it.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:i},t)},MenuPortal:Ht,LoadingMessage:Rt,NoOptionsMessage:Lt,MultiValue:Cn,MultiValueContainer:xn,MultiValueLabel:On,MultiValueRemove:_n,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.isFocused,u=e.isSelected,s=e.innerRef,l=e.innerProps;return me.a.createElement("div",bt({ref:s,className:r(Object(it.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":i,"option--is-selected":u},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,i=e.isDisabled,u=e.isRtl;return me.a.createElement("div",bt({className:r(Object(it.a)(o("container",e)),{"--is-disabled":i,"--is-rtl":u},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},i),t)},ValueContainer:cn},Sn=function(e){return bt({},kn,e.components)},jn={clearIndicator:vn,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:mn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:It,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return vt(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),vt(t,"backgroundColor",i.neutral0),vt(t,"borderRadius",o),vt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),vt(t,"marginBottom",a.menuGutter),vt(t,"marginTop",a.menuGutter),vt(t,"position","absolute"),vt(t,"width","100%"),vt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Nt,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Dn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},An={backspaceRemovesValue:!0,blurInputOnSelect:Mt(),captureMenuScroll:!Mt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=bt({ignoreCase:!0,ignoreAccents:!0,stringify:qt,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?Gt(t):t,l=i?Gt(a(e)):a(e);return r&&(s=s.toLowerCase(),l=l.toLowerCase()),o&&(s=Yt(s),l=Yt(l)),"start"===u?l.substr(0,s.length)===s:l.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Mn=1,Tn=function(e){function t(e){mt(this,t);var n=Et(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Fn.call(n);var r=e.value;n.cacheComponents=ft(n.cacheComponents,zt).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Mn);var o=kt(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=kt(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,l=this.state.isFocused;(l&&!u&&e.isDisabled||l&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?Dt(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,l=-1;if(a.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Dn):bt({},Dn,this.props.theme):Dn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+Ct(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var l=a?void 0:function(){return n.onOptionHover(e)},c=a?void 0:function(){return n.selectOption(e)},p=n.getElementId("option")+"-"+r;return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:p,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,l=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:l({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=this.components.Input,u=this.state.inputIsHidden,s=r||this.getElementId("input");if(!n)return me.a.createElement(Kt,{id:s,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:_t,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps,p=c.cx,f=c.theme;return me.a.createElement(i,bt({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:s,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:f,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,u=t.Placeholder,s=this.commonProps,l=this.props,c=l.controlShouldRenderValue,p=l.isDisabled,f=l.isMulti,d=l.inputValue,h=l.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue;if(!this.hasValue()||!c)return d?null:me.a.createElement(u,bt({},s,{key:"placeholder",isDisabled:p}),h);if(f)return g.map(function(t){var i=t===v;return me.a.createElement(n,bt({},s,{components:{Container:r,Label:o,Remove:a},isFocused:i,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(d)return null;var b=g[0];return me.a.createElement(i,bt({},s,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,bt({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?me.a.createElement(e,bt({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return me.a.createElement(n,bt({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,bt({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,u=t.LoadingMessage,s=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,f=p.focusedOption,d=p.menuOptions,h=this.props,m=h.captureMenuScroll,g=h.inputValue,v=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,E=h.menuIsOpen,x=h.menuPlacement,O=h.menuPosition,_=h.menuPortalTarget,C=h.menuShouldBlockScroll,k=h.menuShouldScrollIntoView,S=h.noOptionsMessage,j=h.onMenuScrollToTop,D=h.onMenuScrollToBottom;if(!E)return null;var A=function(t){var n=f===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,me.a.createElement(l,bt({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},M=void 0;if(this.hasOptions())M=d.render.map(function(t){if("group"===t.type){t.type;var o=wt(t,["type"]),a=t.key+"-heading";return me.a.createElement(n,bt({},c,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return A(e)}))}if("option"===t.type)return A(t)});else if(v){var T=b({inputValue:g});if(null===T)return null;M=me.a.createElement(u,c,T)}else{var F=S({inputValue:g});if(null===F)return null;M=me.a.createElement(s,c,F)}var P={minMenuHeight:y,maxMenuHeight:w,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:k},N=me.a.createElement(Ft,bt({},c,P),function(t){var n=t.ref,r=t.placerProps,i=r.placement,u=r.maxHeight;return me.a.createElement(o,bt({},c,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:i}),me.a.createElement(ln,{isEnabled:m,onTopArrive:j,onBottomArrive:D},me.a.createElement(un,{isEnabled:C},me.a.createElement(a,bt({},c,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:u}),M))))});return _||"fixed"===O?me.a.createElement(i,bt({},c,{appendTo:_,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=this.state.selectValue;if(a&&!r){if(o){if(n){var u=i.map(function(t){return e.getOptionValue(t)}).join(n);return me.a.createElement("input",{name:a,type:"hidden",value:u})}var s=i.length>0?i.map(function(t,n){return me.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):me.a.createElement("input",{name:a,type:"hidden"});return me.a.createElement("div",null,s)}var l=i[0]?this.getOptionValue(i[0]):"";return me.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?me.a.createElement($t,{"aria-live":"assertive"},me.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),me.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,u=a.id,s=a.isDisabled,l=this.state.isFocused,c=this.commonProps=this.getCommonProps();return me.a.createElement(r,bt({},c,{className:i,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),me.a.createElement(t,bt({},c,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l}),me.a.createElement(o,bt({},c,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),me.a.createElement(n,bt({},c,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(he.Component);Tn.defaultProps=An;var Fn=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=Sn({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(Ot(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=jn[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,bt({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&St(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=xt(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=xt(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof c&&(c(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!l||!p||!m||f&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(l){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":l?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!l){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":l?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":l?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!l)return;e.focusOption("pageup");break;case"PageDown":if(!l)return;e.focusOption("pagedown");break;case"Home":if(!l)return;e.focusOption("first");break;case"End":if(!l)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Pn=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;mt(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o-1})}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.field;return o.options.length>0?wp.element.createElement(Yn,{id:t,name:n,value:this.filterValues(r),options:o.options,delimiter:o.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):wp.element.createElement(Gn,null)}}]),t}(N.Component),$n=(n(267),function(e){function t(){var e;return _()(this,t),(e=j()(this,A()(t).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(P()(P()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(P()(P()(e))),e}return T()(t,e),k()(t,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,l=u.height;"resize"!==o||s===a&&l===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"cf-oembed__preview"},wp.element.createElement("iframe",{ref:function(t){return e.iframe=t},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var e="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",t="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(e,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),n=wp.element.createElement("html",{lang:document.documentElement.lang},wp.element.createElement("head",null,wp.element.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),wp.element.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),wp.element.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:t}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(N.renderToString)(n)),this.iframe.contentWindow.document.close()}}}]),t}(N.Component)),Kn=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.embedCode,a=e.embedType,i=e.provider;return wp.element.createElement("div",{ref:this.node},wp.element.createElement(oe,{id:t,value:r,onChange:this.handleChange}),o?wp.element.createElement($n,{html:o,type:a,provider:i}):null,wp.element.createElement("input",{type:"hidden",name:n,value:r,readOnly:!0}))}}]),t}(N.Component),Xn=Object(x.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),Jn=Object(G.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=z()(t,2),r=n[0],o=n[1],a=Object(X.pipe)(J({onFetchEmbedCode:o}),Object(X.map)(G.toProps)),i=Object(X.pipe)(r,Object(X.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(X.merge)(a,i)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(a.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(a.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}}),Zn=Object(x.compose)(Xn,Jn)(Kn),Qn=(n(268),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():wp.element.createElement(Gn,null)}}]),t}(N.Component)),er=(n(269),He(function(e){return p()({},e,{field:p()({},e.field,{options:e.field.options.map(function(e){return p()({},e,{label:wp.element.createElement("img",{className:"cf-radio-image__image",src:e.label})})})})})})(Qn)),tr=function(e){function t(){var e;return _()(this,t),e=j()(this,A()(t).call(this)),l()(P()(P()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(f.isString)(t)?t:t.target.value)}),l()(P()(P()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=p()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=p()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return T()(t,e),k()(t,[{key:"componentDidMount",value:function(){this.props.visible&&(this.timer=setTimeout(this.initEditor,250))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.destroyEditor()}},{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,i=t.field,u=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":i.rich_editing},{"html-active":!i.rich_editing}],s=i.media_buttons?Object(f.template)(i.media_buttons)({id:n}):null;return wp.element.createElement("div",{id:"wp-".concat(n,"-wrap"),className:K()(u),ref:function(t){return e.editorNode=t}},i.media_buttons&&wp.element.createElement("div",{id:"wp-".concat(n,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:s}})),i.rich_editing&&wp.element.createElement("div",{className:"wp-editor-tabs"},wp.element.createElement("button",{type:"button",id:"".concat(n,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":n},Object(a.__)("Visual","carbon-fields-ui")),wp.element.createElement("button",{type:"button",id:"".concat(n,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":n},Object(a.__)("Text","carbon-fields-ui"))),wp.element.createElement("div",{id:"wp-".concat(n,"-editor-container"),className:"wp-editor-container"},wp.element.createElement("textarea",Q()({style:{width:"100%"},className:"regular-text",id:n,name:r,value:o,onChange:this.handleChange},i.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),t}(N.Component),nr=(n(270),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?wp.element.createElement("select",{id:t,name:n,value:r||Object(f.get)(o.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},o.options.map(function(e){return wp.element.createElement("option",{key:e.value,value:e.value},e.label)})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),rr=(n(271),function(e){function t(){return _()(this,t),j()(this,A()(t).apply(this,arguments))}return T()(t,e),k()(t,[{key:"render",value:function(){return wp.element.createElement("h3",null,this.props.field.label)}}]),t}(N.Component)),or=(n(272),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a-1}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?wp.element.createElement("ul",{className:"cf-set__list"},a.options.map(function(t,i){return wp.element.createElement("li",{className:"cf-set__list-item",key:i},wp.element.createElement("input",Q()({type:"checkbox",id:"".concat(n,"-").concat(t.value),name:"".concat(r,"[]"),checked:e.isChecked(o,t),value:t.value,className:"cf-set__input",onChange:e.handleChange},a.attributes)),wp.element.createElement("label",{className:"cf-set__label",htmlFor:"".concat(n,"-").concat(t.value)},t.label))})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),ar=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(f.some)(n,function(t){return t==e});case"NOT IN":return Object(f.every)(n,function(t){return t!=e});case"INCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),l=!1;switch(o){case"AND":l=Object(f.every)(s);break;case"OR":l=Object(f.some)(s)}l?e.showField(e.id):e.hideField(e.id)}}return Object(x.createHigherOrderComponent)(function(e){return Object(x.compose)(Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(u.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(G.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var xr=n(105),Or=n.n(xr),_r="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function Cr(){return"cf-".concat(Or()(_r,21))}function kr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rt=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return b()(e,function(e){Object(a.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return b()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(a.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return b()(e,function(e){Object(a.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return b()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return b()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return b()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(a.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(m.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(m.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(a.assign)(e,Object(a.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(a.omit)(e,n);case"RECEIVE_SIDEBAR":return b()(e,function(e){Object(a.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return f()({},e,s()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(a.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function O(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function g(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function y(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function h(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function w(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function E(e){return{type:"ADD_CONTAINER",payload:e}}function x(e){return{type:"REMOVE_CONTAINER",payload:e}}function S(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function I(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function F(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function T(e){return e.containers}function C(e,t){return e.containers[t]}function A(e){return e.fields}function D(e,t){return Object(a.filter)(e.fields,["container_id",t])}function N(e,t){return e.fields[t]}function k(e){return Object.keys(e.savingLock).length>0}function G(e){return e.isDirty}function L(e,t){var n=Object(a.pick)(A(e),t);return n=Object(a.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(a.mapValues)(n,function(e){return e.value})}function P(e,t,n){return(e=Object(a.cloneDeep)(e)).id=Object(m.uniqueId)(),e.container_id=t,"complex"===e.type&&e.value.forEach(function(e){e.id=Object(m.uniqueId)(),e.container_id=t,e.fields=e.fields.map(function(e){return P(e,t,n)})}),n.push(e),Object(a.pick)(e,["id","type","name","base_name"])}function R(e){var t=[];return{containers:e.filter(function(e){var t=e.id;return!Object(a.endsWith)(t,"__i__")}).map(function(e){return Object(a.assign)({},e,{fields:e.fields.map(function(n){return P(n,e.id,t)})})}),fields:t}}Object(c.registerStore)("carbon-fields/metaboxes",{reducer:v,actions:r,selectors:o});var V=R(Object(a.get)(window.cf,"preloaded.containers",[])),B=V.containers,q=V.fields;Object(c.dispatch)("carbon-fields/metaboxes").setupState(Object(a.keyBy)(B,"id"),Object(a.keyBy)(q,"id"));var U=n(10),M=n(3),Q=Object(U.createHigherOrderComponent)(function(e){var t=Object(c.withSelect)(function(e,t){var n=window.cf.config,r=n.compactInput,o=n.compactInputKey,i=e("carbon-fields/metaboxes").getFieldById(t.id),c=i.value,a=t.name||i.name;return r&&!t.name&&-1===a.indexOf("widget-carbon_fields")&&(a="".concat(o,"[").concat(a,"]")),{field:i,name:a,value:c}}),n=Object(c.withDispatch)(function(e){return{onChange:e("carbon-fields/metaboxes").updateFieldValue}});return Object(U.compose)(t,n)(e)},"withField"),K=n(15),W=n.n(K),$=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:[];return Object(a.pick)(t,Object(a.difference)(Object(a.map)(e.fields,"id"),n))}function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(a.map)(e,function(e){return[e.id,"".concat(Object(a.repeat)("parent.",t)).concat(e.base_name)]})}var Z=Object(m.withConditionalLogic)(function(e){var t=Object(c.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(J.pipe)(Object(J.merge)($(t(e.containerId)),Object(m.fromSelector)(t,e.containerId)),H(a.isEqual))},function(e,t){t=Object(a.keyBy)(t,"id");var n=Object(c.select)("carbon-fields/metaboxes").getContainerById(e.containerId),r=[];if(Object(a.some)(n.fields,["id",e.id]))r=Y(r=X(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(a.find)(t,function(t){return t.container_id===e.containerId&&Object(a.startsWith)(o,t.name)}),u=o.split(/\[|\]/g);u.shift(),(u=u.filter(function(e){return""!==e})).pop();var l=u.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=Y(r=X(n,t,[i.id]),l+1);for(var s="".concat(i.id,".value");u.length>0;){var d=u.shift(),f=!isNaN(d),p=!f;if(f){s="".concat(s,"[").concat(d,"]");var b=X(Object(a.get)(t,s),t,[e.id]);r=r.concat(Y(b,l)),s="".concat(s,".fields")}if(p){var m=Object(a.find)(Object(a.get)(t,s),["name",d]);s="".concat(m.id,".value"),l--}}}return r=r.map(function(e){var n=W()(e,2),r=n[0];return[n[1],Object(a.get)(t,"".concat(r,".value"))]}),Object(a.fromPairs)(r)});function ee(){return!Object(a.isUndefined)(window._wpLoadGutenbergEditor)||!Object(a.isUndefined)(window._wpLoadBlockEditor)}function te(e,t){return Object(a.find)(e,function(e){return 0===e.name.indexOf(t)})}Object(M.addFilter)("carbon-fields.association.metabox","carbon-fields/metaboxes",Object(m.withProps)(function(e){return{hierarchyResolver:function(){for(var t,n,r,o,i=Object(c.select)("carbon-fields/metaboxes").getFieldsByContainerId(e.containerId),u=(t=e.name,n=window.cf.config,r=n.compactInput,o=n.compactInputKey,r&&0===t.indexOf(o)?t.replace(new RegExp("^".concat(o,"\\[(.+?)\\]")),"$1"):t).split(/\[|\]/g),l=te(i,(u=u.filter(function(e){return""!==e})).shift()),s=i.indexOf(l),d=l.base_name;u.length>0;){var f=u.shift(),p=!isNaN(f),b=f===e.field.base_name,m=!p&&!b;if(p&&(s="".concat(s,".value.").concat(f,".name"),d="".concat(d,"[").concat(f,"]:").concat(Object(a.get)(i,s),"/")),m){var v=te(i,f);s=i.indexOf(v),d="".concat(d).concat(v.base_name)}b&&(d="".concat(d).concat(f))}return d}}}));var ne=n(16),re=n.n(ne),oe=n(17),ie=n.n(oe),ce=n(18),ae=n.n(ce),ue=n(19),le=n.n(ue),se=n(20),de=n.n(se),fe=n(7),pe=n.n(fe),be=n(11),me=(n(29),n(30),Object(U.compose)(Q,Object(m.withFilters)("carbon-fields.field-wrapper.metabox"))(m.Field)),ve=function(e){function t(){var e,n;re()(this,t);for(var r=arguments.length,o=new Array(r),i=0;it=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})};function Ee(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function xe(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function Se(e){for(var t=[],n=e,r=xe(e);r>0&&n;)if(xe(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var Ie={post_ancestors:[],post_parent_id:0,post_level:1};function Fe(e){var t=e.options[e.selectedIndex];return{post_ancestors:Se(t),post_parent_id:Ee(t),post_level:xe(t)+1}}Object(M.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Fe(e.target)}),we(Fe(e))):$(Ie)}),Object(M.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(c.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(J.pipe)(Object(J.combine)(Object(m.fromSelector)(Object(c.select)("core/editor").getCurrentPostId),Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"type"),Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"parent")),H(a.isEqual),Object(J.map)(function(e){var r=W()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return Ie;var u=t(i);if(!Object(a.get)(u,["hierarchical"],!1))return Ie;var l=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(a.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:l,post_parent_id:c,post_level:l.length+1}}))});var Te=n(22),Ce=n.n(Te),Ae=(e,t,n)=>Ce()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),De={post_format:"standard"};function Ne(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(M.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(J.pipe)(Ae(e,"input.post-format","change"),Object(J.map)(function(e){return Ne(e.target)}),we(Ne(e.querySelector("input.post-format:checked")))):$(De)}),Object(M.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"format"),H(),Object(J.filter)(Boolean),Object(J.map)(function(e){return{post_format:e}}),we(De))});var ke={post_template:""};function Ge(e){return{post_template:e.value}}Object(M.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Ge(e.target)}),we(Ge(e))):$(ke)}),Object(M.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(m.fromSelector)(Object(c.select)("core/editor").getEditedPostAttribute,"template"),H(),Object(J.filter)(a.isString),Object(J.map)(function(e){return{post_template:e}}),we(ke))});var Le=n(14),Pe=n.n(Le);function Re(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(Re(window.tagBox,"parseTags"),Re(window.tagBox,"flushTags")),Object(M.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(J.pipe)(J.merge.apply(void 0,Pe()((e=document.querySelectorAll('div[id^="taxonomy-"]'),Pe()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(J.pipe)(Ae(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(J.scan)(function(e,n){var r=n.target;return b()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(a.pull)(e[t],n)})},s()({},t,[])),we(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return Pe()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},s()({},e,[]))}(t)))}))).concat(Pe()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return Pe()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(J.pipe)(Object(J.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(J.map)(function(e){var n=e.target;return s()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),we(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return s()({},e,n)}(t)))})}()))),Object(J.scan)(function(e,t){return{post_term:f()({},e.post_term,t)}},{post_term:{}}));var e}),Object(M.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(c.select)("core").getTaxonomies,t=Object(c.select)("core/editor").getEditedPostAttribute;return Object(J.pipe)(Object(m.fromSelector)(e,{per_page:-1}),Object(J.filter)(Boolean),Object(J.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(a.fromPairs)(n)}}))});var Ve={term_ancestors:[],term_parent:0,term_level:1};function Be(e){var t=e.options[e.selectedIndex];return{term_ancestors:Se(t),term_parent:Ee(t),term_level:xe(t)+1}}Object(M.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Be(e.target)}),we(Be(e))):$(Ve)});var qe={user_role:""};function Ue(e){return{user_role:e.value}}Object(M.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return $(t?{user_role:t.dataset.profileRole}:qe)}return Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Ue(e.target)}),we(Ue(e)))});var Me=Object(U.createHigherOrderComponent)(function(e){return Object(c.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(M.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(U.compose)(Me,Object(m.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)}),n(37),Object(M.addFilter)("carbon-fields.widget.classic","carbon-fields/metaboxes",Object(he.withEffects)(function(e){var t=e.mount;return Object(J.pipe)(t,Object(J.map)(function(){return{type:"COMPONENT_MOUNTED"}}))},{handler:function(e){return function(t){switch(t.type){case"COMPONENT_MOUNTED":var n=e.container,r=window.jQuery(".container-".concat(n.id));r.trigger("change"),r.closest(".widget").find(".widget-action").on("click",function(){setTimeout(function(){r.trigger("change")},500)})}}}}));var Qe=n(23),Ke=n.n(Qe);function We(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n-1&&t.data.indexOf("add-tag")>-1&&!n.documentElement.querySelector("wp_error")}))},{handler:function(e){return function(){var t=u.a.map(e.container.fields,"id"),n=R(u.a.get(window.cf,"preloaded.containers",[])),r=n.containers,o=n.fields,i=u.a.find(r,["id",e.id]),a=u.a.filter(o,["container_id",e.id]),l=Object(c.dispatch)("carbon-fields/metaboxes"),s=l.updateState,d=l.removeFields;s(u.a.keyBy([i],"id"),u.a.keyBy(a,"id")),d(t)}}})),n(38),Object(M.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(he.withEffects)(function(){return Object(J.pipe)(Object(J.fromEvent)(window,"scroll"),Object(J.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}})),n(39);var $e=n(21),ze=n.n($e),He=(n(40),function(e){function t(){var e,n;re()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1},evaluate:function(){return!1}},tt={comparers:[f()({},et,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),f()({},et,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),f()({},et,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(a.intersection)(e,n).length;default:return!1}}}),ct={boolean:nt,post_term:ot,post_ancestor_id:f()({},tt,{comparers:[rt,it],getEnvironmentValue:function(e,t){return Object(a.get)(t,"post_ancestors",[])}}),post_parent_id:tt,post_level:tt,post_format:tt,post_template:tt,term_level:tt,term_parent:f()({},tt,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(a.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(a.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:f()({},tt,{comparers:[rt,it],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(a.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(a.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(a.get)(t,"term_ancestors",[])}}),user_role:tt},at=Object(c.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),ut=Object(he.withEffects)(function(e,t){var n=t.context,r=Object(M.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(M.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(M.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),c=Object(M.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),u=Object(M.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),l=Object(M.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(J.pipe)(Object(J.merge)(r,o,i,c,u,l),Object(J.scan)(function(e,t){return b()(e,function(e){Object(a.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(a.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(a.get)(ct,t.type);return r?r.isFulfiled(t,n):(console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=W()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o));c&&(c.hidden=!i),a&&(i&&!a.dataset.mounted&&(a.dataset.mounted=!0,Ze(t[o],n)),!i&&a.dataset.mounted&&(delete a.dataset.mounted,Object(be.unmountComponentAtNode)(a)))})}}}),lt=Object(U.compose)(at,ut)(function(){return null});function st(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var dt="customize.php",ft="carbon_fields_";function pt(e){return e.indexOf(ft)>-1}var bt=Object(he.withEffects)(function(){return Object(J.merge)(Object(J.pipe)(We(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(J.filter)(function(e){return pt(e.$widget[0].id)}),Object(J.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(J.pipe)(We(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(J.filter)(function(e){var t=e.data;return Object(a.startsWith)(t,"deleted:")&&pt(t)}),Object(J.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(c.select)("carbon-fields/metaboxes").getContainerById,n=Object(c.dispatch)("carbon-fields/metaboxes"),r=n.addContainer,o=n.removeContainer,i=n.addFields,u=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var l,s=e.payload,d=s.event,f=s.$widget,p=Object(a.flow)(st,JSON.parse)(f.find("[data-json]").data("json")),b=[];if("widget-updated"===d.type&&(l=t(p.id).fields.map(function(e){return e.id})),p.fields=p.fields.map(function(e){return P(e,p,b)}),i(b),r(p),"widget-updated"===d.type&&u(l),Ze(p,"classic"),window.cf.config.pagenow===dt&&"widget-added"===d.type){var m=f.find('[name="widget-id"]').val();f.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(m).liveUpdateMode=!1}break;case"WIDGET_DELETED":var v=e.payload.data.replace("deleted:",""),O="".concat("carbon_fields_container_").concat(v),j=t(O);Object(be.unmountComponentAtNode)(document.querySelector(".container-".concat(O)));var g=_.map(j.fields,"id");o(O),u(g)}}}})(function(){return null}),mt=Object(c.withSelect)(function(e){return{isDirty:e("carbon-fields/metaboxes").isDirty()}})(function(e){return wp.element.createElement("input",{type:"hidden",name:window.cf.config.revisionsInputKey,disabled:!e.isDirty,value:"1"})});Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var vt,Ot,jt=ee()?"gutenberg":"classic";vt=jt,Ot=Object(c.select)("carbon-fields/metaboxes").getContainers(),Object(a.forEach)(Ot,function(e){Ze(e,vt)}),function(e){var t=window.cf.config.pagenow;Object(be.render)(wp.element.createElement(be.Fragment,null,!ee()&&wp.element.createElement(_e,null),("widgets.php"===t||t===dt)&&wp.element.createElement(bt,null),wp.element.createElement(lt,{context:e})),document.createElement("div"));var n=document.querySelector("#poststuff");n&&Object(be.render)(wp.element.createElement(mt,null),n.appendChild(document.createElement("div")))}(jt)}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=41)}([function(e,t){e.exports=lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=wp.hooks},function(e,t){e.exports=wp.data},function(e,t){e.exports=cf.core},function(e,t){e.exports=wp.i18n},function(e,t,n){var r=n(8);e.exports=function(e){for(var t=1;tt=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return m()(e,function(e){Object(u.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return m()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(u.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return m()(e,function(e){Object(u.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return m()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return m()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return m()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(u.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(v.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(v.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(u.assign)(e,Object(u.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(u.omit)(e,n);case"RECEIVE_SIDEBAR":return m()(e,function(e){Object(u.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return p()({},e,d()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(u.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function j(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function g(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function y(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function h(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function w(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function E(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function x(e){return{type:"ADD_CONTAINER",payload:e}}function S(e){return{type:"REMOVE_CONTAINER",payload:e}}function I(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function F(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function T(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function C(e){return e.containers}function A(e,t){return e.containers[t]}function D(e){return e.fields}function N(e,t){return Object(u.filter)(e.fields,["container_id",t])}function k(e,t){return e.fields[t]}function G(e){return Object.keys(e.savingLock).length>0}function L(e){return e.isDirty}function P(e,t){var n=Object(u.pick)(D(e),t);return n=Object(u.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(u.mapValues)(n,function(e){return e.value})}function R(e,t,n){return(e=Object(u.cloneDeep)(e)).id=Object(v.uniqueId)(),e.container_id=t,"complex"===e.type&&e.value.forEach(function(e){e.id=Object(v.uniqueId)(),e.container_id=t,e.fields=e.fields.map(function(e){return R(e,t,n)})}),n.push(e),Object(u.pick)(e,["id","type","name","base_name"])}function V(e){var t=[];return{containers:e.filter(function(e){var t=e.id;return!Object(u.endsWith)(t,"__i__")}).map(function(e){return Object(u.assign)({},e,{fields:e.fields.map(function(n){return R(n,e.id,t)})})}),fields:t}}Object(a.registerStore)("carbon-fields/metaboxes",{reducer:O,actions:r,selectors:o});var B=V(Object(u.get)(window.cf,"preloaded.containers",[])),q=B.containers,U=B.fields;Object(a.dispatch)("carbon-fields/metaboxes").setupState(Object(u.keyBy)(q,"id"),Object(u.keyBy)(U,"id"));var M=n(10),Q=Object(M.createHigherOrderComponent)(function(e){var t=Object(a.withSelect)(function(e,t){var n=window.cf.config,r=n.compactInput,o=n.compactInputKey,i=e("carbon-fields/metaboxes").getFieldById(t.id),c=i.value,a=t.name||i.name;return r&&!t.name&&-1===a.indexOf("widget-carbon_fields")&&(a="".concat(o,"[").concat(a,"]")),{field:i,name:a,value:c}}),n=Object(a.withDispatch)(function(e){return{onChange:e("carbon-fields/metaboxes").updateFieldValue}});return Object(M.compose)(t,n)(e)},"withField"),K=n(15),W=n.n(K),$=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:[];return Object(u.pick)(t,Object(u.difference)(Object(u.map)(e.fields,"id"),n))}function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(u.map)(e,function(e){return[e.id,"".concat(Object(u.repeat)("parent.",t)).concat(e.base_name)]})}var Z=Object(v.withConditionalLogic)(function(e){var t=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(J.pipe)(Object(J.merge)($(t(e.containerId)),Object(v.fromSelector)(t,e.containerId)),H(u.isEqual))},function(e,t){t=Object(u.keyBy)(t,"id");var n=Object(a.select)("carbon-fields/metaboxes").getContainerById(e.containerId),r=[];if(Object(u.some)(n.fields,["id",e.id]))r=Y(r=X(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(u.find)(t,function(t){return t.container_id===e.containerId&&Object(u.startsWith)(o,t.name)}),c=o.split(/\[|\]/g);c.shift(),(c=c.filter(function(e){return""!==e})).pop();var l=c.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=Y(r=X(n,t,[i.id]),l+1);for(var s="".concat(i.id,".value");c.length>0;){var d=c.shift(),f=!isNaN(d),p=!f;if(f){s="".concat(s,"[").concat(d,"]");var b=X(Object(u.get)(t,s),t,[e.id]);r=r.concat(Y(b,l)),s="".concat(s,".fields")}if(p){var m=Object(u.find)(Object(u.get)(t,s),["name",d]);s="".concat(m.id,".value"),l--}}}return r=r.map(function(e){var n=W()(e,2),r=n[0];return[n[1],Object(u.get)(t,"".concat(r,".value"))]}),Object(u.fromPairs)(r)});function ee(){return!Object(u.isUndefined)(window._wpLoadGutenbergEditor)||!Object(u.isUndefined)(window._wpLoadBlockEditor)}function te(e,t){return Object(u.find)(e,function(e){return 0===e.name.indexOf(t)})}Object(c.addFilter)("carbon-fields.association.metabox","carbon-fields/metaboxes",Object(v.withProps)(function(e){return{hierarchyResolver:function(){for(var t,n,r,o,i=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId(e.containerId),c=(t=e.name,n=window.cf.config,r=n.compactInput,o=n.compactInputKey,r&&0===t.indexOf(o)?t.replace(new RegExp("^".concat(o,"\\[(.+?)\\]")),"$1"):t).split(/\[|\]/g),l=te(i,(c=c.filter(function(e){return""!==e})).shift()),s=i.indexOf(l),d=l.base_name;c.length>0;){var f=c.shift(),p=!isNaN(f),b=f===e.field.base_name,m=!p&&!b;if(p&&(s="".concat(s,".value.").concat(f,".name"),d="".concat(d,"[").concat(f,"]:").concat(Object(u.get)(i,s),"/")),m){var v=te(i,f);s=i.indexOf(v),d="".concat(d).concat(v.base_name)}b&&(d="".concat(d).concat(f))}return d}}}));var ne=n(16),re=n.n(ne),oe=n(17),ie=n.n(oe),ce=n(18),ae=n.n(ce),ue=n(19),le=n.n(ue),se=n(20),de=n.n(se),fe=n(7),pe=n.n(fe),be=n(11),me=(n(29),n(30),Object(M.compose)(Q,Object(v.withFilters)("carbon-fields.field-wrapper.metabox"))(v.Field)),ve=function(e){function t(){var e,n;re()(this,t);for(var r=arguments.length,o=new Array(r),i=0;it=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})};function Ee(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function xe(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function Se(e){for(var t=[],n=e,r=xe(e);r>0&&n;)if(xe(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var Ie={post_ancestors:[],post_parent_id:0,post_level:1};function Fe(e){var t=e.options[e.selectedIndex];return{post_ancestors:Se(t),post_parent_id:Ee(t),post_level:xe(t)+1}}Object(c.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Fe(e.target)}),we(Fe(e))):$(Ie)}),Object(c.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(a.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(J.pipe)(Object(J.combine)(Object(v.fromSelector)(Object(a.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"parent")),H(u.isEqual),Object(J.map)(function(e){var r=W()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return Ie;var a=t(i);if(!Object(u.get)(a,["hierarchical"],!1))return Ie;var l=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(u.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:l,post_parent_id:c,post_level:l.length+1}}))});var Te=n(22),Ce=n.n(Te),Ae=(e,t,n)=>Ce()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),De={post_format:"standard"};function Ne(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(c.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(J.pipe)(Ae(e,"input.post-format","change"),Object(J.map)(function(e){return Ne(e.target)}),we(Ne(e.querySelector("input.post-format:checked")))):$(De)}),Object(c.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"format"),H(),Object(J.filter)(Boolean),Object(J.map)(function(e){return{post_format:e}}),we(De))});var ke={post_template:""};function Ge(e){return{post_template:e.value}}Object(c.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Ge(e.target)}),we(Ge(e))):$(ke)}),Object(c.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"template"),H(),Object(J.filter)(u.isString),Object(J.map)(function(e){return{post_template:e}}),we(ke))});var Le=n(14),Pe=n.n(Le);function Re(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(Re(window.tagBox,"parseTags"),Re(window.tagBox,"flushTags")),Object(c.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(J.pipe)(J.merge.apply(void 0,Pe()((e=document.querySelectorAll('div[id^="taxonomy-"]'),Pe()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(J.pipe)(Ae(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(J.scan)(function(e,n){var r=n.target;return m()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(u.pull)(e[t],n)})},d()({},t,[])),we(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return Pe()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},d()({},e,[]))}(t)))}))).concat(Pe()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return Pe()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(J.pipe)(Object(J.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(J.map)(function(e){var n=e.target;return d()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),we(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return d()({},e,n)}(t)))})}()))),Object(J.scan)(function(e,t){return{post_term:p()({},e.post_term,t)}},{post_term:{}}));var e}),Object(c.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(a.select)("core").getTaxonomies,t=Object(a.select)("core/editor").getEditedPostAttribute;return Object(J.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(J.filter)(Boolean),Object(J.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(u.fromPairs)(n)}}))});var Ve={term_ancestors:[],term_parent:0,term_level:1};function Be(e){var t=e.options[e.selectedIndex];return{term_ancestors:Se(t),term_parent:Ee(t),term_level:xe(t)+1}}Object(c.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Be(e.target)}),we(Be(e))):$(Ve)});var qe={user_role:""};function Ue(e){return{user_role:e.value}}Object(c.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return $(t?{user_role:t.dataset.profileRole}:qe)}return Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Ue(e.target)}),we(Ue(e)))});var Me=Object(M.createHigherOrderComponent)(function(e){return Object(a.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(c.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(M.compose)(Me,Object(v.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)}),n(37),Object(c.addFilter)("carbon-fields.widget.classic","carbon-fields/metaboxes",Object(he.withEffects)(function(e){var t=e.mount;return Object(J.pipe)(t,Object(J.map)(function(){return{type:"COMPONENT_MOUNTED"}}))},{handler:function(e){return function(t){switch(t.type){case"COMPONENT_MOUNTED":var n=e.container,r=window.jQuery(".container-".concat(n.id));r.trigger("change"),r.closest(".widget").find(".widget-action").on("click",function(){setTimeout(function(){r.trigger("change")},500)})}}}}));var Qe=n(23),Ke=n.n(Qe);function We(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n-1&&t.data.indexOf("add-tag")>-1&&!n.documentElement.querySelector("wp_error")}))},{handler:function(e){return function(){var t=l.a.map(e.container.fields,"id"),n=V(l.a.get(window.cf,"preloaded.containers",[])),r=n.containers,o=n.fields,i=l.a.find(r,["id",e.id]),c=l.a.filter(o,["container_id",e.id]),u=Object(a.dispatch)("carbon-fields/metaboxes"),s=u.updateState,d=u.removeFields;s(l.a.keyBy([i],"id"),l.a.keyBy(c,"id")),d(t)}}})),n(38),Object(c.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(he.withEffects)(function(){return Object(J.pipe)(Object(J.fromEvent)(window,"scroll"),Object(J.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}})),n(39);var $e=n(21),ze=n.n($e),He=(n(40),function(e){function t(){var e,n;re()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1},evaluate:function(){return!1}},tt={comparers:[p()({},et,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),p()({},et,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),p()({},et,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(u.intersection)(e,n).length;default:return!1}}}),ct={boolean:nt,post_term:ot,post_ancestor_id:p()({},tt,{comparers:[rt,it],getEnvironmentValue:function(e,t){return Object(u.get)(t,"post_ancestors",[])}}),post_parent_id:tt,post_level:tt,post_format:tt,post_template:tt,term_level:tt,term_parent:p()({},tt,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(u.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(u.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:p()({},tt,{comparers:[rt,it],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(u.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(u.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(u.get)(t,"term_ancestors",[])}}),user_role:tt},at=Object(a.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),ut=Object(he.withEffects)(function(e,t){var n=t.context,r=Object(c.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(c.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(c.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),a=Object(c.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),l=Object(c.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),s=Object(c.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(J.pipe)(Object(J.merge)(r,o,i,a,l,s),Object(J.scan)(function(e,t){return m()(e,function(e){Object(u.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(u.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(u.get)(ct,t.type);return r?r.isFulfiled(t,n):(console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=W()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o));c&&(c.hidden=!i),a&&(i&&!a.dataset.mounted&&(a.dataset.mounted=!0,Ze(t[o],n)),!i&&a.dataset.mounted&&(delete a.dataset.mounted,Object(be.unmountComponentAtNode)(a)))})}}}),lt=Object(M.compose)(at,ut)(function(){return null});function st(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var dt="customize.php",ft="carbon_fields_";function pt(e){return e.indexOf(ft)>-1}var bt=Object(he.withEffects)(function(){return Object(J.merge)(Object(J.pipe)(We(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(J.filter)(function(e){return pt(e.$widget[0].id)}),Object(J.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(J.pipe)(We(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(J.filter)(function(e){var t=e.data;return Object(u.startsWith)(t,"deleted:")&&pt(t)}),Object(J.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(a.select)("carbon-fields/metaboxes").getContainerById,n=Object(a.dispatch)("carbon-fields/metaboxes"),r=n.addContainer,o=n.removeContainer,i=n.addFields,c=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var l,s=e.payload,d=s.event,f=s.$widget,p=Object(u.flow)(st,JSON.parse)(f.find("[data-json]").data("json")),b=[];if("widget-updated"===d.type&&(l=t(p.id).fields.map(function(e){return e.id})),p.fields=p.fields.map(function(e){return R(e,p,b)}),i(b),r(p),"widget-updated"===d.type&&c(l),Ze(p,"classic"),window.cf.config.pagenow===dt&&"widget-added"===d.type){var m=f.find('[name="widget-id"]').val();f.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(m).liveUpdateMode=!1}break;case"WIDGET_DELETED":var v=e.payload.data.replace("deleted:",""),O="".concat("carbon_fields_container_").concat(v),j=t(O);Object(be.unmountComponentAtNode)(document.querySelector(".container-".concat(O)));var g=_.map(j.fields,"id");o(O),c(g)}}}})(function(){return null}),mt=Object(a.withSelect)(function(e){return{isDirty:e("carbon-fields/metaboxes").isDirty()}})(function(e){return wp.element.createElement("input",{type:"hidden",name:window.cf.config.revisionsInputKey,disabled:!e.isDirty,value:"1"})});Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var vt=ee()?"gutenberg":"classic";Object(c.addAction)("carbon-fields.init","carbon-fields/metaboxes",function(){var e,t;e=vt,t=Object(a.select)("carbon-fields/metaboxes").getContainers(),Object(u.forEach)(t,function(t){Ze(t,e)}),function(e){var t=window.cf.config.pagenow;Object(be.render)(wp.element.createElement(be.Fragment,null,!ee()&&wp.element.createElement(_e,null),("widgets.php"===t||t===dt)&&wp.element.createElement(bt,null),wp.element.createElement(lt,{context:e})),document.createElement("div"));var n=document.querySelector("#poststuff");n&&Object(be.render)(wp.element.createElement(mt,null),n.appendChild(document.createElement("div")))}(vt)})}]); \ No newline at end of file From 7ed1d7b8a03359d7d2cbf6540dd891dc805743c5 Mon Sep 17 00:00:00 2001 From: Viktor Vasilev Date: Wed, 2 Jan 2019 17:21:19 +0200 Subject: [PATCH 07/11] Add bundles --- build/classic/core.js | 4 ++-- build/classic/core.min.js | 6 +++--- build/gutenberg/core.js | 4 ++-- build/gutenberg/core.min.js | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build/classic/core.js b/build/classic/core.js index c056d5241..501695d05 100644 --- a/build/classic/core.js +++ b/build/classic/core.js @@ -3306,7 +3306,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bn /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/file/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _components_media_library__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/media-library */ \"./packages/core/components/media-library/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar FileField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(FileField, _Component);\n\n function FileField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, FileField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(FileField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n data: {}\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFileDataChange\", function (data) {\n _this.setState({\n data: data\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleClear\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, '');\n\n _this.handleFileDataChange({});\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSelect\", function (files) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field,\n onChange = _this$props2.onChange;\n\n var _files = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(files, 1),\n file = _files[0];\n\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"get\"])(file, field.value_type, file.id));\n\n _this.handleFileDataChange(file);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(FileField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle Hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props3 = this.props,\n value = _this$props3.value,\n field = _this$props3.field;\n\n if (value) {\n // TODO: Refactor this to use `@wordpress/api-fetch` package.\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/attachment/?type=\").concat(field.value_type, \"&value=\").concat(value), 'get').then(this.handleFileDataChange);\n }\n }\n /**\n * Returns an URL to the attachment's thumbnail.\n *\n * @return {string}\n */\n\n }, {\n key: \"getThumb\",\n value: function getThumb() {\n var data = this.state.data;\n\n if (data.sizes) {\n var size = data.sizes.thumbnail || data.sizes.full;\n\n if (size) {\n return size.url;\n }\n }\n\n if (data.thumb_url) {\n return data.thumb_url;\n }\n\n return data.icon;\n }\n /**\n * Handles the file meta set.\n *\n * @param {Object} data\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var data = this.state.data;\n var _this$props4 = this.props,\n value = _this$props4.value,\n name = _this$props4.name,\n field = _this$props4.field,\n buttonLabel = _this$props4.buttonLabel,\n mediaLibraryButtonLabel = _this$props4.mediaLibraryButtonLabel,\n mediaLibraryTitle = _this$props4.mediaLibraryTitle;\n return __webpack_provided_wp_dot_element.createElement(_components_media_library__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n onSelect: this.handleSelect,\n multiple: false,\n title: mediaLibraryTitle,\n buttonLabel: mediaLibraryButtonLabel,\n typeFilter: field.type_filter\n }, function (_ref) {\n var openMediaBrowser = _ref.openMediaBrowser;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__inner\"\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: name,\n value: value,\n readOnly: true\n }), value && !!data.id && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__content\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__preview\"\n }, __webpack_provided_wp_dot_element.createElement(\"img\", {\n src: _this2.getThumb(),\n className: \"cf-file__image\"\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-file__remove dashicons-before dashicons-no-alt\",\n onClick: _this2.handleClear\n })), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-file__name\",\n title: data.filename || data.file_name\n }, data.filename || data.file_name)), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-file__browse\",\n onClick: openMediaBrowser\n }, buttonLabel));\n });\n }\n }]);\n\n return FileField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FileField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/file/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/file/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _components_media_library__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/media-library */ \"./packages/core/components/media-library/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar FileField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(FileField, _Component);\n\n function FileField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, FileField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(FileField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n data: {}\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleFileDataChange\", function (data) {\n _this.setState({\n data: data\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleClear\", function () {\n var _this$props = _this.props,\n id = _this$props.id,\n onChange = _this$props.onChange;\n onChange(id, '');\n\n _this.handleFileDataChange({});\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleSelect\", function (files) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n field = _this$props2.field,\n onChange = _this$props2.onChange;\n\n var _files = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(files, 1),\n file = _files[0];\n\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"get\"])(file, field.value_type, file.id));\n\n _this.handleFileDataChange(file);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(FileField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle Hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props3 = this.props,\n value = _this$props3.value,\n field = _this$props3.field;\n\n if (value) {\n // TODO: Refactor this to use `@wordpress/api-fetch` package.\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/attachment/?type=\").concat(field.value_type, \"&value=\").concat(value), 'get').then(this.handleFileDataChange);\n }\n }\n /**\n * Returns an URL to the attachment's thumbnail.\n *\n * @return {string}\n */\n\n }, {\n key: \"getThumb\",\n value: function getThumb() {\n var data = this.state.data;\n\n if (data.sizes) {\n var size = data.sizes.thumbnail || data.sizes.full;\n\n if (size) {\n return size.url;\n }\n }\n\n if (data.thumb_url) {\n return data.thumb_url;\n }\n\n return data.icon;\n }\n /**\n * Returns the filename to the attachment thumbnail.\n *\n * @return {string}\n */\n\n }, {\n key: \"getFileName\",\n value: function getFileName() {\n var data = this.state.data;\n return data.filename || data.file_name;\n }\n /**\n * Handles the file meta set.\n *\n * @param {Object} data\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var data = this.state.data;\n var _this$props4 = this.props,\n value = _this$props4.value,\n name = _this$props4.name,\n field = _this$props4.field,\n buttonLabel = _this$props4.buttonLabel,\n mediaLibraryButtonLabel = _this$props4.mediaLibraryButtonLabel,\n mediaLibraryTitle = _this$props4.mediaLibraryTitle;\n return __webpack_provided_wp_dot_element.createElement(_components_media_library__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n onSelect: this.handleSelect,\n multiple: false,\n title: mediaLibraryTitle,\n buttonLabel: mediaLibraryButtonLabel,\n typeFilter: field.type_filter\n }, function (_ref) {\n var openMediaBrowser = _ref.openMediaBrowser;\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__inner\"\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: name,\n value: value,\n readOnly: true\n }), value && !!data.id && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__content\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-file__preview\"\n }, __webpack_provided_wp_dot_element.createElement(\"img\", {\n src: _this2.getThumb(),\n className: \"cf-file__image\"\n }), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-file__remove dashicons-before dashicons-no-alt\",\n onClick: _this2.handleClear\n })), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-file__name\",\n title: _this2.getFileName()\n }, _this2.getFileName())), __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"button cf-file__browse\",\n onClick: openMediaBrowser\n }, buttonLabel));\n });\n }\n }]);\n\n return FileField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FileField);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/file/index.js?"); /***/ }), @@ -3858,7 +3858,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return fromSelector; });\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Creates a callbag listenable source from a store's selector.\n *\n * @param {Function} selector\n * @param {...mixed} args\n * @return {Function}\n */\n\nfunction fromSelector(selector) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return function (start, sink) {\n if (start !== 0) {\n return;\n }\n\n var unsubscribe = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"subscribe\"])(function () {\n return sink(1, selector.apply(void 0, args));\n });\n sink(0, function (type) {\n if (type === 2) {\n unsubscribe();\n }\n });\n };\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/utils/from-selector.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return fromSelector; });\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Creates a callbag listenable source from a store's selector.\n *\n * @param {Function} selector\n * @param {...mixed} args\n * @return {Function}\n */\n\nfunction fromSelector(selector) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return function (start, sink) {\n if (start !== 0) {\n return;\n }\n\n var unsubscribe = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"subscribe\"])(function () {\n return sink(1, selector.apply(void 0, args));\n });\n sink(0, function (type) {\n if (type === 2) {\n unsubscribe();\n }\n });\n sink(1, selector.apply(void 0, args));\n };\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/utils/from-selector.js?"); /***/ }), diff --git a/build/classic/core.min.js b/build/classic/core.min.js index 875616d6d..1bc180816 100644 --- a/build/classic/core.min.js +++ b/build/classic/core.min.js @@ -1,10 +1,10 @@ -this.cf=this.cf||{},this.cf.core=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=323)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.cf.vendor.react}()},function(e,t){!function(){e.exports=this.cf.vendor["@wordpress/element"]}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.cf.vendor.lodash}()},function(e,t){!function(){e.exports=this.cf.vendor["@wordpress/i18n"]}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n1?t-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(o,a){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){o(e)}),i.fail(function(){a(Object(r.__)("An error occured.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";var r=n(1),o=n(30);function a(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var i,u,s=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}},c=(void 0===i&&(i=0),function(){return++i}),l={},f={},p=["touchstart","touchmove"];function d(e,t){var n=null;return-1!==p.indexOf(t)&&u&&(n={passive:!e.props.preventDefault}),n}t.a=function(e,t){var n,i;return i=n=function(n){var i,p;function h(e){var t;return(t=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof t.__clickOutsideHandlerProp){var n=t.getInstance();if("function"!=typeof n.props.handleClickOutside){if("function"!=typeof n.handleClickOutside)throw new Error("WrappedComponent lacks a handleClickOutside(event) function for processing outside click events.");n.handleClickOutside(e)}else n.props.handleClickOutside(e)}else t.__clickOutsideHandlerProp(e)},t.enableOnClickOutside=function(){if("undefined"!=typeof document&&!f[t._uid]){void 0===u&&(u=s()),f[t._uid]=!0;var e=t.props.eventTypes;e.forEach||(e=[e]),l[t._uid]=function(e){var n;t.props.disableOnClickOutside||null!==t.componentNode&&(t.props.preventDefault&&e.preventDefault(),t.props.stopPropagation&&e.stopPropagation(),t.props.excludeScrollbar&&(n=e,document.documentElement.clientWidth<=n.clientX||document.documentElement.clientHeight<=n.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode;){if(a(e,t,n))return!0;e=e.parentNode}return e}(e.target,t.componentNode,t.props.outsideClickIgnoreClass)===document&&t.__outsideClickHandler(e))},e.forEach(function(e){document.addEventListener(e,l[t._uid],d(t,e))})}},t.disableOnClickOutside=function(){delete f[t._uid];var e=l[t._uid];if(e&&"undefined"!=typeof document){var n=t.props.eventTypes;n.forEach||(n=[n]),n.forEach(function(n){return document.removeEventListener(n,e,d(t,n))}),delete l[t._uid]}},t.getRef=function(e){return t.instanceRef=e},t._uid=c(),t}p=n,(i=h).prototype=Object.create(p.prototype),i.prototype.constructor=i,i.__proto__=p;var m=h.prototype;return m.getInstance=function(){if(!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},m.componentDidMount=function(){if("undefined"!=typeof document&&document.createElement){var e=this.getInstance();if(t&&"function"==typeof t.handleClickOutside&&(this.__clickOutsideHandlerProp=t.handleClickOutside(e),"function"!=typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=Object(o.findDOMNode)(this.getInstance()),this.enableOnClickOutside()}},m.componentDidUpdate=function(){this.componentNode=Object(o.findDOMNode)(this.getInstance())},m.componentWillUnmount=function(){this.disableOnClickOutside()},m.render=function(){var t=this.props,n=(t.excludeScrollbar,function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},h}(r.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},i}},function(e,t,n){"use strict";var r=n(16),o=n.n(r),a=n(14),i=n(17),u=n(11),s=n(26),c=Object(i.withEffects)(function(e){var t=e.mount,n=e.unmount,r=e.useEvent("openMediaBrowserEvent"),a=o()(r,2),c=a[0],l=a[1];return Object(u.merge)(Object(u.pipe)(t,Object(u.map)(function(){return{type:"INIT"}})),Object(u.pipe)(n,Object(u.map)(function(){return{type:"DESTROY"}})),Object(u.pipe)(Object(s.a)({openMediaBrowser:l}),Object(u.map)(i.toProps)),Object(u.pipe)(c,Object(u.map)(function(e){return{type:"OPEN",payload:e}})))},{handler:function(e){var t=null;return function(n){switch(n.type){case"INIT":var r=e.onSelect,o=e.typeFilter;(t=wp.media({title:e.title,library:{type:o},button:{text:e.buttonLabel},multiple:e.multiple})).on("select",function(){var e=t.state().get("selection").toJSON();r(e)});break;case"OPEN":t&&t.open();break;case"DESTROY":t=null}}}});t.a=Object(a.compose)(c)(function(e){return(0,e.children)({openMediaBrowser:e.openMediaBrowser})})},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(313),n(31)),w=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():e.createElement(E.a,null)}}]),n}(y.Component);t.a=w}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(3),g=n.n(m),v=n(55),b=function(t){function n(){var e,t;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i1?t.setState(function(e){return{menuVisible:!e.menuVisible}}):r(n[0])}),g()(h()(h()(t)),"handleItemClick",function(e){t.setState({menuVisible:!1}),t.props.onSelect(e)}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.buttonText,o=n.groups;return e.createElement("div",{className:"cf-complex__inserter"},e.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},r),o.length>1&&e.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},o.map(function(n,r){return e.createElement("li",{className:"cf-complex__inserter-item",key:r,onClick:function(){return t.handleItemClick(n)}},n.label)})))}}]),n}(n(2).Component);t.a=Object(v.a)(b)}).call(this,n(2))},function(e,t,n){"use strict";var r=u(n(305)),o=u(n(310)),a=u(n(115)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:a.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(319),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(79),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(63)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(85)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(44),o=n(190),a=n(191),i=n(192),u=n(193),s=n(194);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(33)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(199),o=n(206),a=n(208),i=n(209),u=n(210);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0?e.createElement("select",{id:n,name:r,value:o||Object(b.get)(a.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},a.options.map(function(t){return e.createElement("option",{key:t.value,value:t.value},t.label)})):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return i});var r=n(2),o=Object(r.createContext)(!1),a=o.Provider,i=o.Consumer},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(37))},function(e,t,n){var r=n(172),o=n(42);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(174),o=n(82),a=n(23),i=n(62),u=n(83),s=n(84),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,h=d?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||h.push(g);return h}},function(e,t,n){var r=n(175),o=n(27),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&el))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=l}function E(){var e=o();if(y(e))return w(e);p=setTimeout(E,function(e){var n=t-(e-d);return g?u(n,l-(e-h)):n}(e))}function w(e){return p=void 0,v&&s?b(e):(s=c=void 0,f)}function x(){var e=o(),n=y(e);if(s=arguments,c=this,d=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(E,t),m?b(e):f}(d);if(g)return p=setTimeout(E,t),b(d)}return void 0===p&&(p=setTimeout(E,t)),f}return t=a(t)||0,r(n)&&(m=!!n.leading,l=(g="maxWait"in n)?i(a(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,s=d=c=p=void 0},x.flush=function(){return void 0===p?f:w(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(284)),o=a(n(286));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,i.polyfill)(p);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(113),i=n(311);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";(function(e){var r=n(19),o=n.n(r),a=n(20),i=n.n(a),u=n(14),s=n(22),c=n(4),l=(n(320),n(148)),f=n(35);t.a=Object(u.compose)(Object(s.withSelect)(function(e,t){var n=e("carbon-fields/core"),r=n.getValidationError,o=n.isFieldVisible;return{error:r(t.id),hidden:!o(t.id)}}),Object(f.a)("carbon-fields.field-wrapper"))(function(t){var n=t.id,r=t.field,a=t.error,u=t.hidden,s=t.className,f=t.children,p=r.width?{flexBasis:"".concat(r.width,"%")}:null,d=["cf-field","cf-".concat(Object(c.kebabCase)(r.type)),{"cf-field--has-width":!!r.width,"cf-field--invalid":!!a},s].concat(o()(r.classes));return e.createElement("div",{className:i()(d),style:p,hidden:u},e.createElement("div",{className:"cf-field__head"},r.label&&e.createElement("label",{className:"cf-field__label",htmlFor:n},r.label,r.required&&e.createElement("span",{className:"cf-field__asterisk"},"*"))),!u&&e.createElement("div",{className:"cf-field__body"},f),u&&e.createElement(l.a,{className:"cf-field__body"},f),r.help_text&&e.createElement("em",{className:"cf-field__help",dangerouslySetInnerHTML:{__html:r.help_text}}),a&&e.createElement("span",{className:"cf-field__error"},a))})}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(16),i=n.n(a),u=n(19),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(10),b=n.n(v),y=n(0),E=n.n(y),w=n(3),x=n.n(w),O=n(38),_=n.n(O),C=n(5),k=n(2),S=n(14),j=n(18),D=n(17),A=n(20),M=n.n(A),T=n(4),F=n(11),P=n(26),N=(n(160),n(39)),I=n(36),L=n(54),R=function(t){function n(){var e,t;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&a.length>=r.max?alert(Object(C.sprintf)(Object(C.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(i(o,s()(a).concat([Object(T.pick)(e,"id","type","subtype")])),u({selectedOptions:s()(c).concat([e])})))}),x()(E()(E()(t)),"handleRemoveItem",function(e){var n=t.props,r=n.value,o=n.id,a=n.onChange,i=n.setState,u=n.selectedOptions;a(o,Object(T.without)(r,e)),i({selectedOptions:Object(T.without)(u,e)})}),x()(E()(E()(t)),"handleSort",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),t}return b()(n,t),p()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var t=this,n=this.props,r=n.name,o=n.value,a=n.field,i=n.totalOptionsCount,u=n.selectedOptions,s=n.queryTerm,c=this.props.options;return a.duplicates_allowed||(c=_()(c,function(e){e.map(function(e){return e.disabled=!!Object(T.find)(o,function(t){return Object(T.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),e.createElement(k.Fragment,null,e.createElement("div",{className:"cf-association__bar"},e.createElement(N.a,{value:s,onChange:this.handleSearchChange}),e.createElement("span",{className:"cf-association__counter"},Object(C.sprintf)(Object(C.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(c.length),Number(i)))),e.createElement("div",{className:"cf-association__cols"},e.createElement("div",{className:"cf-association__col"},c.map(function(n,r){return e.createElement("div",{className:M()("cf-association__option",{"cf-association__option--selected":n.disabled}),key:r},n.thumbnail&&e.createElement("img",{className:"cf-association__option-thumb",src:n.thumbnail}),e.createElement("div",{className:"cf-association__option-content"},e.createElement("span",{className:"cf-association__option-title"},n.title),e.createElement("span",{className:"cf-association__option-type"},n.type)),e.createElement("div",{className:"cf-association__option-actions"},e.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:n.edit_link}),!n.disabled&&(a.max<0||o.length0&&t.length=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(163),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;t.setState({currentTab:Object(k.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),x()(E()(E()(t)),"handleToggleAllClick",function(){var e=t.props,n=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!n)}),x()(E()(E()(t)),"handleGroupsSortStart",function(e,n){var r=t.props,o=r.value,a=r.groupIdKey,i=n.item.index(),u=Object(k.get)(o,"".concat(i,".").concat(a),null);t.setState({currentDraggedGroup:u})}),x()(E()(E()(t)),"handleGroupsSortUpdate",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),x()(E()(E()(t)),"handleGroupsSortStop",function(){t.setState({currentDraggedGroup:null})}),x()(E()(E()(t)),"handleTabsChange",function(e){t.setState({currentTab:e})}),t}return b()(n,t),p()(n,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(k.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=s()(e,2),o=r[0],a=r[1],u=Object(k.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(k.isString)(u.label_template))return u.label;try{return Object(k.template)(u.label_template)(i()({$_index:n},a))||u.label}catch(e){return console.error(Object(C.sprintf)(Object(C.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var t=this,n=this.state,r=n.currentDraggedGroup,a=n.currentTab,i=this.props,u=i.value,s=i.field,c=i.groupIdKey,l=i.groupFilterKey,f=i.allGroupsAreCollapsed,p=i.onGroupSetup,d=i.onGroupFieldSetup,h=i.onToggleGroup,m=this.getAvailableGroups(l),g=this.getGroupLabels(),v=u.map(function(e,t){return{id:e[c],label:g[t]}});return e.createElement(_.Fragment,null,this.isTabbed&&!!u.length&&e.createElement(S.a,{items:u,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===s.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},e.createElement(j.a,{ref:this.tabsList,items:v,current:a,layout:s.layout,onChange:this.handleTabsChange},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:"+",groups:m,onSelect:this.handleAddGroup}))),!u.length&&e.createElement(M.a,{label:"There are no entries yet."},e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup})),!!u.length&&e.createElement(S.a,{items:u,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},e.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},u.map(function(n,i){return e.createElement(A.a,o()({key:"".concat(n[l],"-").concat(i)},p(n,{index:i,label:g[i],dragged:n[c]===r,tabbed:t.isTabbed,hidden:t.isTabbed&&n[c]!==a,allowClone:s.duplicate_groups_allowed&&!t.isMaximumReached,onFieldSetup:d,onClone:t.handleCloneGroup,onRemove:t.handleRemoveGroup,onToggle:h})))}))),!this.isTabbed&&!!u.length&&e.createElement("div",{className:"cf-complex__actions"},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup}),e.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},f?Object(C.__)("Expand All","carbon-fields-ui"):Object(C.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(C.sprintf)(Object(C.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),n}(_.Component);Object(O.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(t){return function(n){var r=n.field;return"complex"!==r.type?e.createElement(t,n):e.createElement(t,o()({className:"cf-complex--".concat(r.layout)},n))}}),Object(O.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(k.isEmpty)(t))return Object(C.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===l.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);l.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return l.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();f.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},f.defaultProps={options:{}},t.default=f},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=function(t){function n(){return i()(this,n),l()(this,p()(n).apply(this,arguments))}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.value,a=t.field;return e.createElement("input",o()({type:"hidden",name:n,value:r,className:"hidden-text"},a.attributes))}}]),n}(n(2).Component);t.a=m}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(2);t.a=function(t){var n=t.field;return e.createElement(r.RawHTML,{className:"cf-html__content"},n.html)}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(26),x=n(2),O=n(5),_=n(17),C=n(4),k=n(11),S=(n(295),n(39)),j=n(132),D=function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1})}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?e.createElement(b.a,{id:n,name:r,value:this.filterValues(o),options:a.options,delimiter:a.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){(function(t){for(var r=n(304),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],c=0;!u&&c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(14),w=n(5),x=n(17),O=n(11),_=n(26),C=n(4),k=(n(312),n(39)),S=n(141),j=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.embedCode,i=t.embedType,u=t.provider;return e.createElement("div",{ref:this.node},e.createElement(k.a,{id:n,value:o,onChange:this.handleChange}),a?e.createElement(S.a,{html:a,type:i,provider:u}):null,e.createElement("input",{type:"hidden",name:r,value:o,readOnly:!0}))}}]),n}(y.Component),D=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),A=Object(x.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=o()(t,2),r=n[0],a=n[1],i=Object(O.pipe)(Object(_.a)({onFetchEmbedCode:a}),Object(O.map)(x.toProps)),u=Object(O.pipe)(r,Object(O.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(O.merge)(i,u)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(w.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(w.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}});t.a=Object(E.compose)(D,A)(j)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(2),g=function(t){function n(){var e;return o()(this,n),(e=s()(this,l()(n).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(h()(h()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(h()(h()(e))),e}return p()(n,t),i()(n,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,c=u.height;"resize"!==o||s===a&&c===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var t=this;return e.createElement("div",{className:"cf-oembed__preview"},e.createElement("iframe",{ref:function(e){return t.iframe=e},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var t="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",n="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(t,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),r=e.createElement("html",{lang:document.documentElement.lang},e.createElement("head",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),e.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},e.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),e.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:n}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(m.renderToString)(r)),this.iframe.contentWindow.document.close()}}}]),n}(m.Component);t.a=g}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(29),i=n(57);n(314),t.a=Object(a.a)(function(t){return o()({},t,{field:o()({},t.field,{options:t.field.options.map(function(t){return o()({},t,{label:e.createElement("img",{className:"cf-radio-image__image",src:t.label})})})})})})(i.a)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(5),O=n(4),_=n(20),C=n.n(_),k=function(t){function n(){var e;return s()(this,n),e=p()(this,h()(n).call(this)),E()(b()(b()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(O.isString)(t)?t:t.target.value)}),E()(b()(b()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=i()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=i()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return g()(n,t),l()(n,[{key:"componentDidMount",value:function(){this.props.visible&&(this.timer=setTimeout(this.initEditor,250))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.destroyEditor()}},{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field,s=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":u.rich_editing},{"html-active":!u.rich_editing}],c=u.media_buttons?Object(O.template)(u.media_buttons)({id:r}):null;return e.createElement("div",{id:"wp-".concat(r,"-wrap"),className:C()(s),ref:function(e){return t.editorNode=e}},u.media_buttons&&e.createElement("div",{id:"wp-".concat(r,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},e.createElement("span",{dangerouslySetInnerHTML:{__html:c}})),u.rich_editing&&e.createElement("div",{className:"wp-editor-tabs"},e.createElement("button",{type:"button",id:"".concat(r,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":r},Object(x.__)("Visual","carbon-fields-ui")),e.createElement("button",{type:"button",id:"".concat(r,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":r},Object(x.__)("Text","carbon-fields-ui"))),e.createElement("div",{id:"wp-".concat(r,"-editor-container"),className:"wp-editor-container"},e.createElement("textarea",o()({style:{width:"100%"},className:"regular-text",id:r,name:a,value:i,onChange:this.handleChange},u.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),n}(w.Component);t.a=k}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(2),h=(n(316),function(t){function n(){return o()(this,n),s()(this,l()(n).apply(this,arguments))}return p()(n,t),i()(n,[{key:"render",value:function(){return e.createElement("h3",null,this.props.field.label)}}]),n}(d.Component));t.a=h}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(4),w=(n(317),n(31)),x=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1}),t}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field;return u.options.length>0?e.createElement("ul",{className:"cf-set__list"},u.options.map(function(n,s){return e.createElement("li",{className:"cf-set__list-item",key:s},e.createElement("input",o()({type:"checkbox",id:"".concat(r,"-").concat(n.value),name:"".concat(a,"[]"),checked:t.isChecked(i,n),value:n.value,className:"cf-set__input",onChange:t.handleChange},u.attributes)),e.createElement("label",{className:"cf-set__label",htmlFor:"".concat(r,"-").concat(n.value)},n.label))})):e.createElement(w.a,null)}}]),n}(y.Component);t.a=x}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(26),E=n(2),w=n(5),x=n(17),O=n(4),_=n(11),C=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;ar&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===f.inserted[v]&&(n="",h(e,t),f.inserted[v]=n)}var O=function(){var e=w.apply(this,arguments),t=a+"-"+v;return void 0===f.registered[t]&&(f.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){f.inserted[e]=!0}if(l){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){l&&(d.flush(),d.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},C=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function A(e){return D(e)?window.pageYOffset:e.scrollTop}function M(e,t){D(e)?window.scrollTo(0,t):e.scrollTop=t}function T(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k,a=A(e),i=t-a,u=0;!function t(){var s,c=i*((s=(s=u+=10)/n-1)*s*s+1)+a;M(e,c),u=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&T(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&w>=r)return a&&T(s,_,160),{placement:"bottom",maxHeight:i?w-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&E>=r)&&(k=i?E-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return M(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&T(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&E>=r){var S=t;return(!i&&x>=r||i&&E>=r)&&(S=i?E-y:x-y),a&&T(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!l,isFixedPosition:l,theme:s});c&&c(f),r.setState(f)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||P(e);return E({},r.props,{placement:t,maxHeight:r.state.maxHeight})},O(r,n)}return w(t,e),b(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(a.Component);N.contextTypes={getPortalPlacement:l.a.func};var I=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},L=I,R=I,H=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};H.defaultProps={children:"No options"};var V=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};V.defaultProps={children:"Loading..."};var B=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=l-f-c,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),p.scrollTop=l,m=!0,r.isBottom=!0):!d&&-t>c&&(i&&!r.isTop&&i(e),p.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},O(r,n)}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return i.a.createElement(Z,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(a.Component),le=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=x(e,["isEnabled"]);return t?i.a.createElement(ce,n):this.props.children}}]),t}(a.Component);le.defaultProps={isEnabled:!0};var fe=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,s=e.hasValue;return i.a.createElement("div",{className:r(Object(u.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s},n)},t)}}]),t}(a.Component),pe=function(e){var t=e.size,n=x(e,["size"]);return i.a.createElement("svg",E({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(u.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},de=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},he=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},me=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},ge=me,ve=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};ve.defaultProps={children:i.a.createElement(he,null)};var be=me,ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};ye.defaultProps={children:i.a.createElement(de,null)};var Ee=function(e){var t=e.color,n=e.delay,r=e.offset;return i.a.createElement("span",{className:Object(u.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(u.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var we=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,s=e.isRtl,c=e.theme.colors,l=a?c.neutral80:c.neutral20;return i.a.createElement("div",E({},o,{className:n(Object(u.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),i.a.createElement(Ee,{color:l,delay:0,offset:s}),i.a.createElement(Ee,{color:l,delay:160,offset:!0}),i.a.createElement(Ee,{color:l,delay:320,offset:!s}))};we.defaultProps={size:4};var xe=function(e){var t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)},Oe=xe,_e=xe,Ce=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)}}]),t}(a.Component);Ce.defaultProps={children:i.a.createElement(de,{size:14})};var ke=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,s=e.getStyles,c=e.innerProps,l=e.isDisabled,f=e.removeProps,p=e.selectProps,d=r.Container,h=r.Label,m=r.Remove,g=E({className:o(Object(u.a)(s("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":l},n)},c),v={className:o(Object(u.a)(s("multiValueLabel",this.props)),{"multi-value__label":!0},n)},b=E({className:o(Object(u.a)(s("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},f);return i.a.createElement(d,{data:a,innerProps:g,selectProps:p},i.a.createElement(h,{data:a,innerProps:v,selectProps:p},t),i.a.createElement(m,{data:a,innerProps:b,selectProps:p}))}}]),t}(a.Component);ke.defaultProps={cropWithEllipsis:!0};var Se={ClearIndicator:ye,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,c=e.innerRef,l=e.innerProps;return i.a.createElement("div",E({ref:c,className:n(Object(u.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":s},o)},l),t)},DropdownIndicator:ve,DownChevron:he,CrossIcon:de,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,c=e.label,l=e.theme;return i.a.createElement("div",{className:r(Object(u.a)(o("group",e)),{group:!0},n)},i.a.createElement(a,E({},s,{theme:l,getStyles:o,cx:r}),c),i.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=x(e,["className","cx","getStyles","theme"]);return i.a.createElement("div",E({className:n(Object(u.a)(r("groupHeading",E({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return i.a.createElement("div",{className:r(Object(u.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return i.a.createElement("span",E({},o,{className:n(Object(u.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,s=e.isDisabled,c=e.theme,l=x(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return i.a.createElement("div",{className:Object(u.a)(r("input",E({theme:c},l)))},i.a.createElement(p.a,E({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:s},l)))},LoadingIndicator:we,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps,c=r(Object(u.a)(o("menu",e)),{menu:!0},n);return i.a.createElement("div",E({className:c},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef;return i.a.createElement("div",{className:r(Object(u.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:s},t)},MenuPortal:B,LoadingMessage:V,NoOptionsMessage:H,MultiValue:ke,MultiValueContainer:Oe,MultiValueLabel:_e,MultiValueRemove:Ce,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,c=e.isSelected,l=e.innerRef,f=e.innerProps;return i.a.createElement("div",E({ref:l,className:r(Object(u.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":c},n)},f),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,c=e.isRtl;return i.a.createElement("div",E({className:r(Object(u.a)(o("container",e)),{"--is-disabled":s,"--is-rtl":c},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:fe},je=function(e){return E({},Se,e.components)},De={clearIndicator:be,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:ge,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:R,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return y(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),y(t,"backgroundColor",i.neutral0),y(t,"borderRadius",o),y(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),y(t,"marginBottom",a.menuGutter),y(t,"marginTop",a.menuGutter),y(t,"position","absolute"),y(t,"width","100%"),y(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:L,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ae={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Me={backspaceRemovesValue:!0,blurInputOnSelect:F(),captureMenuScroll:!F(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=E({ignoreCase:!0,ignoreAccents:!0,stringify:K,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?$(t):t,c=i?$(a(e)):a(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=q(s),c=q(c)),"start"===u?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Te=1,Fe=function(e){function t(e){v(this,t);var n=O(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pe.call(n);var r=e.value;n.cacheComponents=h(n.cacheComponents,Y).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Te);var o=j(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=j(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!u&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?M(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,c=-1;if(a.length){switch(e){case"previous":c=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ae):E({},Ae,this.props.theme):Ae}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,c=this.state.selectValue,l=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+S(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:l,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var c=a?void 0:function(){return n.onOptionHover(e)},l=a?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:l,onMouseMove:c,onMouseOver:c,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:f,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,c=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,c=r||this.getElementId("input");if(!n)return i.a.createElement(J,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:k,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,d=f.theme;return i.a.createElement(u,E({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,f=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,h=l.inputValue,m=l.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue;if(!this.hasValue()||!f)return h?null:i.a.createElement(s,E({},c,{key:"placeholder",isDisabled:p}),m);if(d)return v.map(function(t){var u=t===b;return i.a.createElement(n,E({},c,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var y=v[0];return i.a.createElement(u,E({},c,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:u,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?i.a.createElement(e,E({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.a.createElement(n,E({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,O=m.maxMenuHeight,_=m.menuIsOpen,C=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,j=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,A=m.noOptionsMessage,M=m.onMenuScrollToTop,T=m.onMenuScrollToBottom;if(!_)return null;var F=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,i.a.createElement(l,E({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},P=void 0;if(this.hasOptions())P=h.render.map(function(t){if("group"===t.type){t.type;var o=x(t,["type"]),a=t.key+"-heading";return i.a.createElement(n,E({},f,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return F(e)}))}if("option"===t.type)return F(t)});else if(b){var I=y({inputValue:v});if(null===I)return null;P=i.a.createElement(s,f,I)}else{var L=A({inputValue:v});if(null===L)return null;P=i.a.createElement(c,f,L)}var R={minMenuHeight:w,maxMenuHeight:O,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:D},H=i.a.createElement(N,E({},f,R),function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return i.a.createElement(o,E({},f,R,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),i.a.createElement(le,{isEnabled:g,onTopArrive:M,onBottomArrive:T},i.a.createElement(se,{isEnabled:j},i.a.createElement(a,E({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),P))))});return S||"fixed"===k?i.a.createElement(u,E({},f,{appendTo:S,controlElement:this.controlRef,menuPlacement:C,menuPosition:k}),H):H}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(o){if(n){var s=u.map(function(t){return e.getOptionValue(t)}).join(n);return i.a.createElement("input",{name:a,type:"hidden",value:s})}var c=u.length>0?u.map(function(t,n){return i.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):i.a.createElement("input",{name:a,type:"hidden"});return i.a.createElement("div",null,c)}var l=u[0]?this.getOptionValue(u[0]):"";return i.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?i.a.createElement(X,{"aria-live":"assertive"},i.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),i.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,u=a.className,s=a.id,c=a.isDisabled,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.a.createElement(r,E({},f,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:l}),this.renderLiveRegion(),i.a.createElement(t,E({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:l}),i.a.createElement(o,E({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),i.a.createElement(n,E({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(a.Component);Fe.defaultProps=Me;var Pe=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=je({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(C(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=De[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,E({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=_(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=_(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof l&&(l(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!c||!f||!m||p&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(c){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":c?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!c){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":c?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":c?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!c)return;e.focusOption("pageup");break;case"PageDown":if(!c)return;e.focusOption("pagedown");break;case"Home":if(!c)return;e.focusOption("first");break;case"End":if(!c)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Ne=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;v(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=c(n(1)),o=c(n(21)),a=c(n(25)),i=n(52),u=c(n(289)),s=c(n(290));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,c=e.hsv,l=e.hsl,f=e.onChange,p=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:l,hsv:c,onChange:f})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:l,onChange:f})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:l,renderers:m,onChange:f}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:l,hex:o,onChange:f,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:f,onSwatchHover:p}))};l.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},l.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(l)},function(e,t,n){"use strict";var r=n(167);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(169)),o=u(n(61)),a=u(n(180)),i=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(32),o=n(23),a=n(27);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(41),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(173)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(45);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(44);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(44),o=n(71),a=n(72);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(86),o=n(196),a=n(28),i=n(90),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t,n){var r,o=n(197),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(200),o=n(44),a=n(71);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(201),o=n(202),a=n(203),i=n(204),u=n(205);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(244);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(69),o=n(103),a=n(104),i=n(246),u=n(247),s=n(250),c=n(251),l=n(252),f=n(253),p=n(94),d=n(254),h=n(48),m=n(255),g=n(256),v=n(261),b=n(23),y=n(62),E=n(263),w=n(28),x=n(265),O=n(42),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var T,F=1&n,P=2&n,N=4&n;if(j&&(T=A?j(t,D,A,M):j(t)),void 0!==T)return T;if(!w(t))return t;var I=b(t);if(I){if(T=m(t),!F)return c(t,T)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,F);if(L==k||L==_||R&&!A){if(T=P||R?{}:v(t),!F)return P?f(t,u(T,t)):l(t,i(T,t))}else{if(!S[L])return A?t:{};T=g(t,L,F)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,T),x(t))return t.forEach(function(r){T.add(e(r,n,j,r,t,M))}),T;if(E(t))return t.forEach(function(r,o){T.set(o,e(r,n,j,o,t,M))}),T;var V=N?P?d:p:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(T,o,e(r,n,j,o,t,M))}),T}},function(e,t,n){var r=n(33),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(51),o=n(42);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(51),o=n(106);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(28),o=n(67),a=n(249),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(63)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*c/a)/100,n.hsl.a!==l)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:l,source:"rgb"}}else{var f;if(f=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==f)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*c/a+100)/100,n.hsl.h!==l)return{h:l,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==f)return{h:f,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?c=a:l<0?l=0:l>i&&(l=i);var f=100*c/a,p=-100*l/i+100;return{h:n.hsl.h,s:f,v:p,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=F(e,360),t=F(t,100),n=F(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,f,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=T(s),{ok:h,format:e.format||m,r:c(255,l(u.r,0)),g:c(255,l(u.g,0)),b:c(255,l(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r,o,a=l(e,t,n),i=c(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(p(r));return a}function D(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(p({h:r,s:o,v:a})),a=(a+u)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*F(this._r,255))+"%",g:s(100*F(this._g,255))+"%",b:s(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%)":"rgba("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),a=n/100;return p({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,a=p.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},p.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;cs&&(s=r,u=p(t[c]));return p.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var A=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,l(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:l.fields,className:"flexbox-fix"},r.default.createElement("div",{style:l.double},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"hex",value:s.replace("#",""),onChange:f})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.alpha},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:f,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t1?t-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(o,a){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){o(e)}),i.fail(function(){a(Object(r.__)("An error occured.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";var r=n(1),o=n(30);function a(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var i,u,s=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}},c=(void 0===i&&(i=0),function(){return++i}),l={},f={},p=["touchstart","touchmove"];function d(e,t){var n=null;return-1!==p.indexOf(t)&&u&&(n={passive:!e.props.preventDefault}),n}t.a=function(e,t){var n,i;return i=n=function(n){var i,p;function h(e){var t;return(t=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof t.__clickOutsideHandlerProp){var n=t.getInstance();if("function"!=typeof n.props.handleClickOutside){if("function"!=typeof n.handleClickOutside)throw new Error("WrappedComponent lacks a handleClickOutside(event) function for processing outside click events.");n.handleClickOutside(e)}else n.props.handleClickOutside(e)}else t.__clickOutsideHandlerProp(e)},t.enableOnClickOutside=function(){if("undefined"!=typeof document&&!f[t._uid]){void 0===u&&(u=s()),f[t._uid]=!0;var e=t.props.eventTypes;e.forEach||(e=[e]),l[t._uid]=function(e){var n;t.props.disableOnClickOutside||null!==t.componentNode&&(t.props.preventDefault&&e.preventDefault(),t.props.stopPropagation&&e.stopPropagation(),t.props.excludeScrollbar&&(n=e,document.documentElement.clientWidth<=n.clientX||document.documentElement.clientHeight<=n.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode;){if(a(e,t,n))return!0;e=e.parentNode}return e}(e.target,t.componentNode,t.props.outsideClickIgnoreClass)===document&&t.__outsideClickHandler(e))},e.forEach(function(e){document.addEventListener(e,l[t._uid],d(t,e))})}},t.disableOnClickOutside=function(){delete f[t._uid];var e=l[t._uid];if(e&&"undefined"!=typeof document){var n=t.props.eventTypes;n.forEach||(n=[n]),n.forEach(function(n){return document.removeEventListener(n,e,d(t,n))}),delete l[t._uid]}},t.getRef=function(e){return t.instanceRef=e},t._uid=c(),t}p=n,(i=h).prototype=Object.create(p.prototype),i.prototype.constructor=i,i.__proto__=p;var m=h.prototype;return m.getInstance=function(){if(!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},m.componentDidMount=function(){if("undefined"!=typeof document&&document.createElement){var e=this.getInstance();if(t&&"function"==typeof t.handleClickOutside&&(this.__clickOutsideHandlerProp=t.handleClickOutside(e),"function"!=typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=Object(o.findDOMNode)(this.getInstance()),this.enableOnClickOutside()}},m.componentDidUpdate=function(){this.componentNode=Object(o.findDOMNode)(this.getInstance())},m.componentWillUnmount=function(){this.disableOnClickOutside()},m.render=function(){var t=this.props,n=(t.excludeScrollbar,function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},h}(r.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},i}},function(e,t,n){"use strict";var r=n(16),o=n.n(r),a=n(14),i=n(17),u=n(11),s=n(26),c=Object(i.withEffects)(function(e){var t=e.mount,n=e.unmount,r=e.useEvent("openMediaBrowserEvent"),a=o()(r,2),c=a[0],l=a[1];return Object(u.merge)(Object(u.pipe)(t,Object(u.map)(function(){return{type:"INIT"}})),Object(u.pipe)(n,Object(u.map)(function(){return{type:"DESTROY"}})),Object(u.pipe)(Object(s.a)({openMediaBrowser:l}),Object(u.map)(i.toProps)),Object(u.pipe)(c,Object(u.map)(function(e){return{type:"OPEN",payload:e}})))},{handler:function(e){var t=null;return function(n){switch(n.type){case"INIT":var r=e.onSelect,o=e.typeFilter;(t=wp.media({title:e.title,library:{type:o},button:{text:e.buttonLabel},multiple:e.multiple})).on("select",function(){var e=t.state().get("selection").toJSON();r(e)});break;case"OPEN":t&&t.open();break;case"DESTROY":t=null}}}});t.a=Object(a.compose)(c)(function(e){return(0,e.children)({openMediaBrowser:e.openMediaBrowser})})},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(313),n(31)),w=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():e.createElement(E.a,null)}}]),n}(y.Component);t.a=w}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(3),g=n.n(m),v=n(55),b=function(t){function n(){var e,t;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i1?t.setState(function(e){return{menuVisible:!e.menuVisible}}):r(n[0])}),g()(h()(h()(t)),"handleItemClick",function(e){t.setState({menuVisible:!1}),t.props.onSelect(e)}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.buttonText,o=n.groups;return e.createElement("div",{className:"cf-complex__inserter"},e.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},r),o.length>1&&e.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},o.map(function(n,r){return e.createElement("li",{className:"cf-complex__inserter-item",key:r,onClick:function(){return t.handleItemClick(n)}},n.label)})))}}]),n}(n(2).Component);t.a=Object(v.a)(b)}).call(this,n(2))},function(e,t,n){"use strict";var r=u(n(305)),o=u(n(310)),a=u(n(115)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:a.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(319),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(79),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(63)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(85)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(44),o=n(190),a=n(191),i=n(192),u=n(193),s=n(194);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(33)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(199),o=n(206),a=n(208),i=n(209),u=n(210);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0?e.createElement("select",{id:n,name:r,value:o||Object(b.get)(a.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},a.options.map(function(t){return e.createElement("option",{key:t.value,value:t.value},t.label)})):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return i});var r=n(2),o=Object(r.createContext)(!1),a=o.Provider,i=o.Consumer},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(37))},function(e,t,n){var r=n(172),o=n(42);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(174),o=n(82),a=n(23),i=n(62),u=n(83),s=n(84),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,h=d?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||h.push(g);return h}},function(e,t,n){var r=n(175),o=n(27),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&el))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=l}function E(){var e=o();if(y(e))return w(e);p=setTimeout(E,function(e){var n=t-(e-d);return g?u(n,l-(e-h)):n}(e))}function w(e){return p=void 0,v&&s?b(e):(s=c=void 0,f)}function x(){var e=o(),n=y(e);if(s=arguments,c=this,d=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(E,t),m?b(e):f}(d);if(g)return p=setTimeout(E,t),b(d)}return void 0===p&&(p=setTimeout(E,t)),f}return t=a(t)||0,r(n)&&(m=!!n.leading,l=(g="maxWait"in n)?i(a(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,s=d=c=p=void 0},x.flush=function(){return void 0===p?f:w(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(284)),o=a(n(286));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,i.polyfill)(p);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(113),i=n(311);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";(function(e){var r=n(19),o=n.n(r),a=n(20),i=n.n(a),u=n(14),s=n(22),c=n(4),l=(n(320),n(148)),f=n(35);t.a=Object(u.compose)(Object(s.withSelect)(function(e,t){var n=e("carbon-fields/core"),r=n.getValidationError,o=n.isFieldVisible;return{error:r(t.id),hidden:!o(t.id)}}),Object(f.a)("carbon-fields.field-wrapper"))(function(t){var n=t.id,r=t.field,a=t.error,u=t.hidden,s=t.className,f=t.children,p=r.width?{flexBasis:"".concat(r.width,"%")}:null,d=["cf-field","cf-".concat(Object(c.kebabCase)(r.type)),{"cf-field--has-width":!!r.width,"cf-field--invalid":!!a},s].concat(o()(r.classes));return e.createElement("div",{className:i()(d),style:p,hidden:u},e.createElement("div",{className:"cf-field__head"},r.label&&e.createElement("label",{className:"cf-field__label",htmlFor:n},r.label,r.required&&e.createElement("span",{className:"cf-field__asterisk"},"*"))),!u&&e.createElement("div",{className:"cf-field__body"},f),u&&e.createElement(l.a,{className:"cf-field__body"},f),r.help_text&&e.createElement("em",{className:"cf-field__help",dangerouslySetInnerHTML:{__html:r.help_text}}),a&&e.createElement("span",{className:"cf-field__error"},a))})}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(16),i=n.n(a),u=n(19),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(10),b=n.n(v),y=n(0),E=n.n(y),w=n(3),x=n.n(w),O=n(38),_=n.n(O),C=n(5),k=n(2),S=n(14),j=n(18),D=n(17),A=n(20),M=n.n(A),F=n(4),T=n(11),P=n(26),N=(n(160),n(39)),I=n(36),L=n(54),R=function(t){function n(){var e,t;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&a.length>=r.max?alert(Object(C.sprintf)(Object(C.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(i(o,s()(a).concat([Object(F.pick)(e,"id","type","subtype")])),u({selectedOptions:s()(c).concat([e])})))}),x()(E()(E()(t)),"handleRemoveItem",function(e){var n=t.props,r=n.value,o=n.id,a=n.onChange,i=n.setState,u=n.selectedOptions;a(o,Object(F.without)(r,e)),i({selectedOptions:Object(F.without)(u,e)})}),x()(E()(E()(t)),"handleSort",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),t}return b()(n,t),p()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var t=this,n=this.props,r=n.name,o=n.value,a=n.field,i=n.totalOptionsCount,u=n.selectedOptions,s=n.queryTerm,c=this.props.options;return a.duplicates_allowed||(c=_()(c,function(e){e.map(function(e){return e.disabled=!!Object(F.find)(o,function(t){return Object(F.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),e.createElement(k.Fragment,null,e.createElement("div",{className:"cf-association__bar"},e.createElement(N.a,{value:s,onChange:this.handleSearchChange}),e.createElement("span",{className:"cf-association__counter"},Object(C.sprintf)(Object(C.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(c.length),Number(i)))),e.createElement("div",{className:"cf-association__cols"},e.createElement("div",{className:"cf-association__col"},c.map(function(n,r){return e.createElement("div",{className:M()("cf-association__option",{"cf-association__option--selected":n.disabled}),key:r},n.thumbnail&&e.createElement("img",{className:"cf-association__option-thumb",src:n.thumbnail}),e.createElement("div",{className:"cf-association__option-content"},e.createElement("span",{className:"cf-association__option-title"},n.title),e.createElement("span",{className:"cf-association__option-type"},n.type)),e.createElement("div",{className:"cf-association__option-actions"},e.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:n.edit_link}),!n.disabled&&(a.max<0||o.length0&&t.length=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(163),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;t.setState({currentTab:Object(k.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),x()(E()(E()(t)),"handleToggleAllClick",function(){var e=t.props,n=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!n)}),x()(E()(E()(t)),"handleGroupsSortStart",function(e,n){var r=t.props,o=r.value,a=r.groupIdKey,i=n.item.index(),u=Object(k.get)(o,"".concat(i,".").concat(a),null);t.setState({currentDraggedGroup:u})}),x()(E()(E()(t)),"handleGroupsSortUpdate",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),x()(E()(E()(t)),"handleGroupsSortStop",function(){t.setState({currentDraggedGroup:null})}),x()(E()(E()(t)),"handleTabsChange",function(e){t.setState({currentTab:e})}),t}return b()(n,t),p()(n,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(k.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=s()(e,2),o=r[0],a=r[1],u=Object(k.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(k.isString)(u.label_template))return u.label;try{return Object(k.template)(u.label_template)(i()({$_index:n},a))||u.label}catch(e){return console.error(Object(C.sprintf)(Object(C.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var t=this,n=this.state,r=n.currentDraggedGroup,a=n.currentTab,i=this.props,u=i.value,s=i.field,c=i.groupIdKey,l=i.groupFilterKey,f=i.allGroupsAreCollapsed,p=i.onGroupSetup,d=i.onGroupFieldSetup,h=i.onToggleGroup,m=this.getAvailableGroups(l),g=this.getGroupLabels(),v=u.map(function(e,t){return{id:e[c],label:g[t]}});return e.createElement(_.Fragment,null,this.isTabbed&&!!u.length&&e.createElement(S.a,{items:u,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===s.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},e.createElement(j.a,{ref:this.tabsList,items:v,current:a,layout:s.layout,onChange:this.handleTabsChange},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:"+",groups:m,onSelect:this.handleAddGroup}))),!u.length&&e.createElement(M.a,{label:"There are no entries yet."},e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup})),!!u.length&&e.createElement(S.a,{items:u,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},e.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},u.map(function(n,i){return e.createElement(A.a,o()({key:"".concat(n[l],"-").concat(i)},p(n,{index:i,label:g[i],dragged:n[c]===r,tabbed:t.isTabbed,hidden:t.isTabbed&&n[c]!==a,allowClone:s.duplicate_groups_allowed&&!t.isMaximumReached,onFieldSetup:d,onClone:t.handleCloneGroup,onRemove:t.handleRemoveGroup,onToggle:h})))}))),!this.isTabbed&&!!u.length&&e.createElement("div",{className:"cf-complex__actions"},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup}),e.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},f?Object(C.__)("Expand All","carbon-fields-ui"):Object(C.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(C.sprintf)(Object(C.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),n}(_.Component);Object(O.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(t){return function(n){var r=n.field;return"complex"!==r.type?e.createElement(t,n):e.createElement(t,o()({className:"cf-complex--".concat(r.layout)},n))}}),Object(O.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(k.isEmpty)(t))return Object(C.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===l.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);l.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return l.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();f.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},f.defaultProps={options:{}},t.default=f},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=function(t){function n(){return i()(this,n),l()(this,p()(n).apply(this,arguments))}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.value,a=t.field;return e.createElement("input",o()({type:"hidden",name:n,value:r,className:"hidden-text"},a.attributes))}}]),n}(n(2).Component);t.a=m}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(2);t.a=function(t){var n=t.field;return e.createElement(r.RawHTML,{className:"cf-html__content"},n.html)}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(26),x=n(2),O=n(5),_=n(17),C=n(4),k=n(11),S=(n(295),n(39)),j=n(132),D=function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1})}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?e.createElement(b.a,{id:n,name:r,value:this.filterValues(o),options:a.options,delimiter:a.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){(function(t){for(var r=n(304),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],c=0;!u&&c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(14),w=n(5),x=n(17),O=n(11),_=n(26),C=n(4),k=(n(312),n(39)),S=n(141),j=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.embedCode,i=t.embedType,u=t.provider;return e.createElement("div",{ref:this.node},e.createElement(k.a,{id:n,value:o,onChange:this.handleChange}),a?e.createElement(S.a,{html:a,type:i,provider:u}):null,e.createElement("input",{type:"hidden",name:r,value:o,readOnly:!0}))}}]),n}(y.Component),D=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),A=Object(x.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=o()(t,2),r=n[0],a=n[1],i=Object(O.pipe)(Object(_.a)({onFetchEmbedCode:a}),Object(O.map)(x.toProps)),u=Object(O.pipe)(r,Object(O.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(O.merge)(i,u)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(w.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(w.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}});t.a=Object(E.compose)(D,A)(j)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(2),g=function(t){function n(){var e;return o()(this,n),(e=s()(this,l()(n).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(h()(h()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(h()(h()(e))),e}return p()(n,t),i()(n,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,c=u.height;"resize"!==o||s===a&&c===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var t=this;return e.createElement("div",{className:"cf-oembed__preview"},e.createElement("iframe",{ref:function(e){return t.iframe=e},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var t="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",n="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(t,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),r=e.createElement("html",{lang:document.documentElement.lang},e.createElement("head",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),e.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},e.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),e.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:n}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(m.renderToString)(r)),this.iframe.contentWindow.document.close()}}}]),n}(m.Component);t.a=g}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(29),i=n(57);n(314),t.a=Object(a.a)(function(t){return o()({},t,{field:o()({},t.field,{options:t.field.options.map(function(t){return o()({},t,{label:e.createElement("img",{className:"cf-radio-image__image",src:t.label})})})})})})(i.a)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(5),O=n(4),_=n(20),C=n.n(_),k=function(t){function n(){var e;return s()(this,n),e=p()(this,h()(n).call(this)),E()(b()(b()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(O.isString)(t)?t:t.target.value)}),E()(b()(b()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=i()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=i()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return g()(n,t),l()(n,[{key:"componentDidMount",value:function(){this.props.visible&&(this.timer=setTimeout(this.initEditor,250))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.destroyEditor()}},{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field,s=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":u.rich_editing},{"html-active":!u.rich_editing}],c=u.media_buttons?Object(O.template)(u.media_buttons)({id:r}):null;return e.createElement("div",{id:"wp-".concat(r,"-wrap"),className:C()(s),ref:function(e){return t.editorNode=e}},u.media_buttons&&e.createElement("div",{id:"wp-".concat(r,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},e.createElement("span",{dangerouslySetInnerHTML:{__html:c}})),u.rich_editing&&e.createElement("div",{className:"wp-editor-tabs"},e.createElement("button",{type:"button",id:"".concat(r,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":r},Object(x.__)("Visual","carbon-fields-ui")),e.createElement("button",{type:"button",id:"".concat(r,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":r},Object(x.__)("Text","carbon-fields-ui"))),e.createElement("div",{id:"wp-".concat(r,"-editor-container"),className:"wp-editor-container"},e.createElement("textarea",o()({style:{width:"100%"},className:"regular-text",id:r,name:a,value:i,onChange:this.handleChange},u.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),n}(w.Component);t.a=k}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(2),h=(n(316),function(t){function n(){return o()(this,n),s()(this,l()(n).apply(this,arguments))}return p()(n,t),i()(n,[{key:"render",value:function(){return e.createElement("h3",null,this.props.field.label)}}]),n}(d.Component));t.a=h}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(4),w=(n(317),n(31)),x=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1}),t}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field;return u.options.length>0?e.createElement("ul",{className:"cf-set__list"},u.options.map(function(n,s){return e.createElement("li",{className:"cf-set__list-item",key:s},e.createElement("input",o()({type:"checkbox",id:"".concat(r,"-").concat(n.value),name:"".concat(a,"[]"),checked:t.isChecked(i,n),value:n.value,className:"cf-set__input",onChange:t.handleChange},u.attributes)),e.createElement("label",{className:"cf-set__label",htmlFor:"".concat(r,"-").concat(n.value)},n.label))})):e.createElement(w.a,null)}}]),n}(y.Component);t.a=x}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(26),E=n(2),w=n(5),x=n(17),O=n(4),_=n(11),C=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;ar&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===f.inserted[v]&&(n="",h(e,t),f.inserted[v]=n)}var O=function(){var e=w.apply(this,arguments),t=a+"-"+v;return void 0===f.registered[t]&&(f.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){f.inserted[e]=!0}if(l){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){l&&(d.flush(),d.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},C=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function A(e){return D(e)?window.pageYOffset:e.scrollTop}function M(e,t){D(e)?window.scrollTo(0,t):e.scrollTop=t}function F(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k,a=A(e),i=t-a,u=0;!function t(){var s,c=i*((s=(s=u+=10)/n-1)*s*s+1)+a;M(e,c),u=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&F(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&w>=r)return a&&F(s,_,160),{placement:"bottom",maxHeight:i?w-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&E>=r)&&(k=i?E-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return M(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&F(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&E>=r){var S=t;return(!i&&x>=r||i&&E>=r)&&(S=i?E-y:x-y),a&&F(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!l,isFixedPosition:l,theme:s});c&&c(f),r.setState(f)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||P(e);return E({},r.props,{placement:t,maxHeight:r.state.maxHeight})},O(r,n)}return w(t,e),b(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(a.Component);N.contextTypes={getPortalPlacement:l.a.func};var I=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},L=I,R=I,H=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};H.defaultProps={children:"No options"};var V=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};V.defaultProps={children:"Loading..."};var B=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=l-f-c,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),p.scrollTop=l,m=!0,r.isBottom=!0):!d&&-t>c&&(i&&!r.isTop&&i(e),p.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},O(r,n)}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return i.a.createElement(Z,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(a.Component),le=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=x(e,["isEnabled"]);return t?i.a.createElement(ce,n):this.props.children}}]),t}(a.Component);le.defaultProps={isEnabled:!0};var fe=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,s=e.hasValue;return i.a.createElement("div",{className:r(Object(u.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s},n)},t)}}]),t}(a.Component),pe=function(e){var t=e.size,n=x(e,["size"]);return i.a.createElement("svg",E({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(u.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},de=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},he=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},me=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},ge=me,ve=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};ve.defaultProps={children:i.a.createElement(he,null)};var be=me,ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};ye.defaultProps={children:i.a.createElement(de,null)};var Ee=function(e){var t=e.color,n=e.delay,r=e.offset;return i.a.createElement("span",{className:Object(u.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(u.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var we=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,s=e.isRtl,c=e.theme.colors,l=a?c.neutral80:c.neutral20;return i.a.createElement("div",E({},o,{className:n(Object(u.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),i.a.createElement(Ee,{color:l,delay:0,offset:s}),i.a.createElement(Ee,{color:l,delay:160,offset:!0}),i.a.createElement(Ee,{color:l,delay:320,offset:!s}))};we.defaultProps={size:4};var xe=function(e){var t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)},Oe=xe,_e=xe,Ce=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)}}]),t}(a.Component);Ce.defaultProps={children:i.a.createElement(de,{size:14})};var ke=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,s=e.getStyles,c=e.innerProps,l=e.isDisabled,f=e.removeProps,p=e.selectProps,d=r.Container,h=r.Label,m=r.Remove,g=E({className:o(Object(u.a)(s("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":l},n)},c),v={className:o(Object(u.a)(s("multiValueLabel",this.props)),{"multi-value__label":!0},n)},b=E({className:o(Object(u.a)(s("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},f);return i.a.createElement(d,{data:a,innerProps:g,selectProps:p},i.a.createElement(h,{data:a,innerProps:v,selectProps:p},t),i.a.createElement(m,{data:a,innerProps:b,selectProps:p}))}}]),t}(a.Component);ke.defaultProps={cropWithEllipsis:!0};var Se={ClearIndicator:ye,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,c=e.innerRef,l=e.innerProps;return i.a.createElement("div",E({ref:c,className:n(Object(u.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":s},o)},l),t)},DropdownIndicator:ve,DownChevron:he,CrossIcon:de,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,c=e.label,l=e.theme;return i.a.createElement("div",{className:r(Object(u.a)(o("group",e)),{group:!0},n)},i.a.createElement(a,E({},s,{theme:l,getStyles:o,cx:r}),c),i.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=x(e,["className","cx","getStyles","theme"]);return i.a.createElement("div",E({className:n(Object(u.a)(r("groupHeading",E({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return i.a.createElement("div",{className:r(Object(u.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return i.a.createElement("span",E({},o,{className:n(Object(u.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,s=e.isDisabled,c=e.theme,l=x(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return i.a.createElement("div",{className:Object(u.a)(r("input",E({theme:c},l)))},i.a.createElement(p.a,E({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:s},l)))},LoadingIndicator:we,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps,c=r(Object(u.a)(o("menu",e)),{menu:!0},n);return i.a.createElement("div",E({className:c},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef;return i.a.createElement("div",{className:r(Object(u.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:s},t)},MenuPortal:B,LoadingMessage:V,NoOptionsMessage:H,MultiValue:ke,MultiValueContainer:Oe,MultiValueLabel:_e,MultiValueRemove:Ce,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,c=e.isSelected,l=e.innerRef,f=e.innerProps;return i.a.createElement("div",E({ref:l,className:r(Object(u.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":c},n)},f),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,c=e.isRtl;return i.a.createElement("div",E({className:r(Object(u.a)(o("container",e)),{"--is-disabled":s,"--is-rtl":c},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:fe},je=function(e){return E({},Se,e.components)},De={clearIndicator:be,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:ge,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:R,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return y(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),y(t,"backgroundColor",i.neutral0),y(t,"borderRadius",o),y(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),y(t,"marginBottom",a.menuGutter),y(t,"marginTop",a.menuGutter),y(t,"position","absolute"),y(t,"width","100%"),y(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:L,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ae={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Me={backspaceRemovesValue:!0,blurInputOnSelect:T(),captureMenuScroll:!T(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=E({ignoreCase:!0,ignoreAccents:!0,stringify:K,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?$(t):t,c=i?$(a(e)):a(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=q(s),c=q(c)),"start"===u?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Fe=1,Te=function(e){function t(e){v(this,t);var n=O(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pe.call(n);var r=e.value;n.cacheComponents=h(n.cacheComponents,Y).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Fe);var o=j(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=j(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!u&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?M(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,c=-1;if(a.length){switch(e){case"previous":c=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ae):E({},Ae,this.props.theme):Ae}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,c=this.state.selectValue,l=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+S(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:l,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var c=a?void 0:function(){return n.onOptionHover(e)},l=a?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:l,onMouseMove:c,onMouseOver:c,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:f,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,c=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,c=r||this.getElementId("input");if(!n)return i.a.createElement(J,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:k,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,d=f.theme;return i.a.createElement(u,E({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,f=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,h=l.inputValue,m=l.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue;if(!this.hasValue()||!f)return h?null:i.a.createElement(s,E({},c,{key:"placeholder",isDisabled:p}),m);if(d)return v.map(function(t){var u=t===b;return i.a.createElement(n,E({},c,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var y=v[0];return i.a.createElement(u,E({},c,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:u,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?i.a.createElement(e,E({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.a.createElement(n,E({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,O=m.maxMenuHeight,_=m.menuIsOpen,C=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,j=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,A=m.noOptionsMessage,M=m.onMenuScrollToTop,F=m.onMenuScrollToBottom;if(!_)return null;var T=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,i.a.createElement(l,E({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},P=void 0;if(this.hasOptions())P=h.render.map(function(t){if("group"===t.type){t.type;var o=x(t,["type"]),a=t.key+"-heading";return i.a.createElement(n,E({},f,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return T(e)}))}if("option"===t.type)return T(t)});else if(b){var I=y({inputValue:v});if(null===I)return null;P=i.a.createElement(s,f,I)}else{var L=A({inputValue:v});if(null===L)return null;P=i.a.createElement(c,f,L)}var R={minMenuHeight:w,maxMenuHeight:O,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:D},H=i.a.createElement(N,E({},f,R),function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return i.a.createElement(o,E({},f,R,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),i.a.createElement(le,{isEnabled:g,onTopArrive:M,onBottomArrive:F},i.a.createElement(se,{isEnabled:j},i.a.createElement(a,E({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),P))))});return S||"fixed"===k?i.a.createElement(u,E({},f,{appendTo:S,controlElement:this.controlRef,menuPlacement:C,menuPosition:k}),H):H}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(o){if(n){var s=u.map(function(t){return e.getOptionValue(t)}).join(n);return i.a.createElement("input",{name:a,type:"hidden",value:s})}var c=u.length>0?u.map(function(t,n){return i.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):i.a.createElement("input",{name:a,type:"hidden"});return i.a.createElement("div",null,c)}var l=u[0]?this.getOptionValue(u[0]):"";return i.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?i.a.createElement(X,{"aria-live":"assertive"},i.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),i.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,u=a.className,s=a.id,c=a.isDisabled,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.a.createElement(r,E({},f,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:l}),this.renderLiveRegion(),i.a.createElement(t,E({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:l}),i.a.createElement(o,E({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),i.a.createElement(n,E({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(a.Component);Te.defaultProps=Me;var Pe=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=je({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(C(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=De[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,E({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=_(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=_(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof l&&(l(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!c||!f||!m||p&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(c){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":c?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!c){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":c?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":c?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!c)return;e.focusOption("pageup");break;case"PageDown":if(!c)return;e.focusOption("pagedown");break;case"Home":if(!c)return;e.focusOption("first");break;case"End":if(!c)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Ne=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;v(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=c(n(1)),o=c(n(21)),a=c(n(25)),i=n(52),u=c(n(289)),s=c(n(290));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,c=e.hsv,l=e.hsl,f=e.onChange,p=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:l,hsv:c,onChange:f})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:l,onChange:f})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:l,renderers:m,onChange:f}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:l,hex:o,onChange:f,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:f,onSwatchHover:p}))};l.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},l.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(l)},function(e,t,n){"use strict";var r=n(167);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(169)),o=u(n(61)),a=u(n(180)),i=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(32),o=n(23),a=n(27);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(41),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(173)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(45);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(44);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(44),o=n(71),a=n(72);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(86),o=n(196),a=n(28),i=n(90),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t,n){var r,o=n(197),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(200),o=n(44),a=n(71);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(201),o=n(202),a=n(203),i=n(204),u=n(205);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(244);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(69),o=n(103),a=n(104),i=n(246),u=n(247),s=n(250),c=n(251),l=n(252),f=n(253),p=n(94),d=n(254),h=n(48),m=n(255),g=n(256),v=n(261),b=n(23),y=n(62),E=n(263),w=n(28),x=n(265),O=n(42),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var F,T=1&n,P=2&n,N=4&n;if(j&&(F=A?j(t,D,A,M):j(t)),void 0!==F)return F;if(!w(t))return t;var I=b(t);if(I){if(F=m(t),!T)return c(t,F)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,T);if(L==k||L==_||R&&!A){if(F=P||R?{}:v(t),!T)return P?f(t,u(F,t)):l(t,i(F,t))}else{if(!S[L])return A?t:{};F=g(t,L,T)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,F),x(t))return t.forEach(function(r){F.add(e(r,n,j,r,t,M))}),F;if(E(t))return t.forEach(function(r,o){F.set(o,e(r,n,j,o,t,M))}),F;var V=N?P?d:p:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(F,o,e(r,n,j,o,t,M))}),F}},function(e,t,n){var r=n(33),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(51),o=n(42);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(51),o=n(106);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(28),o=n(67),a=n(249),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(63)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*c/a)/100,n.hsl.a!==l)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:l,source:"rgb"}}else{var f;if(f=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==f)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*c/a+100)/100,n.hsl.h!==l)return{h:l,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==f)return{h:f,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?c=a:l<0?l=0:l>i&&(l=i);var f=100*c/a,p=-100*l/i+100;return{h:n.hsl.h,s:f,v:p,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=T(e,360),t=T(t,100),n=T(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,f,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=F(s),{ok:h,format:e.format||m,r:c(255,l(u.r,0)),g:c(255,l(u.g,0)),b:c(255,l(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r,o,a=l(e,t,n),i=c(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(p(r));return a}function D(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(p({h:r,s:o,v:a})),a=(a+u)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*T(this._r,255))+"%",g:s(100*T(this._g,255))+"%",b:s(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%)":"rgba("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),a=n/100;return p({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,a=p.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},p.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;cs&&(s=r,u=p(t[c]));return p.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var A=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,l(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:l.fields,className:"flexbox-fix"},r.default.createElement("div",{style:l.double},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"hex",value:s.replace("#",""),onChange:f})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.alpha},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:f,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},c={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},l=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},f=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r,a){if(0===e||e){var s,c=a||o,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var f=t||(n||g).dateFormat,p=String(e).trim();if("today"===p)s=new Date,r=!0;else if(/Z$/.test(p)||/GMT$/.test(p))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,f);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function E(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(l=o===s.hourElement?l-i-t(!s.amPM):a,p&&N(void 0,1,s.hourElement)),s.amPM&&f&&(1===u?l+c===23:Math.abs(l-c)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(l)}}(n);var r=s._input.value;C(),ge(),s._input.value!==r&&s._debouncedChange()}}function C(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var c=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,c.getHours()))===c.getHours()&&(o=Math.max(o,c.getMinutes())),o===c.getMinutes()&&(a=Math.max(a,c.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function T(){fe("onChange")}function F(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function L(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===p(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===p(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===p(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&p(e,s.selectedDates[0])>=0&&p(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),fe("onDayCreate",a),a}function R(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var c=o.children[u];if(-1===c.className.indexOf("hidden")&&J(c.dateObj))return c}}function V(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,c=i.children.length,l=u;l>=0&&l0?c:-1);l+=o){var f=i.children[l];if(-1===f.className.indexOf("hidden")&&J(f.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return R(f)}s.changeMonth(o),V(H(o),0)}(r,t):R(r)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",c=i?"nextMonthDay hidden":"nextMonthDay",l=r+1-n,f=0;l<=r;l++,f++)a.appendChild(L(u,new Date(e,t-1,l),l,f));for(l=1;l<=o;l++,f++)a.appendChild(L("",new Date(e,t,l),l,f));for(var p=o+1;p<=42-n&&(1===s.config.showMonths||f%7!=0);p++,f++)a.appendChild(L(c,new Date(e,t+1,p%o),p,f));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,fe("onYearChange")),U(),fe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),fe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&p(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&p(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),V(H(1),0)):V(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),V(H(1),0)):a||V(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var c=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),l=c.indexOf(e.target);if(-1!==l){var f=c[l+(e.shiftKey?-1:1)];void 0!==f?(e.preventDefault(),f.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],C(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],C(),ge()}fe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,c=0,l=r;lr&&lu)?u=l:l>n&&(!c||l0&&l0&&l>c;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=l||(nt&&l===n&&a.classList.add("endRange"),l>=u&&(0===c||l<=c)&&d(l,n,t)&&a.classList.add("inRange")))))},v=0,b=p.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===_.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},_.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?_.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=l(s),s.parseDate=f({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){fe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),c=window.innerHeight-u.bottom,l="above"===a||"below"!==a&&cn,f=window.pageYOffset+u.top+(l?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!l),v(s.calendarContainer,"arrowBottom",l),!s.config.inline){var p=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=p+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=f+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=p+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==p(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&fe("onYearChange"),fe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():R(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,c="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||c)&&ie()}T()}}s.parseDate=f({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&fe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),fe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&fe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=F,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void fe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),fe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),F(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);ce(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),F(),k(),ge(t),t&&fe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function ce(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function le(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function fe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&fe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=le(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=le(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):_.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):_.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var c=0;c-1?s.config[p]=r(f[p]).map(g).concat(s.config[p]):void 0===t[p]&&(s.config[p]=f[p])}fe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&ce(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),fe("onChange"),fe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(T,w),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),T()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),fe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},c={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},l=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},f=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r,a){if(0===e||e){var s,c=a||o,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var f=t||(n||g).dateFormat,p=String(e).trim();if("today"===p)s=new Date,r=!0;else if(/Z$/.test(p)||/GMT$/.test(p))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,f);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function E(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(l=o===s.hourElement?l-i-t(!s.amPM):a,p&&N(void 0,1,s.hourElement)),s.amPM&&f&&(1===u?l+c===23:Math.abs(l-c)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(l)}}(n);var r=s._input.value;C(),ge(),s._input.value!==r&&s._debouncedChange()}}function C(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var c=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,c.getHours()))===c.getHours()&&(o=Math.max(o,c.getMinutes())),o===c.getMinutes()&&(a=Math.max(a,c.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function F(){fe("onChange")}function T(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function L(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===p(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===p(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===p(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&p(e,s.selectedDates[0])>=0&&p(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),fe("onDayCreate",a),a}function R(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var c=o.children[u];if(-1===c.className.indexOf("hidden")&&J(c.dateObj))return c}}function V(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,c=i.children.length,l=u;l>=0&&l0?c:-1);l+=o){var f=i.children[l];if(-1===f.className.indexOf("hidden")&&J(f.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return R(f)}s.changeMonth(o),V(H(o),0)}(r,t):R(r)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",c=i?"nextMonthDay hidden":"nextMonthDay",l=r+1-n,f=0;l<=r;l++,f++)a.appendChild(L(u,new Date(e,t-1,l),l,f));for(l=1;l<=o;l++,f++)a.appendChild(L("",new Date(e,t,l),l,f));for(var p=o+1;p<=42-n&&(1===s.config.showMonths||f%7!=0);p++,f++)a.appendChild(L(c,new Date(e,t+1,p%o),p,f));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,fe("onYearChange")),U(),fe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),fe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&p(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&p(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),V(H(1),0)):V(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),V(H(1),0)):a||V(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var c=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),l=c.indexOf(e.target);if(-1!==l){var f=c[l+(e.shiftKey?-1:1)];void 0!==f?(e.preventDefault(),f.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],C(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],C(),ge()}fe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,c=0,l=r;lr&&lu)?u=l:l>n&&(!c||l0&&l0&&l>c;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=l||(nt&&l===n&&a.classList.add("endRange"),l>=u&&(0===c||l<=c)&&d(l,n,t)&&a.classList.add("inRange")))))},v=0,b=p.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===_.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},_.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?_.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=l(s),s.parseDate=f({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){fe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),c=window.innerHeight-u.bottom,l="above"===a||"below"!==a&&cn,f=window.pageYOffset+u.top+(l?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!l),v(s.calendarContainer,"arrowBottom",l),!s.config.inline){var p=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=p+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=f+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=p+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==p(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&fe("onYearChange"),fe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():R(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,c="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||c)&&ie()}F()}}s.parseDate=f({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&fe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),fe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&fe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=T,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void fe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),fe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),T(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);ce(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),T(),k(),ge(t),t&&fe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function ce(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function le(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function fe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&fe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=le(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=le(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):_.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):_.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var c=0;c-1?s.config[p]=r(f[p]).map(g).concat(s.config[p]):void 0===t[p]&&(s.config[p]=f[p])}fe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&ce(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),fe("onChange"),fe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(F,w),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),F()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),fe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(e[s=l[c]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&E(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!E(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=g,f.ok=v,f.equal=function(e,t,n){e!=t&&g(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(37))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var c,E="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(E=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(E=" "+RegExp.prototype.toString.call(n)),w(n)&&(E=" "+Date.prototype.toUTCString.call(n)),x(n)&&(E=" "+f(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,C)):C[0]+E+C[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return E(e)&&"[object RegExp]"===_(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===_(e)}function x(e){return E(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=E,t.isDate=w,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(299);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(300),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(37),n(111))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(111))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(306)),o=u(n(309)),a=u(n(1)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var c=o in t,l=o in u,f=t[o],p=(0,r.isValidElement)(f)&&!f.props.in;!l||c&&!p?l||!c||p?l&&c&&(0,r.isValidElement)(f)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:f.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(p.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return f()({},e,c()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(p.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function h(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function m(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function g(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function v(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function b(e,t){return e.validation[t]||null}function y(e,t){return-1===e.hiddenFields.indexOf(t)}Object(u.registerStore)("carbon-fields/core",{reducer:d,actions:r,selectors:o});var E=n(19),w=n.n(E),x=n(14),O=n(35),_=n(34),C=n(117),k=n(119),S=n(120),j=n(124),D=n(29),A=n(40),M=Object(D.a)(function(e){return f()({},e,{buttonText:Object(a.__)("Select Date","carbon-fields-ui")})})(A.a),T=n(76),F=n(129),P=n(130),N=n(131),I=n(134),L=n(136),R=n(140),H=n(57),V=n(142),B=n(143),U=n(77),z=n(144),W=n(145),Y=n(146),G=n(147),q=n(60),$=Object(D.a)(function(e){return f()({},e,{icon:"clock",buttonText:Object(a.__)("Select Time","carbon-fields-ui")})})(A.a);Object(i.addFilter)("carbon-fields.register-field-type","carbon-fields/core",function(e,t,n){return Object(x.compose)(Object(O.a)("carbon-fields.field-edit.".concat(t)),Object(O.a)("carbon-fields.".concat(e,".").concat(t)))(n)}),[["association",C.a],["checkbox",k.a],["color",S.a],["complex",j.a],["date",M],["date_time",A.a],["file",T.a],["footer_scripts",q.a],["gravity_form",U.a],["header_scripts",q.a],["hidden",F.a],["html",P.a],["image",T.a],["map",N.a],["multiselect",L.a],["media_gallery",I.a],["oembed",R.a],["radio",H.a],["radio_image",V.a],["rich_text",B.a],["select",U.a],["separator",z.a],["set",W.a],["sidebar",Y.a],["text",G.a],["textarea",q.a],["time",$]].forEach(function(e){return _.b.apply(void 0,w()(e))});var K=n(53),X=n(116),J=n(16),Z=n.n(J),Q=function(e,t){return e===t},ee=n(17),te=n(11),ne=Object(ee.withEffects)(function(e,t){if(t.field.required){var n=e.mount,r=e.unmount,o=e.observe("value"),a=e.observe("visible");return Object(te.merge)(Object(te.pipe)(Object(te.combine)(o,a,n),Object(te.filter)(function(e){return Z()(e,2)[1]}),Object(te.take)(1),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:Z()(e,1)[0],transient:!0}}})),Object(te.pipe)(o,function(e){return function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(o=n,e(0,function(e,t){0===e?(a=t)(1):1===e&&(i=!0,a(2))})),1===t?i?r(1,n):o(1):r(t,n)})}}}}(n),function(e){return void 0===e&&(e=Q),function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(a=n),1===t?i&&e(o,n)?a(1):(i=!0,o=n,r(1,n)):r(t,n)})}}}}(),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:e,transient:!1}}})),Object(te.pipe)(r,Object(te.map)(function(){return{type:"RESET"}})))}},{handler:function(e){return function(t){var n=e.id,r=e.field,o=e.markAsInvalid,u=e.markAsValid,s=e.lockSaving,c=e.unlockSaving;switch(t.type){case"VALIDATE":var l=t.payload,f=l.value,d=l.transient,h="carbon-fields.".concat(r.type,".validate"),m=Object(i.hasFilter)(h)?Object(i.applyFilters)(h,r,f):function(e){var t=Object(p.isObject)(e);return t&&!Object(p.isEmpty)(e)||!t&&e?null:Object(a.__)("This field is required.","carbon-fields-ui")}(f);m?(d||o(n,m),s(n)):(d||u(n),c(n));break;case"RESET":u(n),c(n)}}}}),re=Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{markAsValid:t.markAsValid,markAsInvalid:t.markAsInvalid}}),oe=Object(x.compose)(re,ne);function ae(e,t){function n(t,n){if(!Object(p.isEmpty)(n.field.conditional_logic))return e(n,t)}function r(e){return function(n){var r=e.field.conditional_logic,o=r.relation,i=r.rules,u=t(e,n),s=i.reduce(function(e,t){if(!Object(p.has)(u,t.field))return console.error(Object(a.sprintf)(Object(a.__)('An unknown field is used in condition - "%s"',"carbon-fields-ui"),t.field)),e.concat(!1);var n=function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;case">":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(p.some)(n,function(t){return t==e});case"NOT IN":return Object(p.every)(n,function(t){return t!=e});case"INCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),c=!1;switch(o){case"AND":c=Object(p.every)(s);break;case"OR":c=Object(p.some)(s)}c?e.showField(e.id):e.hideField(e.id)}}return Object(x.createHigherOrderComponent)(function(e){return Object(x.compose)(Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(u.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(ee.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var ie=n(149),ue=n.n(ie),se="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function ce(){return"cf-".concat(ue()(se,21))}function le(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(e[s=l[c]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&E(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!E(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=g,f.ok=v,f.equal=function(e,t,n){e!=t&&g(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(37))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var c,E="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(E=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(E=" "+RegExp.prototype.toString.call(n)),w(n)&&(E=" "+Date.prototype.toUTCString.call(n)),x(n)&&(E=" "+f(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,C)):C[0]+E+C[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return E(e)&&"[object RegExp]"===_(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===_(e)}function x(e){return E(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=E,t.isDate=w,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(299);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(300),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(37),n(111))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(111))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(306)),o=u(n(309)),a=u(n(1)),i=u(n(112));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var c=o in t,l=o in u,f=t[o],p=(0,r.isValidElement)(f)&&!f.props.in;!l||c&&!p?l||!c||p?l&&c&&(0,r.isValidElement)(f)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:f.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(p.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return f()({},e,c()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(p.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function h(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function m(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function g(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function v(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function b(e,t){return e.validation[t]||null}function y(e,t){return-1===e.hiddenFields.indexOf(t)}Object(u.registerStore)("carbon-fields/core",{reducer:d,actions:r,selectors:o});var E=n(19),w=n.n(E),x=n(14),O=n(35),_=n(34),C=n(117),k=n(119),S=n(120),j=n(124),D=n(29),A=n(40),M=Object(D.a)(function(e){return f()({},e,{buttonText:Object(a.__)("Select Date","carbon-fields-ui")})})(A.a),F=n(76),T=n(129),P=n(130),N=n(131),I=n(134),L=n(136),R=n(140),H=n(57),V=n(142),B=n(143),U=n(77),z=n(144),W=n(145),Y=n(146),G=n(147),q=n(60),$=Object(D.a)(function(e){return f()({},e,{icon:"clock",buttonText:Object(a.__)("Select Time","carbon-fields-ui")})})(A.a);Object(i.addFilter)("carbon-fields.register-field-type","carbon-fields/core",function(e,t,n){return Object(x.compose)(Object(O.a)("carbon-fields.field-edit.".concat(t)),Object(O.a)("carbon-fields.".concat(e,".").concat(t)))(n)}),[["association",C.a],["checkbox",k.a],["color",S.a],["complex",j.a],["date",M],["date_time",A.a],["file",F.a],["footer_scripts",q.a],["gravity_form",U.a],["header_scripts",q.a],["hidden",T.a],["html",P.a],["image",F.a],["map",N.a],["multiselect",L.a],["media_gallery",I.a],["oembed",R.a],["radio",H.a],["radio_image",V.a],["rich_text",B.a],["select",U.a],["separator",z.a],["set",W.a],["sidebar",Y.a],["text",G.a],["textarea",q.a],["time",$]].forEach(function(e){return _.b.apply(void 0,w()(e))});var K=n(53),X=n(116),J=n(16),Z=n.n(J),Q=function(e,t){return e===t},ee=n(17),te=n(11),ne=Object(ee.withEffects)(function(e,t){if(t.field.required){var n=e.mount,r=e.unmount,o=e.observe("value"),a=e.observe("visible");return Object(te.merge)(Object(te.pipe)(Object(te.combine)(o,a,n),Object(te.filter)(function(e){return Z()(e,2)[1]}),Object(te.take)(1),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:Z()(e,1)[0],transient:!0}}})),Object(te.pipe)(o,function(e){return function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(o=n,e(0,function(e,t){0===e?(a=t)(1):1===e&&(i=!0,a(2))})),1===t?i?r(1,n):o(1):r(t,n)})}}}}(n),function(e){return void 0===e&&(e=Q),function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(a=n),1===t?i&&e(o,n)?a(1):(i=!0,o=n,r(1,n)):r(t,n)})}}}}(),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:e,transient:!1}}})),Object(te.pipe)(r,Object(te.map)(function(){return{type:"RESET"}})))}},{handler:function(e){return function(t){var n=e.id,r=e.field,o=e.markAsInvalid,u=e.markAsValid,s=e.lockSaving,c=e.unlockSaving;switch(t.type){case"VALIDATE":var l=t.payload,f=l.value,d=l.transient,h="carbon-fields.".concat(r.type,".validate"),m=Object(i.hasFilter)(h)?Object(i.applyFilters)(h,r,f):function(e){var t=Object(p.isObject)(e);return t&&!Object(p.isEmpty)(e)||!t&&e?null:Object(a.__)("This field is required.","carbon-fields-ui")}(f);m?(d||o(n,m),s(n)):(d||u(n),c(n));break;case"RESET":u(n),c(n)}}}}),re=Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{markAsValid:t.markAsValid,markAsInvalid:t.markAsInvalid}}),oe=Object(x.compose)(re,ne);function ae(e,t){function n(t,n){if(!Object(p.isEmpty)(n.field.conditional_logic))return e(n,t)}function r(e){return function(n){var r=e.field.conditional_logic,o=r.relation,i=r.rules,u=t(e,n),s=i.reduce(function(e,t){if(!Object(p.has)(u,t.field))return console.error(Object(a.sprintf)(Object(a.__)('An unknown field is used in condition - "%s"',"carbon-fields-ui"),t.field)),e.concat(!1);var n=function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;case">":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(p.some)(n,function(t){return t==e});case"NOT IN":return Object(p.every)(n,function(t){return t!=e});case"INCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),c=!1;switch(o){case"AND":c=Object(p.every)(s);break;case"OR":c=Object(p.some)(s)}c?e.showField(e.id):e.hideField(e.id)}}return Object(x.createHigherOrderComponent)(function(e){return Object(x.compose)(Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(u.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(ee.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var ie=n(149),ue=n.n(ie),se="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function ce(){return"cf-".concat(ue()(se,21))}function le(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return function (start, sink) {\n if (start !== 0) {\n return;\n }\n\n var unsubscribe = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"subscribe\"])(function () {\n return sink(1, selector.apply(void 0, args));\n });\n sink(0, function (type) {\n if (type === 2) {\n unsubscribe();\n }\n });\n };\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/utils/from-selector.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return fromSelector; });\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Creates a callbag listenable source from a store's selector.\n *\n * @param {Function} selector\n * @param {...mixed} args\n * @return {Function}\n */\n\nfunction fromSelector(selector) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return function (start, sink) {\n if (start !== 0) {\n return;\n }\n\n var unsubscribe = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"subscribe\"])(function () {\n return sink(1, selector.apply(void 0, args));\n });\n sink(0, function (type) {\n if (type === 2) {\n unsubscribe();\n }\n });\n sink(1, selector.apply(void 0, args));\n };\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/utils/from-selector.js?"); /***/ }), diff --git a/build/gutenberg/core.min.js b/build/gutenberg/core.min.js index 3ab2c0574..48c17e544 100644 --- a/build/gutenberg/core.min.js +++ b/build/gutenberg/core.min.js @@ -1,10 +1,10 @@ -this.cf=this.cf||{},this.cf.core=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=278)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.cf.vendor.react}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n1?t-1:0),i=1;i-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(61),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(48)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(67)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(36),o=n(145),a=n(146),i=n(147),u=n(148),s=n(149);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(30)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(154),o=n(161),a=n(163),i=n(164),u=n(165);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&ec))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=c}function w(){var e=o();if(y(e))return E(e);f=setTimeout(w,function(e){var n=t-(e-d);return g?u(n,c-(e-h)):n}(e))}function E(e){return f=void 0,v&&s?b(e):(s=l=void 0,p)}function x(){var e=o(),n=y(e);if(s=arguments,l=this,d=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,t),m?b(e):p}(d);if(g)return f=setTimeout(w,t),b(d)}return void 0===f&&(f=setTimeout(w,t)),p}return t=a(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?i(a(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=d=l=f=void 0},x.flush=function(){return void 0===f?p:E(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(239)),o=a(n(241));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],c=!1,p=-1;function f(){c&&s&&(c=!1,s.length?l=s.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=u(f);c=!0;for(var t=l.length;t;){for(s=l,l=[];++p1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,i.polyfill)(f);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(95),i=n(266);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,a.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){var r=n(116);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(120))&&r.__esModule?r:{default:r};t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===c.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);c.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return c.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();p.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},p.defaultProps={options:{}},t.default=p},function(e,t,n){var r=n(251),o=n(252),a=n(256);r(".__observe-resize__ { position: absolute; left: 0; top: -100%; width: 100%; height: 100%; margin: 1px 0 0; border: none; opacity: 0; visibility: hidden; pointer-events: none; }"),e.exports=function(e,t){if(o.ok(a(e),"observe-resize: el should be a valid DOM element"),o.equal(typeof t,"function","observe-resize: cb should be type function"),"object"==typeof window){var n=!1,r=document.createElement("iframe");return r.setAttribute("class","__observe-resize__"),e.appendChild(r),o.ok(r.contentWindow,"observe-resize: no contentWindow detected - cannot start observing"),r.contentWindow.onresize=function(){n||(n=!0,window.requestAnimationFrame(function(){n=!1,t(e)}))},function(){r.parentNode&&r.parentNode.removeChild(r)}}}},function(e,t,n){(function(t){for(var r=n(259),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],l=0;!u&&l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){var r=n(276),o=n(277);e.exports=function(e,t){return o(r,e,t)}},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var u=0;for(e=0===i?"":e[0]+" ";ur&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===p.inserted[v]&&(n="",h(e,t),p.inserted[v]=n)}var O=function(){var e=E.apply(this,arguments),t=a+"-"+v;return void 0===p.registered[t]&&(p.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){p.inserted[e]=!0}if(c){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){c&&(d.flush(),d.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=l(n(1)),o=l(n(21)),a=l(n(25)),i=n(44),u=l(n(244)),s=l(n(245));function l(e){return e&&e.__esModule?e:{default:e}}var c=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,l=e.hsv,c=e.hsl,p=e.onChange,f=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:c,hsv:l,onChange:p})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:c,onChange:p})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:c,renderers:m,onChange:p}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:c,hex:o,onChange:p,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:p,onSwatchHover:f}))};c.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},c.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(c)},function(e,t,n){"use strict";var r=n(122);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(124)),o=u(n(46)),a=u(n(135)),i=u(n(136));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(29),o=n(23),a=n(26);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(33),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(128)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(37);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(36);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(36),o=n(56),a=n(57);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(68),o=n(151),a=n(27),i=n(72),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,p=l.hasOwnProperty,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:u).test(i(e))}},function(e,t,n){var r,o=n(152),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(155),o=n(36),a=n(56);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(156),o=n(157),a=n(158),i=n(159),u=n(160);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(199);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(54),o=n(85),a=n(86),i=n(201),u=n(202),s=n(205),l=n(206),c=n(207),p=n(208),f=n(76),d=n(209),h=n(40),m=n(210),g=n(211),v=n(216),b=n(23),y=n(47),w=n(218),E=n(27),x=n(220),O=n(34),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var T,F=1&n,P=2&n,N=4&n;if(j&&(T=A?j(t,D,A,M):j(t)),void 0!==T)return T;if(!E(t))return t;var I=b(t);if(I){if(T=m(t),!F)return l(t,T)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,F);if(L==k||L==_||R&&!A){if(T=P||R?{}:v(t),!F)return P?p(t,u(T,t)):c(t,i(T,t))}else{if(!S[L])return A?t:{};T=g(t,L,F)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,T),x(t))return t.forEach(function(r){T.add(e(r,n,j,r,t,M))}),T;if(w(t))return t.forEach(function(r,o){T.set(o,e(r,n,j,o,t,M))}),T;var V=N?P?d:f:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(T,o,e(r,n,j,o,t,M))}),T}},function(e,t,n){var r=n(30),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(43),o=n(34);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(43),o=n(88);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(27),o=n(52),a=n(204),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(48)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*l/a)/100,n.hsl.a!==c)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:c,source:"rgb"}}else{var p;if(p=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==p)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:p,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*l/a+100)/100,n.hsl.h!==c)return{h:c,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var p=void 0;if(p=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==p)return{h:p,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?l=a:c<0?c=0:c>i&&(c=i);var p=100*l/a,f=-100*c/i+100;return{h:n.hsl.h,s:p,v:f,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=F(e,360),t=F(t,100),n=F(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,p,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=T(s),{ok:h,format:e.format||m,r:l(255,c(u.r,0)),g:l(255,c(u.g,0)),b:l(255,c(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r,o,a=c(e,t,n),i=l(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(f(r));return a}function D(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(f({h:r,s:o,v:a})),a=(a+u)%1;return i}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*F(this._r,255))+"%",g:s(100*F(this._g,255))+"%",b:s(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%)":"rgba("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:p(),g:p(),b:p()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),a=n/100;return f({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,a=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},f.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var l=0;ls&&(s=r,u=f(t[l]));return f.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var A=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return l(1,c(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:c.fields,className:"flexbox-fix"},r.default.createElement("div",{style:c.double},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:s.replace("#",""),onChange:p})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.alpha},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:p,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t1?t-1:0),i=1;i-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(61),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(48)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(67)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(36),o=n(145),a=n(146),i=n(147),u=n(148),s=n(149);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(30)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(154),o=n(161),a=n(163),i=n(164),u=n(165);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&ec))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=c}function w(){var e=o();if(y(e))return E(e);f=setTimeout(w,function(e){var n=t-(e-d);return g?u(n,c-(e-h)):n}(e))}function E(e){return f=void 0,v&&s?b(e):(s=l=void 0,p)}function x(){var e=o(),n=y(e);if(s=arguments,l=this,d=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,t),m?b(e):p}(d);if(g)return f=setTimeout(w,t),b(d)}return void 0===f&&(f=setTimeout(w,t)),p}return t=a(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?i(a(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=d=l=f=void 0},x.flush=function(){return void 0===f?p:E(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(239)),o=a(n(241));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],c=!1,p=-1;function f(){c&&s&&(c=!1,s.length?l=s.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=u(f);c=!0;for(var t=l.length;t;){for(s=l,l=[];++p1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,i.polyfill)(f);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(95),i=n(266);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,a.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){var r=n(116);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(120))&&r.__esModule?r:{default:r};t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===c.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);c.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return c.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();p.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},p.defaultProps={options:{}},t.default=p},function(e,t,n){var r=n(251),o=n(252),a=n(256);r(".__observe-resize__ { position: absolute; left: 0; top: -100%; width: 100%; height: 100%; margin: 1px 0 0; border: none; opacity: 0; visibility: hidden; pointer-events: none; }"),e.exports=function(e,t){if(o.ok(a(e),"observe-resize: el should be a valid DOM element"),o.equal(typeof t,"function","observe-resize: cb should be type function"),"object"==typeof window){var n=!1,r=document.createElement("iframe");return r.setAttribute("class","__observe-resize__"),e.appendChild(r),o.ok(r.contentWindow,"observe-resize: no contentWindow detected - cannot start observing"),r.contentWindow.onresize=function(){n||(n=!0,window.requestAnimationFrame(function(){n=!1,t(e)}))},function(){r.parentNode&&r.parentNode.removeChild(r)}}}},function(e,t,n){(function(t){for(var r=n(259),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],l=0;!u&&l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){var r=n(276),o=n(277);e.exports=function(e,t){return o(r,e,t)}},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var u=0;for(e=0===i?"":e[0]+" ";ur&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===p.inserted[v]&&(n="",h(e,t),p.inserted[v]=n)}var O=function(){var e=E.apply(this,arguments),t=a+"-"+v;return void 0===p.registered[t]&&(p.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){p.inserted[e]=!0}if(c){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){c&&(d.flush(),d.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=l(n(1)),o=l(n(21)),a=l(n(25)),i=n(44),u=l(n(244)),s=l(n(245));function l(e){return e&&e.__esModule?e:{default:e}}var c=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,l=e.hsv,c=e.hsl,p=e.onChange,f=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:c,hsv:l,onChange:p})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:c,onChange:p})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:c,renderers:m,onChange:p}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:c,hex:o,onChange:p,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:p,onSwatchHover:f}))};c.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},c.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(c)},function(e,t,n){"use strict";var r=n(122);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(124)),o=u(n(46)),a=u(n(135)),i=u(n(136));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(29),o=n(23),a=n(26);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(33),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(128)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(37);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(36);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(36),o=n(56),a=n(57);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(68),o=n(151),a=n(27),i=n(72),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,p=l.hasOwnProperty,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:u).test(i(e))}},function(e,t,n){var r,o=n(152),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(155),o=n(36),a=n(56);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(156),o=n(157),a=n(158),i=n(159),u=n(160);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(199);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(54),o=n(85),a=n(86),i=n(201),u=n(202),s=n(205),l=n(206),c=n(207),p=n(208),f=n(76),d=n(209),h=n(40),m=n(210),g=n(211),v=n(216),b=n(23),y=n(47),w=n(218),E=n(27),x=n(220),O=n(34),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var F,T=1&n,P=2&n,N=4&n;if(j&&(F=A?j(t,D,A,M):j(t)),void 0!==F)return F;if(!E(t))return t;var I=b(t);if(I){if(F=m(t),!T)return l(t,F)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,T);if(L==k||L==_||R&&!A){if(F=P||R?{}:v(t),!T)return P?p(t,u(F,t)):c(t,i(F,t))}else{if(!S[L])return A?t:{};F=g(t,L,T)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,F),x(t))return t.forEach(function(r){F.add(e(r,n,j,r,t,M))}),F;if(w(t))return t.forEach(function(r,o){F.set(o,e(r,n,j,o,t,M))}),F;var V=N?P?d:f:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(F,o,e(r,n,j,o,t,M))}),F}},function(e,t,n){var r=n(30),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(43),o=n(34);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(43),o=n(88);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(27),o=n(52),a=n(204),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(48)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*l/a)/100,n.hsl.a!==c)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:c,source:"rgb"}}else{var p;if(p=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==p)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:p,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*l/a+100)/100,n.hsl.h!==c)return{h:c,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var p=void 0;if(p=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==p)return{h:p,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?l=a:c<0?c=0:c>i&&(c=i);var p=100*l/a,f=-100*c/i+100;return{h:n.hsl.h,s:p,v:f,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=T(e,360),t=T(t,100),n=T(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,p,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=F(s),{ok:h,format:e.format||m,r:l(255,c(u.r,0)),g:l(255,c(u.g,0)),b:l(255,c(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r,o,a=c(e,t,n),i=l(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(f(r));return a}function D(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(f({h:r,s:o,v:a})),a=(a+u)%1;return i}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*T(this._r,255))+"%",g:s(100*T(this._g,255))+"%",b:s(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%)":"rgba("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:p(),g:p(),b:p()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),a=n/100;return f({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,a=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},f.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var l=0;ls&&(s=r,u=f(t[l]));return f.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var A=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return l(1,c(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:c.fields,className:"flexbox-fix"},r.default.createElement("div",{style:c.double},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:s.replace("#",""),onChange:p})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.alpha},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:p,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},c=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},p=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r,a){if(0===e||e){var s,l=a||o,c=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var p=t||(n||g).dateFormat,f=String(e).trim();if("today"===f)s=new Date,r=!0;else if(/Z$/.test(f)||/GMT$/.test(f))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,p);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function w(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(c=o===s.hourElement?c-i-t(!s.amPM):a,f&&N(void 0,1,s.hourElement)),s.amPM&&p&&(1===u?c+l===23:Math.abs(c-l)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(c)}}(n);var r=s._input.value;C(),ge(),s._input.value!==r&&s._debouncedChange()}}function C(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var l=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,l.getHours()))===l.getHours()&&(o=Math.max(o,l.getMinutes())),o===l.getMinutes()&&(a=Math.max(a,l.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function T(){pe("onChange")}function F(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function L(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===f(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===f(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===f(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&f(e,s.selectedDates[0])>=0&&f(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),pe("onDayCreate",a),a}function R(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var l=o.children[u];if(-1===l.className.indexOf("hidden")&&J(l.dateObj))return l}}function V(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,l=i.children.length,c=u;c>=0&&c0?l:-1);c+=o){var p=i.children[c];if(-1===p.className.indexOf("hidden")&&J(p.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return R(p)}s.changeMonth(o),V(H(o),0)}(r,t):R(r)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",l=i?"nextMonthDay hidden":"nextMonthDay",c=r+1-n,p=0;c<=r;c++,p++)a.appendChild(L(u,new Date(e,t-1,c),c,p));for(c=1;c<=o;c++,p++)a.appendChild(L("",new Date(e,t,c),c,p));for(var f=o+1;f<=42-n&&(1===s.config.showMonths||p%7!=0);f++,p++)a.appendChild(L(l,new Date(e,t+1,f%o),f,p));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,pe("onYearChange")),U(),pe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),pe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&f(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&f(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),V(H(1),0)):V(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),V(H(1),0)):a||V(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var l=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),c=l.indexOf(e.target);if(-1!==c){var p=l[c+(e.shiftKey?-1:1)];void 0!==p?(e.preventDefault(),p.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],C(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],C(),ge()}pe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,l=0,c=r;cr&&cu)?u=c:c>n&&(!l||c0&&c0&&c>l;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=c||(nt&&c===n&&a.classList.add("endRange"),c>=u&&(0===l||c<=l)&&d(c,n,t)&&a.classList.add("inRange")))))},v=0,b=f.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===_.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},_.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?_.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=c(s),s.parseDate=p({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){pe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),l=window.innerHeight-u.bottom,c="above"===a||"below"!==a&&ln,p=window.pageYOffset+u.top+(c?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!c),v(s.calendarContainer,"arrowBottom",c),!s.config.inline){var f=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=f+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=p+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=f+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==f(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&pe("onYearChange"),pe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():R(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,l="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||l)&&ie()}T()}}s.parseDate=p({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&pe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),pe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&pe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=F,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void pe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),pe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),F(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);le(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),F(),k(),ge(t),t&&pe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function le(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ce(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function pe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&pe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=ce(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=ce(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):_.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):_.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var l=0;l-1?s.config[f]=r(p[f]).map(g).concat(s.config[f]):void 0===t[f]&&(s.config[f]=p[f])}pe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&le(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),pe("onChange"),pe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(T,E),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),T()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),pe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},c=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},p=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r,a){if(0===e||e){var s,l=a||o,c=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var p=t||(n||g).dateFormat,f=String(e).trim();if("today"===f)s=new Date,r=!0;else if(/Z$/.test(f)||/GMT$/.test(f))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,p);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function w(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(c=o===s.hourElement?c-i-t(!s.amPM):a,f&&N(void 0,1,s.hourElement)),s.amPM&&p&&(1===u?c+l===23:Math.abs(c-l)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(c)}}(n);var r=s._input.value;C(),ge(),s._input.value!==r&&s._debouncedChange()}}function C(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var l=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,l.getHours()))===l.getHours()&&(o=Math.max(o,l.getMinutes())),o===l.getMinutes()&&(a=Math.max(a,l.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function F(){pe("onChange")}function T(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function L(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===f(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===f(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===f(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&f(e,s.selectedDates[0])>=0&&f(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),pe("onDayCreate",a),a}function R(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var l=o.children[u];if(-1===l.className.indexOf("hidden")&&J(l.dateObj))return l}}function V(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,l=i.children.length,c=u;c>=0&&c0?l:-1);c+=o){var p=i.children[c];if(-1===p.className.indexOf("hidden")&&J(p.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return R(p)}s.changeMonth(o),V(H(o),0)}(r,t):R(r)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",l=i?"nextMonthDay hidden":"nextMonthDay",c=r+1-n,p=0;c<=r;c++,p++)a.appendChild(L(u,new Date(e,t-1,c),c,p));for(c=1;c<=o;c++,p++)a.appendChild(L("",new Date(e,t,c),c,p));for(var f=o+1;f<=42-n&&(1===s.config.showMonths||p%7!=0);f++,p++)a.appendChild(L(l,new Date(e,t+1,f%o),f,p));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,pe("onYearChange")),U(),pe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),pe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&f(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&f(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),V(H(1),0)):V(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),V(H(1),0)):a||V(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var l=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),c=l.indexOf(e.target);if(-1!==c){var p=l[c+(e.shiftKey?-1:1)];void 0!==p?(e.preventDefault(),p.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],C(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],C(),ge()}pe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,l=0,c=r;cr&&cu)?u=c:c>n&&(!l||c0&&c0&&c>l;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=c||(nt&&c===n&&a.classList.add("endRange"),c>=u&&(0===l||c<=l)&&d(c,n,t)&&a.classList.add("inRange")))))},v=0,b=f.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===_.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},_.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?_.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=c(s),s.parseDate=p({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){pe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),l=window.innerHeight-u.bottom,c="above"===a||"below"!==a&&ln,p=window.pageYOffset+u.top+(c?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!c),v(s.calendarContainer,"arrowBottom",c),!s.config.inline){var f=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=f+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=p+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=f+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==f(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&pe("onYearChange"),pe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():R(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,l="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||l)&&ie()}F()}}s.parseDate=p({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&pe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),pe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&pe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=T,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void pe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),pe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),T(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);le(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),T(),k(),ge(t),t&&pe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function le(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ce(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function pe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&pe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=ce(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=ce(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):_.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):_.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var l=0;l-1?s.config[f]=r(p[f]).map(g).concat(s.config[f]):void 0===t[f]&&(s.config[f]=p[f])}pe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&le(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),pe("onChange"),pe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(F,E),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),F()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),pe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o=0;l--)if(c[l]!==p[l])return!1;for(l=c.length-1;l>=0;l--)if(!b(e[s=c[l]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&w(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(p.AssertionError,Error),p.fail=g,p.ok=v,p.equal=function(e,t,n){e!=t&&g(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){E(!0,e,t,n)},p.doesNotThrow=function(e,t,n){E(!1,e,t,n)},p.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(31))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),c(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=c(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return p(n)}var l,w="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(w=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),x(n)&&(w=" "+p(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,w,C)):C[0]+w+C[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?c(e,s.value,null):c(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function x(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=w,t.isDate=E,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(254);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(255),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(31),n(93))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(93))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(261)),o=u(n(264)),a=u(n(1)),i=u(n(94));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var l=o in t,c=o in u,p=t[o],f=(0,r.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,r.isValidElement)(p)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:p.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(f.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return p()({},e,l()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(f.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function h(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function m(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function g(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function v(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function b(e,t){return e.validation[t]||null}function y(e,t){return-1===e.hiddenFields.indexOf(t)}Object(u.registerStore)("carbon-fields/core",{reducer:d,actions:r,selectors:o});var w=n(19),E=n.n(w),x=n(14),O=n(6),_=n.n(O),C=n(7),k=n.n(C),S=n(8),j=n.n(S),D=n(9),A=n.n(D),M=n(10),T=n.n(M),F=n(0),P=n.n(F),N=n(3),I=16;function L(e){return Object(x.createHigherOrderComponent)(function(t){return function(n){function r(n){var o;return _()(this,r),(o=j()(this,A()(r).call(this,n))).onHooksUpdated=o.onHooksUpdated.bind(P()(P()(o))),o.Component=Object(i.applyFilters)(e,t),o.namespace=Object(f.uniqueId)("core/with-filters/component-"),o.throttledForceUpdate=Object(f.debounce)(function(){o.Component=Object(i.applyFilters)(e,t),o.forceUpdate()},I),Object(i.addAction)("hookRemoved",o.namespace,o.onHooksUpdated),Object(i.addAction)("hookAdded",o.namespace,o.onHooksUpdated),o}return T()(r,n),k()(r,[{key:"componentWillUnmount",value:function(){this.throttledForceUpdate.cancel(),Object(i.removeAction)("hookRemoved",this.namespace),Object(i.removeAction)("hookAdded",this.namespace)}},{key:"onHooksUpdated",value:function(t){t===e&&this.throttledForceUpdate()}},{key:"render",value:function(){return wp.element.createElement(this.Component,this.props)}}]),r}(N.Component)},"withFilters")}function R(e,t){var n,r=Object(f.startCase)(e),o={};return n={},l()(n,"register".concat(r,"Type"),function(n,u){return Object(f.isString)(n)?o[n]?(console.error(Object(a.sprintf)(Object(a.__)("%1$s %2$s is already registered.","carbon-fields-ui"),r,n)),!1):u&&Object(f.isFunction)(u)?(o[n]=t.reduce(function(t,r){return p()({},t,l()({},r,Object(i.applyFilters)("carbon-fields.register-".concat(e,"-type"),n,r,u)))},{}),!0):(console.error(Object(a.__)('The "component" param must be a function.',"carbon-fields-ui")),!1):(console.error(Object(a.sprintf)(Object(a.__)("%1$s type must be a string.","carbon-fields-ui"),r)),!1)}),l()(n,"get".concat(r,"Type"),function(e,n){if(t.includes(n)){if(o[e])return o[e][n];console.error(Object(a.sprintf)(Object(a.__)("%s %s isn't registered.","carbon-fields-ui"),r,e))}else console.error(Object(a.sprintf)(Object(a.__)("The provided context isn't a valid one. Must be one of - %s .","carbon-fields-ui"),t.join(", ")))}),n}var H=R("field",["metabox","block"]),V=H.registerFieldType,B=H.getFieldType,U=n(16),z=n.n(U),W=n(32),Y=n.n(W),G=n(17),q=n(20),K=n.n(q),X=n(11),J=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(r,o){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){r(e)}),i.fail(function(){o(Object(a.__)("An error occured.","carbon-fields-ui"))})})},ue=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&i.length>=r.max?alert(Object(a.sprintf)(Object(a.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(u(o,E()(i).concat([Object(f.pick)(e,"id","type","subtype")])),s({selectedOptions:E()(l).concat([e])})))}),l()(P()(P()(n)),"handleRemoveItem",function(e){var t=n.props,r=t.value,o=t.id,a=t.onChange,i=t.setState,u=t.selectedOptions;a(o,Object(f.without)(r,e)),i({selectedOptions:Object(f.without)(u,e)})}),l()(P()(P()(n)),"handleSort",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),n}return T()(t,e),k()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.value,o=t.field,i=t.totalOptionsCount,u=t.selectedOptions,s=t.queryTerm,l=this.props.options;return o.duplicates_allowed||(l=Y()(l,function(e){e.map(function(e){return e.disabled=!!Object(f.find)(r,function(t){return Object(f.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),wp.element.createElement(N.Fragment,null,wp.element.createElement("div",{className:"cf-association__bar"},wp.element.createElement(oe,{value:s,onChange:this.handleSearchChange}),wp.element.createElement("span",{className:"cf-association__counter"},Object(a.sprintf)(Object(a.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(l.length),Number(i)))),wp.element.createElement("div",{className:"cf-association__cols"},wp.element.createElement("div",{className:"cf-association__col"},l.map(function(t,n){return wp.element.createElement("div",{className:K()("cf-association__option",{"cf-association__option--selected":t.disabled}),key:n},t.thumbnail&&wp.element.createElement("img",{className:"cf-association__option-thumb",src:t.thumbnail}),wp.element.createElement("div",{className:"cf-association__option-content"},wp.element.createElement("span",{className:"cf-association__option-title"},t.title),wp.element.createElement("span",{className:"cf-association__option-type"},t.type)),wp.element.createElement("div",{className:"cf-association__option-actions"},wp.element.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:t.edit_link}),!t.disabled&&(o.max<0||r.length0&&t.length=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(he.createElement)(e,n)},a}(he.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r},Se=ke(function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a1?n.setState(function(e){return{menuVisible:!e.menuVisible}}):r(t[0])}),l()(P()(P()(n)),"handleItemClick",function(e){n.setState({menuVisible:!1}),n.props.onSelect(e)}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.buttonText,r=t.groups;return wp.element.createElement("div",{className:"cf-complex__inserter"},wp.element.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},n),r.length>1&&wp.element.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},r.map(function(t,n){return wp.element.createElement("li",{className:"cf-complex__inserter-item",key:n,onClick:function(){return e.handleItemClick(t)}},t.label)})))}}]),t}(N.Component)),Ne=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;n.setState({currentTab:Object(f.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),l()(P()(P()(n)),"handleToggleAllClick",function(){var e=n.props,t=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!t)}),l()(P()(P()(n)),"handleGroupsSortStart",function(e,t){var r=n.props,o=r.value,a=r.groupIdKey,i=t.item.index(),u=Object(f.get)(o,"".concat(i,".").concat(a),null);n.setState({currentDraggedGroup:u})}),l()(P()(P()(n)),"handleGroupsSortUpdate",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),l()(P()(P()(n)),"handleGroupsSortStop",function(){n.setState({currentDraggedGroup:null})}),l()(P()(P()(n)),"handleTabsChange",function(e){n.setState({currentTab:e})}),n}return T()(t,e),k()(t,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(f.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=z()(e,2),o=r[0],i=r[1],u=Object(f.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(f.isString)(u.label_template))return u.label;try{return Object(f.template)(u.label_template)(p()({$_index:n},i))||u.label}catch(e){return console.error(Object(a.sprintf)(Object(a.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var e=this,t=this.state,n=t.currentDraggedGroup,r=t.currentTab,o=this.props,i=o.value,u=o.field,s=o.groupIdKey,l=o.groupFilterKey,c=o.allGroupsAreCollapsed,p=o.onGroupSetup,f=o.onGroupFieldSetup,d=o.onToggleGroup,h=this.getAvailableGroups(l),m=this.getGroupLabels(),g=i.map(function(e,t){return{id:e[s],label:m[t]}});return wp.element.createElement(N.Fragment,null,this.isTabbed&&!!i.length&&wp.element.createElement(ae,{items:i,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===u.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},wp.element.createElement(Fe,{ref:this.tabsList,items:g,current:r,layout:u.layout,onChange:this.handleTabsChange},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Pe,{buttonText:"+",groups:h,onSelect:this.handleAddGroup}))),!i.length&&wp.element.createElement(Ie,{label:"There are no entries yet."},wp.element.createElement(Pe,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup})),!!i.length&&wp.element.createElement(ae,{items:i,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},wp.element.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},i.map(function(t,o){return wp.element.createElement(Ne,Q()({key:"".concat(t[l],"-").concat(o)},p(t,{index:o,label:m[o],dragged:t[s]===n,tabbed:e.isTabbed,hidden:e.isTabbed&&t[s]!==r,allowClone:u.duplicate_groups_allowed&&!e.isMaximumReached,onFieldSetup:f,onClone:e.handleCloneGroup,onRemove:e.handleRemoveGroup,onToggle:d})))}))),!this.isTabbed&&!!i.length&&wp.element.createElement("div",{className:"cf-complex__actions"},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Pe,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup}),wp.element.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},c?Object(a.__)("Expand All","carbon-fields-ui"):Object(a.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(a.sprintf)(Object(a.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),t}(N.Component);Object(i.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(e){return function(t){var n=t.field;return"complex"!==n.type?wp.element.createElement(e,t):wp.element.createElement(e,Q()({className:"cf-complex--".concat(n.layout)},t))}}),Object(i.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(f.isEmpty)(t))return Object(a.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Et=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},xt=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Ot=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function jt(e){return St(e)?window.pageYOffset:e.scrollTop}function Dt(e,t){St(e)?window.scrollTo(0,t):e.scrollTop=t}function At(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_t,o=jt(e),a=t-o,i=0;!function t(){var u,s=a*((u=(u=i+=10)/n-1)*u*u+1)+o;Dt(e,s),i=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&At(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&E>=r)return a&&At(s,_,160),{placement:"bottom",maxHeight:i?E-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&w>=r)&&(k=i?w-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return Dt(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&At(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&w>=r){var S=t;return(!i&&x>=r||i&&w>=r)&&(S=i?w-y:x-y),a&&At(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!c,isFixedPosition:c,theme:s});l&&l(p),r.setState(p)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||Tt(e);return bt({},r.props,{placement:t,maxHeight:r.state.maxHeight})},Et(r,n)}return yt(t,e),gt(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(he.Component);Ft.contextTypes={getPortalPlacement:st.a.func};var Pt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},Nt=Pt,It=Pt,Lt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};Lt.defaultProps={children:"No options"};var Rt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};Rt.defaultProps={children:"Loading..."};var Ht=function(e){function t(){var e,n,r;mt(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=c-p-l,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),f.scrollTop=c,m=!0,r.isBottom=!0):!d&&-t>l&&(i&&!r.isTop&&i(e),f.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},Et(r,n)}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return me.a.createElement(Xt,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(he.Component),ln=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=wt(e,["isEnabled"]);return t?me.a.createElement(sn,n):this.props.children}}]),t}(he.Component);ln.defaultProps={isEnabled:!0};var cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,i=e.hasValue;return me.a.createElement("div",{className:r(Object(it.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i},n)},t)}}]),t}(he.Component),pn=function(e){var t=e.size,n=wt(e,["size"]);return me.a.createElement("svg",bt({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(it.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},fn=function(e){return me.a.createElement(pn,bt({size:20},e),me.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},dn=function(e){return me.a.createElement(pn,bt({size:20},e),me.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},hn=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},mn=hn,gn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({},a,{className:r(Object(it.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};gn.defaultProps={children:me.a.createElement(dn,null)};var vn=hn,bn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({},a,{className:r(Object(it.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};bn.defaultProps={children:me.a.createElement(fn,null)};var yn=function(e){var t=e.color,n=e.delay,r=e.offset;return me.a.createElement("span",{className:Object(it.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(it.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var wn=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,i=e.isRtl,u=e.theme.colors,s=a?u.neutral80:u.neutral20;return me.a.createElement("div",bt({},o,{className:n(Object(it.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),me.a.createElement(yn,{color:s,delay:0,offset:i}),me.a.createElement(yn,{color:s,delay:160,offset:!0}),me.a.createElement(yn,{color:s,delay:320,offset:!i}))};wn.defaultProps={size:4};var En=function(e){var t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)},xn=En,On=En,_n=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)}}]),t}(he.Component);_n.defaultProps={children:me.a.createElement(fn,{size:14})};var Cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,i=e.getStyles,u=e.innerProps,s=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove,h=bt({className:o(Object(it.a)(i("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),m={className:o(Object(it.a)(i("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=bt({className:o(Object(it.a)(i("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return me.a.createElement(p,{data:a,innerProps:h,selectProps:c},me.a.createElement(f,{data:a,innerProps:m,selectProps:c},t),me.a.createElement(d,{data:a,innerProps:g,selectProps:c}))}}]),t}(he.Component);Cn.defaultProps={cropWithEllipsis:!0};var kn={ClearIndicator:bn,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,i=e.isFocused,u=e.innerRef,s=e.innerProps;return me.a.createElement("div",bt({ref:u,className:n(Object(it.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":i},o)},s),t)},DropdownIndicator:gn,DownChevron:dn,CrossIcon:fn,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,i=e.headingProps,u=e.label,s=e.theme;return me.a.createElement("div",{className:r(Object(it.a)(o("group",e)),{group:!0},n)},me.a.createElement(a,bt({},i,{theme:s,getStyles:o,cx:r}),u),me.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=wt(e,["className","cx","getStyles","theme"]);return me.a.createElement("div",bt({className:n(Object(it.a)(r("groupHeading",bt({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return me.a.createElement("div",{className:r(Object(it.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return me.a.createElement("span",bt({},o,{className:n(Object(it.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,i=e.isDisabled,u=e.theme,s=wt(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return me.a.createElement("div",{className:Object(it.a)(r("input",bt({theme:u},s)))},me.a.createElement(ct.a,bt({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:i},s)))},LoadingIndicator:wn,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,i=e.innerProps,u=r(Object(it.a)(o("menu",e)),{menu:!0},n);return me.a.createElement("div",bt({className:u},i,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,i=e.innerRef;return me.a.createElement("div",{className:r(Object(it.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:i},t)},MenuPortal:Ht,LoadingMessage:Rt,NoOptionsMessage:Lt,MultiValue:Cn,MultiValueContainer:xn,MultiValueLabel:On,MultiValueRemove:_n,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.isFocused,u=e.isSelected,s=e.innerRef,l=e.innerProps;return me.a.createElement("div",bt({ref:s,className:r(Object(it.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":i,"option--is-selected":u},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,i=e.isDisabled,u=e.isRtl;return me.a.createElement("div",bt({className:r(Object(it.a)(o("container",e)),{"--is-disabled":i,"--is-rtl":u},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},i),t)},ValueContainer:cn},Sn=function(e){return bt({},kn,e.components)},jn={clearIndicator:vn,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:mn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:It,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return vt(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),vt(t,"backgroundColor",i.neutral0),vt(t,"borderRadius",o),vt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),vt(t,"marginBottom",a.menuGutter),vt(t,"marginTop",a.menuGutter),vt(t,"position","absolute"),vt(t,"width","100%"),vt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Nt,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Dn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},An={backspaceRemovesValue:!0,blurInputOnSelect:Mt(),captureMenuScroll:!Mt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=bt({ignoreCase:!0,ignoreAccents:!0,stringify:qt,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?Gt(t):t,l=i?Gt(a(e)):a(e);return r&&(s=s.toLowerCase(),l=l.toLowerCase()),o&&(s=Yt(s),l=Yt(l)),"start"===u?l.substr(0,s.length)===s:l.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Mn=1,Tn=function(e){function t(e){mt(this,t);var n=Et(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Fn.call(n);var r=e.value;n.cacheComponents=ft(n.cacheComponents,zt).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Mn);var o=kt(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=kt(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,l=this.state.isFocused;(l&&!u&&e.isDisabled||l&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?Dt(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,l=-1;if(a.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Dn):bt({},Dn,this.props.theme):Dn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+Ct(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var l=a?void 0:function(){return n.onOptionHover(e)},c=a?void 0:function(){return n.selectOption(e)},p=n.getElementId("option")+"-"+r;return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:p,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,l=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:l({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=this.components.Input,u=this.state.inputIsHidden,s=r||this.getElementId("input");if(!n)return me.a.createElement(Kt,{id:s,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:_t,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps,p=c.cx,f=c.theme;return me.a.createElement(i,bt({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:s,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:f,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,u=t.Placeholder,s=this.commonProps,l=this.props,c=l.controlShouldRenderValue,p=l.isDisabled,f=l.isMulti,d=l.inputValue,h=l.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue;if(!this.hasValue()||!c)return d?null:me.a.createElement(u,bt({},s,{key:"placeholder",isDisabled:p}),h);if(f)return g.map(function(t){var i=t===v;return me.a.createElement(n,bt({},s,{components:{Container:r,Label:o,Remove:a},isFocused:i,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(d)return null;var b=g[0];return me.a.createElement(i,bt({},s,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,bt({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?me.a.createElement(e,bt({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return me.a.createElement(n,bt({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,bt({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,u=t.LoadingMessage,s=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,f=p.focusedOption,d=p.menuOptions,h=this.props,m=h.captureMenuScroll,g=h.inputValue,v=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,E=h.menuIsOpen,x=h.menuPlacement,O=h.menuPosition,_=h.menuPortalTarget,C=h.menuShouldBlockScroll,k=h.menuShouldScrollIntoView,S=h.noOptionsMessage,j=h.onMenuScrollToTop,D=h.onMenuScrollToBottom;if(!E)return null;var A=function(t){var n=f===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,me.a.createElement(l,bt({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},M=void 0;if(this.hasOptions())M=d.render.map(function(t){if("group"===t.type){t.type;var o=wt(t,["type"]),a=t.key+"-heading";return me.a.createElement(n,bt({},c,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return A(e)}))}if("option"===t.type)return A(t)});else if(v){var T=b({inputValue:g});if(null===T)return null;M=me.a.createElement(u,c,T)}else{var F=S({inputValue:g});if(null===F)return null;M=me.a.createElement(s,c,F)}var P={minMenuHeight:y,maxMenuHeight:w,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:k},N=me.a.createElement(Ft,bt({},c,P),function(t){var n=t.ref,r=t.placerProps,i=r.placement,u=r.maxHeight;return me.a.createElement(o,bt({},c,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:i}),me.a.createElement(ln,{isEnabled:m,onTopArrive:j,onBottomArrive:D},me.a.createElement(un,{isEnabled:C},me.a.createElement(a,bt({},c,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:u}),M))))});return _||"fixed"===O?me.a.createElement(i,bt({},c,{appendTo:_,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=this.state.selectValue;if(a&&!r){if(o){if(n){var u=i.map(function(t){return e.getOptionValue(t)}).join(n);return me.a.createElement("input",{name:a,type:"hidden",value:u})}var s=i.length>0?i.map(function(t,n){return me.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):me.a.createElement("input",{name:a,type:"hidden"});return me.a.createElement("div",null,s)}var l=i[0]?this.getOptionValue(i[0]):"";return me.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?me.a.createElement($t,{"aria-live":"assertive"},me.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),me.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,u=a.id,s=a.isDisabled,l=this.state.isFocused,c=this.commonProps=this.getCommonProps();return me.a.createElement(r,bt({},c,{className:i,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),me.a.createElement(t,bt({},c,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l}),me.a.createElement(o,bt({},c,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),me.a.createElement(n,bt({},c,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(he.Component);Tn.defaultProps=An;var Fn=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=Sn({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(Ot(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=jn[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,bt({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&St(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=xt(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=xt(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof c&&(c(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!l||!p||!m||f&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(l){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":l?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!l){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":l?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":l?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!l)return;e.focusOption("pageup");break;case"PageDown":if(!l)return;e.focusOption("pagedown");break;case"Home":if(!l)return;e.focusOption("first");break;case"End":if(!l)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Pn=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;mt(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o-1})}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.field;return o.options.length>0?wp.element.createElement(Yn,{id:t,name:n,value:this.filterValues(r),options:o.options,delimiter:o.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):wp.element.createElement(Gn,null)}}]),t}(N.Component),$n=(n(267),function(e){function t(){var e;return _()(this,t),(e=j()(this,A()(t).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(P()(P()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(P()(P()(e))),e}return T()(t,e),k()(t,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,l=u.height;"resize"!==o||s===a&&l===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"cf-oembed__preview"},wp.element.createElement("iframe",{ref:function(t){return e.iframe=t},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var e="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",t="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(e,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),n=wp.element.createElement("html",{lang:document.documentElement.lang},wp.element.createElement("head",null,wp.element.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),wp.element.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),wp.element.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:t}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(N.renderToString)(n)),this.iframe.contentWindow.document.close()}}}]),t}(N.Component)),Kn=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.embedCode,a=e.embedType,i=e.provider;return wp.element.createElement("div",{ref:this.node},wp.element.createElement(oe,{id:t,value:r,onChange:this.handleChange}),o?wp.element.createElement($n,{html:o,type:a,provider:i}):null,wp.element.createElement("input",{type:"hidden",name:n,value:r,readOnly:!0}))}}]),t}(N.Component),Xn=Object(x.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),Jn=Object(G.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=z()(t,2),r=n[0],o=n[1],a=Object(X.pipe)(J({onFetchEmbedCode:o}),Object(X.map)(G.toProps)),i=Object(X.pipe)(r,Object(X.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(X.merge)(a,i)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(a.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(a.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}}),Zn=Object(x.compose)(Xn,Jn)(Kn),Qn=(n(268),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():wp.element.createElement(Gn,null)}}]),t}(N.Component)),er=(n(269),He(function(e){return p()({},e,{field:p()({},e.field,{options:e.field.options.map(function(e){return p()({},e,{label:wp.element.createElement("img",{className:"cf-radio-image__image",src:e.label})})})})})})(Qn)),tr=function(e){function t(){var e;return _()(this,t),e=j()(this,A()(t).call(this)),l()(P()(P()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(f.isString)(t)?t:t.target.value)}),l()(P()(P()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=p()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=p()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return T()(t,e),k()(t,[{key:"componentDidMount",value:function(){this.props.visible&&(this.timer=setTimeout(this.initEditor,250))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.destroyEditor()}},{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,i=t.field,u=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":i.rich_editing},{"html-active":!i.rich_editing}],s=i.media_buttons?Object(f.template)(i.media_buttons)({id:n}):null;return wp.element.createElement("div",{id:"wp-".concat(n,"-wrap"),className:K()(u),ref:function(t){return e.editorNode=t}},i.media_buttons&&wp.element.createElement("div",{id:"wp-".concat(n,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:s}})),i.rich_editing&&wp.element.createElement("div",{className:"wp-editor-tabs"},wp.element.createElement("button",{type:"button",id:"".concat(n,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":n},Object(a.__)("Visual","carbon-fields-ui")),wp.element.createElement("button",{type:"button",id:"".concat(n,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":n},Object(a.__)("Text","carbon-fields-ui"))),wp.element.createElement("div",{id:"wp-".concat(n,"-editor-container"),className:"wp-editor-container"},wp.element.createElement("textarea",Q()({style:{width:"100%"},className:"regular-text",id:n,name:r,value:o,onChange:this.handleChange},i.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),t}(N.Component),nr=(n(270),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?wp.element.createElement("select",{id:t,name:n,value:r||Object(f.get)(o.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},o.options.map(function(e){return wp.element.createElement("option",{key:e.value,value:e.value},e.label)})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),rr=(n(271),function(e){function t(){return _()(this,t),j()(this,A()(t).apply(this,arguments))}return T()(t,e),k()(t,[{key:"render",value:function(){return wp.element.createElement("h3",null,this.props.field.label)}}]),t}(N.Component)),or=(n(272),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a-1}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?wp.element.createElement("ul",{className:"cf-set__list"},a.options.map(function(t,i){return wp.element.createElement("li",{className:"cf-set__list-item",key:i},wp.element.createElement("input",Q()({type:"checkbox",id:"".concat(n,"-").concat(t.value),name:"".concat(r,"[]"),checked:e.isChecked(o,t),value:t.value,className:"cf-set__input",onChange:e.handleChange},a.attributes)),wp.element.createElement("label",{className:"cf-set__label",htmlFor:"".concat(n,"-").concat(t.value)},t.label))})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),ar=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(f.some)(n,function(t){return t==e});case"NOT IN":return Object(f.every)(n,function(t){return t!=e});case"INCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),l=!1;switch(o){case"AND":l=Object(f.every)(s);break;case"OR":l=Object(f.some)(s)}l?e.showField(e.id):e.hideField(e.id)}}return Object(x.createHigherOrderComponent)(function(e){return Object(x.compose)(Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(u.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(G.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var xr=n(105),Or=n.n(xr),_r="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function Cr(){return"cf-".concat(Or()(_r,21))}function kr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;l--)if(c[l]!==p[l])return!1;for(l=c.length-1;l>=0;l--)if(!b(e[s=c[l]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&w(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(p.AssertionError,Error),p.fail=g,p.ok=v,p.equal=function(e,t,n){e!=t&&g(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){E(!0,e,t,n)},p.doesNotThrow=function(e,t,n){E(!1,e,t,n)},p.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(31))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),c(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=c(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return p(n)}var l,w="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(w=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),x(n)&&(w=" "+p(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,w,C)):C[0]+w+C[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?c(e,s.value,null):c(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function x(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=w,t.isDate=E,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(254);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(255),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(31),n(93))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(93))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(261)),o=u(n(264)),a=u(n(1)),i=u(n(94));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var l=o in t,c=o in u,p=t[o],f=(0,r.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,r.isValidElement)(p)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:p.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(f.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return p()({},e,l()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(f.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function h(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function m(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function g(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function v(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function b(e,t){return e.validation[t]||null}function y(e,t){return-1===e.hiddenFields.indexOf(t)}Object(u.registerStore)("carbon-fields/core",{reducer:d,actions:r,selectors:o});var w=n(19),E=n.n(w),x=n(14),O=n(6),_=n.n(O),C=n(7),k=n.n(C),S=n(8),j=n.n(S),D=n(9),A=n.n(D),M=n(10),F=n.n(M),T=n(0),P=n.n(T),N=n(3),I=16;function L(e){return Object(x.createHigherOrderComponent)(function(t){return function(n){function r(n){var o;return _()(this,r),(o=j()(this,A()(r).call(this,n))).onHooksUpdated=o.onHooksUpdated.bind(P()(P()(o))),o.Component=Object(i.applyFilters)(e,t),o.namespace=Object(f.uniqueId)("core/with-filters/component-"),o.throttledForceUpdate=Object(f.debounce)(function(){o.Component=Object(i.applyFilters)(e,t),o.forceUpdate()},I),Object(i.addAction)("hookRemoved",o.namespace,o.onHooksUpdated),Object(i.addAction)("hookAdded",o.namespace,o.onHooksUpdated),o}return F()(r,n),k()(r,[{key:"componentWillUnmount",value:function(){this.throttledForceUpdate.cancel(),Object(i.removeAction)("hookRemoved",this.namespace),Object(i.removeAction)("hookAdded",this.namespace)}},{key:"onHooksUpdated",value:function(t){t===e&&this.throttledForceUpdate()}},{key:"render",value:function(){return wp.element.createElement(this.Component,this.props)}}]),r}(N.Component)},"withFilters")}function R(e,t){var n,r=Object(f.startCase)(e),o={};return n={},l()(n,"register".concat(r,"Type"),function(n,u){return Object(f.isString)(n)?o[n]?(console.error(Object(a.sprintf)(Object(a.__)("%1$s %2$s is already registered.","carbon-fields-ui"),r,n)),!1):u&&Object(f.isFunction)(u)?(o[n]=t.reduce(function(t,r){return p()({},t,l()({},r,Object(i.applyFilters)("carbon-fields.register-".concat(e,"-type"),n,r,u)))},{}),!0):(console.error(Object(a.__)('The "component" param must be a function.',"carbon-fields-ui")),!1):(console.error(Object(a.sprintf)(Object(a.__)("%1$s type must be a string.","carbon-fields-ui"),r)),!1)}),l()(n,"get".concat(r,"Type"),function(e,n){if(t.includes(n)){if(o[e])return o[e][n];console.error(Object(a.sprintf)(Object(a.__)("%s %s isn't registered.","carbon-fields-ui"),r,e))}else console.error(Object(a.sprintf)(Object(a.__)("The provided context isn't a valid one. Must be one of - %s .","carbon-fields-ui"),t.join(", ")))}),n}var H=R("field",["metabox","block"]),V=H.registerFieldType,B=H.getFieldType,U=n(16),z=n.n(U),W=n(32),Y=n.n(W),G=n(17),q=n(20),K=n.n(q),X=n(11),J=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(r,o){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){r(e)}),i.fail(function(){o(Object(a.__)("An error occured.","carbon-fields-ui"))})})},ue=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&i.length>=r.max?alert(Object(a.sprintf)(Object(a.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(u(o,E()(i).concat([Object(f.pick)(e,"id","type","subtype")])),s({selectedOptions:E()(l).concat([e])})))}),l()(P()(P()(n)),"handleRemoveItem",function(e){var t=n.props,r=t.value,o=t.id,a=t.onChange,i=t.setState,u=t.selectedOptions;a(o,Object(f.without)(r,e)),i({selectedOptions:Object(f.without)(u,e)})}),l()(P()(P()(n)),"handleSort",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),n}return F()(t,e),k()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.value,o=t.field,i=t.totalOptionsCount,u=t.selectedOptions,s=t.queryTerm,l=this.props.options;return o.duplicates_allowed||(l=Y()(l,function(e){e.map(function(e){return e.disabled=!!Object(f.find)(r,function(t){return Object(f.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),wp.element.createElement(N.Fragment,null,wp.element.createElement("div",{className:"cf-association__bar"},wp.element.createElement(oe,{value:s,onChange:this.handleSearchChange}),wp.element.createElement("span",{className:"cf-association__counter"},Object(a.sprintf)(Object(a.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(l.length),Number(i)))),wp.element.createElement("div",{className:"cf-association__cols"},wp.element.createElement("div",{className:"cf-association__col"},l.map(function(t,n){return wp.element.createElement("div",{className:K()("cf-association__option",{"cf-association__option--selected":t.disabled}),key:n},t.thumbnail&&wp.element.createElement("img",{className:"cf-association__option-thumb",src:t.thumbnail}),wp.element.createElement("div",{className:"cf-association__option-content"},wp.element.createElement("span",{className:"cf-association__option-title"},t.title),wp.element.createElement("span",{className:"cf-association__option-type"},t.type)),wp.element.createElement("div",{className:"cf-association__option-actions"},wp.element.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:t.edit_link}),!t.disabled&&(o.max<0||r.length0&&t.length=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(he.createElement)(e,n)},a}(he.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r},Se=ke(function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a1?n.setState(function(e){return{menuVisible:!e.menuVisible}}):r(t[0])}),l()(P()(P()(n)),"handleItemClick",function(e){n.setState({menuVisible:!1}),n.props.onSelect(e)}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.buttonText,r=t.groups;return wp.element.createElement("div",{className:"cf-complex__inserter"},wp.element.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},n),r.length>1&&wp.element.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},r.map(function(t,n){return wp.element.createElement("li",{className:"cf-complex__inserter-item",key:n,onClick:function(){return e.handleItemClick(t)}},t.label)})))}}]),t}(N.Component)),Ne=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;n.setState({currentTab:Object(f.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),l()(P()(P()(n)),"handleToggleAllClick",function(){var e=n.props,t=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!t)}),l()(P()(P()(n)),"handleGroupsSortStart",function(e,t){var r=n.props,o=r.value,a=r.groupIdKey,i=t.item.index(),u=Object(f.get)(o,"".concat(i,".").concat(a),null);n.setState({currentDraggedGroup:u})}),l()(P()(P()(n)),"handleGroupsSortUpdate",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),l()(P()(P()(n)),"handleGroupsSortStop",function(){n.setState({currentDraggedGroup:null})}),l()(P()(P()(n)),"handleTabsChange",function(e){n.setState({currentTab:e})}),n}return F()(t,e),k()(t,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(f.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=z()(e,2),o=r[0],i=r[1],u=Object(f.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(f.isString)(u.label_template))return u.label;try{return Object(f.template)(u.label_template)(p()({$_index:n},i))||u.label}catch(e){return console.error(Object(a.sprintf)(Object(a.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var e=this,t=this.state,n=t.currentDraggedGroup,r=t.currentTab,o=this.props,i=o.value,u=o.field,s=o.groupIdKey,l=o.groupFilterKey,c=o.allGroupsAreCollapsed,p=o.onGroupSetup,f=o.onGroupFieldSetup,d=o.onToggleGroup,h=this.getAvailableGroups(l),m=this.getGroupLabels(),g=i.map(function(e,t){return{id:e[s],label:m[t]}});return wp.element.createElement(N.Fragment,null,this.isTabbed&&!!i.length&&wp.element.createElement(ae,{items:i,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===u.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},wp.element.createElement(Te,{ref:this.tabsList,items:g,current:r,layout:u.layout,onChange:this.handleTabsChange},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Pe,{buttonText:"+",groups:h,onSelect:this.handleAddGroup}))),!i.length&&wp.element.createElement(Ie,{label:"There are no entries yet."},wp.element.createElement(Pe,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup})),!!i.length&&wp.element.createElement(ae,{items:i,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},wp.element.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},i.map(function(t,o){return wp.element.createElement(Ne,Q()({key:"".concat(t[l],"-").concat(o)},p(t,{index:o,label:m[o],dragged:t[s]===n,tabbed:e.isTabbed,hidden:e.isTabbed&&t[s]!==r,allowClone:u.duplicate_groups_allowed&&!e.isMaximumReached,onFieldSetup:f,onClone:e.handleCloneGroup,onRemove:e.handleRemoveGroup,onToggle:d})))}))),!this.isTabbed&&!!i.length&&wp.element.createElement("div",{className:"cf-complex__actions"},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Pe,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup}),wp.element.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},c?Object(a.__)("Expand All","carbon-fields-ui"):Object(a.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(a.sprintf)(Object(a.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),t}(N.Component);Object(i.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(e){return function(t){var n=t.field;return"complex"!==n.type?wp.element.createElement(e,t):wp.element.createElement(e,Q()({className:"cf-complex--".concat(n.layout)},t))}}),Object(i.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(f.isEmpty)(t))return Object(a.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Et=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},xt=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Ot=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function jt(e){return St(e)?window.pageYOffset:e.scrollTop}function Dt(e,t){St(e)?window.scrollTo(0,t):e.scrollTop=t}function At(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_t,o=jt(e),a=t-o,i=0;!function t(){var u,s=a*((u=(u=i+=10)/n-1)*u*u+1)+o;Dt(e,s),i=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&At(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&E>=r)return a&&At(s,_,160),{placement:"bottom",maxHeight:i?E-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&w>=r)&&(k=i?w-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return Dt(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&At(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&w>=r){var S=t;return(!i&&x>=r||i&&w>=r)&&(S=i?w-y:x-y),a&&At(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!c,isFixedPosition:c,theme:s});l&&l(p),r.setState(p)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||Ft(e);return bt({},r.props,{placement:t,maxHeight:r.state.maxHeight})},Et(r,n)}return yt(t,e),gt(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(he.Component);Tt.contextTypes={getPortalPlacement:st.a.func};var Pt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},Nt=Pt,It=Pt,Lt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};Lt.defaultProps={children:"No options"};var Rt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};Rt.defaultProps={children:"Loading..."};var Ht=function(e){function t(){var e,n,r;mt(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=c-p-l,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),f.scrollTop=c,m=!0,r.isBottom=!0):!d&&-t>l&&(i&&!r.isTop&&i(e),f.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},Et(r,n)}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return me.a.createElement(Xt,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(he.Component),ln=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=wt(e,["isEnabled"]);return t?me.a.createElement(sn,n):this.props.children}}]),t}(he.Component);ln.defaultProps={isEnabled:!0};var cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,i=e.hasValue;return me.a.createElement("div",{className:r(Object(it.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i},n)},t)}}]),t}(he.Component),pn=function(e){var t=e.size,n=wt(e,["size"]);return me.a.createElement("svg",bt({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(it.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},fn=function(e){return me.a.createElement(pn,bt({size:20},e),me.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},dn=function(e){return me.a.createElement(pn,bt({size:20},e),me.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},hn=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},mn=hn,gn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({},a,{className:r(Object(it.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};gn.defaultProps={children:me.a.createElement(dn,null)};var vn=hn,bn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({},a,{className:r(Object(it.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};bn.defaultProps={children:me.a.createElement(fn,null)};var yn=function(e){var t=e.color,n=e.delay,r=e.offset;return me.a.createElement("span",{className:Object(it.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(it.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var wn=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,i=e.isRtl,u=e.theme.colors,s=a?u.neutral80:u.neutral20;return me.a.createElement("div",bt({},o,{className:n(Object(it.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),me.a.createElement(yn,{color:s,delay:0,offset:i}),me.a.createElement(yn,{color:s,delay:160,offset:!0}),me.a.createElement(yn,{color:s,delay:320,offset:!i}))};wn.defaultProps={size:4};var En=function(e){var t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)},xn=En,On=En,_n=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)}}]),t}(he.Component);_n.defaultProps={children:me.a.createElement(fn,{size:14})};var Cn=function(e){function t(){return mt(this,t),Et(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return yt(t,e),gt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,i=e.getStyles,u=e.innerProps,s=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove,h=bt({className:o(Object(it.a)(i("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),m={className:o(Object(it.a)(i("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=bt({className:o(Object(it.a)(i("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return me.a.createElement(p,{data:a,innerProps:h,selectProps:c},me.a.createElement(f,{data:a,innerProps:m,selectProps:c},t),me.a.createElement(d,{data:a,innerProps:g,selectProps:c}))}}]),t}(he.Component);Cn.defaultProps={cropWithEllipsis:!0};var kn={ClearIndicator:bn,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,i=e.isFocused,u=e.innerRef,s=e.innerProps;return me.a.createElement("div",bt({ref:u,className:n(Object(it.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":i},o)},s),t)},DropdownIndicator:gn,DownChevron:dn,CrossIcon:fn,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,i=e.headingProps,u=e.label,s=e.theme;return me.a.createElement("div",{className:r(Object(it.a)(o("group",e)),{group:!0},n)},me.a.createElement(a,bt({},i,{theme:s,getStyles:o,cx:r}),u),me.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=wt(e,["className","cx","getStyles","theme"]);return me.a.createElement("div",bt({className:n(Object(it.a)(r("groupHeading",bt({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return me.a.createElement("div",{className:r(Object(it.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return me.a.createElement("span",bt({},o,{className:n(Object(it.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,i=e.isDisabled,u=e.theme,s=wt(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return me.a.createElement("div",{className:Object(it.a)(r("input",bt({theme:u},s)))},me.a.createElement(ct.a,bt({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:i},s)))},LoadingIndicator:wn,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,i=e.innerProps,u=r(Object(it.a)(o("menu",e)),{menu:!0},n);return me.a.createElement("div",bt({className:u},i,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,i=e.innerRef;return me.a.createElement("div",{className:r(Object(it.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:i},t)},MenuPortal:Ht,LoadingMessage:Rt,NoOptionsMessage:Lt,MultiValue:Cn,MultiValueContainer:xn,MultiValueLabel:On,MultiValueRemove:_n,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.isFocused,u=e.isSelected,s=e.innerRef,l=e.innerProps;return me.a.createElement("div",bt({ref:s,className:r(Object(it.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":i,"option--is-selected":u},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,i=e.isDisabled,u=e.isRtl;return me.a.createElement("div",bt({className:r(Object(it.a)(o("container",e)),{"--is-disabled":i,"--is-rtl":u},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.innerProps;return me.a.createElement("div",bt({className:r(Object(it.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},i),t)},ValueContainer:cn},Sn=function(e){return bt({},kn,e.components)},jn={clearIndicator:vn,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:mn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:It,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return vt(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),vt(t,"backgroundColor",i.neutral0),vt(t,"borderRadius",o),vt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),vt(t,"marginBottom",a.menuGutter),vt(t,"marginTop",a.menuGutter),vt(t,"position","absolute"),vt(t,"width","100%"),vt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Nt,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Dn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},An={backspaceRemovesValue:!0,blurInputOnSelect:Mt(),captureMenuScroll:!Mt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=bt({ignoreCase:!0,ignoreAccents:!0,stringify:qt,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?Gt(t):t,l=i?Gt(a(e)):a(e);return r&&(s=s.toLowerCase(),l=l.toLowerCase()),o&&(s=Yt(s),l=Yt(l)),"start"===u?l.substr(0,s.length)===s:l.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Mn=1,Fn=function(e){function t(e){mt(this,t);var n=Et(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Tn.call(n);var r=e.value;n.cacheComponents=ft(n.cacheComponents,zt).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Mn);var o=kt(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return yt(t,e),gt(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=kt(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,l=this.state.isFocused;(l&&!u&&e.isDisabled||l&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?Dt(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,l=-1;if(a.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Dn):bt({},Dn,this.props.theme):Dn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+Ct(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var l=a?void 0:function(){return n.onOptionHover(e)},c=a?void 0:function(){return n.selectOption(e)},p=n.getElementId("option")+"-"+r;return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:p,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,l=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:l({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=this.components.Input,u=this.state.inputIsHidden,s=r||this.getElementId("input");if(!n)return me.a.createElement(Kt,{id:s,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:_t,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps,p=c.cx,f=c.theme;return me.a.createElement(i,bt({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:s,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:f,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,u=t.Placeholder,s=this.commonProps,l=this.props,c=l.controlShouldRenderValue,p=l.isDisabled,f=l.isMulti,d=l.inputValue,h=l.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue;if(!this.hasValue()||!c)return d?null:me.a.createElement(u,bt({},s,{key:"placeholder",isDisabled:p}),h);if(f)return g.map(function(t){var i=t===v;return me.a.createElement(n,bt({},s,{components:{Container:r,Label:o,Remove:a},isFocused:i,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(d)return null;var b=g[0];return me.a.createElement(i,bt({},s,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,bt({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?me.a.createElement(e,bt({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return me.a.createElement(n,bt({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,bt({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,u=t.LoadingMessage,s=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,f=p.focusedOption,d=p.menuOptions,h=this.props,m=h.captureMenuScroll,g=h.inputValue,v=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,E=h.menuIsOpen,x=h.menuPlacement,O=h.menuPosition,_=h.menuPortalTarget,C=h.menuShouldBlockScroll,k=h.menuShouldScrollIntoView,S=h.noOptionsMessage,j=h.onMenuScrollToTop,D=h.onMenuScrollToBottom;if(!E)return null;var A=function(t){var n=f===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,me.a.createElement(l,bt({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},M=void 0;if(this.hasOptions())M=d.render.map(function(t){if("group"===t.type){t.type;var o=wt(t,["type"]),a=t.key+"-heading";return me.a.createElement(n,bt({},c,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return A(e)}))}if("option"===t.type)return A(t)});else if(v){var F=b({inputValue:g});if(null===F)return null;M=me.a.createElement(u,c,F)}else{var T=S({inputValue:g});if(null===T)return null;M=me.a.createElement(s,c,T)}var P={minMenuHeight:y,maxMenuHeight:w,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:k},N=me.a.createElement(Tt,bt({},c,P),function(t){var n=t.ref,r=t.placerProps,i=r.placement,u=r.maxHeight;return me.a.createElement(o,bt({},c,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:i}),me.a.createElement(ln,{isEnabled:m,onTopArrive:j,onBottomArrive:D},me.a.createElement(un,{isEnabled:C},me.a.createElement(a,bt({},c,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:u}),M))))});return _||"fixed"===O?me.a.createElement(i,bt({},c,{appendTo:_,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=this.state.selectValue;if(a&&!r){if(o){if(n){var u=i.map(function(t){return e.getOptionValue(t)}).join(n);return me.a.createElement("input",{name:a,type:"hidden",value:u})}var s=i.length>0?i.map(function(t,n){return me.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):me.a.createElement("input",{name:a,type:"hidden"});return me.a.createElement("div",null,s)}var l=i[0]?this.getOptionValue(i[0]):"";return me.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?me.a.createElement($t,{"aria-live":"assertive"},me.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),me.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,u=a.id,s=a.isDisabled,l=this.state.isFocused,c=this.commonProps=this.getCommonProps();return me.a.createElement(r,bt({},c,{className:i,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),me.a.createElement(t,bt({},c,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l}),me.a.createElement(o,bt({},c,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),me.a.createElement(n,bt({},c,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(he.Component);Fn.defaultProps=An;var Tn=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=Sn({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(Ot(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=jn[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,bt({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&St(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=xt(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=xt(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof c&&(c(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!l||!p||!m||f&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(l){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":l?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!l){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":l?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":l?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!l)return;e.focusOption("pageup");break;case"PageDown":if(!l)return;e.focusOption("pagedown");break;case"Home":if(!l)return;e.focusOption("first");break;case"End":if(!l)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Pn=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;mt(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o-1})}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.field;return o.options.length>0?wp.element.createElement(Yn,{id:t,name:n,value:this.filterValues(r),options:o.options,delimiter:o.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):wp.element.createElement(Gn,null)}}]),t}(N.Component),$n=(n(267),function(e){function t(){var e;return _()(this,t),(e=j()(this,A()(t).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(P()(P()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(P()(P()(e))),e}return F()(t,e),k()(t,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,l=u.height;"resize"!==o||s===a&&l===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"cf-oembed__preview"},wp.element.createElement("iframe",{ref:function(t){return e.iframe=t},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var e="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",t="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(e,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),n=wp.element.createElement("html",{lang:document.documentElement.lang},wp.element.createElement("head",null,wp.element.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),wp.element.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),wp.element.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:t}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(N.renderToString)(n)),this.iframe.contentWindow.document.close()}}}]),t}(N.Component)),Kn=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.embedCode,a=e.embedType,i=e.provider;return wp.element.createElement("div",{ref:this.node},wp.element.createElement(oe,{id:t,value:r,onChange:this.handleChange}),o?wp.element.createElement($n,{html:o,type:a,provider:i}):null,wp.element.createElement("input",{type:"hidden",name:n,value:r,readOnly:!0}))}}]),t}(N.Component),Xn=Object(x.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),Jn=Object(G.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=z()(t,2),r=n[0],o=n[1],a=Object(X.pipe)(J({onFetchEmbedCode:o}),Object(X.map)(G.toProps)),i=Object(X.pipe)(r,Object(X.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(X.merge)(a,i)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(a.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(a.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}}),Zn=Object(x.compose)(Xn,Jn)(Kn),Qn=(n(268),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():wp.element.createElement(Gn,null)}}]),t}(N.Component)),er=(n(269),He(function(e){return p()({},e,{field:p()({},e.field,{options:e.field.options.map(function(e){return p()({},e,{label:wp.element.createElement("img",{className:"cf-radio-image__image",src:e.label})})})})})})(Qn)),tr=function(e){function t(){var e;return _()(this,t),e=j()(this,A()(t).call(this)),l()(P()(P()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(f.isString)(t)?t:t.target.value)}),l()(P()(P()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=p()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=p()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return F()(t,e),k()(t,[{key:"componentDidMount",value:function(){this.props.visible&&(this.timer=setTimeout(this.initEditor,250))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.destroyEditor()}},{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,i=t.field,u=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":i.rich_editing},{"html-active":!i.rich_editing}],s=i.media_buttons?Object(f.template)(i.media_buttons)({id:n}):null;return wp.element.createElement("div",{id:"wp-".concat(n,"-wrap"),className:K()(u),ref:function(t){return e.editorNode=t}},i.media_buttons&&wp.element.createElement("div",{id:"wp-".concat(n,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:s}})),i.rich_editing&&wp.element.createElement("div",{className:"wp-editor-tabs"},wp.element.createElement("button",{type:"button",id:"".concat(n,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":n},Object(a.__)("Visual","carbon-fields-ui")),wp.element.createElement("button",{type:"button",id:"".concat(n,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":n},Object(a.__)("Text","carbon-fields-ui"))),wp.element.createElement("div",{id:"wp-".concat(n,"-editor-container"),className:"wp-editor-container"},wp.element.createElement("textarea",Q()({style:{width:"100%"},className:"regular-text",id:n,name:r,value:o,onChange:this.handleChange},i.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),t}(N.Component),nr=(n(270),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?wp.element.createElement("select",{id:t,name:n,value:r||Object(f.get)(o.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},o.options.map(function(e){return wp.element.createElement("option",{key:e.value,value:e.value},e.label)})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),rr=(n(271),function(e){function t(){return _()(this,t),j()(this,A()(t).apply(this,arguments))}return F()(t,e),k()(t,[{key:"render",value:function(){return wp.element.createElement("h3",null,this.props.field.label)}}]),t}(N.Component)),or=(n(272),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a-1}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?wp.element.createElement("ul",{className:"cf-set__list"},a.options.map(function(t,i){return wp.element.createElement("li",{className:"cf-set__list-item",key:i},wp.element.createElement("input",Q()({type:"checkbox",id:"".concat(n,"-").concat(t.value),name:"".concat(r,"[]"),checked:e.isChecked(o,t),value:t.value,className:"cf-set__input",onChange:e.handleChange},a.attributes)),wp.element.createElement("label",{className:"cf-set__label",htmlFor:"".concat(n,"-").concat(t.value)},t.label))})):wp.element.createElement(Gn,null)}}]),t}(N.Component)),ar=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(f.some)(n,function(t){return t==e});case"NOT IN":return Object(f.every)(n,function(t){return t!=e});case"INCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),l=!1;switch(o){case"AND":l=Object(f.every)(s);break;case"OR":l=Object(f.some)(s)}l?e.showField(e.id):e.hideField(e.id)}}return Object(x.createHigherOrderComponent)(function(e){return Object(x.compose)(Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(u.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(G.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var xr=n(105),Or=n.n(xr),_r="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function Cr(){return"cf-".concat(Or()(_r,21))}function kr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r Date: Thu, 10 Jan 2019 08:44:20 +0000 Subject: [PATCH 08/11] Fix complex field inserter z-index --- packages/core/fields/complex/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/fields/complex/style.scss b/packages/core/fields/complex/style.scss index 5fad0c344..eeea95d52 100644 --- a/packages/core/fields/complex/style.scss +++ b/packages/core/fields/complex/style.scss @@ -181,6 +181,7 @@ min-width: 180px; margin: 0; transform: translate(10px, -50%); + z-index: 1; } .cf-complex__inserter-item { From e0b39ec36a2e503567791cd2155457d410bdb985 Mon Sep 17 00:00:00 2001 From: ggeorgiev Date: Mon, 14 Jan 2019 12:21:14 +0200 Subject: [PATCH 09/11] [Complex] Spread groups wrapper --- packages/core/fields/complex/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/fields/complex/style.scss b/packages/core/fields/complex/style.scss index 5fad0c344..a630df0c7 100644 --- a/packages/core/fields/complex/style.scss +++ b/packages/core/fields/complex/style.scss @@ -3,6 +3,7 @@ ========================================================================== */ .cf-complex__groups { + flex: 1; position: relative; z-index: 0; From 17a3c7ac838444e00b0a4c82b0b974f8f216f7b9 Mon Sep 17 00:00:00 2001 From: ggeorgiev Date: Mon, 14 Jan 2019 14:23:54 +0200 Subject: [PATCH 10/11] Update compiled assets --- build/classic/core.css | 4 +++- build/classic/core.min.css | 2 +- build/gutenberg/core.css | 4 +++- build/gutenberg/core.min.css | 2 +- languages/carbon-fields-ui.pot | 32 ++++++++++++++++---------------- 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/build/classic/core.css b/build/classic/core.css index 179c7f358..4ce6dec26 100644 --- a/build/classic/core.css +++ b/build/classic/core.css @@ -292,6 +292,7 @@ Complex ========================================================================== */ .cf-complex__groups { + flex: 1; position: relative; z-index: 0; } .cf-complex--tabbed-vertical > .cf-complex__groups { @@ -422,7 +423,8 @@ min-width: 180px; margin: 0; -webkit-transform: translate(10px, -50%); - transform: translate(10px, -50%); } + transform: translate(10px, -50%); + z-index: 1; } .cf-complex__inserter-item { padding: 8px 12px; diff --git a/build/classic/core.min.css b/build/classic/core.min.css index c24e9d673..531aca832 100644 --- a/build/classic/core.min.css +++ b/build/classic/core.min.css @@ -1 +1 @@ -.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{position:relative;z-index:0}.cf-complex--tabbed-vertical>.cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex__group--grid>.cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex__tabs--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex__tabs--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--grid{position:absolute;top:12px;right:12px}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex__tabs--tabbed-horizontal{display:inline-flex;margin-bottom:-5px}.cf-complex__tabs--tabbed-vertical{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex__tabs--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex__tabs--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal{margin:0 4px 4px 0}.cf-complex__tabs-item--tabbed-vertical~.cf-complex__tabs-item--tabbed-vertical{border-top-width:0}.cf-complex__tabs-item--current{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal.cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex__tabs-item--tabbed-vertical.cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label.cf-complex__placeholder-label{margin:8px 0 12px}.cf-container-term-meta .cf-complex__placeholder-label{font-style:normal;color:inherit}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%!important;margin:0}.cf-textarea__input{display:block;width:100%!important;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file +.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{flex:1;position:relative;z-index:0}.cf-complex--tabbed-vertical>.cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex__group--grid>.cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex__tabs--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex__tabs--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%);z-index:1}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--grid{position:absolute;top:12px;right:12px}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex__tabs--tabbed-horizontal{display:inline-flex;margin-bottom:-5px}.cf-complex__tabs--tabbed-vertical{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex__tabs--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex__tabs--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal{margin:0 4px 4px 0}.cf-complex__tabs-item--tabbed-vertical~.cf-complex__tabs-item--tabbed-vertical{border-top-width:0}.cf-complex__tabs-item--current{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal.cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex__tabs-item--tabbed-vertical.cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label.cf-complex__placeholder-label{margin:8px 0 12px}.cf-container-term-meta .cf-complex__placeholder-label{font-style:normal;color:inherit}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%!important;margin:0}.cf-textarea__input{display:block;width:100%!important;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file diff --git a/build/gutenberg/core.css b/build/gutenberg/core.css index 179c7f358..4ce6dec26 100644 --- a/build/gutenberg/core.css +++ b/build/gutenberg/core.css @@ -292,6 +292,7 @@ Complex ========================================================================== */ .cf-complex__groups { + flex: 1; position: relative; z-index: 0; } .cf-complex--tabbed-vertical > .cf-complex__groups { @@ -422,7 +423,8 @@ min-width: 180px; margin: 0; -webkit-transform: translate(10px, -50%); - transform: translate(10px, -50%); } + transform: translate(10px, -50%); + z-index: 1; } .cf-complex__inserter-item { padding: 8px 12px; diff --git a/build/gutenberg/core.min.css b/build/gutenberg/core.min.css index c24e9d673..531aca832 100644 --- a/build/gutenberg/core.min.css +++ b/build/gutenberg/core.min.css @@ -1 +1 @@ -.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{position:relative;z-index:0}.cf-complex--tabbed-vertical>.cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex__group--grid>.cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex__tabs--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex__tabs--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--grid{position:absolute;top:12px;right:12px}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex__tabs--tabbed-horizontal{display:inline-flex;margin-bottom:-5px}.cf-complex__tabs--tabbed-vertical{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex__tabs--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex__tabs--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal{margin:0 4px 4px 0}.cf-complex__tabs-item--tabbed-vertical~.cf-complex__tabs-item--tabbed-vertical{border-top-width:0}.cf-complex__tabs-item--current{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal.cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex__tabs-item--tabbed-vertical.cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label.cf-complex__placeholder-label{margin:8px 0 12px}.cf-container-term-meta .cf-complex__placeholder-label{font-style:normal;color:inherit}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%!important;margin:0}.cf-textarea__input{display:block;width:100%!important;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file +.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{flex:1;position:relative;z-index:0}.cf-complex--tabbed-vertical>.cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex__group--grid>.cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex__tabs--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex__tabs--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%);z-index:1}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--grid{position:absolute;top:12px;right:12px}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex__tabs--tabbed-horizontal{display:inline-flex;margin-bottom:-5px}.cf-complex__tabs--tabbed-vertical{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex__tabs--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex__tabs--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal{margin:0 4px 4px 0}.cf-complex__tabs-item--tabbed-vertical~.cf-complex__tabs-item--tabbed-vertical{border-top-width:0}.cf-complex__tabs-item--current{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal.cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex__tabs-item--tabbed-vertical.cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label.cf-complex__placeholder-label{margin:8px 0 12px}.cf-container-term-meta .cf-complex__placeholder-label{font-style:normal;color:inherit}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%!important;margin:0}.cf-textarea__input{display:block;width:100%!important;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file diff --git a/languages/carbon-fields-ui.pot b/languages/carbon-fields-ui.pot index 2afad2480..0f8ba00f3 100644 --- a/languages/carbon-fields-ui.pot +++ b/languages/carbon-fields-ui.pot @@ -3,15 +3,15 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "X-Generator: babel-plugin-makepot\n" -#: packages/blocks/components/block-edit/index.js:152 +#: packages/blocks/components/block-edit/index.js:201 msgid "Show preview" msgstr "" -#: packages/blocks/components/block-edit/index.js:153 +#: packages/blocks/components/block-edit/index.js:202 msgid "Hide preview" msgstr "" -#: packages/blocks/components/block-edit/index.js:169 +#: packages/blocks/components/block-edit/index.js:271 msgid "Fields" msgstr "" @@ -19,7 +19,7 @@ msgstr "" msgid "Field of type '%s' is not supported in Gutenberg." msgstr "" -#: packages/blocks/fields/datetime/index.js:14 +#: packages/blocks/fields/datetime/index.js:59 #: packages/core/fields/date/index.js:15 #: packages/metaboxes/fields/datetime/index.js:9 msgid "Select Date" @@ -76,7 +76,7 @@ msgid "An error occurred while trying to fetch association options." msgstr "" #: packages/core/fields/association/index.js:430 -#: packages/core/fields/complex/index.js:394 +#: packages/core/fields/complex/index.js:428 #: packages/core/hocs/with-validation/required.js:20 msgid "This field is required." msgstr "" @@ -89,35 +89,35 @@ msgstr "" msgid "Select a color" msgstr "" -#: packages/core/fields/complex/group.js:150 +#: packages/core/fields/complex/group.js:154 msgid "Duplicate" msgstr "" -#: packages/core/fields/complex/group.js:159 +#: packages/core/fields/complex/group.js:163 msgid "Remove" msgstr "" -#: packages/core/fields/complex/group.js:168 +#: packages/core/fields/complex/group.js:172 msgid "Collapse" msgstr "" -#: packages/core/fields/complex/index.js:145 +#: packages/core/fields/complex/index.js:146 msgid "Couldn't create the label of group - %s" msgstr "" -#: packages/core/fields/complex/index.js:367 +#: packages/core/fields/complex/index.js:401 msgid "Expand All" msgstr "" -#: packages/core/fields/complex/index.js:367 +#: packages/core/fields/complex/index.js:401 msgid "Collapse All" msgstr "" -#: packages/core/fields/complex/index.js:401 +#: packages/core/fields/complex/index.js:435 msgid "Minimum number of rows not reached (%1$d %2$s)" msgstr "" -#: packages/core/fields/complex/index.js:81 +#: packages/core/fields/complex/index.js:82 msgid "Add %s" msgstr "" @@ -141,11 +141,11 @@ msgstr "" msgid "Not Found" msgstr "" -#: packages/core/fields/rich-text/index.js:100 +#: packages/core/fields/rich-text/index.js:103 msgid "Text" msgstr "" -#: packages/core/fields/rich-text/index.js:96 +#: packages/core/fields/rich-text/index.js:99 msgid "Visual" msgstr "" @@ -211,4 +211,4 @@ msgstr "" #: packages/metaboxes/monitors/conditional-display/handler/index.js:73 msgid "Unsupported container condition relation used - \"%1$s\"." -msgstr "" +msgstr "" \ No newline at end of file From 1a90387dd9bda90266f0b98d285185fb0770b472 Mon Sep 17 00:00:00 2001 From: ggeorgiev Date: Mon, 14 Jan 2019 14:24:18 +0200 Subject: [PATCH 11/11] Bump package version --- config.php | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.php b/config.php index e4778bdd3..69c86edab 100644 --- a/config.php +++ b/config.php @@ -4,7 +4,7 @@ # Define version constant if ( ! defined( __NAMESPACE__ . '\VERSION' ) ) { - define( __NAMESPACE__ . '\VERSION', '3.0.1' ); + define( __NAMESPACE__ . '\VERSION', '3.0.2' ); } # Define root directory diff --git a/package.json b/package.json index e06eb2df5..cfc78a439 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "carbon-fields", - "version": "3.0.1", + "version": "3.0.2", "description": "WordPress developer-friendly custom fields for post types, taxonomy terms, users, comments, widgets, options, navigation menus and more.", "directories": { "test": "tests"