{"version":3,"file":"fc63LGcl.mjs","names":["$.from_html","$.mutable_source","$.prop","$.deep_read_state","$.get","$.first_child","$.child","$.sibling","$.only_child","$.set_text","$.untrack","$.index","$.set_class","sibling","push","init","child","reset","set","first_child","set_attribute","template_effect","set_class","untrack","set_text","legacy_pre_effect","prop","from_html","each","mutable_source","only_child","get","append","deep_read_state","if_block","index","legacy_pre_effect_reset","pop","WarningFilled","isNotBlank","randomid","FormInlineNotification","root","root_1","root_2","FieldStatusText","$$props","errors","notices","showError","showHelper","helperText","messages","invalid","id","m","fragment","div","classes","node","consequent","div_1","node_1","span","text","$0","$$anchor","$$render","node_2","consequent_1","div_2","text_1","node_3","message"],"sources":["../../../../../../../node_modules/@txstate-mws/carbon-svelte/dist/form/FieldStatusText.svelte"],"sourcesContent":["<script lang=\"ts\">\n  import type { Feedback } from '@txstate-mws/svelte-forms'\n  import WarningFilled from 'carbon-icons-svelte/lib/WarningFilled.svelte'\n  import { isNotBlank, randomid } from 'txstate-utils'\n  import FormInlineNotification from './FormInlineNotification.svelte'\n\n  /**\n   * Helper text shown below the field when it has no errors to display.\n   * @type {string | undefined}\n   */\n  export let helperText: string | undefined = undefined\n\n  /**\n   * Validation feedback for the field. Error/system messages render inline\n   * when `invalid` is true. Other types (warning, success, info) render as\n   * Carbon InlineNotification cards.\n   * @type {Feedback[]}\n   */\n  export let messages: Feedback[] = []\n\n  /**\n   * Whether the field is currently in an invalid state. Required for error\n   * messages to render.\n   * @type {boolean}\n   */\n  export let invalid = false\n\n  /**\n   * DOM id for the wrapper, suitable for use in the parent's `aria-describedby`.\n   * @type {string}\n   */\n  export let id: string = randomid()\n\n  $: errors = invalid ? messages.filter(m => m.type === 'error' || m.type === 'system') : []\n  $: notices = messages.filter(m => m.type !== 'error' && m.type !== 'system')\n  $: showError = errors.length > 0\n  $: showHelper = !showError && isNotBlank(helperText)\n</script>\n\n<div {id} class=\"field-status-text\" class:has-content={showError || showHelper}>\n  {#if showError}\n    <div class=\"field-status-text-error\">\n      <WarningFilled />\n      <span class=\"field-status-text-message\">{errors.map(e => e.message).join('\\n')}</span>\n    </div>\n  {/if}\n  {#if showHelper}\n    <div class=\"bx--form__helper-text\">{helperText}</div>\n  {/if}\n</div>\n{#each notices as message, i (i)}\n  <FormInlineNotification {message} />\n{/each}\n\n<style>\n  .field-status-text.has-content {\n    margin-block-start: 0.25rem;\n  }\n  .field-status-text-error {\n    display: flex;\n    align-items: flex-start;\n    gap: 0.25rem;\n    margin-block-start: 0.125rem;\n    font-size: 0.75rem;\n    line-height: var(--cds-caption-01-line-height, 1.33333);\n    font-weight: 400;\n    color: var(--cds-support-01, #da1e28);\n  }\n  .field-status-text-error :global(svg) {\n    flex-shrink: 0;\n    fill: currentColor;\n    transform: translateY(-0.15ch);\n  }\n  .field-status-text-message {\n    white-space: pre-line;\n    flex: 1;\n  }\n  :global(:has(.bx--form-requirement) + .field-status-text.has-content) {\n    margin-block-start: 0;\n  }\n</style>\n"],"ignoreList":[0],"mappings":"A,ylBAAA,SAAA6C,EAAA,EAAA,EAAA,C,oCAUaM,EAA8BjD,EAAA4C,EAAA,aAAA,EAAG,IAAA,EAAA,EAQjCM,EAAoBlD,EAAA4C,EAAA,WAAA,OAAG,CAAA,CAAC,EAOxBO,EAAOnD,EAAA4C,EAAA,UAAA,EAAG,EAAA,EAMVQ,EAAUpD,EAAA4C,EAAA,KAAA,GAAGN,CAAQ,E,2BAE7BtB,EAAA6B,EAASM,EAAO,EAAGD,EAAQ,CAAA,CAAC,OAAO,GAAKG,EAAE,OAAS,SAAWA,EAAE,OAAS,QAAQ,EAAI,CAAA,CAAC,C,qBACtFrC,EAAA8B,EAAUI,EAAQ,CAAA,CAAC,OAAO,GAAKG,EAAE,OAAS,SAAWA,EAAE,OAAS,QAAQ,CAAA,C,mBACxErC,EAAA+B,EAAY7C,EAAA2C,CAAM,CAAA,CAAC,OAAS,CAAA,C,4BAC5B7B,EAAAgC,EAAa,CAAC9C,EAAA6C,CAAS,GAAIV,EAAWY,E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