@mindbill/react 0.25.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  // src/index.tsx
4
4
  import "@mindbill/embed";
5
- import { createElement, useEffect as useEffect5, useRef as useRef5 } from "react";
5
+ import { createElement, useEffect as useEffect6, useRef as useRef5 } from "react";
6
6
 
7
7
  // src/appearance.ts
8
8
  var mindBillThemePresets = {
@@ -1044,6 +1044,7 @@ var NATIVE_THEME_OVERRIDE_STYLES = `
1044
1044
  `;
1045
1045
 
1046
1046
  // src/bill-read-only-form.tsx
1047
+ import { useEffect as useEffect2, useState as useState2 } from "react";
1047
1048
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1048
1049
  function money2(value) {
1049
1050
  return new Intl.NumberFormat(void 0, { style: "currency", currency: "USD" }).format(value);
@@ -1060,13 +1061,25 @@ function Value({ label, children, wide = false }) {
1060
1061
  ] });
1061
1062
  }
1062
1063
  function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment }) {
1064
+ const [payerOpen, setPayerOpen] = useState2(false);
1063
1065
  const { bill, patient, injury } = data;
1064
1066
  const provider = bill.billingSnapshot?.billingProvider;
1065
1067
  const clinician = bill.billingSnapshot?.renderingProvider;
1066
1068
  const location = bill.billingSnapshot?.placeOfService;
1067
1069
  const address = patient.address;
1068
1070
  const patientAddress = [address?.line1, address?.city, address?.state, address?.postalCode].filter(Boolean).join(", ");
1071
+ const billingAddress = provider ? [provider.billingStreet, provider.billingCity, provider.billingState, provider.billingZip].filter(Boolean).join(", ") : "";
1069
1072
  const locationAddress = location ? [location.street, location.city, location.state, location.zip].filter(Boolean).join(", ") : "";
1073
+ const payerName = data.delivery?.payerName || injury.claimsAdminName || "\u2014";
1074
+ const contacts = data.delivery?.contacts;
1075
+ useEffect2(() => {
1076
+ if (!payerOpen) return;
1077
+ const close = (event) => {
1078
+ if (event.key === "Escape") setPayerOpen(false);
1079
+ };
1080
+ window.addEventListener("keydown", close);
1081
+ return () => window.removeEventListener("keydown", close);
1082
+ }, [payerOpen]);
1070
1083
  return /* @__PURE__ */ jsxs2("section", { className: ["mb-readonly-bill", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill details", children: [
1071
1084
  /* @__PURE__ */ jsx2("style", { children: READ_ONLY_STYLES }),
1072
1085
  /* @__PURE__ */ jsxs2("header", { className: "mb-readonly-heading", children: [
@@ -1090,7 +1103,7 @@ function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment
1090
1103
  /* @__PURE__ */ jsxs2("dl", { className: "mb-read-grid", children: [
1091
1104
  /* @__PURE__ */ jsx2(Value, { label: "Claim number", children: injury.claimNumber }),
1092
1105
  /* @__PURE__ */ jsx2(Value, { label: "WCAB / ADJ number", children: injury.adjNumber }),
1093
- /* @__PURE__ */ jsx2(Value, { label: "Claims administrator", children: injury.claimsAdminName }),
1106
+ /* @__PURE__ */ jsx2(Value, { label: "Claims administrator", children: /* @__PURE__ */ jsx2("button", { type: "button", className: "mb-read-payer", onClick: () => setPayerOpen(true), children: payerName }) }),
1094
1107
  /* @__PURE__ */ jsx2(Value, { label: "Employer", children: injury.employer }),
1095
1108
  /* @__PURE__ */ jsx2(Value, { label: "Date of injury", children: date(injury.doi) }),
1096
1109
  /* @__PURE__ */ jsx2(Value, { label: "Date of service", children: bill.dosEnd ? `${date(bill.dos)} \u2013 ${date(bill.dosEnd)}` : date(bill.dos) }),
@@ -1103,10 +1116,13 @@ function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment
1103
1116
  /* @__PURE__ */ jsxs2("dl", { className: "mb-read-grid", children: [
1104
1117
  /* @__PURE__ */ jsx2(Value, { label: "Billing provider", children: provider?.name }),
1105
1118
  /* @__PURE__ */ jsx2(Value, { label: "Billing NPI", children: provider?.npi }),
1119
+ /* @__PURE__ */ jsx2(Value, { label: "Billing tax ID", children: provider?.taxId }),
1120
+ /* @__PURE__ */ jsx2(Value, { label: "Billing phone", children: provider?.phone }),
1121
+ /* @__PURE__ */ jsx2(Value, { label: "Billing address", wide: true, children: billingAddress }),
1106
1122
  /* @__PURE__ */ jsx2(Value, { label: "Rendering provider", children: clinician?.name }),
1107
1123
  /* @__PURE__ */ jsx2(Value, { label: "Rendering NPI", children: clinician?.npi }),
1108
- /* @__PURE__ */ jsx2(Value, { label: "Specialty", children: clinician?.specialty }),
1109
- /* @__PURE__ */ jsx2(Value, { label: "Place of service", children: location?.name }),
1124
+ /* @__PURE__ */ jsx2(Value, { label: "Rendering taxonomy", children: clinician?.taxonomy }),
1125
+ /* @__PURE__ */ jsx2(Value, { label: "Place of service code", children: location?.posCode }),
1110
1126
  /* @__PURE__ */ jsx2(Value, { label: "Service address", wide: true, children: locationAddress })
1111
1127
  ] })
1112
1128
  ] }),
@@ -1144,18 +1160,39 @@ function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment
1144
1160
  /* @__PURE__ */ jsx2("strong", { children: attachment.filename }),
1145
1161
  /* @__PURE__ */ jsx2("span", { children: attachment.description || attachment.documentType.replace(/_/g, " ") })
1146
1162
  ] }),
1147
- onOpenAttachment ? /* @__PURE__ */ jsx2("button", { type: "button", onClick: () => void onOpenAttachment(attachment), children: "View" }) : null
1163
+ onOpenAttachment ? /* @__PURE__ */ jsx2("button", { type: "button", onClick: () => void onOpenAttachment(attachment), children: "Preview" }) : null
1148
1164
  ] }, attachment.id)) }) : /* @__PURE__ */ jsx2("p", { className: "mb-read-empty", children: "No attachments." })
1149
- ] })
1165
+ ] }),
1166
+ payerOpen ? /* @__PURE__ */ jsx2("div", { className: "mb-read-dialog-backdrop", role: "presentation", onMouseDown: (event) => {
1167
+ if (event.target === event.currentTarget) setPayerOpen(false);
1168
+ }, children: /* @__PURE__ */ jsxs2("section", { className: "mb-read-dialog", role: "dialog", "aria-modal": "true", "aria-labelledby": "mb-read-payer-title", children: [
1169
+ /* @__PURE__ */ jsxs2("header", { children: [
1170
+ /* @__PURE__ */ jsxs2("div", { children: [
1171
+ /* @__PURE__ */ jsx2("span", { children: "Claims administrator" }),
1172
+ /* @__PURE__ */ jsx2("h3", { id: "mb-read-payer-title", children: payerName })
1173
+ ] }),
1174
+ /* @__PURE__ */ jsx2("button", { type: "button", "aria-label": "Close claims administrator details", onClick: () => setPayerOpen(false), children: "\xD7" })
1175
+ ] }),
1176
+ /* @__PURE__ */ jsxs2("dl", { className: "mb-read-contact-grid", children: [
1177
+ /* @__PURE__ */ jsx2(Value, { label: "Adjuster", children: contacts?.adjusterName }),
1178
+ /* @__PURE__ */ jsx2(Value, { label: "Adjuster phone", children: contacts?.adjusterPhone }),
1179
+ /* @__PURE__ */ jsx2(Value, { label: "Adjuster email", children: contacts?.adjusterEmail }),
1180
+ /* @__PURE__ */ jsx2(Value, { label: "Claims email", children: contacts?.claimsEmail }),
1181
+ /* @__PURE__ */ jsx2(Value, { label: "Fax", children: contacts?.faxNumber }),
1182
+ /* @__PURE__ */ jsx2(Value, { label: "Portal", children: contacts?.portalUrl ? /* @__PURE__ */ jsx2("a", { href: contacts.portalUrl, target: "_blank", rel: "noopener noreferrer", children: "Open payer portal" }) : "\u2014" }),
1183
+ /* @__PURE__ */ jsx2(Value, { label: "Mailing address", wide: true, children: contacts?.mailingAddress })
1184
+ ] }),
1185
+ !contacts || !Object.values(contacts).some(Boolean) ? /* @__PURE__ */ jsx2("p", { className: "mb-read-empty", children: "No contact details are available for this directory entry." }) : null
1186
+ ] }) }) : null
1150
1187
  ] });
1151
1188
  }
