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BzL,IAAnBkM,EACKb,EAGFA,GADiBU,EAAOG,EAAiB,GACd,CACpC,CAUiEK,CAAcR,KAG/E,EACIM,EAAO,WACT,IAAInG,EAAIwF,EAAQD,SAChB,YAAUzL,IAANkG,GACFwF,EAAQD,cAAWzL,EACnBwL,EAAQC,cAAWzL,EACZD,EAAG,KAA0BmG,UAEpCsF,EAAQC,cAAWzL,EAGvB,EAUIwM,EAAS,WACX,IAAIC,EAAYjB,EAAQC,SACxB,QAAkBzL,IAAdyM,EAKF,OAJAX,aAAa,KAA0BW,IACvCjB,EAAQC,cAAWzL,EACnB0L,EAAQD,cAAWzL,OACnB2L,EAAaF,cAAWzL,EAI5B,EAKA,MAAO,CACC0M,OALK,SAAUxG,GACrBsG,IACAzM,EAAGmG,EACL,EAGQyG,SA1BO,SAAUzG,GACvB,IAAI6F,EAAoB,EAAbC,KAAKC,MAChBP,EAAQD,SAAW,KAAiBvF,GACpCyF,EAAaF,SAAWM,EACxBP,EAAQC,SAAW,KAAiBa,WAAWV,EAAcP,GAC/D,EAsBQuB,UArBQ,WACd,YAA4B5M,IAArBwL,EAAQC,QACjB,EAoBQe,OAAQA,EAElB,CAEA,SAAStM,EAAKmL,EAAMtL,GAClB,OAAOuL,EAAeD,EAAMtL,GAAI4M,QAClC,C","sources":["webpack://datacenters/./client/app/rescript/bundles/common/dashboard/DashboardProductEditorLocationWidget.res.js","webpack://datacenters/./client/app/rescript/bundles/common/dashboard/DashboardProductEditorLocations.res.js","webpack://datacenters/./client/app/rescript/bundles/common/dashboard/DashboardProductEditorLocationTab.res.js","webpack://datacenters/./client/app/rescript/styleguide/icons/IconLocation.res.js","webpack://datacenters/./client/app/rescript/bundles/common/dashboard/DashboardProductEditorNoLocations.res.js","webpack://datacenters/./client/app/rescript/bundles/dashboard-edit-product/location-tab/DashboardEditProductLocationTab.res.js","webpack://datacenters/./client/app/rescript/bundles/dashboard-edit-product/location-tab/index.js","webpack://datacenters/./client/app/rescript/styleguide/components/Link/A.res.js","webpack://datacenters/./client/app/rescript/styleguide/forms/RadioButton/RadioButton.scss?1df4","webpack://datacenters/./client/app/rescript/styleguide/forms/RadioButton/RadioButton.res.js","webpack://datacenters/./client/app/rescript/styleguide/icons/IconSearch.res.js","webpack://datacenters/./client/app/rescript/styleguide/forms/SearchField/SearchFieldCss.res.js","webpack://datacenters/./client/app/rescript/styleguide/forms/SearchField/SearchField.res.js","webpack://datacenters/./client/app/rescript/styleguide/components/Link/Link.scss?ea56","webpack://datacenters/./node_modules/rescript-debounce-react/src/ReactDebounce.res.js","webpack://datacenters/./node_modules/rescript-debounce/src/Debounce.res.js"],"sourcesContent":["// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as A from \"../../../styleguide/components/Link/A.res.js\";\nimport * as ID from \"../../../libs/ID.res.js\";\nimport * as React from \"react\";\nimport * as Events from \"../../../libs/Events.res.js\";\nimport * as Js_array from \"rescript/lib/es6/js_array.js\";\nimport * as Belt_Array from \"rescript/lib/es6/belt_Array.js\";\nimport * as Caml_option from \"rescript/lib/es6/caml_option.js\";\nimport * as RadioButton from \"../../../styleguide/forms/RadioButton/RadioButton.res.js\";\nimport * as JsxRuntime from \"react/jsx-runtime\";\nimport * as DashboardProductEditorScss from \"./DashboardProductEditor.scss\";\n\nvar css = DashboardProductEditorScss;\n\nfunction filterLinkClicks(target, link, fn) {\n  if (link !== undefined && target === Caml_option.valFromOption(link)) {\n    return ;\n  } else {\n    return fn();\n  }\n}\n\nvar Handlers = {\n  filterLinkClicks: filterLinkClicks\n};\n\nfunction DashboardProductEditorLocationWidget(props) {\n  var select = props.select;\n  var $$location = props.location;\n  var linkEl = React.useRef(null);\n  return JsxRuntime.jsx(\"button\", {\n              children: JsxRuntime.jsxs(\"div\", {\n                    children: [\n                      JsxRuntime.jsx(RadioButton.make, {\n                            id: \"radioButton--\" + ID.toString($$location.id),\n                            checked: props.selected,\n                            tabIndex: -1,\n                            onChange: (function (prim) {\n                                \n                              })\n                          }),\n                      JsxRuntime.jsxs(\"div\", {\n                            children: [\n                              JsxRuntime.jsx(\"span\", {\n                                    children: $$location.name,\n                                    className: css.locationName\n                                  }),\n                              JsxRuntime.jsx(\"span\", {\n                                    children: (function (__x) {\n                                          return Js_array.joinWith(\", \", __x);\n                                        })(Belt_Array.keep([\n                                              $$location.streetAddress1,\n                                              $$location.streetAddress2,\n                                              $$location.city,\n                                              $$location.state,\n                                              $$location.country\n                                            ], (function (item) {\n                                                return item !== \"\";\n                                              }))),\n                                    className: css.locationAddress\n                                  })\n                            ],\n                            className: css.locationWidgetInfo\n                          }),\n                      JsxRuntime.jsx(A.make, {\n                            href: $$location.editUrl,\n                            targetBlank: true,\n                            className: css.locationDetailsLink,\n                            elRef: Caml_option.some(linkEl),\n                            children: \"Location Details\"\n                          })\n                    ],\n                    className: css.locationWidgetInner\n                  }),\n              className: css.locationWidget,\n              type: \"button\",\n              onClick: (function ($$event) {\n                  filterLinkClicks(Events.Target.fromReactEventTargetToHtmlElement($$event.target), Caml_option.nullable_to_opt(linkEl.current), (function () {\n                          select($$location.id);\n                        }));\n                })\n            });\n}\n\nvar make = DashboardProductEditorLocationWidget;\n\nexport {\n  css ,\n  Handlers ,\n  make ,\n}\n/* css Not a pure module */\n","// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as ID from \"../../../libs/ID.res.js\";\nimport * as React from \"react\";\nimport * as Caml_obj from \"rescript/lib/es6/caml_obj.js\";\nimport * as Belt_Array from \"rescript/lib/es6/belt_Array.js\";\nimport * as Belt_Option from \"rescript/lib/es6/belt_Option.js\";\nimport * as JsxRuntime from \"react/jsx-runtime\";\nimport * as DashboardProductEditorScss from \"./DashboardProductEditor.scss\";\nimport * as DashboardProductEditorLocationWidget from \"./DashboardProductEditorLocationWidget.res.js\";\n\nvar css = DashboardProductEditorScss;\n\nvar make = React.memo(function (props) {\n      var selectLocation = props.selectLocation;\n      var selectedLocation = props.selectedLocation;\n      return JsxRuntime.jsx(\"div\", {\n                  children: Belt_Array.map(props.locations, (function ($$location) {\n                          return JsxRuntime.jsx(DashboardProductEditorLocationWidget.make, {\n                                      location: $$location,\n                                      selected: Belt_Option.getWithDefault(Belt_Option.map(selectedLocation, (function (id) {\n                                                  return Caml_obj.equal($$location.id, id);\n                                                })), false),\n                                      select: selectLocation\n                                    }, ID.toString($$location.id));\n                        })),\n                  className: css.locations\n                });\n    });\n\nexport {\n  css ,\n  make ,\n}\n/* css Not a pure module */\n","// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as H2 from \"../../../styleguide/components/Heading/H2.res.js\";\nimport * as Hooks from \"../../../libs/Hooks.res.js\";\nimport * as React from \"react\";\nimport * as Container from \"../../../styleguide/components/Container/Container.res.js\";\nimport * as Js_string from \"rescript/lib/es6/js_string.js\";\nimport * as Belt_Array from \"rescript/lib/es6/belt_Array.js\";\nimport * as SearchField from \"../../../styleguide/forms/SearchField/SearchField.res.js\";\nimport * as ReactDebounce from \"rescript-debounce-react/src/ReactDebounce.res.js\";\nimport * as JsxRuntime from \"react/jsx-runtime\";\nimport * as DashboardProductEditorScss from \"./DashboardProductEditor.scss\";\nimport * as DashboardProductEditorLocations from \"./DashboardProductEditorLocations.res.js\";\n\nvar css = DashboardProductEditorScss;\n\nfunction DashboardProductEditorLocationTab(props) {\n  var locations = props.locations;\n  var searchLocations = ReactDebounce.useDebounced(300, (function (param) {\n          param.dispatch({\n                TAG: \"SearchLocations\",\n                _0: param.state.input\n              });\n        }));\n  var initialState = React.useMemo((function () {\n          return {\n                  input: \"\",\n                  locations: locations\n                };\n        }), []);\n  var match = Hooks.useReducer(initialState, (function (state, action) {\n          switch (action.TAG) {\n            case \"UpdateInput\" :\n                return {\n                        TAG: \"UpdateWithSideEffects\",\n                        _0: {\n                          input: action._0,\n                          locations: state.locations\n                        },\n                        _1: searchLocations\n                      };\n            case \"SearchLocations\" :\n                var input = action._0;\n                if (input === \"\") {\n                  return {\n                          TAG: \"SideEffects\",\n                          _0: (function (param) {\n                              param.dispatch({\n                                    TAG: \"SetLocations\",\n                                    _0: input,\n                                    _1: locations\n                                  });\n                            })\n                        };\n                } else {\n                  return {\n                          TAG: \"SideEffects\",\n                          _0: (function (param) {\n                              param.dispatch({\n                                    TAG: \"SetLocations\",\n                                    _0: input,\n                                    _1: Belt_Array.keep(locations, (function ($$location) {\n                                            var input$1 = input.toLowerCase();\n                                            if ((function (__x) {\n                                                    return Js_string.includes(input$1, __x);\n                                                  })($$location.name.toLowerCase()) || (function (__x) {\n                                                    return Js_string.includes(input$1, __x);\n                                                  })($$location.streetAddress1.toLowerCase()) || (function (__x) {\n                                                    return Js_string.includes(input$1, __x);\n                                                  })($$location.streetAddress2.toLowerCase()) || (function (__x) {\n                                                    return Js_string.includes(input$1, __x);\n                                                  })($$location.city.toLowerCase()) || (function (__x) {\n                                                    return Js_string.includes(input$1, __x);\n                                                  })($$location.state.toLowerCase())) {\n                                              return true;\n                                            } else {\n                                              var __x = $$location.country.toLowerCase();\n                                              return Js_string.includes(input$1, __x);\n                                            }\n                                          }))\n                                  });\n                            })\n                        };\n                }\n            case \"SetLocations\" :\n                if (action._0 === state.input) {\n                  return {\n                          TAG: \"Update\",\n                          _0: {\n                            input: state.input,\n                            locations: action._1\n                          }\n                        };\n                } else {\n                  return \"NoUpdate\";\n                }\n            \n          }\n        }));\n  var dispatch = match[1];\n  var state = match[0];\n  return JsxRuntime.jsxs(Container.make, {\n              className: css.locationsContainer,\n              children: [\n                JsxRuntime.jsx(H2.make, {\n                      className: css.formTitle,\n                      children: \"Set Location\"\n                    }),\n                JsxRuntime.jsx(SearchField.make, {\n                      id: \"product-form--location\",\n                      value: state.input,\n                      placeholder: \"Search by title or address\",\n                      autoFocus: true,\n                      onChange: (function ($$event) {\n                          dispatch({\n                                TAG: \"UpdateInput\",\n                                _0: $$event.target.value\n                              });\n                        })\n                    }),\n                JsxRuntime.jsx(DashboardProductEditorLocations.make, {\n                      locations: state.locations,\n                      selectedLocation: props.selectedLocation,\n                      selectLocation: props.selectLocation\n                    }),\n                props.children\n              ]\n            });\n}\n\nvar make = DashboardProductEditorLocationTab;\n\nexport {\n  css ,\n  make ,\n}\n/* css Not a pure module */\n","// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Icon from \"../components/Icon/Icon.res.js\";\nimport * as JsxRuntime from \"react/jsx-runtime\";\n\nfunction IconLocation(props) {\n  var __title = props.title;\n  var title = __title !== undefined ? __title : \"Location\";\n  return JsxRuntime.jsx(Icon.make, {\n              title: title,\n              size: props.size,\n              className: props.className,\n              children: JsxRuntime.jsx(\"path\", {\n                    d: \"M8,15.2 C4.26666667,13.0007734 2.4,10.1207734 2.4,6.56 C2.4,3.37883984 4.9072054,0.8 8,0.8 C11.0927946,0.8 13.6,3.37883984 13.6,6.56 C13.6,10.1207734 11.7333333,13.0007734 8,15.2 Z M8,9.44 C9.5463973,9.44 10.8,8.15058008 10.8,6.56 C10.8,4.96941992 9.5463973,3.68 8,3.68 C6.4536027,3.68 5.2,4.96941992 5.2,6.56 C5.2,8.15058008 6.4536027,9.44 8,9.44 Z\",\n                    fill: Icon.mapColor(props.color)\n                  })\n            });\n}\n\nvar make = IconLocation;\n\nexport {\n  make ,\n}\n/* Icon Not a pure module */\n","// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as H2 from \"../../../styleguide/components/Heading/H2.res.js\";\nimport * as Button from \"../../../styleguide/components/Button/Button.res.js\";\nimport * as Container from \"../../../styleguide/components/Container/Container.res.js\";\nimport * as IconLocation from \"../../../styleguide/icons/IconLocation.res.js\";\nimport * as JsxRuntime from \"react/jsx-runtime\";\nimport * as DashboardProductEditorScss from \"./DashboardProductEditor.scss\";\n\nvar css = DashboardProductEditorScss;\n\nfunction DashboardProductEditorNoLocations(props) {\n  return JsxRuntime.jsxs(Container.make, {\n              className: css.noLocations,\n              children: [\n                JsxRuntime.jsx(H2.make, {\n                      children: \"No Locations\"\n                    }),\n                JsxRuntime.jsx(\"div\", {\n                      children: JsxRuntime.jsx(IconLocation.make, {\n                            size: \"XXL\",\n                            color: \"LighterGray\"\n                          }),\n                      className: css.locationIcon\n                    }),\n                JsxRuntime.jsx(\"div\", {\n                      children: \"You should create a location first. After that you can go back here. Your progress will be saved.\"\n                    }),\n                JsxRuntime.jsx(Button.AsLink.make, {\n                      href: props.providerUrl,\n                      size: \"LG\",\n                      color: \"Teal\",\n                      children: \"Create First Location\"\n                    })\n              ]\n            });\n}\n\nvar make = DashboardProductEditorNoLocations;\n\nexport {\n  css ,\n  make ,\n}\n/* css Not a pure module */\n","// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Api from \"../../../api/Api.res.js\";\nimport * as Url from \"../../../utils/Url.res.js\";\nimport * as Hooks from \"../../../libs/Hooks.res.js\";\nimport * as React from \"react\";\nimport * as Button from \"../../../styleguide/components/Button/Button.res.js\";\nimport * as $$Promise from \"../../../bindings/Promise.res.js\";\nimport * as $$Location from \"../../../models/Location.res.js\";\nimport * as Belt_Array from \"rescript/lib/es6/belt_Array.js\";\nimport * as Belt_Option from \"rescript/lib/es6/belt_Option.js\";\nimport * as Caml_option from \"rescript/lib/es6/caml_option.js\";\nimport * as SentryLogger from \"../../../loggers/SentryLogger.res.js\";\nimport * as Routes_Product from \"../../../routes/common/Routes_Product.res.js\";\nimport * as ColocationProduct from \"../../../models/ColocationProduct.res.js\";\nimport * as JsxRuntime from \"react/jsx-runtime\";\nimport * as DashboardProductEditorHeader from \"../../common/dashboard/DashboardProductEditorHeader.res.js\";\nimport * as DashboardProductEditorLayout from \"../../common/dashboard/DashboardProductEditorLayout.res.js\";\nimport * as DashboardProductEditorActionBar from \"../../common/dashboard/DashboardProductEditorActionBar.res.js\";\nimport * as DashboardProductEditorContextMenu from \"../../common/dashboard/DashboardProductEditorContextMenu.res.js\";\nimport * as DashboardProductEditorLocationTab from \"../../common/dashboard/DashboardProductEditorLocationTab.res.js\";\nimport * as DashboardProductEditorNoLocations from \"../../common/dashboard/DashboardProductEditorNoLocations.res.js\";\nimport * as DashboardProductEditorUnarchiveLink from \"../../common/dashboard/DashboardProductEditorUnarchiveLink.res.js\";\nimport * as DashboardProductEditorActiveStatusToggle from \"../../common/dashboard/DashboardProductEditorActiveStatusToggle.res.js\";\n\nfunction DashboardEditProductLocationTab$DashboardEditProductLocationTab(props) {\n  var locations = props.locations;\n  var product = props.product;\n  var initialState = React.useMemo((function () {\n          return {\n                  product: product,\n                  status: \"Editing\",\n                  location: Belt_Option.map(product.location, (function ($$location) {\n                          return $$location.id;\n                        })),\n                  submissionError: false\n                };\n        }), []);\n  var match = Hooks.useReducer(initialState, (function (state, action) {\n          if (typeof action === \"object\") {\n            if (action.TAG === \"UpdateProduct\") {\n              return {\n                      TAG: \"Update\",\n                      _0: {\n                        product: action._0,\n                        status: state.status,\n                        location: state.location,\n                        submissionError: state.submissionError\n                      }\n                    };\n            } else {\n              return {\n                      TAG: \"Update\",\n                      _0: {\n                        product: state.product,\n                        status: state.status,\n                        location: Caml_option.some(action._0),\n                        submissionError: state.submissionError\n                      }\n                    };\n            }\n          }\n          switch (action) {\n            case \"Submit\" :\n                var match = state.location;\n                var match$1 = state.status;\n                if (match === undefined) {\n                  return \"NoUpdate\";\n                }\n                if (match$1 !== \"Editing\") {\n                  return \"NoUpdate\";\n                }\n                var locationId = Caml_option.valFromOption(match);\n                return {\n                        TAG: \"UpdateWithSideEffects\",\n                        _0: {\n                          product: state.product,\n                          status: \"Submitting\",\n                          location: state.location,\n                          submissionError: state.submissionError\n                        },\n                        _1: (function (param) {\n                            var dispatch = param.dispatch;\n                            $$Promise.wait(Api.updateProductLocation(product.id, locationId), (function (x) {\n                                    if (x.TAG === \"Ok\") {\n                                      return dispatch(\"GoToNextTab\");\n                                    }\n                                    SentryLogger.error1({\n                                          rootModule: \"DashboardEditProductLocationTab\",\n                                          subModulePath: {\n                                            hd: \"DashboardEditProductLocationTab\",\n                                            tl: /* [] */0\n                                          },\n                                          value: \"make\",\n                                          fullPath: \"DashboardEditProductLocationTab.DashboardEditProductLocationTab.make\"\n                                        }, \"DashboardEditProductLocationTab::Submit::Error\", [\n                                          \"Error\",\n                                          x._0\n                                        ]);\n                                    dispatch(\"FailSubmission\");\n                                  }));\n                          })\n                      };\n            case \"GoToNextTab\" :\n                return {\n                        TAG: \"SideEffects\",\n                        _0: (function (param) {\n                            Url.visit(Routes_Product.Dashboard.editAssets(product.id));\n                          })\n                      };\n            case \"GoToPreviousTab\" :\n                return {\n                        TAG: \"SideEffects\",\n                        _0: (function (param) {\n                            Url.visit(Routes_Product.Dashboard.editGeneral(product.id));\n                          })\n                      };\n            case \"FailSubmission\" :\n                return {\n                        TAG: \"Update\",\n                        _0: {\n                          product: state.product,\n                          status: \"Editing\",\n                          location: state.location,\n                          submissionError: true\n                        }\n                      };\n            \n          }\n        }));\n  var dispatch = match[1];\n  var state = match[0];\n  var tmp;\n  if (locations.length !== 0) {\n    var match$1 = state.product.status;\n    var tmp$1;\n    var exit = 0;\n    switch (match$1) {\n      case \"Active\" :\n          var match$2 = state.status;\n          tmp$1 = JsxRuntime.jsxs(JsxRuntime.Fragment, {\n                children: [\n                  JsxRuntime.jsx(DashboardProductEditorActiveStatusToggle.make, {\n                        productId: product.id,\n                        status: \"Active\",\n                        busy: match$2 !== \"Editing\"\n                      }),\n                  JsxRuntime.jsx(DashboardProductEditorContextMenu.make, {\n                        product: state.product,\n                        onUpdated: (function (product) {\n                            dispatch({\n                                  TAG: \"UpdateProduct\",\n                                  _0: product\n                                });\n                          })\n                      })\n                ]\n              });\n          break;\n      case \"Disabled\" :\n          var match$3 = state.status;\n          tmp$1 = JsxRuntime.jsxs(JsxRuntime.Fragment, {\n                children: [\n                  JsxRuntime.jsx(DashboardProductEditorActiveStatusToggle.make, {\n                        productId: product.id,\n                        status: \"Disabled\",\n                        busy: match$3 !== \"Editing\"\n                      }),\n                  JsxRuntime.jsx(DashboardProductEditorContextMenu.make, {\n                        product: state.product,\n                        onUpdated: (function (product) {\n                            dispatch({\n                                  TAG: \"UpdateProduct\",\n                                  _0: product\n                                });\n                          })\n                      })\n                ]\n              });\n          break;\n      case \"Draft\" :\n      case \"Expired\" :\n          exit = 1;\n          break;\n      case \"Archived\" :\n          tmp$1 = JsxRuntime.jsx(DashboardProductEditorUnarchiveLink.make, {\n                productId: product.id,\n                onUnarchived: (function (product) {\n                    dispatch({\n                          TAG: \"UpdateProduct\",\n                          _0: product\n                        });\n                  })\n              });\n          break;\n      \n    }\n    if (exit === 1) {\n      tmp$1 = JsxRuntime.jsx(DashboardProductEditorContextMenu.make, {\n            product: state.product,\n            onUpdated: (function (product) {\n                dispatch({\n                      TAG: \"UpdateProduct\",\n                      _0: product\n                    });\n              })\n          });\n    }\n    var match$4 = state.status;\n    tmp = JsxRuntime.jsx(DashboardProductEditorLocationTab.make, {\n          locations: locations,\n          selectedLocation: state.location,\n          selectLocation: (function (id) {\n              dispatch({\n                    TAG: \"SelectLocation\",\n                    _0: id\n                  });\n            }),\n          children: JsxRuntime.jsxs(DashboardProductEditorActionBar.make, {\n                children: [\n                  JsxRuntime.jsx(DashboardProductEditorActionBar.ContextControls.make, {\n                        children: tmp$1\n                      }),\n                  JsxRuntime.jsx(DashboardProductEditorActionBar.$$Error.make, {\n                        children: state.submissionError ? \"Something went wrong\" : null\n                      }),\n                  JsxRuntime.jsx(Button.make, {\n                        size: \"LG\",\n                        color: \"Primary\",\n                        expanded: true,\n                        visuallyDisabled: Belt_Option.isNone(state.location),\n                        busy: match$4 !== \"Editing\",\n                        onClick: (function (param) {\n                            dispatch(\"Submit\");\n                          }),\n                        children: \"Save changes\"\n                      })\n                ]\n              })\n        });\n  } else {\n    tmp = JsxRuntime.jsx(DashboardProductEditorNoLocations.make, {\n          providerUrl: props.providerUrl\n        });\n  }\n  return JsxRuntime.jsxs(DashboardProductEditorLayout.make, {\n              children: [\n                JsxRuntime.jsx(DashboardProductEditorHeader.make, {\n                      product: product,\n                      active: \"LocationTab\"\n                    }),\n                tmp\n              ]\n            });\n}\n\nvar DashboardEditProductLocationTab = {\n  make: DashboardEditProductLocationTab$DashboardEditProductLocationTab\n};\n\nfunction DashboardEditProductLocationTab$default(props) {\n  var props$1 = props.props;\n  return JsxRuntime.jsx(DashboardEditProductLocationTab$DashboardEditProductLocationTab, {\n              product: ColocationProduct.Draft.fromJs(props$1.product),\n              locations: Belt_Array.map(props$1.locations, $$Location.fromJs),\n              providerUrl: props$1.providerUrl\n            });\n}\n\nvar $$default = DashboardEditProductLocationTab$default;\n\nexport {\n  DashboardEditProductLocationTab ,\n  $$default as default,\n}\n/* Api Not a pure module */\n","import * as React from 'react';\n\nimport DashboardEditProductLocationTab from './DashboardEditProductLocationTab.res.js';\n\nexport default ({ context, ...props }) => <DashboardEditProductLocationTab props={props} context={context} />;\n","// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Cx from \"rescript-classnames/src/Cx.res.js\";\nimport * as LinkScss from \"./Link.scss\";\nimport * as JsxRuntime from \"react/jsx-runtime\";\n\nvar css = LinkScss;\n\nfunction A(props) {\n  var __className = props.className;\n  var targetBlank = props.targetBlank;\n  var className = __className !== undefined ? __className : \"\";\n  return JsxRuntime.jsx(\"a\", {\n              children: props.children,\n              ref: props.elRef,\n              className: Cx.cx([className.length !== 0 ? className : css.link]),\n              id: props.id,\n              download: props.download,\n              href: props.href,\n              rel: targetBlank !== undefined && targetBlank ? \"noopener noreferrer\" : undefined,\n              target: targetBlank !== undefined && targetBlank ? \"_blank\" : undefined,\n              onClick: props.onClick\n            });\n}\n\nvar make = A;\n\nexport {\n  css ,\n  make ,\n}\n/* css Not a pure module */\n","// extracted by mini-css-extract-plugin\nexport var column = \"RadioButton__column__Zcyg4\";\nexport var flex = \"RadioButton__flex__GMHK4\";\nexport var flexColumn = \"RadioButton__flexColumn__sWo0N\";\nexport var gap1 = \"RadioButton__gap1__OWWWt\";\nexport var gap2 = \"RadioButton__gap2__Isnwl\";\nexport var gap3 = \"RadioButton__gap3__bD5m5\";\nexport var gap4 = \"RadioButton__gap4__ut2Br\";\nexport var gap5 = \"RadioButton__gap5__wU0Sk\";\nexport var label = \"RadioButton__label__UhkwS\";\nexport var radioButton = \"RadioButton__radioButton__LhIkr\";\nexport var row = \"RadioButton__row__dt3oZ\";\nexport var visuallyDisabled = \"RadioButton__visuallyDisabled__kkulx\";\nexport var wrapper = \"RadioButton__wrapper__uaDY5\";","// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Cx from \"rescript-classnames/src/Cx.res.js\";\nimport * as React from \"react\";\nimport * as Caml_option from \"rescript/lib/es6/caml_option.js\";\nimport * as JsxRuntime from \"react/jsx-runtime\";\nimport * as RadioButtonScss from \"./RadioButton.scss\";\n\nvar css = RadioButtonScss;\n\nfunction RadioButton(props) {\n  var onClick = props.onClick;\n  var __className = props.className;\n  var __visuallyDisabled = props.visuallyDisabled;\n  var __disabled = props.disabled;\n  var id = props.id;\n  var disabled = __disabled !== undefined ? __disabled : false;\n  var visuallyDisabled = __visuallyDisabled !== undefined ? __visuallyDisabled : false;\n  var className = __className !== undefined ? __className : \"\";\n  var radioButtonRef = React.useRef(null);\n  var handleClick = function ($$event) {\n    var radioButtonRef$1 = radioButtonRef.current;\n    if (!(radioButtonRef$1 == null)) {\n      if (onClick !== undefined) {\n        onClick($$event);\n      }\n      radioButtonRef$1.blur();\n      return ;\n    }\n    \n  };\n  return JsxRuntime.jsxs(\"div\", {\n              children: [\n                JsxRuntime.jsx(\"input\", {\n                      ref: Caml_option.some(radioButtonRef),\n                      className: Cx.cx([\n                            css.radioButton,\n                            visuallyDisabled ? css.visuallyDisabled : \"\"\n                          ]),\n                      id: id,\n                      tabIndex: props.tabIndex,\n                      checked: props.checked,\n                      disabled: disabled || visuallyDisabled,\n                      type: \"radio\",\n                      onChange: props.onChange,\n                      onClick: handleClick\n                    }),\n                JsxRuntime.jsx(\"label\", {\n                      className: css.label,\n                      htmlFor: id\n                    })\n              ],\n              className: Cx.cx([\n                    css.wrapper,\n                    className\n                  ])\n            });\n}\n\nvar make = RadioButton;\n\nexport {\n  css ,\n  make ,\n}\n/* css Not a pure module */\n","// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Icon from \"../components/Icon/Icon.res.js\";\nimport * as JsxRuntime from \"react/jsx-runtime\";\n\nfunction IconSearch(props) {\n  var color = props.color;\n  var __title = props.title;\n  var title = __title !== undefined ? __title : \"Search\";\n  return JsxRuntime.jsxs(Icon.make, {\n              title: title,\n              size: props.size,\n              className: props.className,\n              children: [\n                JsxRuntime.jsx(\"path\", {\n                      d: \"M7,10.3333333 C8.84094917,10.3333333 10.3333333,8.84094917 10.3333333,7 C10.3333333,5.15905083 8.84094917,3.66666667 7,3.66666667 C5.15905083,3.66666667 3.66666667,5.15905083 3.66666667,7 C3.66666667,8.84094917 5.15905083,10.3333333 7,10.3333333 Z M7,12 C4.23857625,12 2,9.76142375 2,7 C2,4.23857625 4.23857625,2 7,2 C9.76142375,2 12,4.23857625 12,7 C12,9.76142375 9.76142375,12 7,12 Z\",\n                      fill: Icon.mapColor(color)\n                    }),\n                JsxRuntime.jsx(\"path\", {\n                      d: \"M9.4,10.4 L12.6,13.6\",\n                      stroke: Icon.mapColor(color),\n                      strokeLinecap: \"round\",\n                      strokeWidth: \"2\"\n                    })\n              ]\n            });\n}\n\nvar make = IconSearch;\n\nexport {\n  make ,\n}\n/* Icon Not a pure module */\n","// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Cx from \"rescript-classnames/src/Cx.res.js\";\n\nvar icon = Cx.cx([\n      \"absolute\",\n      \"top-0\",\n      \"left-0\",\n      \"bottom-0\",\n      \"right-0\",\n      \"z-10\",\n      \"flex\",\n      \"items-center\",\n      \"justify-center\",\n      \"w-[44px]\",\n      \"border-r\",\n      \"border-solid\",\n      \"border-gray-200\"\n    ]);\n\nvar input = Cx.cx([\"!pl-[58px]\"]);\n\nvar wrapper = \"relative\";\n\nexport {\n  wrapper ,\n  icon ,\n  input ,\n}\n/* icon Not a pure module */\n","// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Cx from \"rescript-classnames/src/Cx.res.js\";\nimport * as TextField from \"../TextField/TextField.res.js\";\nimport * as IconSearch from \"../../icons/IconSearch.res.js\";\nimport * as SearchFieldCss from \"./SearchFieldCss.res.js\";\nimport * as JsxRuntime from \"react/jsx-runtime\";\n\nfunction SearchField(props) {\n  var __disabled = props.disabled;\n  var __showSearchIcon = props.showSearchIcon;\n  var __iconClassName = props.iconClassName;\n  var __inputClassName = props.inputClassName;\n  var __className = props.className;\n  var className = __className !== undefined ? __className : \"\";\n  var inputClassName = __inputClassName !== undefined ? __inputClassName : \"\";\n  var iconClassName = __iconClassName !== undefined ? __iconClassName : \"\";\n  var showSearchIcon = __showSearchIcon !== undefined ? __showSearchIcon : true;\n  var disabled = __disabled !== undefined ? __disabled : false;\n  var inputClassName$1 = showSearchIcon ? Cx.cx([\n          inputClassName,\n          SearchFieldCss.input\n        ]) : inputClassName;\n  return JsxRuntime.jsxs(\"div\", {\n              children: [\n                showSearchIcon ? JsxRuntime.jsx(\"div\", {\n                        children: JsxRuntime.jsx(IconSearch.make, {\n                              size: \"MD\",\n                              color: \"LightGray\"\n                            }),\n                        className: Cx.cx([\n                              SearchFieldCss.icon,\n                              iconClassName\n                            ])\n                      }) : null,\n                JsxRuntime.jsx(TextField.make, {\n                      id: props.id,\n                      value: props.value,\n                      placeholder: props.placeholder,\n                      disabled: disabled,\n                      status: props.status,\n                      autoFocus: props.autoFocus,\n                      className: inputClassName$1,\n                      onChange: props.onChange\n                    })\n              ],\n              className: Cx.cx([\n                    SearchFieldCss.wrapper,\n                    className\n                  ])\n            });\n}\n\nvar Css;\n\nvar make = SearchField;\n\nexport {\n  Css ,\n  make ,\n}\n/* TextField Not a pure module */\n","// extracted by mini-css-extract-plugin\nexport var column = \"Link__column__pEN4T\";\nexport var flex = \"Link__flex__yPTqa\";\nexport var flexColumn = \"Link__flexColumn__IRHVb\";\nexport var gap1 = \"Link__gap1__PT0qr\";\nexport var gap2 = \"Link__gap2__nKVKV\";\nexport var gap3 = \"Link__gap3__u0bKM\";\nexport var gap4 = \"Link__gap4__q5jG1\";\nexport var gap5 = \"Link__gap5__IyelJ\";\nexport var link = \"Link__link__Ivmt3\";\nexport var row = \"Link__row__R9iCv\";","// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as React from \"react\";\nimport * as Debounce from \"rescript-debounce/src/Debounce.res.js\";\n\nfunction useDebounced(wait, fn) {\n  return React.useRef(Debounce.make(wait, fn)).current;\n}\n\nfunction useControlled(wait, fn) {\n  return React.useRef(Debounce.makeControlled(wait, fn)).current;\n}\n\nexport {\n  useDebounced ,\n  useControlled ,\n}\n/* react Not a pure module */\n","// Generated by ReScript, PLEASE EDIT WITH CARE\n\nimport * as Caml_option from \"rescript/lib/es6/caml_option.js\";\n\nfunction makeControlled(waitOpt, fn) {\n  var wait = waitOpt !== undefined ? waitOpt : 100;\n  var timerId = {\n    contents: undefined\n  };\n  var lastArg = {\n    contents: undefined\n  };\n  var lastCallTime = {\n    contents: undefined\n  };\n  var shouldCall = function (time) {\n    var lastCallTime$1 = lastCallTime.contents;\n    if (lastCallTime$1 === undefined) {\n      return true;\n    }\n    var timeSinceLastCall = time - lastCallTime$1 | 0;\n    if (timeSinceLastCall >= wait) {\n      return true;\n    } else {\n      return timeSinceLastCall < 0;\n    }\n  };\n  var remainingWait = function (time) {\n    var lastCallTime$1 = lastCallTime.contents;\n    if (lastCallTime$1 === undefined) {\n      return wait;\n    }\n    var timeSinceLastCall = time - lastCallTime$1 | 0;\n    return wait - timeSinceLastCall | 0;\n  };\n  var timerExpired = function () {\n    var timerId$1 = timerId.contents;\n    if (timerId$1 !== undefined) {\n      clearTimeout(Caml_option.valFromOption(timerId$1));\n    }\n    var time = Date.now() | 0;\n    if (shouldCall(time)) {\n      return call();\n    } else {\n      timerId.contents = Caml_option.some(setTimeout(timerExpired, remainingWait(time)));\n      return ;\n    }\n  };\n  var call = function () {\n    var x = lastArg.contents;\n    if (x !== undefined) {\n      lastArg.contents = undefined;\n      timerId.contents = undefined;\n      return fn(Caml_option.valFromOption(x));\n    } else {\n      timerId.contents = undefined;\n      return ;\n    }\n  };\n  var schedule = function (x) {\n    var time = Date.now() | 0;\n    lastArg.contents = Caml_option.some(x);\n    lastCallTime.contents = time;\n    timerId.contents = Caml_option.some(setTimeout(timerExpired, wait));\n  };\n  var scheduled = function () {\n    return timerId.contents !== undefined;\n  };\n  var cancel = function () {\n    var timerId$p = timerId.contents;\n    if (timerId$p !== undefined) {\n      clearTimeout(Caml_option.valFromOption(timerId$p));\n      timerId.contents = undefined;\n      lastArg.contents = undefined;\n      lastCallTime.contents = undefined;\n      return ;\n    }\n    \n  };\n  var invoke = function (x) {\n    cancel();\n    fn(x);\n  };\n  return {\n          invoke: invoke,\n          schedule: schedule,\n          scheduled: scheduled,\n          cancel: cancel\n        };\n}\n\nfunction make(wait, fn) {\n  return makeControlled(wait, fn).schedule;\n}\n\nexport {\n  make ,\n  makeControlled ,\n}\n/* No side effect */\n"],"names":["css","DashboardProductEditorScss","filterLinkClicks","target","link","fn","undefined","Caml_option","make","props","__x","select","$$location","location","linkEl","React","JsxRuntime","children","RadioButton","id","ID","checked","selected","tabIndex","onChange","prim","name","className","locationName","Belt_Array","streetAddress1","streetAddress2","city","state","country","item","Js_array","locationAddress","locationWidgetInfo","A","href","editUrl","targetBlank","locationDetailsLink","elRef","locationWidgetInner","locationWidget","type","onClick","$$event","Events","fromReactEventTargetToHtmlElement","current","selectLocation","selectedLocation","locations","DashboardProductEditorLocationWidget","Belt_Option","Caml_obj","searchLocations","ReactDebounce","param","dispatch","TAG","_0","input","initialState","match","Hooks","action","_1","input$1","toLowerCase","Js_string","Container","locationsContainer","H2","formTitle","SearchField","value","placeholder","autoFocus","DashboardProductEditorLocations","__title","title","Icon","size","d","fill","color","noLocations","IconLocation","locationIcon","Button","providerUrl","DashboardEditProductLocationTab$DashboardEditProductLocationTab","tmp","product","status","submissionError","match$1","locationId","$$Promise","Api","x","SentryLogger","rootModule","subModulePath","hd","tl","fullPath","Url","Routes_Product","editAssets","editGeneral","length","tmp$1","exit","match$2","DashboardProductEditorActiveStatusToggle","productId","busy","DashboardProductEditorContextMenu","onUpdated","match$3","DashboardProductEditorUnarchiveLink","onUnarchived","match$4","DashboardProductEditorLocationTab","DashboardProductEditorActionBar","expanded","visuallyDisabled","DashboardProductEditorNoLocations","DashboardProductEditorLayout","DashboardProductEditorHeader","active","$$default","props$1","ColocationProduct","fromJs","$$Location","_ref","context","_objectWithoutProperties","_excluded","DashboardEditProductLocationTab","LinkScss","__className","ref","Cx","download","rel","column","flex","flexColumn","gap1","gap2","gap3","gap4","gap5","label","radioButton","row","wrapper","RadioButtonScss","__visuallyDisabled","__disabled","disabled","radioButtonRef","radioButtonRef$1","blur","htmlFor","stroke","strokeLinecap","strokeWidth","icon","__showSearchIcon","showSearchIcon","__iconClassName","iconClassName","__inputClassName","inputClassName","inputClassName$1","SearchFieldCss","IconSearch","TextField","useDebounced","wait","makeControlled","waitOpt","timerId","contents","lastArg","lastCallTime","timerExpired","timerId$1","clearTimeout","time","Date","now","lastCallTime$1","timeSinceLastCall","shouldCall","call","setTimeout","remainingWait","cancel","timerId$p","invoke","schedule","scheduled"],"sourceRoot":""}