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,KAkDlE,MAAMmT,EAAcpG,IACzB,IAEE,OADA,IAAIqG,IAAIrG,IACD,CACT,CAAE,MAAOsG,GACP,OAAO,CACT,GAGWC,EAAiBC,IAC5B,MACMC,GADS,IAAIC,WACAC,gBAAgBH,EAAY,aACzCI,EAAiB,GAevB,OAbA,SAASC,EAASC,GAChBA,EAAKC,WAAWhI,SAASiI,IACnBA,EAAMC,WAAaC,KAAKC,UAC1BP,EAAejN,KAAKqN,EAAMI,YAAYnG,QAC7B+F,EAAMC,WAAaC,KAAKG,eACjCR,EAASG,GACTJ,EAAejN,KAAK,KACtB,GAEJ,CAEAkN,CAASJ,EAAIjL,MAENoL,EAAexG,KAAK,KAAK5O,QAAQ,OAAQ,KAAKyP,MAAM,C","sources":["webpack://daocloud/./app/javascript/components/shared/Buttons.jsx","webpack://daocloud/./app/javascript/components/shared/Inputs.jsx","webpack://daocloud/./app/javascript/components/shared/Layout.jsx","webpack://daocloud/./app/javascript/components/shared/Typography.jsx","webpack://daocloud/./app/javascript/utils/dayJsPlugins.js","webpack://daocloud/./app/javascript/utils/utils.jsx"],"sourcesContent":["import { XMarkIcon } from \"@heroicons/react/24/outline\"\nimport { DocumentDuplicateIcon } from \"@heroicons/react/24/outline\"\nimport PropTypes from \"prop-types\"\nimport React from \"react\"\nimport { twMerge } from \"tailwind-merge\"\n\nimport { Input } from \"./Inputs\"\n\nexport const Button = ({\n  type = \"primary\",\n  size = \"small\",\n  className,\n  disabled = false,\n  floatingInMobile,\n  onClick,\n  children\n}) => (\n  <button\n    onClick={onClick}\n    className={twMerge(\n      \"rounded border px-4 font-bold focus:outline-none focus:ring-2 focus:ring-blue\",\n      type === \"secondary\"\n        ? \"border-teal bg-white text-teal active:bg-gray-light\"\n        : type === \"tertiary\"\n        ? \"border-gray bg-white active:bg-gray-light\"\n        : type === \"destructive\"\n        ? \"border-red bg-red text-white\"\n        : type === \"warning\"\n        ? \"border-red bg-white text-red\"\n        : type === \"coming-soon\"\n        ? \"cursor-not-allowed border-gray-ultralight bg-gray-ultralight text-gray-dark\"\n        : type === \"link\"\n        ? \"border-none p-0 text-teal underline hover:shadow-none\"\n        : \"border-teal bg-teal text-white hover:shadow active:bg-teal-dark\",\n      size === \"large\" ? \"h-12\" : \"h-8\",\n      disabled ? \"pointer-events-none opacity-25\" : \"\",\n      floatingInMobile ? \"relative z-10 sm:fixed sm:bottom-[86px] sm:right-[16px]\" : \"\",\n      className\n    )}>\n    {children}\n  </button>\n)\n\nButton.propTypes = {\n  type: PropTypes.oneOf([\"primary\", \"secondary\", \"tertiary\", \"destructive\", \"warning\", \"coming-soon\", \"link\"]),\n  size: PropTypes.oneOf([\"large\", \"small\"]),\n  disabled: PropTypes.bool,\n  active: PropTypes.bool,\n  onClick: PropTypes.func\n}\n\nexport const CloseButton = ({ onClick, active = false, className }) => (\n  <button\n    className={twMerge(\n      \"h-8 w-8 rounded text-gray-dark hover:bg-gray-light focus:outline-none focus:ring-2 focus:ring-blue active:bg-gray\",\n      active ? \"bg-gray\" : \"\",\n      className\n    )}\n    onClick={onClick}>\n    <XMarkIcon />\n  </button>\n)\n\nCloseButton.propTypes = {\n  onClick: PropTypes.func,\n  active: PropTypes.bool\n}\n\nexport const IconButton = ({ Icon, onClick, className = \"\", disabled = false, tooltip }) => (\n  <div className=\"group relative\">\n    <button\n      type=\"button\"\n      onClick={onClick}\n      disabled={disabled}\n      className={twMerge(\n        \"flex h-8 w-8 items-center justify-center rounded p-1.5 text-gray-dark transition-colors hover:bg-gray-light focus:outline-none focus:ring-2 focus:ring-blue active:bg-gray\",\n        className\n      )}>\n      <Icon className=\"h-full w-full\" />\n    </button>\n    {tooltip && (\n      <div className=\"pointer-events-none absolute left-1/2 top-full z-10 mt-1 -translate-x-1/2 rounded bg-gray-dark px-2 py-1 text-xs text-white opacity-0 transition-opacity duration-500 group-hover:opacity-100\">\n        {tooltip}\n      </div>\n    )}\n  </div>\n)\n\nIconButton.propTypes = {\n  Icon: PropTypes.elementType.isRequired,\n  onClick: PropTypes.func,\n  active: PropTypes.bool\n}\n\nexport const CopyLinkButton = ({ onClick, value, className }) => {\n  function stripHttp(url) {\n    return url.replace(/^(https?:\\/\\/)/, \"\")\n  }\n\n  const strippedValue = stripHttp(value)\n\n  return (\n    <div className={twMerge(\"relative\", className)}>\n      <Input disabled={true} value={strippedValue} />\n      <Button\n        className=\"absolute right-[3px] top-[3px] flex items-center\"\n        type=\"tertiary\"\n        size=\"small\"\n        onClick={onClick}>\n        {\" \"}\n        Copy link <DocumentDuplicateIcon className=\"ml-2 h-5 w-5\" />\n      </Button>\n    </div>\n  )\n}\n\nCopyLinkButton.propTypes = {\n  onClick: PropTypes.func,\n  value: PropTypes.string\n}\n\nexport const CircularButton = ({ Icon, className, disabled, ...rest }) => (\n  <button\n    {...rest}\n    disabled={disabled}\n    className={twMerge(\n      \"flex h-8 w-8 items-center justify-center rounded-full border border-gray\",\n      disabled ? \"opacity-30\" : \"\",\n      className\n    )}>\n    <Icon className=\"h-5 w-5\" />\n  </button>\n)\n","import { CheckIcon, ChevronDownIcon, MagnifyingGlassIcon } from \"@heroicons/react/24/outline\"\nimport { ExclamationCircleIcon } from \"@heroicons/react/24/solid\"\nimport dayjs from \"dayjs\"\nimport React, { useState, forwardRef, Fragment, useRef, useEffect, useImperativeHandle } from \"react\"\nimport Switch from \"react-switch\"\nimport MaskedInput from \"react-text-mask\"\nimport { twMerge } from \"tailwind-merge\"\nimport { createNumberMask } from \"text-mask-addons\"\n\nimport { sanitize } from \"../../utils/utils\"\n\nimport { Button } from \"./Buttons\"\nimport Typography from \"./Typography\"\n\nexport const VALIDATION_ERROR_INPUT_CLASSNAMES =\n  \"border border-red hover:z-20 hover:border-red focus:z-20 focus:border-red focus:outline-none focus:ring-2 focus:ring-red/50\"\n\nconst formatPhoneNumber = (value) => {\n  const digits = value.replace(/\\D/g, \"\")\n  const match = digits.match(/^(\\d{1,3})(\\d{0,3})(\\d{0,4})$/)\n  if (match) {\n    return `(${match[1]}${match[2] ? \") \" : \"\"}${match[2]}${match[3] ? \"-\" : \"\"}${match[3]}`\n  }\n  return value\n}\n\nexport const BASE_INPUT_CLASSNAMES = twMerge(\n  \"w-full rounded-lg border border-gray px-3 py-1.5 placeholder:text-gray-dark hover:border-black focus:border-black focus:outline-none focus:ring-4 focus:ring-blue disabled:cursor-not-allowed disabled:bg-gray-ultralight disabled:text-gray-dark\"\n)\nexport const BASE_LABEL_CLASSNAMES = twMerge(\"mb-1 cursor-pointer text-sm font-bold\")\nexport const DROPDOWN_CLASSNAMES = twMerge(\n  \"z-50 mt-1 max-h-72 w-full overflow-auto rounded-lg border-2 border-gray bg-white py-2 focus:outline-none\"\n)\nexport const DROPDOWN_OPTION_CLASSNAMES = ({ active, selected }) =>\n  twMerge(\n    \"relative cursor-pointer select-none py-2 pl-3 pr-9\",\n    selected ? \"bg-gray\" : active ? \"bg-gray-ultralight\" : \"\"\n  )\n\nexport const Input = forwardRef(({ type, className, validationError, explanatorySubtext, ...rest }, ref) => {\n  className = twMerge(className, validationError && VALIDATION_ERROR_INPUT_CLASSNAMES)\n\n  const handleChange = (e) => {\n    if (type === \"phone\") {\n      e.target.value = formatPhoneNumber(e.target.value)\n    }\n    if (rest.onChange) {\n      rest.onChange(e)\n    }\n  }\n\n  const inputProps = {\n    ...rest,\n    type,\n    inputMode: type === \"phone\" ? \"numeric\" : undefined,\n    placeholder: type === \"phone\" ? \"(___) ___-____\" : undefined\n  }\n\n  return (\n    <>\n      <input\n        {...inputProps}\n        {...rest}\n        ref={ref}\n        className={twMerge(BASE_INPUT_CLASSNAMES, className)}\n        onChange={handleChange}\n      />\n      {validationError && !!validationError.length && <ValidationError>{validationError}</ValidationError>}\n      {explanatorySubtext && <Typography variant=\"micro\">{explanatorySubtext}</Typography>}\n    </>\n  )\n})\nInput.displayName = \"Input\"\n\nexport const ValidationError = ({ className, children }) => (\n  <div className={twMerge(\"mt-1 flex items-center gap-1\", className)}>\n    <ExclamationCircleIcon className=\"h-5 w-5 text-gray-dark\" />\n    <span className=\"text-[13px] text-red\">{children}</span>\n  </div>\n)\n\nexport const Label = ({ className, children, ...rest }) => (\n  // TODO: mb-0 class is needed to override styles in forms.sass, which we can remove when that's gone\n  <label {...rest} className={twMerge(BASE_LABEL_CLASSNAMES, className)}>\n    {children}\n  </label>\n)\n\nexport const InputWithLabel = ({\n  id,\n  label,\n  className,\n  inputClassName,\n  labelClassName,\n  required,\n  validationError,\n  ...rest\n}) => {\n  id ||= \"input-\" + label.toLowerCase().replace(\" \", \"-\")\n\n  return (\n    <div className={className}>\n      <Label className={labelClassName} htmlFor={id}>\n        {label} {required && <span className=\"text-red\">*</span>}\n      </Label>\n      <Input id={id} className={inputClassName} validationError={validationError} {...rest} />\n    </div>\n  )\n}\n\nexport const CurrencyInput = ({ value, onChange, validationError, ...rest }) => {\n  const handleChange = (event) => {\n    onChange(event.target.value.replace(/,/g, \"\") * 100)\n  }\n  const adjustedValue = value === null || value === undefined ? \"\" : Number((value / 100).toFixed(2)).toString()\n\n  const defaultMaskOptions = {\n    prefix: \"\",\n    suffix: \"\",\n    includeThousandsSeparator: true,\n    thousandsSeparatorSymbol: \",\",\n    allowDecimal: true,\n    decimalSymbol: \".\",\n    decimalLimit: 2,\n    allowNegative: false,\n    allowLeadingZeroes: false,\n    placeholderChar: \"\"\n  }\n  return (\n    <div className=\"relative\">\n      <div className=\"pointer-events-none absolute left-0 top-[6.3px] pl-3\">\n        <span className=\"text-gray-dark\">$</span>\n      </div>\n      <MaskedInput\n        mask={createNumberMask(defaultMaskOptions)}\n        value={adjustedValue}\n        onChange={handleChange}\n        className={twMerge(BASE_INPUT_CLASSNAMES, \"pl-7\", validationError && VALIDATION_ERROR_INPUT_CLASSNAMES)}\n        {...rest}\n      />\n      {validationError && <ValidationError>{validationError}</ValidationError>}\n    </div>\n  )\n}\n\nconst ToggleButton = ({ className, label, selected, onClick }) => (\n  <button\n    role=\"radio\"\n    onClick={onClick}\n    className={twMerge(\n      `flex-1 border border-gray-light py-1.5 text-center focus:outline-blue active:bg-gray-light ${\n        selected ? \"cursor-not-allowed bg-white font-bold\" : \"bg-gray-ultralight\"\n      }`,\n      className\n    )}>\n    {label}\n  </button>\n)\n\nexport const ToggleButtonGroup = ({ className, onChange, value, options }) => (\n  <div className={twMerge(\"flex items-center justify-center\", className)}>\n    {options.map((option, index) => (\n      <ToggleButton\n        key={option.value}\n        className={index === 0 ? \"rounded-l-lg\" : index === options.length - 1 ? \"rounded-r-lg\" : \"\"}\n        label={option.label}\n        selected={option.value === value}\n        onClick={() => onChange(option.value)}\n      />\n    ))}\n  </div>\n)\n\nexport const EditableValue = React.forwardRef(\n  (\n    {\n      name,\n      value,\n      onSave = () => {},\n      onCancel = () => {},\n      onOpened = () => {},\n      onClosed = () => {},\n      className,\n      titleClassName,\n      disabled,\n      saveDisabled,\n      editable = true,\n      children,\n      editButtonCopy = \"Edit\",\n      truncateLength = 190,\n      hint\n    },\n    ref\n  ) => {\n    const [editing, setEditing] = useState(false)\n\n    useImperativeHandle(ref, () => ({\n      setEditing\n    }))\n\n    if (value && truncateLength && value.length > truncateLength) {\n      value = value.slice(0, 190) + \"...\"\n    }\n\n    return (\n      <div className={twMerge(\"bg-white\", className, disabled ? \"opacity-50\" : \"\")}>\n        {editing ? (\n          <div>\n            <div className=\"mb-2\">\n              <div className=\"mb-1 font-bold\">{name}</div>\n              {hint && (\n                <Typography variant=\"smSubtitle\" className=\"mb-3\">\n                  {hint}\n                </Typography>\n              )}\n            </div>\n            {children}\n            <div className=\"mt-4 flex justify-end gap-4\">\n              <Button\n                type=\"tertiary\"\n                size=\"small\"\n                onClick={() => {\n                  setEditing(false)\n                  onCancel()\n                  onClosed()\n                }}>\n                Cancel\n              </Button>\n              <Button\n                disabled={saveDisabled}\n                size=\"small\"\n                onClick={() => {\n                  if (saveDisabled) return\n                  setEditing(false)\n                  onSave()\n                  onClosed()\n                }}>\n                Save\n              </Button>\n            </div>\n          </div>\n        ) : (\n          <div className=\"flex\">\n            <div className=\"mr-4 flex-1\">\n              <Typography variant=\"title\" className={titleClassName}>\n                {name}\n              </Typography>\n              <Typography variant=\"smSubtitle\" className=\"max-w-[445px] break-words\">\n                <div dangerouslySetInnerHTML={{ __html: sanitize(value) || \"Not set\" }} />\n              </Typography>\n            </div>\n            {editable && (\n              <div className=\"flex-none\">\n                <button\n                  className={twMerge(\"font-bold text-teal underline\", disabled ? \"pointer-events-none\" : \"\")}\n                  onClick={() => {\n                    if (disabled) return\n                    setEditing(true)\n                    onOpened(name)\n                  }}>\n                  {editButtonCopy}\n                </button>\n              </div>\n            )}\n          </div>\n        )}\n      </div>\n    )\n  }\n)\nEditableValue.displayName = \"EditableValue\"\n\nexport const ShortUrlInput = (props) => (\n  <div className=\"relative\">\n    <div className=\"absolute left-[15px] top-[7px]\">https://heal.me/</div>\n    <Input className=\"pl-[133.5px]\" {...props} />\n  </div>\n)\n\nexport const Select = ({ className, disabled, children, options, value, defaultOption, validationError, ...rest }) => {\n  if (options && children) throw \"NativeSelect can't have both options and children\"\n\n  return (\n    <div className={twMerge(\"relative\", className)}>\n      <select\n        className={twMerge(\n          BASE_INPUT_CLASSNAMES,\n          \"appearance-none bg-white pr-8\",\n          defaultOption && value === \"\" ? \"text-gray-dark\" : \"\",\n          disabled ? \"pointer-events-none\" : \"\",\n          validationError && VALIDATION_ERROR_INPUT_CLASSNAMES\n        )}\n        value={value}\n        disabled={disabled}\n        {...rest}>\n        {options ? (\n          <>\n            {defaultOption && (\n              <option disabled value={\"\"}>\n                {defaultOption}\n              </option>\n            )}\n            {options.map((option) => (\n              <option key={option.value} value={option.value} disabled={option.disabled}>\n                {option.label}\n              </option>\n            ))}\n          </>\n        ) : (\n          <>{children}</>\n        )}\n      </select>\n      <ChevronDownIcon\n        className=\"pointer-events-none absolute right-2.5 top-2.5 h-5 w-5 text-gray-dark\"\n        aria-hidden=\"true\"\n      />\n      {validationError && <ValidationError>{validationError}</ValidationError>}\n    </div>\n  )\n}\n\nexport const TextArea = forwardRef(\n  ({ className, validationError, rows = 3, maxLength, value, onChange, ...rest }, ref) => {\n    className = twMerge(className, validationError && VALIDATION_ERROR_INPUT_CLASSNAMES)\n\n    const textAreaRef = ref || useRef(null)\n\n    const autoResize = () => {\n      const textarea = textAreaRef.current\n      if (textarea) {\n        textarea.style.height = \"auto\"\n        textarea.style.height = `${textarea.scrollHeight}px`\n      }\n    }\n\n    const handleChange = (e) => {\n      if (!maxLength || e.target.value.length <= maxLength) {\n        onChange(e)\n        autoResize()\n      }\n    }\n\n    useEffect(() => {\n      autoResize()\n    }, [value])\n\n    return (\n      <>\n        <textarea\n          rows={rows}\n          ref={textAreaRef}\n          value={value}\n          onChange={handleChange}\n          {...rest}\n          style={{ overflow: \"hidden\", resize: \"none\" }}\n          className={twMerge(BASE_INPUT_CLASSNAMES, className)}\n        />\n        {maxLength > 0 && (\n          <div className=\"text-right text-sm\">\n            {value.length}/{maxLength}\n          </div>\n        )}\n        {validationError && <ValidationError>{validationError}</ValidationError>}\n      </>\n    )\n  }\n)\n\nTextArea.displayName = \"TextArea\"\n\nexport const SearchMagnifyingGlass = () => (\n  <MagnifyingGlassIcon className=\"absolute right-2.5 top-2 h-6 w-6 text-gray-dark opacity-[0.64]\" />\n)\n\nexport const SearchInput = ({ containerClassName, ...props }) => (\n  <div className={twMerge(\"relative w-[300px] sm:w-full\", containerClassName)}>\n    <Input {...props} />\n    <SearchMagnifyingGlass />\n  </div>\n)\n\nexport const Toggle = ({ checked, onChange, ...rest }) => (\n  <Switch\n    checked={checked}\n    onChange={onChange}\n    offColor=\"#C8D6DF\"\n    onColor=\"#0D9DA4\"\n    uncheckedIcon={false}\n    checkedIcon={false}\n    height={24}\n    width={45}\n    {...rest}\n  />\n)\n\nexport const TimePicker = ({\n  value,\n  onChange,\n  disabled,\n  showFifteenIncrements = false,\n  valueFormat = \"HH:mm\",\n  labelFormat = \"h:mm a\",\n  startAt = \"00:00\"\n}) => {\n  const availableTimes = []\n  const startTime = dayjs(`2024-01-01T${startAt}`)\n\n  for (let hour = 0; hour < 24; hour++) {\n    for (let minute = 0; minute < 60; minute += showFifteenIncrements ? 15 : 30) {\n      const currentTime = dayjs(`2024-01-01T${hour.toString().padStart(2, \"0\")}:${minute.toString().padStart(2, \"0\")}`)\n\n      if (currentTime.isBefore(startTime)) continue\n\n      availableTimes.push({\n        label: currentTime.format(labelFormat),\n        value: currentTime.format(valueFormat)\n      })\n    }\n  }\n\n  return (\n    <Select\n      options={availableTimes}\n      value={value}\n      onChange={onChange}\n      disabled={disabled}\n      defaultOption=\"Select a time\"\n    />\n  )\n}\n\nexport const CheckBox = ({ label, onChange, id, checked, className }) => {\n  const ref = useRef()\n  id ||= \"checkbox-\" + label.toLowerCase().replace(\" \", \"-\")\n\n  return (\n    <label\n      htmlFor={id}\n      className={twMerge(`inline-flex cursor-pointer gap-2 text-base ${checked ? \"font-bold\" : \"\"}`, className)}\n      onClick={() => (ref.current.checked = !ref.current.checked)}>\n      <input ref={ref} checked onChange={onChange} type=\"checkbox\" id={id} className=\"hidden\" />\n      {checked ? (\n        <CheckIcon className=\"inline-block h-6 w-6 flex-none rounded bg-gray-dark stroke-2 text-white\" />\n      ) : (\n        <div className=\"inline-block h-6 w-6 flex-none rounded border border-gray bg-white\" />\n      )}\n      {label}\n    </label>\n  )\n}\n","import PropTypes from \"prop-types\"\nimport React, { useCallback, useEffect } from \"react\"\nimport { createPortal } from \"react-dom\"\nimport { twMerge } from \"tailwind-merge\"\n\nimport { Button, CloseButton } from \"./Buttons\"\nimport Typography from \"./Typography\"\n\nexport const Box = ({ children, className, as = \"div\", keepBorderInMobile = false, ...rest }) => {\n  const Tag = as\n\n  return (\n    <Tag\n      {...rest}\n      className={twMerge(\n        \"rounded-xl border border-gray-light bg-white p-8 md:p-6\",\n        keepBorderInMobile ? \"\" : \"sm:border-none sm:p-0\",\n        className\n      )}>\n      {children}\n    </Tag>\n  )\n}\n\nexport const EmptyStateBox = ({ children, className, ...rest }) => (\n  <div\n    {...rest}\n    className={twMerge(\n      \"flex h-96 flex-col items-center justify-center rounded-xl bg-gray-ultralight p-6 text-center\",\n      className\n    )}>\n    <div className=\"max-w-[260px]\">{children}</div>\n  </div>\n)\n\nexport const ProfilePageEmptyStateBox = ({\n  children,\n  title,\n  className,\n  onButtonClick,\n  buttonCopy = \"Add now\",\n  ...rest\n}) => (\n  <EmptyStateBox {...rest} className={twMerge(\"h-[438px]\", className)}>\n    <Typography variant=\"h4\" as=\"h3\">\n      {title}\n    </Typography>\n    <Typography variant=\"subtitle\">{children}</Typography>\n    {onButtonClick && (\n      <Button className=\"mt-4\" onClick={onButtonClick}>\n        {buttonCopy}\n      </Button>\n    )}\n  </EmptyStateBox>\n)\n\nexport const Banner = ({ children, className, type, ...rest }) => (\n  <div\n    {...rest}\n    className={twMerge(\n      \"rounded-xl border border-gray-light bg-white p-4\",\n      type === \"error\"\n        ? \"border-red bg-red-light\"\n        : type === \"warning\"\n        ? \"border-orange bg-orange-light\"\n        : type === \"info\"\n        ? \"border-gray bg-gray-light\"\n        : type === \"success\"\n        ? \"border-green bg-green-light\"\n        : \"\",\n      className\n    )}>\n    {children}\n  </div>\n)\n\nBanner.propTypes = {\n  type: PropTypes.oneOf([\"error\", \"warning\", \"info\", \"success\"])\n}\n\nexport const Divider = ({ className }) => <div className={twMerge(\"my-6 h-[1px] w-full bg-gray-light\", className)} />\n\nexport const Flyout = ({ visible, closeFlyout, header, children, footer, footerSticky = true }) => {\n  const escFunction = useCallback((event) => {\n    if (event.key === \"Escape\") {\n      closeFlyout()\n    }\n  }, [])\n\n  useEffect(() => {\n    document.addEventListener(\"keydown\", escFunction, false)\n\n    return () => {\n      document.removeEventListener(\"keydown\", escFunction, false)\n    }\n  }, [])\n\n  const sharedClasses = twMerge(\n    `fixed w-[496px] bg-white duration-500 md:w-screen ${\n      visible ? \"right-0 md:right-0\" : \"right-[-496px] md:-right-100vw\"\n    }`\n  )\n\n  return (\n    <>\n      {createPortal(\n        <>\n          <div\n            onClick={closeFlyout}\n            className={`fixed inset-0 z-50 bg-black/50 transition-opacity duration-500 ${\n              visible ? \"visible\" : \"hidden\"\n            }`}\n          />\n          <div\n            className={`Flyout top-0 z-[51] h-screen overflow-x-hidden overflow-y-scroll ${sharedClasses}`}\n            style={{ overscrollBehaviorBlock: \"contain\" }}>\n            <div\n              className={`top-0 z-1 flex items-center justify-between border-b border-gray-light px-8 py-6 md:p-6 ${sharedClasses}`}>\n              <Typography variant=\"h4\" as=\"h2\">\n                {header}\n              </Typography>\n              <CloseButton onClick={closeFlyout} />\n            </div>\n            <div\n              className={twMerge(\n                \"p-8 pt-[110px] md:p-6 md:pt-[100px]\",\n                footerSticky ? \"pb-[112px] md:pb-[104px]\" : \"\"\n              )}>\n              {children}\n            </div>\n            {footer && (\n              <div className={`z-1 border-t border-gray-light p-6 ${footerSticky ? `${sharedClasses} bottom-0` : \"\"}`}>\n                {footer}\n              </div>\n            )}\n          </div>\n        </>,\n        document.body\n      )}\n    </>\n  )\n}\n","import PropTypes from \"prop-types\"\nimport React from \"react\"\nimport { twMerge } from \"tailwind-merge\"\n\nconst tags = {\n  h1: \"h1\",\n  h2: \"h2\",\n  h3: \"h3\",\n  h4: \"h4\",\n  h5: \"h5\",\n  hxl: \"h1\",\n  body: \"div\",\n  small: \"span\",\n  micro: \"span\",\n  subtitle: \"div\",\n  smSubtitle: \"div\",\n  title: \"div\",\n  capitalHeading: \"h2\"\n}\n\nconst classNames = {\n  h1: \"font-bold leading-tight text-[40px] sm:text-[32px]\",\n  h2: \"font-bold leading-tight text-[32px] sm:text-[24px]\",\n  h3: \"font-bold !leading-tight text-[24px] sm:text-[20px]\",\n  h4: \"font-bold leading-tight text-[20px] sm:text-[18px]\",\n  h5: \"font-bold leading-tight text-[18px] sm:text-[16px] sm:leading-normal\",\n  hxl: \"font-bold leading-tight text-[64px] sm:text-[32px]\",\n  body: \"text-base leading-normal\",\n  small: \"text-sm\",\n  micro: \"text-[13px] text-gray-dark\",\n  subtitle: \"text-gray-dark\",\n  smSubtitle: \"text-gray-dark text-sm\",\n  title: \"font-bold mb-1\",\n  capitalHeading: \"font-bold text-gray-dark text-sm uppercase tracking-wider\"\n}\n\nconst Typography = ({ variant = \"body\", children, className, as }) => {\n  const sizeClassNames = classNames[variant]\n  const Tag = as || tags[variant]\n\n  return <Tag className={twMerge(sizeClassNames, className)}>{children}</Tag>\n}\n\nTypography.propTypes = {\n  variant: PropTypes.oneOf(Object.keys(classNames)).isRequired\n}\n\nexport default Typography\n","import dayjs from \"dayjs\"\n\nconst advancedFormat = require(\"dayjs/plugin/advancedFormat\")\nconst relativeTime = require(\"dayjs/plugin/relativeTime\")\nconst timezone = require(\"dayjs/plugin/timezone\")\nconst utc = require(\"dayjs/plugin/utc\")\n\ndayjs.extend(utc)\ndayjs.extend(timezone)\ndayjs.extend(advancedFormat)\ndayjs.extend(relativeTime)\n","import dayjs from \"dayjs\"\nimport DOMPurify from \"dompurify\"\nimport Fuse from \"fuse.js\"\nimport camelCase from \"lodash/camelCase\"\nimport mapKeys from \"lodash/mapKeys\"\nimport Geocode from \"react-geocode\"\nimport { createClient } from \"urql\"\n\nexport const OPACITY_75 = \"BF\"\nexport const OPACITY_25 = \"40\"\nexport const OPACITY_50 = \"80\"\nexport const OPACITY_40 = \"66\"\n\nexport function timeAgo(timestamp) {\n  const time = new Date(timestamp).getTime()\n  const now = new Date().getTime()\n  const difference = Math.abs(now - time)\n\n  const seconds = Math.floor(difference / 1000)\n  const minutes = Math.floor(seconds / 60)\n  const hours = Math.floor(minutes / 60)\n  const days = Math.floor(hours / 24)\n  const weeks = Math.floor(days / 7)\n  const months = Math.floor(weeks / 4.345) // Average weeks in a month\n  const years = Math.floor(months / 12)\n\n  if (minutes < 60) {\n    return minutes + \" min ago\"\n  } else if (hours < 24) {\n    return hours + \" hour\" + (hours !== 1 ? \"s\" : \"\") + \" ago\"\n  } else if (days < 7) {\n    return days + \" day\" + (days !== 1 ? \"s\" : \"\") + \" ago\"\n  } else if (weeks < 4.345) {\n    return weeks + \" week\" + (weeks !== 1 ? \"s\" : \"\") + \" ago\"\n  } else if (months < 12) {\n    return months + \" month\" + (months !== 1 ? \"s\" : \"\") + \" ago\"\n  } else {\n    return years + \" year\" + (years !== 1 ? \"s\" : \"\") + \" ago\"\n  }\n}\n\nexport function distanceInMiles(lat1, lon1, lat2, lon2) {\n  const radiusOfEarthInMiles = 3958.8\n  // Convert degrees to radians\n  const rlat1 = lat1 * (Math.PI / 180)\n  const rlat2 = lat2 * (Math.PI / 180)\n  const difflat = rlat2 - rlat1 // Difference in latitude in radians\n  const difflon = (lon2 - lon1) * (Math.PI / 180) // Difference in longitude in radians\n\n  // Haversine formula\n  return (\n    2 *\n    radiusOfEarthInMiles *\n    Math.asin(\n      Math.sqrt(\n        Math.sin(difflat / 2) * Math.sin(difflat / 2) +\n          Math.cos(rlat1) * Math.cos(rlat2) * Math.sin(difflon / 2) * Math.sin(difflon / 2)\n      )\n    )\n  )\n}\n\nexport const updateLocationSearchText = (latLng) => {\n  Geocode.fromLatLng(latLng[0], latLng[1], process.env.GOOGLE_MAPS_API_KEY)\n    .then((response) => {\n      let results = response.results\n\n      let result = results[0]\n\n      let cityStateCountry = getCityFromGeoResult(result)\n\n      const event = new CustomEvent(\"newLocationChosen\", { detail: stripUSAFromString(cityStateCountry) })\n      document.dispatchEvent(event)\n    })\n    .catch((error) => {\n      console.error(error)\n    })\n}\n\nexport function getCityFromGeoResult(result) {\n  const { address_components } = result\n  let city = \"\"\n  let state = \"\"\n  let country = \"\"\n\n  const componentTypes = {\n    CITY: [\"locality\", \"postal_town\", \"administrative_area_level_2\"],\n    STATE: [\"administrative_area_level_1\"],\n    COUNTRY: [\"country\"]\n  }\n\n  address_components.forEach((component) => {\n    if (!city && componentTypes.CITY.some((type) => component.types.includes(type))) {\n      city = component.long_name\n    }\n    if (!state && componentTypes.STATE.some((type) => component.types.includes(type))) {\n      state = component.short_name || component.long_name\n    }\n    if (!country && componentTypes.COUNTRY.some((type) => component.types.includes(type))) {\n      country = component.short_name === \"US\" ? \"USA\" : component.long_name\n    }\n  })\n\n  return formatLocation(city, state, country)\n}\n\nfunction formatLocation(city, state, country) {\n  if (city && state && country) {\n    return `${city}, ${state}, ${country}`\n  } else if (state && country) {\n    return `${state}, ${country}`\n  } else if (country) {\n    return country\n  }\n  return \"\"\n}\n\nexport function splitString({ string, numberWords }) {\n  if (string.length > 0) {\n    const stringArray = string.split(\",\")\n    if (stringArray.length > 0) {\n      if (stringArray[1] === \"United States of America\") {\n        return stringArray[0]\n      } else if (stringArray.slice(0, numberWords).join().length > 18) {\n        return stringArray.slice(0, numberWords).join().substring(0, 18)\n      } else {\n        return stringArray.slice(0, numberWords).join()\n      }\n    }\n  }\n  return \"\"\n}\n\nexport function stripUSAFromString(string) {\n  return string.endsWith(\", USA\") ? string.replace(\", USA\", \"\") : string\n}\n\nexport function formatPhone(phone) {\n  const cleaned = (\"\" + phone).replace(/\\D/g, \"\")\n  const match = cleaned.match(/^(1|)?(\\d{3})(\\d{3})(\\d{4})$/)\n  if (match) {\n    const intlCode = match[1] ? \"+1 \" : \"\"\n    return [intlCode, \"(\", match[2], \") \", match[3], \"-\", match[4]].join(\"\")\n  }\n}\n\nexport function formatClientPhonePlusOne(phone) {\n  if (!phone) return null\n  let clientPhone = formatPhone(phone)\n  if (clientPhone) {\n    clientPhone = clientPhone.startsWith(\"+1\") || clientPhone.startsWith(\"1\") ? clientPhone : \"+1 \" + clientPhone\n  }\n  return clientPhone\n}\n\nexport function clientName(client) {\n  let clientName = client.firstName\n  if (client.lastName) {\n    clientName += ` ${client.lastName}`\n  }\n  if (clientName?.length === 0) {\n    clientName = client.email || client.phone\n  }\n  return clientName\n}\n\nexport function isClientValid(clientInput, clientPhone, practicePhone, practiceEmail) {\n  const { firstName, lastName, phone, email } = clientInput\n  return (\n    firstName?.trim() !== \"\" &&\n    lastName?.trim() !== \"\" &&\n    phone?.trim() !== \"\" &&\n    (clientPhone !== practicePhone || !practicePhone) &&\n    email?.trim() !== practiceEmail\n  )\n}\n\nexport function formatPrice(price) {\n  return (Math.abs(price) / 100).toLocaleString(\"en-US\", { style: \"currency\", currency: \"USD\" })\n}\n\nexport function unformatPrice(string) {\n  return parseFloat(string.replace(/[^0-9-.]/g, \"\")) * 100\n}\n\nexport function stringPriceToInteger(price) {\n  return Math.round(parseFloat(price.replace(/[^0-9-.]/g, \"\")) * 100)\n}\n\nexport function formatDate(date) {\n  return dayjs(date).format(\"MMMM Do YYYY [at] h:mm a\")\n}\n\nexport function formatShortDate(date) {\n  return dayjs(date).format(\"MM/DD/YYYY\")\n}\n\nexport function formatShortDateTime(date) {\n  return dayjs(date).format(\"MM/DD/YYYY [at] h:mm a\")\n}\n\nexport function capitalize(string) {\n  return string.charAt(0).toUpperCase() + string.slice(1)\n}\n\nexport function appointmentStatusString(appointment) {\n  if (appointment.newClient) {\n    return \"New client\"\n  } else if (appointment.state === \"approved\" && new Date(appointment.startsAt) < Date.now()) {\n    return \"Appointment completed\"\n  } else if (appointment.state === \"cancelled\") {\n    return \"Appointment cancelled\"\n  }\n}\n\nexport function findBestMatchService(hit, query, isVirtual) {\n  if (!hit.services) return null\n\n  const servicesWithVariations = [].concat.apply(\n    [],\n    hit.services.map((service) => {\n      if (service.variations) {\n        return service.variations.map((variation) => ({ ...service, ...variation }))\n      } else {\n        return [service]\n      }\n    })\n  )\n\n  const fuse = new Fuse(servicesWithVariations.map((service) => service.name))\n  const matches = fuse.search(query).map((match) => servicesWithVariations[match.refIndex])\n  const services = query ? matches : servicesWithVariations\n\n  const freeService = servicesWithVariations.find((service) => service.amount_cents === 0)\n\n  const cheapestMatchingServiceAmount = Math.min(\n    ...services.filter((service) => service.amount_cents > 0).map((service) => service.amount_cents)\n  )\n  const cheapestMatchingService = services.filter(\n    (service) =>\n      (isVirtual ? service.is_virtual === isVirtual : true) && service.amount_cents === cheapestMatchingServiceAmount\n  )[0]\n\n  const cheapestServiceAmount = Math.min(\n    ...servicesWithVariations.filter((service) => service.amount_cents > 0).map((service) => service.amount_cents)\n  )\n  const cheapestService = servicesWithVariations.filter((service) => service.amount_cents === cheapestServiceAmount)[0]\n\n  return cheapestMatchingService || cheapestService || freeService\n}\n\nexport const truncate = (text, maxLength) => {\n  if (text.length > maxLength) {\n    let truncatedText = text.substring(0, maxLength - 3).trim()\n    truncatedText = truncatedText.replace(/[.\\s]+$/, \"\")\n\n    return truncatedText + \"...\"\n  }\n  return text\n}\n\nexport function findPhotoUrl(practitioner, service) {\n  if (service.photoUrl.includes(\"defaults\") && service.parent && !service.parent.photoUrl.includes(\"defualts\")) {\n    service.photoUrl = service.parent.photoUrl\n    service.photos = service.parent.photos\n  }\n  let photoUrl = service.photos.large ? service.photos.large.jpeg : null\n  if (!photoUrl) {\n    photoUrl = service.photos.medium ? service.photos.medium.jpeg : null\n  }\n  if (!photoUrl) {\n    photoUrl = practitioner?.filestack_photo?.large ? practitioner?.filestack_photo?.large?.jpeg : null\n  }\n  if (!photoUrl) {\n    photoUrl = practitioner?.filestack_photo?.medium ? practitioner?.filestack_photo?.medium?.jpeg : null\n  }\n  return photoUrl\n}\n\nexport function findAvailability(practice) {\n  return practice.bookingAvailability?.availableSlots.filter((slot) => slot.datetimes.length > 0)\n}\n\nexport function selectStyling() {\n  const options = {\n    menuPortal: (provided) => ({ ...provided, zIndex: 99999 }),\n    menu: (provided) => ({ ...provided, zIndex: 99999 }),\n\n    option: (provided, state) => ({\n      ...provided,\n      borderBottom: \"transparent\",\n      padding: 16,\n      backgroundColor: state.isSelected || state.isFocused ? \"rgb(var(--color-ultra-light-gray))\" : \"#fff\",\n      color: \"rgb(var(--color-black))\"\n    }),\n    valueContainer: (provided) => ({ ...provided, padding: \"0.375rem 0.75rem\" }),\n    dropdownIndicator: (provided) => ({ ...provided, color: \"rgb(var(--color-dark-gray))\" }),\n    placeholder: (provided) => ({ ...provided, color: \"rgb(var(--color-dark-gray))\" }),\n    input: (provided) => ({\n      ...provided,\n      color: \"rgb(var(--color-dark-gray))\",\n      fontSize: \"16px\",\n      paddingTop: 0,\n      paddingBottom: 0,\n      margin: 0\n    }),\n    indicatorSeparator: () => ({ display: \"none\" }),\n    control: (provided, state) => ({\n      ...provided,\n      borderRadius: \"0.5rem\",\n      boxShadow: state.isSelected || state.isFocused ? \"0 0 0 1px rgb(var(--color-blue))\" : \"none\",\n      borderColor: \"rgb(var(--color-gray))\",\n      \"&:hover\": {\n        borderColor: \"rgb(var(--color-black))\"\n      },\n      \"&:focus\": {\n        boxShadow: \"0 0 0 3px rgb(var(--color-blue))\",\n        borderColor: \"rgb(var(--color-gray))\"\n      }\n    })\n  }\n\n  return options\n}\n\nexport function getDisplayAndFullTimeZone(location) {\n  let timeZoneDisplay = \"\"\n  let timeZone = \"\"\n  if (location?.kind === \"virtual\") {\n    timeZoneDisplay = new Date().toLocaleTimeString(\"en-us\", { timeZoneName: \"short\" }).split(\" \")[2]\n    timeZone = new Date().toLocaleTimeString(\"en-us\", { timeZoneName: \"long\" }).split(\" \").slice(2).join(\" \")\n  } else {\n    timeZoneDisplay = location?.timeZoneAbbr\n    timeZone = location?.formattedTimeZone\n  }\n\n  return [timeZoneDisplay, timeZone]\n}\n\nexport function getDisplayServiceRanges(service) {\n  let amountCentsRange = `${service.amountCents > 0 ? `$${service.amountCents / 100}` : \"Free\"}`\n  let timeLengthRange = `${service.timeLength}`\n  if (service.variations.length > 1) {\n    const lastService = service.variations[service.variations.length - 1]\n    if (lastService.amountCents !== service.amountCents) {\n      amountCentsRange += ` - ${lastService.amountCents > 0 ? `$${lastService.amountCents / 100}` : \"Free\"}`\n    }\n    if (lastService.timeLength !== service.timeLength) {\n      timeLengthRange += ` - ${lastService.timeLength}`\n    }\n  }\n  timeLengthRange += \" min\"\n  return [amountCentsRange, timeLengthRange]\n}\n\nexport function validEmail(email) {\n  return email.match(\n    /^(([^<>()[\\].,;:@\"]+(\\.[^<>()[\\].,;:@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n  )\n}\n\nexport const sanitize = (value) => (typeof window !== \"undefined\" ? DOMPurify.sanitize(value) : value) // not sure why, but DOMPurify.sanitize is undefined in SSR\n\nconst urqlHeaders =\n  typeof window !== \"undefined\"\n    ? { \"X-CSRF-Token\": document.querySelector('meta[name=\"csrf-token\"]')?.getAttribute(\"content\") }\n    : {}\n\nexport const urqlClient = createClient({\n  url: \"/graphql\",\n  fetchOptions: {\n    headers: urqlHeaders\n  }\n})\n\nexport const createUrqlClient = (options) =>\n  createClient({\n    url: \"/graphql\",\n    fetchOptions: {\n      headers: urqlHeaders\n    },\n    ...options\n  })\n\nexport const networkOnlyUrqlClient = createUrqlClient({ requestPolicy: \"network-only\" })\n\nexport const formatAvailableTimes = (availableTimes) => {\n  availableTimes = JSON.parse(availableTimes)\n  availableTimes = availableTimes.reduce((acc, day) => {\n    const dayName = day[0]\n    const startAndEndTimes = day[1]\n    acc[dayName] = mapKeys(startAndEndTimes, (value, key) => camelCase(key))\n    return acc\n  }, {})\n  return availableTimes\n}\n\nexport const ORDERED_DAYS = [\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"]\n\nexport const copyToClipboard = async (\n  text,\n  showToast,\n  successMessage = \"Link copied!\",\n  errorMessage = \"Failed to copy\"\n) => {\n  try {\n    await navigator.clipboard.writeText(text)\n    showToast && showToast(successMessage)\n  } catch (err) {\n    showToast && showToast({ type: \"error\", content: errorMessage })\n  }\n}\n\nexport const commIntervals = [\n  { value: 5, label: \"5 mins\" },\n  { value: 15, label: \"15 mins\" },\n  { value: 30, label: \"30 mins\" },\n  { value: 60, label: \"1 hrs\" },\n  { value: 120, label: \"2 hrs\" },\n  { value: 240, label: \"4 hrs\" },\n  { value: 480, label: \"8 hrs\" },\n  { value: 1440, label: \"24 hrs\" },\n  { value: 2880, label: \"2 days\" }\n]\n\nexport const joinWithAnd = (array) => {\n  if (array.length === 0) {\n    return null\n  } else if (array.length === 1) {\n    return array[0]\n  } else if (array.length === 2) {\n    return `${array[0]} and ${array[1]}`\n  } else {\n    return `${array.slice(0, -1).join(\", \")}, and ${array[array.length - 1]}`\n  }\n}\n\nfunction hexToRgb(hex) {\n  const bigint = parseInt(hex.slice(1), 16)\n  return {\n    r: (bigint >> 16) & 255,\n    g: (bigint >> 8) & 255,\n    b: bigint & 255\n  }\n}\n\nfunction rgbToHex({ r, g, b }) {\n  return \"#\" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1).toUpperCase()\n}\n\nexport function blendColors(topColor, topOpacity, bottomColor) {\n  const topRgb = hexToRgb(topColor)\n  const bottomRgb = hexToRgb(bottomColor)\n\n  const blendedRgb = {\n    r: Math.round(topRgb.r * topOpacity + bottomRgb.r * (1 - topOpacity)),\n    g: Math.round(topRgb.g * topOpacity + bottomRgb.g * (1 - topOpacity)),\n    b: Math.round(topRgb.b * topOpacity + bottomRgb.b * (1 - topOpacity))\n  }\n\n  return rgbToHex(blendedRgb)\n}\n\nexport function lightenHexColor(hex, percent) {\n  if (!hex) return hex\n\n  hex = hex.replace(/^#/, \"\")\n\n  let r = parseInt(hex.substring(0, 2), 16)\n  let g = parseInt(hex.substring(2, 4), 16)\n  let b = parseInt(hex.substring(4, 6), 16)\n\n  r = Math.min(255, Math.floor(r * (1 + percent / 100)))\n  g = Math.min(255, Math.floor(g * (1 + percent / 100)))\n  b = Math.min(255, Math.floor(b * (1 + percent / 100)))\n\n  r = r.toString(16).padStart(2, \"0\")\n  g = g.toString(16).padStart(2, \"0\")\n  b = b.toString(16).padStart(2, \"0\")\n\n  return `#${r}${g}${b}`\n}\n\nexport const isValidUrl = (string) => {\n  try {\n    new URL(string)\n    return true\n  } catch (_) {\n    return false\n  }\n}\n\nexport const stripHTMLTags = (htmlString) => {\n  const parser = new DOMParser()\n  const doc = parser.parseFromString(htmlString, \"text/html\")\n  const textWithSpaces = []\n\n  function traverse(node) {\n    node.childNodes.forEach((child) => {\n      if (child.nodeType === Node.TEXT_NODE) {\n        textWithSpaces.push(child.textContent.trim())\n      } else if (child.nodeType === Node.ELEMENT_NODE) {\n        traverse(child)\n        textWithSpaces.push(\" \") // Add a space after each element node\n      }\n    })\n  }\n\n  traverse(doc.body)\n\n  return textWithSpaces.join(\" \").replace(/\\s+/g, \" \").trim() // Clean up extra spaces\n}\n"],"names":["Button","type","size","className","disabled","floatingInMobile","onClick","children","React","twMerge","CloseButton","active","XMarkIcon","IconButton","Icon","tooltip","CopyLinkButton","value","strippedValue","replace","Input","DocumentDuplicateIcon","VALIDATION_ERROR_INPUT_CLASSNAMES","BASE_INPUT_CLASSNAMES","BASE_LABEL_CLASSNAMES","DROPDOWN_CLASSNAMES","DROPDOWN_OPTION_CLASSNAMES","selected","forwardRef","validationError","explanatorySubtext","rest","ref","inputProps","inputMode","undefined","placeholder","Object","assign","onChange","e","target","match","formatPhoneNumber","length","ValidationError","Typography","variant","displayName","ExclamationCircleIcon","Label","InputWithLabel","id","label","inputClassName","labelClassName","required","toLowerCase","htmlFor","CurrencyInput","adjustedValue","Number","toFixed","toString","MaskedInput","mask","createNumberMask","prefix","suffix","includeThousandsSeparator","thousandsSeparatorSymbol","allowDecimal","decimalSymbol","decimalLimit","allowNegative","allowLeadingZeroes","placeholderChar","event","ToggleButton","role","ToggleButtonGroup","options","map","option","index","key","EditableValue","name","onSave","onCancel","onOpened","onClosed","titleClassName","saveDisabled","editable","editButtonCopy","truncateLength","hint","editing","setEditing","useState","useImperativeHandle","slice","dangerouslySetInnerHTML","__html","sanitize","ShortUrlInput","props","Select","defaultOption","ChevronDownIcon","TextArea","rows","maxLength","textAreaRef","useRef","autoResize","textarea","current","style","height","scrollHeight","useEffect","overflow","resize","SearchMagnifyingGlass","MagnifyingGlassIcon","SearchInput","containerClassName","Toggle","checked","Switch","offColor","onColor","uncheckedIcon","checkedIcon","width","TimePicker","showFifteenIncrements","valueFormat","labelFormat","startAt","availableTimes","startTime","dayjs","hour","minute","currentTime","padStart","isBefore","push","format","CheckBox","CheckIcon","Box","as","keepBorderInMobile","Tag","EmptyStateBox","ProfilePageEmptyStateBox","title","onButtonClick","buttonCopy","Banner","Divider","Flyout","visible","closeFlyout","header","footer","footerSticky","escFunction","useCallback","document","addEventListener","removeEventListener","sharedClasses","createPortal","overscrollBehaviorBlock","body","tags","h1","h2","h3","h4","h5","hxl","small","micro","subtitle","smSubtitle","capitalHeading","classNames","sizeClassNames","advancedFormat","require","relativeTime","timezone","utc","OPACITY_75","OPACITY_25","OPACITY_40","distanceInMiles","lat1","lon1","lat2","lon2","rlat1","Math","PI","rlat2","difflat","difflon","asin","sqrt","sin","cos","updateLocationSearchText","latLng","Geocode","fromLatLng","process","then","response","cityStateCountry","result","address_components","city","state","country","componentTypes","CITY","STATE","COUNTRY","forEach","component","some","types","includes","long_name","short_name","formatLocation","getCityFromGeoResult","results","CustomEvent","detail","stripUSAFromString","dispatchEvent","catch","error","console","string","endsWith","formatPhone","phone","join","formatClientPhonePlusOne","clientPhone","startsWith","clientName","client","firstName","lastName","email","isClientValid","clientInput","practicePhone","practiceEmail","trim","formatPrice","price","abs","toLocaleString","currency","unformatPrice","parseFloat","stringPriceToInteger","round","formatDate","date","formatShortDate","formatShortDateTime","capitalize","charAt","toUpperCase","truncate","text","truncatedText","substring","selectStyling","menuPortal","provided","zIndex","menu","borderBottom","padding","backgroundColor","isSelected","isFocused","color","valueContainer","dropdownIndicator","input","fontSize","paddingTop","paddingBottom","margin","indicatorSeparator","display","control","borderRadius","boxShadow","borderColor","validEmail","window","DOMPurify","urqlHeaders","querySelector","getAttribute","urqlClient","createClient","url","fetchOptions","headers","createUrqlClient","networkOnlyUrqlClient","requestPolicy","formatAvailableTimes","JSON","parse","reduce","acc","day","dayName","startAndEndTimes","mapKeys","camelCase","ORDERED_DAYS","copyToClipboard","async","showToast","successMessage","errorMessage","navigator","clipboard","writeText","err","content","commIntervals","joinWithAnd","array","isValidUrl","URL","_","stripHTMLTags","htmlString","doc","DOMParser","parseFromString","textWithSpaces","traverse","node","childNodes","child","nodeType","Node","TEXT_NODE","textContent","ELEMENT_NODE"],"sourceRoot":""}