1152
1189
  var READ_ONLY_STYLES = `
1153
- .mb-readonly-bill{--mb-accent:#176c70;--mb-border:#d7e0df;--mb-surface:#fff;--mb-muted:#607176;color:var(--mb-text,#17282d);font:inherit;display:grid;gap:16px}.mb-readonly-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.mb-readonly-heading h2,.mb-read-card h3{margin:0}.mb-readonly-heading p{margin:4px 0 0;color:var(--mb-muted)}.mb-readonly-heading>strong{font-size:1.35rem}.mb-read-card{background:var(--mb-surface);border:1px solid var(--mb-border);border-radius:var(--mb-radius,14px);padding:20px;box-shadow:0 1px 2px rgba(15,40,45,.04)}.mb-read-card h3{font-size:1.05rem;margin-bottom:16px}.mb-read-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 28px;margin:0}.mb-read-value{min-width:0}.mb-read-value.is-wide{grid-column:1/-1}.mb-read-value dt{color:var(--mb-muted);font-size:.75rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase}.mb-read-value dd{font-weight:600;margin:5px 0 0;overflow-wrap:anywhere}.mb-read-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:16px}.mb-read-chips span{border:1px solid var(--mb-border);border-radius:999px;padding:3px 9px;font-size:.82rem;background:#f7f9f8}.mb-read-lines{border:1px solid var(--mb-border);border-radius:10px;overflow:hidden}.mb-read-line-header,.mb-read-line{display:grid;grid-template-columns:1.2fr 1.5fr .45fr .7fr;gap:16px;align-items:center;padding:12px 14px}.mb-read-line-header{background:#f6f8f7;color:var(--mb-muted);font-size:.75rem;font-weight:700;text-transform:uppercase}.mb-read-line{border-top:1px solid var(--mb-border)}.mb-read-line .mb-read-chips{margin:0}.mb-read-line>span:last-child,.mb-read-line>strong:last-child{text-align:right}.mb-read-total{display:flex;justify-content:flex-end;gap:24px;border-top:1px solid var(--mb-border);padding:13px 14px}.mb-read-documents{list-style:none;padding:0;margin:0;display:grid}.mb-read-documents li{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0;border-top:1px solid var(--mb-border)}.mb-read-documents li:first-child{border-top:0;padding-top:0}.mb-read-documents li:last-child{padding-bottom:0}.mb-read-documents div{display:grid;gap:3px;min-width:0}.mb-read-documents strong{overflow-wrap:anywhere}.mb-read-documents span,.mb-read-empty{color:var(--mb-muted)}.mb-read-documents button{border:1px solid var(--mb-border);border-radius:8px;background:transparent;color:inherit;padding:8px 13px;font:inherit;font-weight:650;cursor:pointer}.mb-read-documents button:hover{border-color:var(--mb-accent);color:var(--mb-accent)}
1154
- @media(max-width:700px){.mb-readonly-heading{align-items:flex-start}.mb-read-grid{grid-template-columns:1fr}.mb-read-value.is-wide{grid-column:auto}.mb-read-card{padding:16px}.mb-read-line-header{display:none}.mb-read-line{grid-template-columns:1fr auto;gap:8px}.mb-read-line>*:nth-child(2){grid-column:1/-1}.mb-read-total{justify-content:space-between}.mb-readonly-heading>strong{font-size:1.05rem}}
1190
+ .mb-readonly-bill{--mb-accent:#176c70;--mb-border:#d7e0df;--mb-surface:#fff;--mb-muted:#607176;color:var(--mb-text,#17282d);font:inherit;display:grid;gap:16px}.mb-readonly-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.mb-readonly-heading h2,.mb-read-card h3{margin:0}.mb-readonly-heading p{margin:4px 0 0;color:var(--mb-muted)}.mb-readonly-heading>strong{font-size:1.35rem}.mb-read-card{background:var(--mb-surface);border:1px solid var(--mb-border);border-radius:var(--mb-radius,14px);padding:20px;box-shadow:0 1px 2px rgba(15,40,45,.04)}.mb-read-card h3{font-size:1.05rem;margin-bottom:16px}.mb-read-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 28px;margin:0}.mb-read-value{min-width:0}.mb-read-value.is-wide{grid-column:1/-1}.mb-read-value dt{color:var(--mb-muted);font-size:.75rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase}.mb-read-value dd{font-weight:600;margin:5px 0 0;overflow-wrap:anywhere}.mb-read-payer{border:0;border-bottom:1px dotted currentColor;background:transparent;color:inherit;padding:0;font:inherit;font-weight:inherit;text-align:left;cursor:pointer}.mb-read-payer:hover{color:var(--mb-accent)}.mb-read-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:16px}.mb-read-chips span{border:1px solid var(--mb-border);border-radius:999px;padding:3px 9px;font-size:.82rem;background:#f7f9f8}.mb-read-lines{border:1px solid var(--mb-border);border-radius:10px;overflow:hidden}.mb-read-line-header,.mb-read-line{display:grid;grid-template-columns:1.2fr 1.5fr .45fr .7fr;gap:16px;align-items:center;padding:12px 14px}.mb-read-line-header{background:#f6f8f7;color:var(--mb-muted);font-size:.75rem;font-weight:700;text-transform:uppercase}.mb-read-line{border-top:1px solid var(--mb-border)}.mb-read-line .mb-read-chips{margin:0}.mb-read-line>span:last-child,.mb-read-line>strong:last-child{text-align:right}.mb-read-total{display:flex;justify-content:flex-end;gap:24px;border-top:1px solid var(--mb-border);padding:13px 14px}.mb-read-documents{list-style:none;padding:0;margin:0;display:grid}.mb-read-documents li{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0;border-top:1px solid var(--mb-border)}.mb-read-documents li:first-child{border-top:0;padding-top:0}.mb-read-documents li:last-child{padding-bottom:0}.mb-read-documents div{display:grid;gap:3px;min-width:0}.mb-read-documents strong{overflow-wrap:anywhere}.mb-read-documents span,.mb-read-empty{color:var(--mb-muted)}.mb-read-documents button{border:1px solid var(--mb-border);border-radius:8px;background:transparent;color:inherit;padding:8px 13px;font:inherit;font-weight:650;cursor:pointer}.mb-read-documents button:hover{border-color:var(--mb-accent);color:var(--mb-accent)}.mb-read-dialog-backdrop{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:rgba(11,28,32,.46);padding:20px}.mb-read-dialog{width:min(620px,100%);max-height:min(760px,calc(100vh - 40px));overflow:auto;border:1px solid var(--mb-border);border-radius:var(--mb-radius,14px);background:var(--mb-surface);padding:22px;box-shadow:0 22px 70px rgba(8,25,29,.24)}.mb-read-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}.mb-read-dialog header span{color:var(--mb-muted);font-size:.75rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase}.mb-read-dialog h3{margin:4px 0 0}.mb-read-dialog header button{border:0;background:transparent;color:inherit;font:inherit;font-size:1.7rem;line-height:1;cursor:pointer}.mb-read-contact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 28px;margin:0}.mb-read-contact-grid a{color:var(--mb-accent)}
1191
+ @media(max-width:700px){.mb-readonly-heading{align-items:flex-start}.mb-read-grid,.mb-read-contact-grid{grid-template-columns:1fr}.mb-read-value.is-wide{grid-column:auto}.mb-read-card{padding:16px}.mb-read-line-header{display:none}.mb-read-line{grid-template-columns:1fr auto;gap:8px}.mb-read-line>*:nth-child(2){grid-column:1/-1}.mb-read-total{justify-content:space-between}.mb-readonly-heading>strong{font-size:1.05rem}.mb-read-dialog-backdrop{place-items:end center;padding:0}.mb-read-dialog{width:100%;max-height:82vh;border-radius:18px 18px 0 0;padding:20px 18px calc(20px + env(safe-area-inset-bottom))}}
1155
1192
  `;
1156
1193
 
1157
1194
  // src/bill-submission-form.tsx
1158
- import { createContext, useCallback, useContext, useEffect as useEffect2, useMemo as useMemo2, useRef as useRef2, useState as useState2 } from "react";
1195
+ import { createContext, useCallback, useContext, useEffect as useEffect3, useMemo as useMemo2, useRef as useRef2, useState as useState3 } from "react";
1159
1196
  import {
1160
1197
  createBillReferenceClient,
1161
1198
  createBillSubmissionClient
@@ -1232,6 +1269,46 @@ var DEFAULT_BILL_SUBMISSION_MODIFIERS = [
1232
1269
  { code: "XP", description: "Separate practitioner" },
1233
1270
  { code: "XU", description: "Unusual non-overlapping service" }
1234
1271
  ];
1272
+ var DEFAULT_BILL_SUBMISSION_TAXONOMIES = [
1273
+ { code: "103G00000X", description: "Clinical Neuropsychologist" },
1274
+ { code: "103T00000X", description: "Psychologist" },
1275
+ { code: "111N00000X", description: "Chiropractor" },
1276
+ { code: "122300000X", description: "Dentist" },
1277
+ { code: "133V00000X", description: "Dietitian, Registered" },
1278
+ { code: "163W00000X", description: "Registered Nurse" },
1279
+ { code: "183500000X", description: "Pharmacist" },
1280
+ { code: "207L00000X", description: "Anesthesiology" },
1281
+ { code: "207P00000X", description: "Emergency Medicine" },
1282
+ { code: "207Q00000X", description: "Family Medicine" },
1283
+ { code: "207R00000X", description: "Internal Medicine" },
1284
+ { code: "207RC0000X", description: "Cardiovascular Disease" },
1285
+ { code: "207RN0300X", description: "Nephrology" },
1286
+ { code: "207RP1001X", description: "Pulmonary Disease" },
1287
+ { code: "207RR0500X", description: "Rheumatology" },
1288
+ { code: "207T00000X", description: "Neurological Surgery" },
1289
+ { code: "207X00000X", description: "Orthopaedic Surgery" },
1290
+ { code: "207XS0117X", description: "Orthopaedic Surgery of the Spine" },
1291
+ { code: "207Y00000X", description: "Otolaryngology" },
1292
+ { code: "208000000X", description: "Pediatrics" },
1293
+ { code: "208100000X", description: "Physical Medicine & Rehabilitation" },
1294
+ { code: "2083X0100X", description: "Occupational Medicine" },
1295
+ { code: "2084N0400X", description: "Neurology" },
1296
+ { code: "2084P0800X", description: "Psychiatry" },
1297
+ { code: "2084P0802X", description: "Addiction Psychiatry" },
1298
+ { code: "2084P0804X", description: "Child & Adolescent Psychiatry" },
1299
+ { code: "2084S0012X", description: "Sleep Medicine" },
1300
+ { code: "2085R0202X", description: "Diagnostic Radiology" },
1301
+ { code: "208600000X", description: "Surgery" },
1302
+ { code: "2086S0105X", description: "Surgery of the Hand" },
1303
+ { code: "208D00000X", description: "General Practice" },
1304
+ { code: "208M00000X", description: "Hospitalist" },
1305
+ { code: "208VP0000X", description: "Pain Medicine" },
1306
+ { code: "213E00000X", description: "Podiatrist" },
1307
+ { code: "225100000X", description: "Physical Therapist" },
1308
+ { code: "225X00000X", description: "Occupational Therapist" },
1309
+ { code: "363A00000X", description: "Physician Assistant" },
1310
+ { code: "363L00000X", description: "Nurse Practitioner" }
1311
+ ];
1235
1312
  var BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS = [
1236
1313
  { label: "Psych", code: "Z04.6", description: "General psychiatric examination requested by authority" },
1237
1314
  { label: "Back", code: "M54.50", description: "Low back pain, unspecified" },
@@ -1627,9 +1704,9 @@ function Field2({ label, required, error, path, span, children }) {
1627
1704
  ] });
1628
1705
  }
1629
1706
  function TextDateInput({ value, onChange, disabled, required, ariaLabel }) {
1630
- const [display, setDisplay] = useState2(() => formatBillSubmissionDate(value));
1631
- const [invalid, setInvalid] = useState2(false);
1632
- useEffect2(() => {
1707
+ const [display, setDisplay] = useState3(() => formatBillSubmissionDate(value));
1708
+ const [invalid, setInvalid] = useState3(false);
1709
+ useEffect3(() => {
1633
1710
  setDisplay(formatBillSubmissionDate(value));
1634
1711
  setInvalid(false);
1635
1712
  }, [value]);
@@ -1646,8 +1723,8 @@ function TextDateInput({ value, onChange, disabled, required, ariaLabel }) {
1646
1723
  ] });
1647
1724
  }
1648
1725
  function ComboBox({ value, placeholder, options, disabled, loading, loadingMore, invalid, preserveValueOnOpen = false, onOpen, onQuery, onEndReached, onSelect, createOption, ariaLabel }) {
1649
- const [open, setOpen] = useState2(false);
1650
- const [query, setQuery] = useState2("");
1726
+ const [open, setOpen] = useState3(false);
1727
+ const [query, setQuery] = useState3("");
1651
1728
  const visible = useMemo2(() => {
1652
1729
  const q = query.trim().toLowerCase();
1653
1730
  const matches = q ? options.filter((option) => `${option.id} ${option.label} ${option.detail ?? ""}`.toLowerCase().includes(q)) : options;
@@ -1767,6 +1844,7 @@ function BillSubmissionForm({
1767
1844
  onLookupPostalCode,
1768
1845
  procedureOptions,
1769
1846
  modifierOptions,
1847
+ taxonomyOptions,
1770
1848
  attachmentReportTypeMode = "auto",
1771
1849
  attachmentReportTypes = BILL_SUBMISSION_REPORT_TYPES,
1772
1850
  defaultAttachmentReportType,
@@ -1779,24 +1857,24 @@ function BillSubmissionForm({
1779
1857
  description = "Review the bill details, add attachments, and submit.",
1780
1858
  children
1781
1859
  }) {
1782
- const [bill, setBill] = useState2(() => cloneInitialBill(initialBill));
1783
- const [selectedIds, setSelectedIds] = useState2(() => attachments.map((item) => item.id));
1784
- const [removedSourceIds, setRemovedSourceIds] = useState2([]);
1785
- const [uploads, setUploads] = useState2([]);
1786
- const [errors, setErrors] = useState2({});
1787
- const [sourceAttachmentReportTypes, setSourceAttachmentReportTypes] = useState2(() => Object.fromEntries(attachments.flatMap((item) => item.reportTypeCode ? [[item.id, item.reportTypeCode]] : [])));
1788
- const [validationActive, setValidationActive] = useState2(false);
1789
- const [formError, setFormError] = useState2(null);
1790
- const [submitting, setSubmitting] = useState2(false);
1791
- const [payerResults, setPayerResults] = useState2([]);
1792
- const [payerLoading, setPayerLoading] = useState2(false);
1793
- const [diagnosisResults, setDiagnosisResults] = useState2([]);
1794
- const [diagnosisLoading, setDiagnosisLoading] = useState2(false);
1795
- const [diagnosisLoadingMore, setDiagnosisLoadingMore] = useState2(false);
1796
- const [diagnosisQuery, setDiagnosisQuery] = useState2(null);
1797
- const [diagnosisHasMore, setDiagnosisHasMore] = useState2(true);
1798
- const [postalStatus, setPostalStatus] = useState2(null);
1799
- const [dragActive, setDragActive] = useState2(false);
1860
+ const [bill, setBill] = useState3(() => cloneInitialBill(initialBill));
1861
+ const [selectedIds, setSelectedIds] = useState3(() => attachments.map((item) => item.id));
1862
+ const [removedSourceIds, setRemovedSourceIds] = useState3([]);
1863
+ const [uploads, setUploads] = useState3([]);
1864
+ const [errors, setErrors] = useState3({});
1865
+ const [sourceAttachmentReportTypes, setSourceAttachmentReportTypes] = useState3(() => Object.fromEntries(attachments.flatMap((item) => item.reportTypeCode ? [[item.id, item.reportTypeCode]] : [])));
1866
+ const [validationActive, setValidationActive] = useState3(false);
1867
+ const [formError, setFormError] = useState3(null);
1868
+ const [submitting, setSubmitting] = useState3(false);
1869
+ const [payerResults, setPayerResults] = useState3([]);
1870
+ const [payerLoading, setPayerLoading] = useState3(false);
1871
+ const [diagnosisResults, setDiagnosisResults] = useState3([]);
1872
+ const [diagnosisLoading, setDiagnosisLoading] = useState3(false);
1873
+ const [diagnosisLoadingMore, setDiagnosisLoadingMore] = useState3(false);
1874
+ const [diagnosisQuery, setDiagnosisQuery] = useState3(null);
1875
+ const [diagnosisHasMore, setDiagnosisHasMore] = useState3(true);
1876
+ const [postalStatus, setPostalStatus] = useState3(null);
1877
+ const [dragActive, setDragActive] = useState3(false);
1800
1878
  const formRef = useRef2(null);
1801
1879
  const fileInput = useRef2(null);
1802
1880
  const diagnosisRequest = useRef2(0);
@@ -1804,7 +1882,8 @@ function BillSubmissionForm({
1804
1882
  const payerRequest = useRef2(0);
1805
1883
  const procedures = useMemo2(() => mergeOptions(DEFAULT_BILL_SUBMISSION_PROCEDURES, procedureOptions), [procedureOptions]);
1806
1884
  const modifiers = useMemo2(() => mergeOptions(DEFAULT_BILL_SUBMISSION_MODIFIERS, modifierOptions), [modifierOptions]);
1807
- const [evaluationType, setEvaluationType] = useState2(() => initialEvaluationType(initialBill));
1885
+ const taxonomies = useMemo2(() => mergeOptions(DEFAULT_BILL_SUBMISSION_TAXONOMIES, taxonomyOptions), [taxonomyOptions]);
1886
+ const [evaluationType, setEvaluationType] = useState3(() => initialEvaluationType(initialBill));
1808
1887
  const connected = !onSubmit;
1809
1888
  const referenceClient = useMemo2(() => getSession || sessionEndpoint || connected ? createBillReferenceClient({ getSession, sessionEndpoint, apiBaseUrl, fetch: fetchOverride }) : null, [getSession, sessionEndpoint, apiBaseUrl, fetchOverride, connected]);
1810
1889
  const submissionClient = useMemo2(() => connected ? createBillSubmissionClient({ getSession, sessionEndpoint, apiBaseUrl, fetch: fetchOverride }) : null, [getSession, sessionEndpoint, apiBaseUrl, fetchOverride, connected]);
@@ -1813,7 +1892,7 @@ function BillSubmissionForm({
1813
1892
  const forcedAttachmentReportType = showAttachmentReportTypes ? void 0 : defaultAttachmentReportType ?? MED_LEGAL_REPORT_TYPE_CODE;
1814
1893
  const reportTypeOptions = useMemo2(() => attachmentReportTypes.map((item) => ({ id: item.code, label: item.code.replace(/^OZ:/, ""), detail: item.label })), [attachmentReportTypes]);
1815
1894
  const missingAttachmentReportType = showAttachmentReportTypes && (selectedIds.some((id) => !(sourceAttachmentReportTypes[id] || attachments.find((item) => item.id === id)?.reportTypeCode || defaultAttachmentReportType)) || uploads.some((upload) => !(upload.reportTypeCode || defaultAttachmentReportType)));
1816
- useEffect2(() => {
1895
+ useEffect3(() => {
1817
1896
  setBill(cloneInitialBill(initialBill));
1818
1897
  setEvaluationType(initialEvaluationType(initialBill));
1819
1898
  setSelectedIds(attachments.map((item) => item.id));
@@ -1829,7 +1908,7 @@ function BillSubmissionForm({
1829
1908
  diagnosisRequest.current += 1;
1830
1909
  diagnosisAppendPending.current = false;
1831
1910
  }, [initialBill, attachments]);
1832
- useEffect2(() => {
1911
+ useEffect3(() => {
1833
1912
  if (!validationActive) return;
1834
1913
  const next = validateBillSubmission(bill).fieldErrors;
1835
1914
  setErrors(missingAttachmentReportType ? { ...next, attachments: "Select a report type for every attachment." } : next);
@@ -1847,7 +1926,7 @@ function BillSubmissionForm({
1847
1926
  if (selectedIds.length + uploads.length + files.length > MAX_DOCUMENTS) return setFormError(`A bill can include at most ${MAX_DOCUMENTS} attachments.`);
1848
1927
  setUploads((current) => [...current, ...files.map((file) => ({ file, documentType: "other", ...defaultAttachmentReportType ? { reportTypeCode: defaultAttachmentReportType } : {} }))]);
1849
1928
  }, [defaultAttachmentReportType, selectedIds.length, uploads]);
1850
- useEffect2(() => {
1929
+ useEffect3(() => {
1851
1930
  const over = (event) => {
1852
1931
  if (event.dataTransfer?.types.includes("Files")) {
1853
1932
  event.preventDefault();
@@ -1917,7 +1996,7 @@ function BillSubmissionForm({
1917
1996
  });
1918
1997
  void runPayerSearch(query, true);
1919
1998
  };
1920
- useEffect2(() => {
1999
+ useEffect3(() => {
1921
2000
  const payer = bill.claim.claimsAdministrator;
1922
2001
  if (!payer?.name || payer.name.trim().length < 2) return;
1923
2002
  void runPayerSearch(payer.name, !payer.id);
@@ -2132,15 +2211,14 @@ function BillSubmissionForm({
2132
2211
  /* @__PURE__ */ jsx3("h4", { className: "mbsf-subhead", children: "Rendering provider" }),
2133
2212
  /* @__PURE__ */ jsx3(Field2, { path: "renderingProvider.name", label: "Rendering provider name", required: true, error: errors["renderingProvider.name"], children: text(bill.renderingProvider?.name, (name) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, name } }))) }),
2134
2213
  /* @__PURE__ */ jsx3(Field2, { path: "renderingProvider.npi", label: "Rendering provider NPI", required: true, error: errors["renderingProvider.npi"], children: text(bill.renderingProvider?.npi, (npi) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, npi } })), { inputMode: "numeric", maxLength: 10 }) }),
2135
- /* @__PURE__ */ jsxs3(Field2, { path: "renderingProvider.taxonomy", label: "Rendering taxonomy code", required: true, error: errors["renderingProvider.taxonomy"], children: [
2136
- text(bill.renderingProvider?.taxonomy, (taxonomy) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, taxonomy: taxonomy.toUpperCase() } })), { maxLength: 10, placeholder: "10-character NUCC code" }),
2137
- /* @__PURE__ */ jsx3("small", { className: "mbsf-help", children: "Sent in CMS-1500 Box 24J with qualifier ZZ." })
2214
+ /* @__PURE__ */ jsxs3(Field2, { path: "renderingProvider.taxonomy", label: "Rendering taxonomy", required: true, error: errors["renderingProvider.taxonomy"], children: [
2215
+ /* @__PURE__ */ jsx3(ComboBox, { ariaLabel: "Rendering taxonomy", invalid: Boolean(errors["renderingProvider.taxonomy"]), disabled: locked, preserveValueOnOpen: true, value: bill.renderingProvider?.taxonomy ?? "", placeholder: "Search specialty name or taxonomy code\u2026", options: taxonomies.map((item) => ({ id: item.code, label: item.description, detail: item.code })), createOption: (query) => {
2216
+ const code = query.trim().toUpperCase();
2217
+ return /^[A-Z0-9]{10}$/.test(code) ? { id: code, label: code, detail: "Use this taxonomy code" } : null;
2218
+ }, onSelect: (option) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, taxonomy: option.id } })) }),
2219
+ /* @__PURE__ */ jsx3("small", { className: "mbsf-help", children: "Search by specialty name or 10-character taxonomy code." })
2138
2220
  ] }),
2139
- /* @__PURE__ */ jsx3(Field2, { label: "Specialty (optional)", children: text(bill.renderingProvider?.specialty, (specialty) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, specialty } }))) }),
2140
- /* @__PURE__ */ jsx3(Field2, { label: "License number (optional)", children: text(bill.renderingProvider?.licenseNumber, (licenseNumber) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, licenseNumber } }))) }),
2141
- /* @__PURE__ */ jsx3(Field2, { label: "License state (optional)", children: text(bill.renderingProvider?.licenseState, (licenseState) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, licenseState: licenseState.toUpperCase() } })), { maxLength: 2 }) }),
2142
- /* @__PURE__ */ jsx3("h4", { className: "mbsf-subhead", children: "Service facility (CMS-1500 Box 32)" }),
2143
- /* @__PURE__ */ jsx3(Field2, { label: "Service facility name (optional)", children: text(bill.serviceLocation?.name, (name) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, name } }))) }),
2221
+ /* @__PURE__ */ jsx3("h4", { className: "mbsf-subhead", children: "Service facility" }),
2144
2222
  /* @__PURE__ */ jsx3(Field2, { path: "serviceLocation.placeOfServiceCode", label: "Place of service code", required: true, error: errors["serviceLocation.placeOfServiceCode"], children: text(bill.serviceLocation?.placeOfServiceCode, (placeOfServiceCode) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, placeOfServiceCode } })), { inputMode: "numeric", maxLength: 2, placeholder: "11" }) }),
2145
2223
  /* @__PURE__ */ jsx3(Field2, { path: "serviceLocation.address.line1", label: "Service address line 1", required: true, span: true, error: errors["serviceLocation.address.line1"], children: text(bill.serviceLocation?.address?.line1, (line1) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, address: { line1, line2: c.serviceLocation?.address?.line2 ?? "", city: c.serviceLocation?.address?.city ?? "", state: c.serviceLocation?.address?.state ?? "", postalCode: c.serviceLocation?.address?.postalCode ?? "" } } }))) }),
2146
2224
  /* @__PURE__ */ jsx3(Field2, { label: "Service address line 2 (optional)", span: true, children: text(bill.serviceLocation?.address?.line2, (line2) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, address: { line1: c.serviceLocation?.address?.line1 ?? "", line2, city: c.serviceLocation?.address?.city ?? "", state: c.serviceLocation?.address?.state ?? "", postalCode: c.serviceLocation?.address?.postalCode ?? "" } } }))) }),
@@ -2286,7 +2364,7 @@ function BillSubmissionForm({
2286
2364
  }
2287
2365
 
2288
2366
  // src/billing-dashboard.tsx
2289
- import { useMemo as useMemo3, useState as useState3 } from "react";
2367
+ import { useMemo as useMemo3, useState as useState4 } from "react";
2290
2368
  import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
2291
2369
  var css2 = `
2292
2370
  .mbdash{display:grid;gap:20px;color:var(--mb-text);font-family:var(--mb-font);font-size:15px}.mbdash *{box-sizing:border-box}.mbdash h2,.mbdash h3,.mbdash p{margin:0}.mbdash-copy{color:var(--mb-muted);margin-top:5px!important}.mbdash-card{min-width:0;border:1px solid var(--mb-border);border-radius:var(--mb-radius);background:var(--mb-surface);box-shadow:var(--mb-shadow)}
@@ -2454,8 +2532,8 @@ function BillAgingSummary(props) {
2454
2532
  return /* @__PURE__ */ jsx4(Shell, { ...shellProps, children: /* @__PURE__ */ jsx4(AgingContent, { bills: props.bills, ...props.heading === void 0 ? {} : { heading: props.heading } }) });
2455
2533
  }
2456
2534
  function BillingDashboard({ bills, heading = "Billing", description = "Track submitted bills, payments, and outstanding balances.", onSelectBill, initialSearch = "", initialState = "all", hideFilters = false, appearance, className, style }) {
2457
- const [search, setSearch] = useState3(initialSearch);
2458
- const [state, setState] = useState3(initialState);
2535
+ const [search, setSearch] = useState4(initialSearch);
2536
+ const [state, setState] = useState4(initialState);
2459
2537
  const states = useMemo3(() => [...new Set(bills.map((bill) => bill.state))].sort((a, b) => a.localeCompare(b)), [bills]);
2460
2538
  const filtered = useMemo3(() => {
2461
2539
  const query = search.trim().toLowerCase();
@@ -2551,10 +2629,10 @@ function BillingReport({ bills, groupBy = "status", heading = "Billing report",
2551
2629
  // src/connected-bill-status.tsx
2552
2630
  import {
2553
2631
  useCallback as useCallback2,
2554
- useEffect as useEffect3,
2632
+ useEffect as useEffect4,
2555
2633
  useMemo as useMemo4,
2556
2634
  useRef as useRef3,
2557
- useState as useState4
2635
+ useState as useState5
2558
2636
  } from "react";
2559
2637
  import {
2560
2638
  DEFAULT_API_BASE_URL,
@@ -2700,16 +2778,16 @@ function useBillStatus({
2700
2778
  apiBaseUrl,
2701
2779
  ...fetchOverride ? { fetch: fetchOverride } : {}
2702
2780
  }), [apiBaseUrl, billId, fetchOverride, getSession, sessionEndpoint]);
2703
- const [data, setData] = useState4(initialData);
2704
- const [error, setError] = useState4(null);
2705
- const [isLoading, setIsLoading] = useState4(enabled && !initialData);
2706
- const [isRefreshing, setIsRefreshing] = useState4(false);
2781
+ const [data, setData] = useState5(initialData);
2782
+ const [error, setError] = useState5(null);
2783
+ const [isLoading, setIsLoading] = useState5(enabled && !initialData);
2784
+ const [isRefreshing, setIsRefreshing] = useState5(false);
2707
2785
  const dataRef = useRef3(initialData);
2708
2786
  const initialDataRef = useRef3(initialData);
2709
2787
  initialDataRef.current = initialData;
2710
2788
  const activeControllerRef = useRef3(null);
2711
2789
  const requestSequence = useRef3(0);
2712
- useEffect3(() => {
2790
+ useEffect4(() => {
2713
2791
  const seed = initialDataRef.current;
2714
2792
  dataRef.current = seed;
2715
2793
  setData(seed);
@@ -2750,10 +2828,10 @@ function useBillStatus({
2750
2828
  }
2751
2829
  }
2752
2830
  }, [billId, client, enabled]);
2753
- useEffect3(() => {
2831
+ useEffect4(() => {
2754
2832
  if (enabled) void load();
2755
2833
  }, [enabled, load]);
2756
- useEffect3(() => {
2834
+ useEffect4(() => {
2757
2835
  if (!enabled || refreshInterval <= 0) return;
2758
2836
  const timer = window.setInterval(() => void load(), refreshInterval);
2759
2837
  const onFocus = () => void load();
@@ -2861,13 +2939,10 @@ function defaultFormatDate(createdAt) {
2861
2939
  function BillActivityTimeline({ events, emptyLabel = "No bill activity yet.", appearance, className, style, formatDate = defaultFormatDate }) {
2862
2940
  return /* @__PURE__ */ jsxs6("section", { className: classes("mb-surface mb-activity", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill activity", children: [
2863
2941
  /* @__PURE__ */ jsx6("style", { children: lifecycleSurfaceStyles }),
2864
- /* @__PURE__ */ jsxs6("header", { className: "mb-surface-heading", children: [
2865
- /* @__PURE__ */ jsxs6("div", { children: [
2866
- /* @__PURE__ */ jsx6("strong", { children: "Bill history" }),
2867
- /* @__PURE__ */ jsx6("span", { children: "Submission, payer responses, follow-up, and payments." })
2868
- ] }),
2869
- /* @__PURE__ */ jsx6("span", { children: events.length })
2870
- ] }),
2942
+ /* @__PURE__ */ jsx6("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs6("div", { children: [
2943
+ /* @__PURE__ */ jsx6("strong", { children: "Bill history" }),
2944
+ /* @__PURE__ */ jsx6("span", { children: "Submission, payer responses, follow-up, and payments." })
2945
+ ] }) }),
2871
2946
  !events.length ? /* @__PURE__ */ jsx6("p", { className: "mb-activity-empty", children: emptyLabel }) : /* @__PURE__ */ jsx6("ol", { className: "mb-activity-list", children: events.map((event) => /* @__PURE__ */ jsxs6("li", { className: "mb-activity-item", children: [
2872
2947
  /* @__PURE__ */ jsx6("span", { className: "mb-activity-marker", "aria-hidden": "true" }),
2873
2948
  /* @__PURE__ */ jsxs6("div", { className: "mb-activity-content", children: [
@@ -3045,16 +3120,16 @@ var lifecycleSurfaceStyles = `
3045
3120
  .mb-progress-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none;margin:0;padding:0}.mb-progress-list li{display:grid;gap:7px;position:relative;text-align:center;color:var(--mb-muted);font-size:12px}.mb-progress-list li:not(:last-child)::after{content:"";position:absolute;left:calc(50% + 14px);right:calc(-50% + 14px);top:13px;height:2px;background:var(--mb-border)}.mb-progress-list li.is-complete:not(:last-child)::after{background:var(--mb-accent)}.mb-progress-list li>span{display:grid;place-items:center;justify-self:center;position:relative;z-index:1;width:28px;height:28px;border:2px solid var(--mb-border);border-radius:50%;background:var(--mb-surface);font-weight:800}.mb-progress-list li.is-complete>span,.mb-progress-list li.is-current>span{border-color:var(--mb-accent);background:var(--mb-accent);color:var(--mb-accent-contrast)}.mb-progress-list li.is-current{color:var(--mb-text)}
3046
3121
  .mb-snapshot dl,.mb-remittance dl,.mb-contacts dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:0}.mb-snapshot dl>div,.mb-remittance dl>div,.mb-contacts dl>div{display:grid;gap:3px;padding:10px 14px;border-left:1px solid var(--mb-border)}.mb-snapshot dl>div:nth-child(3n+1),.mb-remittance dl>div:first-child,.mb-contacts dl>div:first-child{border-left:0}.mb-snapshot dt,.mb-remittance dt,.mb-contacts dt{color:var(--mb-muted);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.mb-snapshot dd,.mb-remittance dd,.mb-contacts dd{font-size:14px;font-weight:750;margin:0;overflow-wrap:anywhere}.mb-contacts a{color:var(--mb-accent)}.mb-denial{margin-top:16px;border-left:4px solid var(--mb-danger);border-radius:var(--mb-control-radius);background:color-mix(in srgb,var(--mb-danger) 8%,var(--mb-surface));padding:12px 14px}.mb-denial p{margin:4px 0 0}
3047
3122
  .mb-payment-list{display:grid}.mb-payment-list article{display:grid;grid-template-columns:1fr auto;gap:5px 18px;padding:12px 0;border-top:1px solid var(--mb-border)}.mb-payment-list article:first-child{border-top:0}.mb-payment-list article>div{display:grid;gap:2px}.mb-payment-list article>div:nth-child(2){text-align:right}.mb-payment-list article span{color:var(--mb-muted);font-size:12px}.mb-payment-list article p{grid-column:1/-1;margin:0;color:var(--mb-muted);font-size:13px}
3048
- @media(max-width:700px){.mb-progress-list{grid-template-columns:1fr;text-align:left}.mb-progress-list li{grid-template-columns:28px 1fr;align-items:center;text-align:left}.mb-progress-list li:not(:last-child)::after{left:13px;right:auto;top:28px;bottom:-7px;width:2px;height:auto}.mb-progress-list li>span{grid-row:1}.mb-snapshot dl,.mb-remittance dl,.mb-contacts dl{grid-template-columns:1fr 1fr}.mb-snapshot dl>div,.mb-remittance dl>div,.mb-contacts dl>div{border:0;border-top:1px solid var(--mb-border);padding:10px 0}.mb-snapshot dl>div:nth-child(-n+2),.mb-remittance dl>div:nth-child(-n+2),.mb-contacts dl>div:nth-child(-n+2){border-top:0}.mb-payment-list article{grid-template-columns:1fr}.mb-payment-list article>div:nth-child(2){text-align:left}}
3123
+ @media(max-width:700px){.mb-surface.mb-progress{padding:16px 10px}.mb-progress-list{grid-template-columns:repeat(4,minmax(0,1fr))}.mb-progress-list li{display:grid;grid-template-columns:1fr;align-items:start;gap:6px;text-align:center;font-size:10px;min-width:0}.mb-progress-list li b{font-size:10px;white-space:nowrap}.mb-progress-list li:not(:last-child)::after{left:calc(50% + 12px);right:calc(-50% + 12px);top:11px;bottom:auto;width:auto;height:2px}.mb-progress-list li>span{grid-row:auto;width:24px;height:24px;font-size:11px}.mb-snapshot dl,.mb-remittance dl,.mb-contacts dl{grid-template-columns:1fr 1fr}.mb-snapshot dl>div,.mb-remittance dl>div,.mb-contacts dl>div{border:0;border-top:1px solid var(--mb-border);padding:10px 0}.mb-snapshot dl>div:nth-child(-n+2),.mb-remittance dl>div:nth-child(-n+2),.mb-contacts dl>div:nth-child(-n+2){border-top:0}.mb-payment-list article{grid-template-columns:1fr}.mb-payment-list article>div:nth-child(2){text-align:left}}
3049
3124
  `;
3050
3125
 
3051
3126
  // src/connected-bill-lifecycle.tsx
3052
3127
  import {
3053
3128
  useCallback as useCallback3,
3054
- useEffect as useEffect4,
3129
+ useEffect as useEffect5,
3055
3130
  useMemo as useMemo5,
3056
3131
  useRef as useRef4,
3057
- useState as useState5
3132
+ useState as useState6
3058
3133
  } from "react";
3059
3134
  import {
3060
3135
  DEFAULT_API_BASE_URL as DEFAULT_API_BASE_URL2,
@@ -3064,16 +3139,32 @@ import {
3064
3139
  import { createBillLifecycleClient as createBillLifecycleClient2 } from "@mindbill/browser";
3065
3140
  import { Fragment as Fragment5, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
3066
3141
  var DEFAULT_REFRESH_INTERVAL2 = 6e4;
3067
- function downloadBlob(blob, filename, open = false) {
3142
+ function downloadBlob(blob, filename) {
3068
3143
  const url = URL.createObjectURL(blob);
3069
3144
  const link = document.createElement("a");
3070
3145
  link.href = url;
3071
3146
  link.rel = "noopener noreferrer";
3072
3147
  link.download = filename;
3073
- if (open) link.target = "_blank";
3074
3148
  link.click();
3075
3149
  window.setTimeout(() => URL.revokeObjectURL(url), 6e4);
3076
3150
  }
3151
+ function reservePreviewWindow() {
3152
+ const preview = window.open("about:blank", "_blank");
3153
+ if (preview) preview.opener = null;
3154
+ return preview;
3155
+ }
3156
+ function previewBlob(blob, preview) {
3157
+ const url = URL.createObjectURL(blob);
3158
+ if (preview) preview.location.replace(url);
3159
+ else {
3160
+ const link = document.createElement("a");
3161
+ link.href = url;
3162
+ link.target = "_blank";
3163
+ link.rel = "noopener noreferrer";
3164
+ link.click();
3165
+ }
3166
+ window.setTimeout(() => URL.revokeObjectURL(url), 3e5);
3167
+ }
3077
3168
  function useBillLifecycle({
3078
3169
  billId: providedBillId,
3079
3170
  sessionEndpoint = DEFAULT_SESSION_ENDPOINT2,
@@ -3084,11 +3175,11 @@ function useBillLifecycle({
3084
3175
  initialData = null,
3085
3176
  fetch: fetchOverride
3086
3177
  }) {
3087
- const [data, setData] = useState5(initialData);
3088
- const [error, setError] = useState5(null);
3089
- const [isLoading, setIsLoading] = useState5(enabled && !initialData);
3090
- const [isRefreshing, setIsRefreshing] = useState5(false);
3091
- const [isMutating, setIsMutating] = useState5(false);
3178
+ const [data, setData] = useState6(initialData);
3179
+ const [error, setError] = useState6(null);
3180
+ const [isLoading, setIsLoading] = useState6(enabled && !initialData);
3181
+ const [isRefreshing, setIsRefreshing] = useState6(false);
3182
+ const [isMutating, setIsMutating] = useState6(false);
3092
3183
  const mounted = useRef4(true);
3093
3184
  const client = useMemo5(() => createBillLifecycleClient({
3094
3185
  billId: providedBillId,
@@ -3097,11 +3188,11 @@ function useBillLifecycle({
3097
3188
  apiBaseUrl,
3098
3189
  fetch: fetchOverride
3099
3190
  }), [apiBaseUrl, fetchOverride, getSession, providedBillId, sessionEndpoint]);
3100
- useEffect4(() => {
3191
+ useEffect5(() => {
3101
3192
  setData(initialData);
3102
3193
  setError(null);
3103
3194
  }, [initialData, providedBillId]);
3104
- useEffect4(() => {
3195
+ useEffect5(() => {
3105
3196
  mounted.current = true;
3106
3197
  return () => {
3107
3198
  mounted.current = false;
@@ -3125,7 +3216,7 @@ function useBillLifecycle({
3125
3216
  }
3126
3217
  }
3127
3218
  }, [client, enabled]);
3128
- useEffect4(() => {
3219
+ useEffect5(() => {
3129
3220
  if (!enabled) return;
3130
3221
  void refresh();
3131
3222
  const interval = refreshInterval > 0 ? window.setInterval(() => void refresh(), refreshInterval) : null;
@@ -3152,10 +3243,22 @@ function useBillLifecycle({
3152
3243
  }
3153
3244
  }, []);
3154
3245
  const openAttachment = useCallback3(async (attachment) => {
3155
- downloadBlob(await client.getAttachment(attachment.id), attachment.filename, true);
3246
+ const preview = reservePreviewWindow();
3247
+ try {
3248
+ previewBlob(await client.getAttachment(attachment.id), preview);
3249
+ } catch (error2) {
3250
+ preview?.close();
3251
+ throw error2;
3252
+ }
3156
3253
  }, [client]);
3157
3254
  const openEor = useCallback3(async (document2) => {
3158
- downloadBlob(await client.getEor(document2.id), document2.filename, true);
3255
+ const preview = reservePreviewWindow();
3256
+ try {
3257
+ previewBlob(await client.getEor(document2.id), preview);
3258
+ } catch (error2) {
3259
+ preview?.close();
3260
+ throw error2;
3261
+ }
3159
3262
  }, [client]);
3160
3263
  const downloadPacket = useCallback3(async () => {
3161
3264
  const packet = await client.getPacket();
@@ -3184,7 +3287,7 @@ function useBillLifecycle({
3184
3287
  }
3185
3288
  function LifecycleDialog({ children, title, onClose }) {
3186
3289
  const dialog = useRef4(null);
3187
- useEffect4(() => {
3290
+ useEffect5(() => {
3188
3291
  const previous = document.activeElement;
3189
3292
  dialog.current?.focus();
3190
3293
  const onKeyDown = (event) => event.key === "Escape" && onClose();
@@ -3225,14 +3328,14 @@ function sandboxScenarios(state) {
3225
3328
  function ConnectedBillLifecycle({ appearance, className, style, loadingFallback, errorFallback, onChanged, ...options }) {
3226
3329
  const lifecycle = useBillLifecycle(options);
3227
3330
  const { data } = lifecycle;
3228
- const [tab, setTab] = useState5("details");
3229
- const [panel, setPanel] = useState5("");
3230
- const [notice, setNotice] = useState5("");
3231
- const [reason, setReason] = useState5("");
3232
- const [payment, setPayment] = useState5({ amount: 0, method: "check", checkNumber: "", depositDate: today(), note: "" });
3233
- const [review, setReview] = useState5({ reason: "", payerClaimControlNumber: "", disputedAmount: void 0, attachmentIds: [], route: "ebill" });
3331
+ const [tab, setTab] = useState6("details");
3332
+ const [panel, setPanel] = useState6("");
3333
+ const [notice, setNotice] = useState6("");
3334
+ const [reason, setReason] = useState6("");
3335
+ const [payment, setPayment] = useState6({ amount: 0, method: "check", checkNumber: "", depositDate: today(), note: "" });
3336
+ const [review, setReview] = useState6({ reason: "", payerClaimControlNumber: "", disputedAmount: void 0, attachmentIds: [], route: "ebill" });
3234
3337
  const lastData = useRef4(null);
3235
- useEffect4(() => {
3338
+ useEffect5(() => {
3236
3339
  if (!data || data === lastData.current) return;
3237
3340
  lastData.current = data;
3238
3341
  onChanged?.(data);
@@ -3288,10 +3391,7 @@ function ConnectedBillLifecycle({ appearance, className, style, loadingFallback,
3288
3391
  ] }),
3289
3392
  /* @__PURE__ */ jsxs7("div", { className: "mb-lifecycle-tabs", role: "tablist", "aria-label": "Bill view", children: [
3290
3393
  /* @__PURE__ */ jsx7("button", { type: "button", role: "tab", "aria-selected": tab === "details", onClick: () => setTab("details"), children: "Bill details" }),
3291
- /* @__PURE__ */ jsxs7("button", { type: "button", role: "tab", "aria-selected": tab === "history", onClick: () => setTab("history"), children: [
3292
- "Bill history ",
3293
- /* @__PURE__ */ jsx7("span", { children: data.activity.length })
3294
- ] })
3394
+ /* @__PURE__ */ jsx7("button", { type: "button", role: "tab", "aria-selected": tab === "history", onClick: () => setTab("history"), children: "Bill history" })
3295
3395
  ] }),
3296
3396
  data.environment === "sandbox" ? /* @__PURE__ */ jsxs7("section", { className: "mb-lifecycle-simulator", "aria-label": "Sandbox lifecycle simulator", children: [
3297
3397
  /* @__PURE__ */ jsxs7("div", { children: [
@@ -3322,20 +3422,24 @@ function ConnectedBillLifecycle({ appearance, className, style, loadingFallback,
3322
3422
  /* @__PURE__ */ jsx7("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => void lifecycle.openEor(eor).catch(() => void 0), children: "View EOR" })
3323
3423
  ] }, eor.id)) })
3324
3424
  ] }) : null,
3325
- viewEor || actions.length ? /* @__PURE__ */ jsxs7("section", { className: "mb-lifecycle-actions-sheet", children: [
3326
- /* @__PURE__ */ jsxs7("div", { children: [
3327
- /* @__PURE__ */ jsx7("h3", { children: data.lifecycle.state.includes("closed") ? "This bill is closed" : data.lifecycle.state.includes("denied") || data.lifecycle.state.includes("rejected") ? "This bill needs attention" : "Available actions" }),
3328
- /* @__PURE__ */ jsx7("p", { children: "Actions are determined by the current bill status." })
3329
- ] }),
3330
- /* @__PURE__ */ jsxs7("div", { children: [
3331
- viewEor ? /* @__PURE__ */ jsx7("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => document.getElementById(`mb-eors-${data.bill.id}`)?.scrollIntoView({ behavior: "smooth" }), children: viewEor.label }) : null,
3332
- actions.map((action) => /* @__PURE__ */ jsx7("button", { type: "button", className: action.primary ? "mb-lifecycle-button primary" : "mb-lifecycle-button secondary", onClick: () => {
3333
- const next = actionPanel(action);
3334
- if (next) setPanel(next);
3335
- }, children: action.label }, action.id))
3336
- ] })
3337
- ] }) : null
3425
+ viewEor || actions.length ? /* @__PURE__ */ jsx7("button", { type: "button", className: "mb-lifecycle-button secondary mb-lifecycle-actions-trigger", onClick: () => setPanel("actions"), children: "Bill actions" }) : null
3338
3426
  ] }) : /* @__PURE__ */ jsx7("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: /* @__PURE__ */ jsx7(BillActivityTimeline, { events: data.activity, ...appearance ? { appearance } : {} }) }),
3427
+ panel === "actions" ? /* @__PURE__ */ jsx7(LifecycleDialog, { title: "Bill actions", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs7("section", { className: "mb-lifecycle-panel mb-lifecycle-action-panel", children: [
3428
+ /* @__PURE__ */ jsxs7("div", { children: [
3429
+ /* @__PURE__ */ jsx7("h3", { children: "Bill actions" }),
3430
+ /* @__PURE__ */ jsx7("p", { children: "Choose what you want to do with this bill." })
3431
+ ] }),
3432
+ /* @__PURE__ */ jsxs7("div", { className: "mb-lifecycle-action-options", children: [
3433
+ viewEor ? /* @__PURE__ */ jsx7("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => {
3434
+ setPanel("");
3435
+ document.getElementById(`mb-eors-${data.bill.id}`)?.scrollIntoView({ behavior: "smooth" });
3436
+ }, children: viewEor.label }) : null,
3437
+ actions.map((action) => /* @__PURE__ */ jsx7("button", { type: "button", className: action.primary ? "mb-lifecycle-button primary" : "mb-lifecycle-button secondary", onClick: () => {
3438
+ const next = actionPanel(action);
3439
+ if (next) setPanel(next);
3440
+ }, children: action.label }, action.id))
3441
+ ] })
3442
+ ] }) }) : null,
3339
3443
  panel === "resubmit" ? /* @__PURE__ */ jsx7(LifecycleDialog, { title: "Correct and resubmit", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs7("section", { className: "mb-lifecycle-panel", children: [
3340
3444
  /* @__PURE__ */ jsxs7("div", { children: [
3341
3445
  /* @__PURE__ */ jsx7("h3", { children: "Correct and resubmit" }),
@@ -3449,7 +3553,7 @@ function ConnectedBillLifecycle({ appearance, className, style, loadingFallback,
3449
3553
  }
3450
3554
  var CONNECTED_LIFECYCLE_STYLES = `
3451
3555
  .mb-lifecycle-simulator{display:grid;gap:14px;padding:18px;border:1px solid #b8dadd;border-radius:var(--mb-radius,14px);background:#f2fbfb}.mb-lifecycle-simulator>div:first-child>span{color:var(--mb-accent);font-size:.72rem;font-weight:850;letter-spacing:.09em;text-transform:uppercase}.mb-lifecycle-simulator h3{margin:3px 0 0;font-size:1.05rem}.mb-lifecycle-simulator p{margin:4px 0 0;color:var(--mb-muted)}.mb-lifecycle-simulator-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.mb-lifecycle-simulator-actions button{min-height:76px;border:1px solid #a9cccf;border-radius:10px;background:var(--mb-surface);color:var(--mb-text);cursor:pointer;padding:12px 14px;text-align:left;font:inherit}.mb-lifecycle-simulator-actions button:hover{border-color:var(--mb-accent);box-shadow:0 3px 14px rgba(23,108,112,.1)}.mb-lifecycle-simulator-actions button:disabled{cursor:not-allowed;opacity:.55}.mb-lifecycle-simulator-actions button strong,.mb-lifecycle-simulator-actions button span{display:block}.mb-lifecycle-simulator-actions button span{margin-top:3px;color:var(--mb-muted);font-size:.83rem}.mb-lifecycle-simulator-idle{padding:10px 12px;border-radius:8px;background:rgba(255,255,255,.72)}
3452
- .mb-connected-lifecycle{--mb-accent:#176c70;--mb-text:#17282d;--mb-muted:#607176;--mb-border:#d7e0df;--mb-soft:#f4f7f6;--mb-surface:#fff;display:grid;gap:18px;color:var(--mb-text);font:14px/1.45 var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}.mb-connected-lifecycle *{box-sizing:border-box}.mb-lifecycle-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.mb-lifecycle-title{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.mb-lifecycle-title h2{margin:0;font-size:1.7rem}.mb-lifecycle-title span{border-radius:999px;background:var(--mb-soft);padding:5px 10px;font-weight:750}.mb-lifecycle-head p{margin:3px 0 0;color:var(--mb-muted)}.mb-lifecycle-tabs{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--mb-border);border-radius:12px;background:var(--mb-surface);padding:6px}.mb-lifecycle-tabs button{min-height:46px;border:0;border-radius:8px;background:transparent;color:var(--mb-muted);font:inherit;font-size:1rem;font-weight:750;cursor:pointer}.mb-lifecycle-tabs button[aria-selected=true]{background:var(--mb-accent);color:white}.mb-lifecycle-tabs span{display:inline-grid;place-items:center;min-width:24px;height:24px;margin-left:6px;border-radius:999px;background:rgba(127,127,127,.14);font-size:.8rem}.mb-lifecycle-tabpanel{display:grid;gap:18px}.mb-lifecycle-button{min-height:40px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius,8px);background:var(--mb-input,#fff);color:var(--mb-text);cursor:pointer;font:inherit;font-weight:750;padding:9px 14px}.mb-lifecycle-button.primary{border-color:var(--mb-accent);background:var(--mb-accent);color:var(--mb-accent-contrast,#fff)}.mb-lifecycle-button:disabled{cursor:not-allowed;opacity:.5}.mb-lifecycle-card,.mb-lifecycle-actions-sheet,.mb-lifecycle-panel{padding:20px;border:1px solid var(--mb-border);border-radius:var(--mb-radius,14px);background:var(--mb-surface)}.mb-lifecycle-card header,.mb-lifecycle-actions-sheet{display:flex;align-items:center;justify-content:space-between;gap:20px}.mb-lifecycle-card h3,.mb-lifecycle-actions-sheet h3,.mb-lifecycle-panel h3{margin:0;font-size:1.08rem}.mb-lifecycle-card p,.mb-lifecycle-actions-sheet p,.mb-lifecycle-panel p{margin:3px 0 0;color:var(--mb-muted)}.mb-lifecycle-card header>span{display:grid;place-items:center;min-width:28px;height:28px;border-radius:999px;background:var(--mb-soft);font-weight:750}.mb-lifecycle-actions-sheet>div:last-child{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.mb-lifecycle-documents{list-style:none;margin:14px 0 0;padding:0}.mb-lifecycle-documents li{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-top:1px solid var(--mb-border)}.mb-lifecycle-documents li>div{display:grid;gap:3px;min-width:0}.mb-lifecycle-documents li span{color:var(--mb-muted);font-size:.85rem}.mb-lifecycle-dialog-backdrop{position:fixed;z-index:2147483000;inset:0;display:grid;place-items:center;padding:20px;background:rgba(18,35,43,.56);backdrop-filter:blur(3px)}.mb-lifecycle-dialog{position:relative;width:min(760px,100%);max-height:calc(100vh - 40px);overflow:auto;outline:0}.mb-lifecycle-dialog-close{position:absolute;z-index:1;top:12px;right:12px;width:34px;height:34px;border:1px solid var(--mb-border);border-radius:8px;background:var(--mb-surface);color:var(--mb-text);cursor:pointer;font:22px/1 inherit}.mb-lifecycle-panel{display:grid;gap:17px;padding-top:24px;box-shadow:0 24px 70px rgba(18,35,43,.22)}.mb-lifecycle-panel label{display:grid;gap:6px;font-size:.85rem;font-weight:750}.mb-lifecycle-panel label small{color:var(--mb-muted);font-weight:500}.mb-lifecycle-panel input,.mb-lifecycle-panel select,.mb-lifecycle-panel textarea{width:100%;min-height:44px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius,8px);background:var(--mb-input,#fff);color:var(--mb-text);font:inherit;padding:10px 12px}.mb-lifecycle-panel textarea{min-height:100px;resize:vertical}.mb-lifecycle-fields{display:grid;gap:13px}.mb-lifecycle-fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}.mb-lifecycle-fields .full{grid-column:1/-1}.mb-lifecycle-panel-actions{display:flex;justify-content:flex-end;gap:8px}.mb-lifecycle-packet{display:grid;gap:0;margin:0;padding:0;border:0}.mb-lifecycle-packet legend{margin-bottom:7px;font-size:.85rem;font-weight:800}.mb-lifecycle-packet>label{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:10px 2px;border-top:1px solid var(--mb-border)}.mb-lifecycle-packet>label>input{width:16px;min-height:16px}.mb-lifecycle-packet>label>span{display:grid}.mb-lifecycle-packet button{border:0;background:transparent;color:var(--mb-accent);cursor:pointer;font:inherit}.mb-lifecycle-message,.mb-lifecycle-error,.mb-lifecycle-loading{padding:12px 14px;border-radius:9px}.mb-lifecycle-message.success{background:#edf9f2;color:#217449}.mb-lifecycle-message.error,.mb-lifecycle-error{background:#fff0ef;color:#9d3029}.mb-lifecycle-error{display:flex;align-items:center;gap:12px}.mb-lifecycle-error span{flex:1}.mb-lifecycle-error button{border:1px solid currentColor;border-radius:7px;background:transparent;color:inherit;padding:7px 10px}
3556
+ .mb-connected-lifecycle{--mb-accent:#176c70;--mb-text:#17282d;--mb-muted:#607176;--mb-border:#d7e0df;--mb-soft:#f4f7f6;--mb-surface:#fff;display:grid;gap:18px;color:var(--mb-text);font:14px/1.45 var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}.mb-connected-lifecycle *{box-sizing:border-box}.mb-lifecycle-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.mb-lifecycle-title{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.mb-lifecycle-title h2{margin:0;font-size:1.7rem}.mb-lifecycle-title span{border-radius:999px;background:var(--mb-soft);padding:5px 10px;font-weight:750}.mb-lifecycle-head p{margin:3px 0 0;color:var(--mb-muted)}.mb-lifecycle-tabs{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--mb-border);border-radius:12px;background:var(--mb-surface);padding:6px}.mb-lifecycle-tabs button{min-height:46px;border:0;border-radius:8px;background:transparent;color:var(--mb-muted);font:inherit;font-size:1rem;font-weight:750;cursor:pointer}.mb-lifecycle-tabs button[aria-selected=true]{background:var(--mb-accent);color:white}.mb-lifecycle-tabpanel{display:grid;gap:18px}.mb-lifecycle-button{min-height:40px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius,8px);background:var(--mb-input,#fff);color:var(--mb-text);cursor:pointer;font:inherit;font-weight:750;padding:9px 14px}.mb-lifecycle-button.primary{border-color:var(--mb-accent);background:var(--mb-accent);color:var(--mb-accent-contrast,#fff)}.mb-lifecycle-button:disabled{cursor:not-allowed;opacity:.5}.mb-lifecycle-actions-trigger{width:100%}.mb-lifecycle-card,.mb-lifecycle-panel{padding:20px;border:1px solid var(--mb-border);border-radius:var(--mb-radius,14px);background:var(--mb-surface)}.mb-lifecycle-card header{display:flex;align-items:center;justify-content:space-between;gap:20px}.mb-lifecycle-card h3,.mb-lifecycle-panel h3{margin:0;font-size:1.08rem}.mb-lifecycle-card p,.mb-lifecycle-panel p{margin:3px 0 0;color:var(--mb-muted)}.mb-lifecycle-card header>span{display:grid;place-items:center;min-width:28px;height:28px;border-radius:999px;background:var(--mb-soft);font-weight:750}.mb-lifecycle-action-options{display:grid;gap:10px}.mb-lifecycle-action-options .mb-lifecycle-button{width:100%}.mb-lifecycle-documents{list-style:none;margin:14px 0 0;padding:0}.mb-lifecycle-documents li{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-top:1px solid var(--mb-border)}.mb-lifecycle-documents li>div{display:grid;gap:3px;min-width:0}.mb-lifecycle-documents li span{color:var(--mb-muted);font-size:.85rem}.mb-lifecycle-dialog-backdrop{position:fixed;z-index:2147483000;inset:0;display:grid;place-items:center;padding:20px;background:rgba(18,35,43,.56);backdrop-filter:blur(3px)}.mb-lifecycle-dialog{position:relative;width:min(760px,100%);max-height:calc(100vh - 40px);overflow:auto;outline:0}.mb-lifecycle-dialog-close{position:absolute;z-index:1;top:12px;right:12px;width:34px;height:34px;border:1px solid var(--mb-border);border-radius:8px;background:var(--mb-surface);color:var(--mb-text);cursor:pointer;font:22px/1 inherit}.mb-lifecycle-panel{display:grid;gap:17px;padding-top:24px;box-shadow:0 24px 70px rgba(18,35,43,.22)}.mb-lifecycle-panel label{display:grid;gap:6px;font-size:.85rem;font-weight:750}.mb-lifecycle-panel label small{color:var(--mb-muted);font-weight:500}.mb-lifecycle-panel input,.mb-lifecycle-panel select,.mb-lifecycle-panel textarea{width:100%;min-height:44px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius,8px);background:var(--mb-input,#fff);color:var(--mb-text);font:inherit;padding:10px 12px}.mb-lifecycle-panel textarea{min-height:100px;resize:vertical}.mb-lifecycle-fields{display:grid;gap:13px}.mb-lifecycle-fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}.mb-lifecycle-fields .full{grid-column:1/-1}.mb-lifecycle-panel-actions{display:flex;justify-content:flex-end;gap:8px}.mb-lifecycle-packet{display:grid;gap:0;margin:0;padding:0;border:0}.mb-lifecycle-packet legend{margin-bottom:7px;font-size:.85rem;font-weight:800}.mb-lifecycle-packet>label{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:10px 2px;border-top:1px solid var(--mb-border)}.mb-lifecycle-packet>label>input{width:16px;min-height:16px}.mb-lifecycle-packet>label>span{display:grid}.mb-lifecycle-packet button{border:0;background:transparent;color:var(--mb-accent);cursor:pointer;font:inherit}.mb-lifecycle-message,.mb-lifecycle-error,.mb-lifecycle-loading{padding:12px 14px;border-radius:9px}.mb-lifecycle-message.success{background:#edf9f2;color:#217449}.mb-lifecycle-message.error,.mb-lifecycle-error{background:#fff0ef;color:#9d3029}.mb-lifecycle-error{display:flex;align-items:center;gap:12px}.mb-lifecycle-error span{flex:1}.mb-lifecycle-error button{border:1px solid currentColor;border-radius:7px;background:transparent;color:inherit;padding:7px 10px}
3453
3557
  @media(max-width:700px){.mb-lifecycle-head,.mb-lifecycle-actions-sheet,.mb-lifecycle-card header{align-items:stretch;flex-direction:column}.mb-lifecycle-head>.mb-lifecycle-button{width:100%}.mb-lifecycle-actions-sheet>div:last-child{justify-content:stretch}.mb-lifecycle-actions-sheet .mb-lifecycle-button{width:100%}.mb-lifecycle-fields.two{grid-template-columns:1fr}.mb-lifecycle-fields .full{grid-column:auto}.mb-lifecycle-dialog-backdrop{align-items:end;padding:0}.mb-lifecycle-dialog{max-height:92vh}.mb-lifecycle-dialog .mb-lifecycle-panel{border-radius:18px 18px 0 0}.mb-lifecycle-tabs button{font-size:.9rem}.mb-lifecycle-title h2{font-size:1.4rem}}
3454
3558
  `;
3455
3559
 
@@ -3457,7 +3561,7 @@ var CONNECTED_LIFECYCLE_STYLES = `
3457
3561
  function widget(tagName, props) {
3458
3562
  const ref = useRef5(null);
3459
3563
  const { onMindBill, onMindBillError } = props;
3460
- useEffect5(() => {
3564
+ useEffect6(() => {
3461
3565
  const element = ref.current;
3462
3566
  if (!element) return;
3463
3567
  const handleEvent = (event) => onMindBill?.(event);
@@ -3524,6 +3628,7 @@ export {
3524
3628
  ConnectedBillStatus,
3525
3629
  DEFAULT_BILL_SUBMISSION_MODIFIERS,
3526
3630
  DEFAULT_BILL_SUBMISSION_PROCEDURES,
3631
+ DEFAULT_BILL_SUBMISSION_TAXONOMIES,
3527
3632
  MED_LEGAL_REPORT_TYPE_CODE,
3528
3633
  MindBillBillReview,
3529
3634
  MindBillBillTimeline,