@harshshahcg/survey-render 1.4.0 → 1.5.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.
Files changed (69) hide show
  1. package/dist/components/QuestionListCarousel.d.ts +16 -0
  2. package/dist/components/QuestionMapper.d.ts +3 -1
  3. package/dist/components/{QuestionOverviewPanel/QuestionOverviewPanel.d.ts → QuestionOverviewPanel.d.ts} +1 -2
  4. package/dist/components/QuestionRenderer.d.ts +3 -1
  5. package/dist/components/{SubmissionLoadingOverlay/SubmissionLoadingOverlay.d.ts → SubmissionLoadingOverlay.d.ts} +0 -1
  6. package/dist/components/{SurveyContainer/SurveyContainer.d.ts → SurveyContainer.d.ts} +5 -3
  7. package/dist/components/SurveyProgressBar.d.ts +25 -0
  8. package/dist/components/SurveyRenderer.d.ts +3 -0
  9. package/dist/components/custom/{DatePicker/DatePicker.d.ts → DatePicker.d.ts} +0 -1
  10. package/dist/components/custom/{Dropdown/Dropdown.d.ts → Dropdown.d.ts} +0 -1
  11. package/dist/components/custom/{MCQSelect/MCQSelect.d.ts → MCQSelect.d.ts} +3 -2
  12. package/dist/components/custom/{TabularInput/TabularInput.d.ts → TabularInput.d.ts} +0 -1
  13. package/dist/components/custom/{TextResponse/TextResponse.d.ts → TextResponse.d.ts} +0 -1
  14. package/dist/components/ui/{ErrorMessage/ErrorMessage.d.ts → ErrorMessage.d.ts} +3 -1
  15. package/dist/components/ui/{Alert/Alert.d.ts → alert.d.ts} +5 -11
  16. package/dist/components/ui/badge.d.ts +9 -0
  17. package/dist/components/ui/button-variants.d.ts +4 -0
  18. package/dist/components/ui/{Button/Button.d.ts → button.d.ts} +3 -6
  19. package/dist/components/ui/{Card/Card.d.ts → card.d.ts} +1 -4
  20. package/dist/components/ui/dialog.d.ts +17 -0
  21. package/dist/components/ui/{Input/Input.d.ts → input.d.ts} +0 -1
  22. package/dist/components/ui/{Label/Label.d.ts → label.d.ts} +1 -2
  23. package/dist/components/ui/{Pagination/Pagination.d.ts → pagination.d.ts} +2 -3
  24. package/dist/components/ui/popover.d.ts +7 -0
  25. package/dist/components/ui/progress.d.ts +4 -0
  26. package/dist/components/ui/select.d.ts +15 -0
  27. package/dist/components/ui/tabs.d.ts +7 -0
  28. package/dist/components/ui/{Textarea/Textarea.d.ts → textarea.d.ts} +0 -1
  29. package/dist/index.d.ts +2 -1
  30. package/dist/lib/utils.d.ts +2 -5
  31. package/dist/surveyRender.js +6429 -1803
  32. package/dist/surveyRender.js.map +1 -1
  33. package/dist/surveyRender.umd.cjs +85 -11
  34. package/dist/surveyRender.umd.cjs.map +1 -1
  35. package/dist/utils/themeStatusStyles.d.ts +1 -1
  36. package/package.json +17 -2
  37. package/dist/components/QuestionListCarousel/QuestionListCarousel.d.ts +0 -10
  38. package/dist/components/QuestionListCarousel/index.d.ts +0 -2
  39. package/dist/components/QuestionOverviewPanel/index.d.ts +0 -2
  40. package/dist/components/SubmissionLoadingOverlay/index.d.ts +0 -2
  41. package/dist/components/SurveyContainer/index.d.ts +0 -2
  42. package/dist/components/SurveyProgressBar/SurveyProgressBar.d.ts +0 -16
  43. package/dist/components/SurveyProgressBar/index.d.ts +0 -2
  44. package/dist/components/custom/DatePicker/index.d.ts +0 -2
  45. package/dist/components/custom/Dropdown/index.d.ts +0 -2
  46. package/dist/components/custom/MCQSelect/index.d.ts +0 -2
  47. package/dist/components/custom/TabularInput/index.d.ts +0 -2
  48. package/dist/components/custom/TextResponse/index.d.ts +0 -2
  49. package/dist/components/icons.d.ts +0 -10
  50. package/dist/components/ui/Alert/index.d.ts +0 -1
  51. package/dist/components/ui/Badge/Badge.d.ts +0 -9
  52. package/dist/components/ui/Badge/index.d.ts +0 -1
  53. package/dist/components/ui/Button/index.d.ts +0 -2
  54. package/dist/components/ui/Card/index.d.ts +0 -1
  55. package/dist/components/ui/Dialog/Dialog.d.ts +0 -30
  56. package/dist/components/ui/Dialog/index.d.ts +0 -2
  57. package/dist/components/ui/ErrorMessage/index.d.ts +0 -1
  58. package/dist/components/ui/Input/index.d.ts +0 -1
  59. package/dist/components/ui/Label/index.d.ts +0 -2
  60. package/dist/components/ui/Pagination/index.d.ts +0 -1
  61. package/dist/components/ui/Popover/Popover.d.ts +0 -18
  62. package/dist/components/ui/Popover/index.d.ts +0 -2
  63. package/dist/components/ui/Progress/Progress.d.ts +0 -8
  64. package/dist/components/ui/Progress/index.d.ts +0 -2
  65. package/dist/components/ui/Select/Select.d.ts +0 -38
  66. package/dist/components/ui/Select/index.d.ts +0 -2
  67. package/dist/components/ui/Tabs/Tabs.d.ts +0 -19
  68. package/dist/components/ui/Tabs/index.d.ts +0 -2
  69. package/dist/components/ui/Textarea/index.d.ts +0 -1
@@ -1,5 +1,5 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(`:root{--primary-600: #3b82f6;--primary-700: #2563eb;--primary-100: #dbeafe;--primary-200: #bfdbfe;--primary-50: #eff6ff;--primary-foreground: #ffffff;--error-600: #dc2626;--error-200: #fecaca;--error-50: #fef2f2;--warning-600: #ea580c;--warning-200: #fed7aa;--warning-50: #fff7ed;--neutral-100: #f3f4f6;--neutral-400: #9ca3af;--neutral-500: #6b7280;--neutral-200: #e5e7eb;--neutral-50: #f9fafb;--neutral-900: #111827;--overlay-bg: rgba(0, 0, 0, .5)}[data-theme=emerald]{--primary-600: #059669;--primary-700: #047857;--primary-100: #d1fae5;--primary-200: #a7f3d0;--primary-50: #ecfdf5;--primary-foreground: #ffffff}[data-theme=violet]{--primary-600: #7c3aed;--primary-700: #6d28d9;--primary-100: #ede9fe;--primary-200: #ddd6fe;--primary-50: #f5f3ff;--primary-foreground: #ffffff}[data-theme=amber]{--primary-600: #d97706;--primary-500: #f59e0b;--primary-400: #fbbf24;--primary-700: #b45309;--primary-100: #fef3c7;--primary-200: #fde68a;--primary-50: #fffbeb;--primary-foreground: #ffffff}[data-theme=blue]{--primary-600: #2563eb;--primary-700: #1d4ed8;--primary-100: #dbeafe;--primary-200: #bfdbfe;--primary-50: #eff6ff;--primary-foreground: #ffffff}[data-theme=rose]{--primary-600: #e11d48;--primary-700: #be123c;--primary-100: #ffe4e6;--primary-200: #fecdd3;--primary-50: #fff1f2;--primary-foreground: #ffffff}[data-theme=teal]{--primary-600: #0d9488;--primary-700: #0f766e;--primary-100: #ccfbf1;--primary-200: #99f6e4;--primary-50: #f0fdfa;--primary-foreground: #ffffff}[data-theme=indigo]{--primary-600: #4f46e5;--primary-700: #4338ca;--primary-100: #e0e7ff;--primary-200: #c7d2fe;--primary-50: #eef2ff;--primary-foreground: #ffffff}[data-theme=cyan]{--primary-600: #0891b2;--primary-700: #0e7490;--primary-100: #cffafe;--primary-200: #a5f3fc;--primary-50: #ecfeff;--primary-foreground: #ffffff}[data-theme=orange]{--primary-600: #ea580c;--primary-700: #c2410c;--primary-100: #ffedd5;--primary-200: #fed7aa;--primary-50: #fff7ed;--primary-foreground: #ffffff}[data-theme=lime]{--primary-600: #65a30d;--primary-700: #4d7c0f;--primary-100: #ecfccb;--primary-200: #d9f99d;--primary-50: #f7fee7;--primary-foreground: #ffffff}[data-theme=fuchsia]{--primary-600: #c026d3;--primary-700: #a21caf;--primary-100: #fae8ff;--primary-200: #f5d0fe;--primary-50: #fdf4ff;--primary-foreground: #ffffff}[data-theme=dark]{--primary-600: #60a5fa;--primary-700: #93c5fd;--primary-100: #1e3a8a;--primary-200: #475569;--primary-50: #1e293b;--primary-foreground: #ffffff;--error-600: #f87171;--error-200: #7f1d1d;--error-50: #450a0a;--warning-600: #fb923c;--warning-200: #7c2d12;--warning-50: #431407;--neutral-50: #0f172a;--neutral-100: #1e293b;--neutral-200: #334155;--neutral-400: #94a3b8;--neutral-500: #cbd5e1;--neutral-900: #f8fafc;--overlay-bg: rgba(0, 0, 0, .7);--header-bg: #1e293b;--header-title: #f8fafc;--header-border: #334155;--color-background: #0f172a;--color-foreground: #f8fafc;--color-textBlack: #f1f5f9;--color-textGray: #94a3b8;--color-borderGray: #334155;--color-muted: #1e293b;--color-muted-foreground: #94a3b8;--color-border: #334155;--color-input: #334155;--color-ring: #60a5fa;--color-card: #1e293b;--color-card-foreground: #f8fafc;--color-popover: #1e293b;--color-popover-foreground: #f8fafc;--color-accent: #334155;--color-accent-foreground: #f8fafc;--color-destructive: #f87171;--color-destructive-foreground: #fef2f2}.statusCompleted{border:1px solid var(--primary-200);background:var(--primary-50)}.statusError{border:1px solid var(--error-200);background:var(--error-50)}.statusRequired{border:1px solid var(--warning-200);background:var(--warning-50)}.statusDefault{border:1px solid var(--neutral-200);background:var(--neutral-50)}.statusIconCompleted{color:var(--primary-600)}.statusIconError{color:var(--error-600)}.statusIconRequired{color:var(--warning-600)}.statusIconDefault{color:var(--neutral-500)}:root{--color-primary: #2e74ff;--color-secondary: #e8b018;--color-textBlack: #333333;--color-textGray: #737373;--color-borderGray: #e0e0e0;--color-warning: #fef9c3;--color-error: #ef4444;--color-background: #ffffff;--color-foreground: #0f172a;--color-muted: #f1f5f9;--color-muted-foreground: #64748b;--color-destructive: #ef4444;--color-destructive-foreground: #fef2f2;--color-border: #e2e8f0;--color-input: #e2e8f0;--color-ring: #3b82f6;--color-card: #ffffff;--color-card-foreground: #0f172a;--color-popover: #ffffff;--color-popover-foreground: #0f172a;--color-primary-foreground: #ffffff;--color-secondary-foreground: #0f172a;--color-accent: #f1f5f9;--color-accent-foreground: #0f172a}body.mobile-landscape{overflow:hidden}body.mobile-landscape #root{display:none}body.mobile-landscape:before{content:"Please rotate your device to portrait mode to use this app";position:fixed;top:0;left:0;right:0;bottom:0;background:var(--color-background);display:flex;align-items:center;justify-content:center;z-index:9999;padding:2rem;text-align:center;font-size:1.25rem;font-weight:500;color:var(--color-textBlack)}*{border-color:var(--color-border);margin:0}body{background-color:var(--color-background);color:var(--color-foreground);font-family:Inter,sans-serif}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar::-webkit-scrollbar{display:none}.animate-question-enter{animation:question-enter .5s ease-out both}@keyframes question-enter{0%{opacity:0;transform:translate(100px)}to{opacity:1;transform:translate(0)}}.textError{color:var(--color-error)}.textMuted{color:var(--color-textGray)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.loader{animation:rotate 1s infinite;height:50px;width:50px}.loader:before,.loader:after{content:"";display:block;height:20px;width:20px}.loader:before{animation:box1 1s infinite;background-color:#fff;box-shadow:30px 0 0 var(--primary-600);margin-bottom:10px}.loader:after{animation:box2 1s infinite;background-color:var(--primary-600);box-shadow:30px 0 #fff}@keyframes rotate{0%{transform:rotate(0) scale(.8)}50%{transform:rotate(360deg) scale(1.2)}to{transform:rotate(720deg) scale(.8)}}@keyframes box1{0%{box-shadow:30px 0 0 var(--primary-600)}50%{box-shadow:0 0 0 var(--primary-600);margin-bottom:0;transform:translate(15px,15px)}to{box-shadow:30px 0 0 var(--primary-600);margin-bottom:10px}}@keyframes box2{0%{box-shadow:30px 0 #fff}50%{box-shadow:0 0 #fff;margin-top:-20px;transform:translate(15px,15px)}to{box-shadow:30px 0 #fff;margin-top:0}}.mcqRoot{display:flex;flex-direction:column;gap:.75rem}.mcqOption{width:100%;border:1px solid var(--primary-600);padding:.75rem 1rem;font-size:.875rem;line-height:1.25;font-weight:400;text-align:left;cursor:pointer;border-radius:.75rem;transition:background .15s,border-color .15s}.mcqOption:disabled{cursor:not-allowed;opacity:.5}.mcqOptionSelected{background:var(--primary-600);color:var(--primary-foreground)}.mcqOptionUnselected{background:var(--neutral-50);color:var(--primary-600)}.mcqOptionUnselected:hover{background:var(--primary-50)}.mcqOptionContent{display:flex;align-items:center;gap:.75rem}.mcqOptionIcon{flex-shrink:0}.mcqOptionText{flex:1}.mcqRadio{width:1rem;height:1rem;border-radius:9999px;border:2px solid var(--primary-600);transition:all .15s}.mcqRadioSelected{border-color:var(--neutral-50);background:var(--neutral-50)}.mcqRadioSelected:after{content:"";display:block;width:100%;height:100%;transform:scale(.5);border-radius:9999px;background:var(--primary-600)}.mcqCheckbox{width:1rem;height:1rem;border-radius:2px;border:2px solid var(--primary-600);transition:all .15s;display:flex;align-items:center;justify-content:center}.mcqCheckboxSelected{border-color:var(--neutral-50);background:var(--neutral-50)}.mcqCheckboxSelected svg{width:100%;height:100%;color:var(--primary-600)}.textarea{display:flex;min-height:4rem;width:100%;padding:.5rem .75rem;font-size:1rem;border-radius:.375rem;border:1px solid var(--color-input);background:transparent;outline:none;transition:color .15s,box-shadow .15s;resize:vertical}.textarea::placeholder{color:var(--color-muted-foreground)}.textarea:focus-visible{border-color:var(--color-ring);box-shadow:0 0 0 3px var(--color-ring)}.textarea:disabled{cursor:not-allowed;opacity:.5}.textarea[aria-invalid=true]{border-color:var(--color-destructive)}@media(min-width:768px){.textarea{font-size:.875rem}}.textResponseRoot{display:flex;flex-direction:column;gap:.5rem}.textResponseFieldWrap{position:relative}.textResponseCounterWrap{display:flex;justify-content:flex-end}.textResponseCounter{font-size:.75rem;transition:color .15s;color:var(--color-textGray)}.textResponseCounterNearLimit{color:var(--warning-600)}.textResponseCounterAtLimit{color:var(--color-error)}.dropdownRoot{position:relative}.dropdownTrigger{position:relative;width:100%;cursor:pointer;text-align:left;border:1px solid var(--neutral-200);border-radius:.75rem;background:var(--neutral-50);padding:.5rem 2.5rem .5rem .75rem}.dropdownTrigger:focus{border-color:var(--primary-600);outline:none;box-shadow:0 0 0 1px var(--primary-200)}.dropdownTrigger:disabled{cursor:not-allowed;background:var(--neutral-100);color:var(--neutral-500)}.dropdownTriggerError{border-color:var(--color-error)}.dropdownTriggerError:focus{border-color:var(--color-error);box-shadow:0 0 0 1px var(--color-error)}.dropdownValue{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdownValuePlaceholder{color:var(--color-textGray)}.dropdownChevron{pointer-events:none;position:absolute;top:0;bottom:0;right:0;display:flex;align-items:center;padding-right:.75rem}.dropdownChevron svg{width:1rem;height:1rem;transition:transform .2s;color:var(--color-textGray)}.dropdownChevronOpen svg{transform:rotate(180deg)}.dropdownList{position:absolute;z-index:50;margin-top:.25rem;max-height:15rem;width:100%;overflow:auto;border-radius:.5rem;border:1px solid var(--neutral-200);background:var(--neutral-50);box-shadow:0 10px 15px -3px #0000001a}.dropdownItem{cursor:pointer;padding:.5rem .75rem;font-size:.875rem;transition:background .15s,color .15s}.dropdownItem:hover{background:var(--neutral-100)}.dropdownItemSelected{background:var(--primary-600);color:var(--primary-foreground)}.dropdownItemHighlighted{background:var(--primary-100);color:var(--primary-600)}.dropdownItemDisabled{cursor:not-allowed;background:var(--neutral-100);color:var(--neutral-500)}.dropdownEmpty{padding:.5rem .75rem;font-size:.875rem;color:var(--color-textGray)}.dropdownError{margin-top:.25rem;font-size:.875rem;color:var(--color-error)}.tabularRoot{overflow:hidden;border:1px solid var(--neutral-200);border-radius:.75rem;background:var(--neutral-50)}.tabularHeader{display:flex;border-bottom:1px solid var(--neutral-200);background:var(--neutral-100)}.tabularHeaderCell{flex:1;padding:.75rem 1rem;text-align:left;font-size:.875rem;font-weight:500;color:var(--color-textBlack)}.tabularHeaderCell:not(:last-child){border-right:1px solid var(--neutral-200)}.tabularRow{display:flex}.tabularRow:not(:last-child){border-bottom:1px solid var(--neutral-200)}.tabularLabelCell{flex:1;display:flex;align-items:center;border-right:1px solid var(--neutral-200);padding:.75rem 1rem;font-size:.875rem;color:var(--color-textBlack)}.tabularInputCell{flex:1;display:flex;align-items:center;padding:.75rem 1rem}.tabularInput{width:100%;padding:.5rem .75rem;font-size:.875rem;line-height:1.25;font-weight:400;border:1px solid var(--neutral-200);background:var(--neutral-50);border-radius:.75rem;outline:none;transition:border-color .15s}.tabularInput:focus{border-color:var(--primary-600)}.tabularSelect{width:100%;padding:.5rem 2rem .5rem .75rem;font-size:.875rem;line-height:1.25;cursor:pointer;border:1px solid var(--neutral-200);background:var(--neutral-50);border-radius:.75rem;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right 8px center;background-repeat:no-repeat;background-size:16px}.tabularSelect:focus{border-color:var(--primary-600)}.tabularCheckboxWrap{display:flex;align-items:center}.tabularCheckbox{width:1rem;height:1rem;cursor:pointer;border:1px solid var(--neutral-200);accent-color:var(--primary-600)}.tabularCheckboxLabel{margin-left:.5rem;cursor:pointer;font-size:.875rem;color:var(--color-textBlack)}.datePickerRoot{position:relative}.datePickerTrigger{display:flex;width:100%;align-items:center;justify-content:flex-start;padding:.75rem 13px;font-size:.875rem;font-weight:400;text-align:left;border:1px solid var(--neutral-200);background:var(--neutral-50);border-radius:.75rem;cursor:pointer}.datePickerTrigger:hover{background:var(--neutral-100)}.datePickerTrigger:disabled{cursor:not-allowed;opacity:.5}.datePickerTriggerPlaceholder{color:var(--color-textGray)}.datePickerIcon{margin-right:.5rem;flex-shrink:0;width:1rem;height:1rem;color:var(--color-textGray)}.datePickerDropdown{position:absolute;z-index:50;margin-top:.25rem;min-width:280px;padding:.75rem;border-radius:.375rem;border:1px solid var(--neutral-200);background:var(--neutral-50);box-shadow:0 10px 15px -3px #0000001a}.datePickerHeader{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.datePickerSelect{height:2rem;border-radius:.25rem;border:1px solid var(--primary-200);background:var(--neutral-50);padding:0 .5rem;font-size:.875rem}.datePickerSelect:focus{border-color:var(--primary-600);outline:none}.datePickerGrid{width:100%}.datePickerWeekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:.25rem;text-align:center;font-size:.75rem;font-weight:500;color:var(--color-textGray);margin-bottom:.25rem}.datePickerDays{display:grid;grid-template-columns:repeat(7,1fr);gap:.25rem;font-size:.875rem}.datePickerDay{display:flex;height:2rem;width:2rem;align-items:center;justify-content:center;border-radius:.375rem;cursor:pointer;transition:background .15s,color .15s}.datePickerDay:hover:not(:disabled){background:var(--primary-50);color:var(--primary-600)}.datePickerDay:disabled{cursor:not-allowed;color:var(--neutral-400)}.datePickerDaySelected,.datePickerDaySelected:hover{background:var(--primary-600);color:var(--primary-foreground)}.errorMessage{margin-top:.25rem;font-size:.875rem;color:var(--color-error)}.carouselRoot{display:flex;align-items:center;gap:.5rem;overflow:hidden}.carouselScroll{display:flex;flex:1;gap:.5rem;overflow-x:auto;scroll-behavior:smooth;white-space:nowrap;padding:.25rem 0;min-height:0}.carouselPill{min-width:60px;flex-shrink:0;border-radius:9999px;padding:.5rem 1rem;font-size:.875rem;text-align:center;cursor:pointer;color:var(--color-foreground)}.carouselPill:hover{background:var(--neutral-100)}.carouselPill:disabled{cursor:not-allowed;opacity:.5}.carouselPill[aria-current=step]{border-color:var(--primary-600);box-shadow:0 0 0 2px var(--primary-200);background:var(--primary-50);color:var(--primary-600)}.carouselNavButton{display:flex;height:2.5rem;width:2.5rem;flex-shrink:0;align-items:center;justify-content:center;border-radius:.375rem;border:1px solid var(--neutral-200);background:var(--color-card);color:var(--color-foreground);cursor:pointer;transition:background .15s}.carouselNavButton:hover:not(:disabled){background:var(--neutral-100)}.carouselNavButton:disabled{cursor:not-allowed;opacity:.5}.carouselNavButton svg{width:1.25rem;height:1.25rem}.overviewBackdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:#00000080}.overviewPanel{position:fixed;top:0;right:0;z-index:50;height:100%;width:100%;max-width:28rem;overflow:hidden;background:var(--neutral-50);box-shadow:0 25px 50px -12px #00000040}.overviewHeader{display:flex;align-items:center;justify-content:space-between;padding:1.5rem;border-bottom:1px solid var(--neutral-200)}.overviewTitle{font-size:1.25rem;font-weight:600;color:var(--color-textBlack)}.overviewCloseButton{padding:.5rem;border-radius:.5rem;color:var(--color-foreground);cursor:pointer;border:none;background:transparent;transition:background .15s}.overviewCloseButton:hover{background:var(--neutral-100)}.overviewCloseButton svg{width:1.25rem;height:1.25rem}.overviewBody{flex:1;overflow-y:auto;padding:1.5rem}.overviewList{display:flex;flex-direction:column;gap:.75rem}.overviewCard{width:100%;border-radius:.5rem;border:2px solid transparent;padding:1rem;text-align:left;cursor:pointer;transition:box-shadow .2s,border-color .2s,background .2s}.overviewCard:hover{box-shadow:0 4px 6px -1px #0000001a}.overviewCardCurrent{border-color:var(--primary-600);background:var(--primary-50);box-shadow:0 4px 6px -1px #0000001a}.overviewCardContent{display:flex;align-items:flex-start;gap:.75rem}.overviewCardIcon{margin-top:.125rem;flex-shrink:0;width:1.25rem;height:1.25rem}.overviewCardMain{min-width:0;flex:1}.overviewCardMeta{display:flex;align-items:center;gap:.5rem;margin-bottom:.25rem}.overviewCardId{font-size:.875rem;font-weight:500;color:var(--primary-600)}.overviewCardDescription{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;font-weight:500;color:var(--color-textBlack)}.overviewCardIndex{flex-shrink:0;font-size:.75rem;color:var(--color-textGray)}.overviewFooter{display:flex;align-items:center;justify-content:space-between;padding:1.5rem;border-top:1px solid var(--neutral-200);background:var(--neutral-50);font-size:.875rem}.overviewLegend{display:flex;align-items:center;gap:1rem}.overviewLegendItem{display:flex;align-items:center;gap:.25rem}.overviewLegendDot{width:.75rem;height:.75rem;border-radius:9999px}.overviewLayout{display:flex;flex-direction:column;height:100%}.button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;white-space:nowrap;border-radius:14px;font-size:14px;line-height:20px;font-weight:500;transition:opacity .15s,color .15s,box-shadow .15s;cursor:pointer;border:none}.button:disabled{pointer-events:none;opacity:.5}.button:focus-visible{outline:none;box-shadow:0 0 0 3px var(--color-ring)}.button:hover:not(:disabled){opacity:.9}.buttonDefault{padding:.75rem}.buttonSm{padding:.5rem .75rem}.buttonLg{padding:1rem}.buttonIcon{width:2.25rem;height:2.25rem;padding:0}.buttonVariantDefault{background:var(--primary-600);color:var(--primary-foreground);box-shadow:0 1px 2px #0000000d}.buttonVariantDefault:hover:not(:disabled){background:var(--primary-700)}.buttonVariantDestructive{background:var(--color-destructive);color:#fff;box-shadow:0 1px 2px #0000000d}.buttonVariantDestructive:hover:not(:disabled){opacity:.9}.buttonVariantOutline{border:1px solid var(--primary-200);background:transparent;color:var(--color-foreground);box-shadow:0 1px 2px #0000000d}.buttonVariantOutline:hover:not(:disabled){background:var(--primary-100);color:var(--primary-700)}.buttonVariantSecondary{border:1px solid var(--primary-200);background:var(--primary-100);color:var(--primary-700);box-shadow:0 1px 2px #0000000d}.buttonVariantSecondary:hover:not(:disabled){background:var(--primary-200)}.buttonVariantGhost{background:transparent;color:var(--color-foreground)}.buttonVariantGhost:hover:not(:disabled){background:var(--color-accent);color:var(--color-accent-foreground)}.buttonVariantLink{background:transparent;color:var(--color-primary);text-underline-offset:4px}.buttonVariantLink:hover:not(:disabled){text-decoration:underline}.buttonIconWrap{display:flex;height:1rem;width:1rem;align-items:center;justify-content:center}.buttonIconWrap svg{width:1rem;height:1rem}.progressRoot{position:relative;height:.5rem;width:100%;overflow:hidden;border-radius:9999px;background:color-mix(in srgb,var(--primary-200) 50%,transparent)}.progressIndicator{height:100%;width:100%;flex:1;background:var(--primary-600);transition:transform .3s ease-out}.progressBarRoot{display:flex;align-items:center;justify-content:space-between;gap:1rem;role:progressbar}.progressBarLabel{font-size:.875rem;font-weight:500;color:var(--color-textGray)}.progressBarTrack{display:flex;min-width:0;flex:1;align-items:center;gap:.75rem}.progressBarPercentage{font-size:.875rem;font-weight:500;color:var(--color-textGray);flex-shrink:0}.progressBarGradient{position:relative;height:.5rem;flex:1;min-width:0;overflow:hidden;border-radius:9999px;background:color-mix(in srgb,var(--primary-200) 50%,transparent)}.progressBarGradientFill{height:.5rem;border-radius:9999px;background:linear-gradient(to right,var(--primary-600),var(--primary-700));transition:width .3s ease-out}.progressBarTrackProgress{flex:1;min-width:0}.dialogOverlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:var(--overlay-bg, rgba(0, 0, 0, .5))}.dialogOverlay[data-state=closed]{animation:dialogFadeOut .15s ease-out forwards}.dialogOverlay[data-state=open]{animation:dialogFadeIn .15s ease-out forwards}.dialogContent{position:fixed;top:50%;left:50%;z-index:50;display:grid;width:100%;max-width:calc(100% - 2rem);gap:1rem;border-radius:.5rem;border:1px solid var(--neutral-200);background:var(--neutral-50);padding:1rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;transform:translate(-50%,-50%);transition:box-shadow .2s}@media(min-width:640px){.dialogContent{max-width:32rem}}.dialogContent[data-state=closed]{animation:dialogContentOut .15s ease-out forwards}.dialogContent[data-state=open]{animation:dialogContentIn .15s ease-out forwards}.dialogCloseButton{position:absolute;top:1rem;right:1rem;cursor:pointer;border-radius:2px;opacity:.7;transition:opacity .15s;padding:.25rem;border:none;background:transparent;color:inherit;display:flex;align-items:center;justify-content:center}.dialogCloseButton:hover{opacity:1}.dialogCloseButton:focus{outline:none;box-shadow:0 0 0 3px var(--primary-200)}.dialogCloseButton:focus-visible{outline:2px solid var(--primary-200);outline-offset:2px}.dialogCloseButton[data-state=open]{background:var(--primary-100);color:var(--primary-700)}.dialogCloseButton svg{pointer-events:none;flex-shrink:0;width:1rem;height:1rem}.dialogHeader{display:flex;flex-direction:column;gap:.5rem;text-align:center}@media(min-width:640px){.dialogHeader{text-align:left}}.dialogFooter{display:flex;flex-direction:column-reverse;gap:.5rem}@media(min-width:640px){.dialogFooter{flex-direction:row;justify-content:flex-end}}.dialogTitle{font-size:1.125rem;line-height:1;font-weight:600;color:var(--neutral-900)}.dialogDescription{font-size:.875rem;color:var(--neutral-500)}@keyframes dialogFadeIn{0%{opacity:0}to{opacity:1}}@keyframes dialogFadeOut{0%{opacity:1}to{opacity:0}}@keyframes dialogContentIn{0%{opacity:0;transform:translate(-50%,-50%) scale(.95)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@keyframes dialogContentOut{0%{opacity:1;transform:translate(-50%,-50%) scale(1)}to{opacity:0;transform:translate(-50%,-50%) scale(.95)}}.submissionOverlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;display:flex;align-items:center;justify-content:center;background:#0006}.submissionOverlayCard{display:flex;flex-direction:column;align-items:center;gap:1rem;padding:1.5rem;border-radius:.5rem;background:var(--color-card);box-shadow:0 20px 25px -5px #0000001a;border:1px solid var(--color-border)}.submissionOverlaySpinner{width:2.5rem;height:2.5rem;border-radius:9999px;border:2px solid var(--color-primary);border-top-color:transparent;animation:submissionSpin 1s linear infinite}.submissionOverlayText{font-size:.875rem;font-weight:500;color:var(--color-textBlack)}@keyframes submissionSpin{to{transform:rotate(360deg)}}.surveyRoot{display:flex;flex-direction:column;height:100dvh;min-height:100dvh;overflow:hidden;border-radius:.5rem;box-shadow:0 1px 3px #0000001a;background:var(--primary-foreground)}.surveyLoading{display:flex;min-height:100dvh;align-items:center;justify-content:center}.surveyLoadingText{color:var(--color-textGray)}.surveyHeader{position:sticky;top:0;z-index:40;border-bottom:1px solid var(--header-border, var(--primary-200));background:var(--header-bg, var(--primary-50))}.surveyHeaderInner{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem}.surveyTitle{font-size:1.25rem;font-weight:500;color:var(--header-title, var(--primary-700))}.surveyHeaderActions{display:flex;align-items:center;gap:1rem}.surveyCarouselSection{display:flex;flex-direction:column;gap:.75rem;background:var(--primary-foreground);padding:.75rem 1rem;box-shadow:0 1px 3px #0000001a}.surveyMain{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.surveyMainScroll{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding:1rem}.surveyMainScrollInner{position:relative;display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.surveyQuestionCard{display:flex;flex-direction:column;flex:1;min-height:0;border-radius:.75rem;background:var(--color-card);padding:1.5rem;box-shadow:0 1px 3px #0000001a;border:1px solid var(--color-border);overflow-y:auto;max-height:100%}.surveyQuestionId{width:fit-content;margin-bottom:.75rem;border-radius:9999px;background:var(--primary-100);padding:.25rem .75rem;font-size:1rem;font-weight:500;color:var(--primary-600)}.surveyQuestionDescription{font-size:1.125rem;line-height:1.625;font-weight:500;color:var(--color-textBlack)}.surveyQuestionDescriptionRequired{margin-left:.25rem;color:var(--color-error)}.surveyQuestionImageWrap{margin-top:1rem}.surveyQuestionImage{max-width:100%;height:auto;border-radius:.5rem;border:1px solid var(--neutral-200);object-fit:contain}.surveyQuestionHint{margin-top:.5rem;font-size:.75rem;color:var(--color-textGray)}.surveyQuestionBody{margin-top:1.5rem;display:flex;max-width:56rem;flex:1;flex-direction:column;justify-content:center}.surveyFooter{flex-shrink:0;padding:1rem;border-top:1px solid var(--color-borderGray)}.surveyFooterActions{display:flex;justify-content:center;gap:.75rem}@media(min-width:768px){.surveyFooterActions{justify-content:flex-end}}.surveyFooterButton{min-width:140px;font-size:1rem;font-weight:600}`)),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- (function(g,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],y):(g=typeof globalThis<"u"?globalThis:g||self,y(g.SurveyRender={},g.React,g.ReactDOM))})(this,(function(g,y,zr){"use strict";function Hr(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const a=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,a.get?a:{enumerable:!0,get:()=>e[s]})}}return r.default=e,Object.freeze(r)}const X=Hr(y);var ve={exports:{}},ue={};/**
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(`/*! tailwindcss v4.2.0 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500:oklch(63.7% .237 25.331);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-gray-500:oklch(55.1% .027 264.364);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-primary:#2e74ff;--color-secondary:#e8b018;--color-textBlack:#333;--color-textGray:#737373;--color-borderGray:#e0e0e0;--color-warning:#fef9c3;--color-error:#ef4444;--color-background:#fff;--color-foreground:#0f172a;--color-muted:#f1f5f9;--color-muted-foreground:#64748b;--color-destructive:#ef4444;--color-border:#e2e8f0;--color-input:#e2e8f0;--color-ring:#3b82f6;--color-card:#fff;--color-card-foreground:#0f172a;--color-popover:#fff;--color-popover-foreground:#0f172a;--color-primary-foreground:#fff;--color-secondary-foreground:#0f172a;--color-accent:#f1f5f9;--color-accent-foreground:#0f172a}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--color-border)}body{background-color:var(--color-background);color:var(--color-foreground);font-family:Inter,sans-serif}}@layer components{.loader{width:50px;height:50px;animation:1s infinite rotate}.loader:before,.loader:after{content:"";width:20px;height:20px;display:block}.loader:before{box-shadow:30px 0 0 var(--primary-600);background-color:#fff;margin-bottom:10px;animation:1s infinite box1}.loader:after{background-color:var(--primary-600);animation:1s infinite box2;box-shadow:30px 0 #fff}@keyframes rotate{0%{transform:rotate(0)scale(.8)}50%{transform:rotate(360deg)scale(1.2)}to{transform:rotate(720deg)scale(.8)}}@keyframes box1{0%{box-shadow:30px 0 0 var(--primary-600)}50%{box-shadow:0 0 0 var(--primary-600);margin-bottom:0;transform:translate(15px,15px)}to{box-shadow:30px 0 0 var(--primary-600);margin-bottom:10px}}@keyframes box2{0%{box-shadow:30px 0 #fff}50%{margin-top:-20px;transform:translate(15px,15px);box-shadow:0 0 #fff}to{margin-top:0;box-shadow:30px 0 #fff}}}@layer utilities{.\\@container\\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-3{top:calc(var(--spacing) * -3)}.top-0{top:calc(var(--spacing) * 0)}.top-4{top:calc(var(--spacing) * 4)}.top-\\[50\\%\\]{top:50%}.-right-3{right:calc(var(--spacing) * -3)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.left-\\[50\\%\\]{left:50%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.field-sizing-content{field-sizing:content}.size-3\\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-96{height:calc(var(--spacing) * 96)}.h-\\[41px\\]{height:41px}.h-\\[calc\\(100\\%-1px\\)\\]{height:calc(100% - 1px)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-24{width:calc(var(--spacing) * 24)}.w-32{width:calc(var(--spacing) * 32)}.w-72{width:calc(var(--spacing) * 72)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 2rem)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[45px\\]{min-width:45px}.min-w-\\[60px\\]{min-width:60px}.min-w-\\[140px\\]{min-width:140px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-50{--tw-scale-x:50%;--tw-scale-y:50%;--tw-scale-z:50%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-y{resize:vertical}.scroll-my-1{scroll-margin-block:calc(var(--spacing) * 1)}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-\\[0_1fr\\]{grid-template-columns:0 1fr}.grid-rows-\\[auto_auto\\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-items-start{justify-items:start}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.gap-y-0\\.5{row-gap:calc(var(--spacing) * .5)}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-\\[9px\\]{border-radius:9px}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[var\\(--color-border\\)\\]{border-color:var(--color-border)}.border-\\[var\\(--color-borderGray\\)\\]{border-color:var(--color-borderGray)}.border-\\[var\\(--error-200\\)\\]{border-color:var(--error-200)}.border-\\[var\\(--header-border\\,var\\(--primary-200\\)\\)\\]{border-color:var(--header-border,var(--primary-200))}.border-\\[var\\(--neutral-50\\)\\]{border-color:var(--neutral-50)}.border-\\[var\\(--neutral-200\\)\\]{border-color:var(--neutral-200)}.border-\\[var\\(--primary-200\\)\\]{border-color:var(--primary-200)}.border-\\[var\\(--primary-600\\)\\]{border-color:var(--primary-600)}.border-\\[var\\(--warning-200\\)\\]{border-color:var(--warning-200)}.border-borderGray{border-color:var(--color-borderGray)}.border-error{border-color:var(--color-error)}.border-input{border-color:var(--color-input)}.border-primary{border-color:var(--color-primary)}.border-transparent{border-color:#0000}.border-t-transparent{border-top-color:#0000}.bg-\\[\\#E5E7EB\\]{background-color:#e5e7eb}.bg-\\[var\\(--color-card\\)\\]{background-color:var(--color-card)}.bg-\\[var\\(--error-50\\)\\]{background-color:var(--error-50)}.bg-\\[var\\(--error-600\\)\\]{background-color:var(--error-600)}.bg-\\[var\\(--header-bg\\,var\\(--primary-50\\)\\)\\]{background-color:var(--header-bg,var(--primary-50))}.bg-\\[var\\(--neutral-50\\)\\]{background-color:var(--neutral-50)}.bg-\\[var\\(--neutral-100\\)\\]{background-color:var(--neutral-100)}.bg-\\[var\\(--neutral-500\\)\\]{background-color:var(--neutral-500)}.bg-\\[var\\(--overlay-bg\\)\\]{background-color:var(--overlay-bg)}.bg-\\[var\\(--primary-50\\)\\]{background-color:var(--primary-50)}.bg-\\[var\\(--primary-100\\)\\]{background-color:var(--primary-100)}.bg-\\[var\\(--primary-200\\)\\]\\/50{background-color:var(--primary-200)}@supports (color:color-mix(in lab,red,red)){.bg-\\[var\\(--primary-200\\)\\]\\/50{background-color:color-mix(in oklab,var(--primary-200) 50%,transparent)}}.bg-\\[var\\(--primary-600\\)\\]{background-color:var(--primary-600)}.bg-\\[var\\(--primary-foreground\\)\\]{background-color:var(--primary-foreground)}.bg-\\[var\\(--warning-50\\)\\]{background-color:var(--warning-50)}.bg-\\[var\\(--warning-600\\)\\]{background-color:var(--warning-600)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-border{background-color:var(--color-border)}.bg-borderGray{background-color:var(--color-borderGray)}.bg-card{background-color:var(--color-card)}.bg-destructive{background-color:var(--color-destructive)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-green-500{background-color:var(--color-green-500)}.bg-muted{background-color:var(--color-muted)}.bg-popover{background-color:var(--color-popover)}.bg-primary{background-color:var(--color-primary)}.bg-red-500{background-color:var(--color-red-500)}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-\\[var\\(--primary-600\\)\\]{--tw-gradient-from:var(--primary-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\\[var\\(--primary-700\\)\\]{--tw-gradient-to:var(--primary-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.object-contain{object-fit:contain}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-\\[3px\\]{padding:3px}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-\\[13px\\]{padding-inline:13px}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[14px\\]{font-size:14px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-\\[20px\\]{--tw-leading:20px;line-height:20px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.whitespace-nowrap{white-space:nowrap}.text-\\[var\\(--color-foreground\\)\\]{color:var(--color-foreground)}.text-\\[var\\(--color-textBlack\\)\\]{color:var(--color-textBlack)}.text-\\[var\\(--color-textGray\\)\\]{color:var(--color-textGray)}.text-\\[var\\(--error-600\\)\\]{color:var(--error-600)}.text-\\[var\\(--header-title\\,var\\(--primary-700\\)\\)\\]{color:var(--header-title,var(--primary-700))}.text-\\[var\\(--neutral-400\\)\\]{color:var(--neutral-400)}.text-\\[var\\(--neutral-500\\)\\]{color:var(--neutral-500)}.text-\\[var\\(--neutral-900\\)\\]{color:var(--neutral-900)}.text-\\[var\\(--primary-200\\)\\]{color:var(--primary-200)}.text-\\[var\\(--primary-600\\)\\]{color:var(--primary-600)}.text-\\[var\\(--primary-700\\)\\]{color:var(--primary-700)}.text-\\[var\\(--primary-foreground\\)\\]{color:var(--primary-foreground)}.text-\\[var\\(--warning-600\\)\\]{color:var(--warning-600)}.text-black{color:var(--color-black)}.text-card-foreground{color:var(--color-card-foreground)}.text-destructive{color:var(--color-destructive)}.text-error{color:var(--color-error)}.text-foreground{color:var(--color-foreground)}.text-muted-foreground{color:var(--color-muted-foreground)}.text-popover-foreground{color:var(--color-popover-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-secondary{color:var(--color-secondary)}.text-secondary-foreground{color:var(--color-secondary-foreground)}.text-textBlack{color:var(--color-textBlack)}.text-textGray{color:var(--color-textGray)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.underline-offset-4{text-underline-offset:4px}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-\\[var\\(--primary-200\\)\\]{--tw-ring-color:var(--primary-200)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\\!transition-none{transition-property:none!important}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:-translate-x-1:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:translate-x-1:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}}.peer-disabled\\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.selection\\:bg-primary ::selection{background-color:var(--color-primary)}.selection\\:bg-primary::selection{background-color:var(--color-primary)}.selection\\:text-primary-foreground ::selection{color:var(--color-primary-foreground)}.selection\\:text-primary-foreground::selection{color:var(--color-primary-foreground)}.file\\:inline-flex::file-selector-button{display:inline-flex}.file\\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\\:text-foreground::file-selector-button{color:var(--color-foreground)}.placeholder\\:text-muted-foreground::placeholder{color:var(--color-muted-foreground)}.placeholder\\:text-textGray::placeholder{color:var(--color-textGray)}@media(hover:hover){.hover\\:border-\\[var\\(--primary-200\\)\\]:hover{border-color:var(--primary-200)}.hover\\:border-\\[var\\(--primary-600\\)\\]:hover{border-color:var(--primary-600)}.hover\\:bg-\\[var\\(--neutral-100\\)\\]:hover{background-color:var(--neutral-100)}.hover\\:bg-\\[var\\(--primary-50\\)\\]:hover{background-color:var(--primary-50)}.hover\\:bg-\\[var\\(--primary-100\\)\\]:hover{background-color:var(--primary-100)}.hover\\:bg-\\[var\\(--primary-200\\)\\]:hover{background-color:var(--primary-200)}.hover\\:bg-\\[var\\(--primary-600\\)\\]:hover{background-color:var(--primary-600)}.hover\\:bg-\\[var\\(--primary-700\\)\\]:hover{background-color:var(--primary-700)}.hover\\:bg-accent:hover{background-color:var(--color-accent)}.hover\\:bg-destructive\\/90:hover{background-color:#ef4444e6}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}.hover\\:text-\\[var\\(--color-textBlack\\)\\]:hover{color:var(--color-textBlack)}.hover\\:text-\\[var\\(--primary-600\\)\\]:hover{color:var(--primary-600)}.hover\\:text-\\[var\\(--primary-700\\)\\]:hover{color:var(--primary-700)}.hover\\:text-\\[var\\(--primary-foreground\\)\\]:hover{color:var(--primary-foreground)}.hover\\:text-accent-foreground:hover{color:var(--color-accent-foreground)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:border-\\[var\\(--primary-600\\)\\]:focus{border-color:var(--primary-600)}.focus\\:border-error:focus{border-color:var(--color-error)}.focus\\:border-ring:focus{border-color:var(--color-ring)}.focus\\:bg-accent:focus{background-color:var(--color-accent)}.focus\\:text-accent-foreground:focus{color:var(--color-accent-foreground)}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-\\[var\\(--primary-200\\)\\]:focus{--tw-ring-color:var(--primary-200)}.focus\\:ring-error:focus{--tw-ring-color:var(--color-error)}.focus\\:ring-offset-0:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:border-ring:focus-visible{border-color:var(--color-ring)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:#ef444433}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 20%, transparent)}}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:#3b82f680}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-ring) 50%, transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\\[\\>svg\\]\\:grid-cols-\\[calc\\(var\\(--spacing\\)\\*4\\)_1fr\\]:has(>svg){grid-template-columns:calc(var(--spacing) * 4) 1fr}.has-\\[\\>svg\\]\\:gap-x-3:has(>svg){column-gap:calc(var(--spacing) * 3)}.aria-invalid\\:border-destructive[aria-invalid=true]{border-color:var(--color-destructive)}.aria-invalid\\:border-error[aria-invalid=true]{border-color:var(--color-error)}.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:#ef444433}@supports (color:color-mix(in lab,red,red)){.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 20%, transparent)}}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:var(--color-muted-foreground)}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}:is(.\\*\\:data-\\[slot\\=alert-description\\]\\:text-destructive\\/90>*)[data-slot=alert-description]{color:#ef4444e6}@supports (color:color-mix(in lab,red,red)){:is(.\\*\\:data-\\[slot\\=alert-description\\]\\:text-destructive\\/90>*)[data-slot=alert-description]{color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:var(--color-background)}.data-\\[state\\=active\\]\\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=open\\]\\:bg-\\[var\\(--primary-100\\)\\][data-state=open]{background-color:var(--primary-100)}.data-\\[state\\=open\\]\\:text-\\[var\\(--primary-700\\)\\][data-state=open]{color:var(--primary-700)}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}@media(min-width:40rem){.sm\\:block{display:block}.sm\\:max-w-lg{max-width:var(--container-lg)}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:pr-2\\.5{padding-right:calc(var(--spacing) * 2.5)}.sm\\:pl-2\\.5{padding-left:calc(var(--spacing) * 2.5)}.sm\\:text-left{text-align:left}}@media(min-width:48rem){.md\\:justify-end{justify-content:flex-end}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(prefers-color-scheme:dark){.dark\\:bg-destructive\\/60{background-color:#ef444499}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-destructive\\/60{background-color:color-mix(in oklab,var(--color-destructive) 60%,transparent)}}@media(hover:hover){.dark\\:hover\\:bg-accent\\/50:hover{background-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-accent\\/50:hover{background-color:color-mix(in oklab,var(--color-accent) 50%,transparent)}}}.dark\\:focus-visible\\:ring-destructive\\/40:focus-visible{--tw-ring-color:#ef444466}@supports (color:color-mix(in lab,red,red)){.dark\\:focus-visible\\:ring-destructive\\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 40%, transparent)}}}.\\[\\&_p\\]\\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\.border-b\\]\\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\\[\\.border-t\\]\\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}.\\[\\&\\>svg\\]\\:pointer-events-none>svg{pointer-events:none}.\\[\\&\\>svg\\]\\:size-3>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\\[\\&\\>svg\\]\\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\&\\>svg\\]\\:translate-y-0\\.5>svg{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.\\[\\&\\>svg\\]\\:text-current>svg{color:currentColor}@media(hover:hover){a.\\[a\\&\\]\\:hover\\:bg-accent:hover{background-color:var(--color-accent)}a.\\[a\\&\\]\\:hover\\:bg-destructive\\/90:hover{background-color:#ef4444e6}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}a.\\[a\\&\\]\\:hover\\:bg-primary\\/90:hover{background-color:#2e74ffe6}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}a.\\[a\\&\\]\\:hover\\:bg-secondary\\/90:hover{background-color:#e8b018e6}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-secondary\\/90:hover{background-color:color-mix(in oklab,var(--color-secondary) 90%,transparent)}}a.\\[a\\&\\]\\:hover\\:text-accent-foreground:hover{color:var(--color-accent-foreground)}}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar::-webkit-scrollbar{display:none}.animate-question-enter{animation:.5s ease-out both question-enter}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--primary-600:#3b82f6;--primary-700:#2563eb;--primary-100:#dbeafe;--primary-200:#bfdbfe;--primary-50:#eff6ff;--primary-foreground:#fff;--error-600:#dc2626;--error-200:#fecaca;--error-50:#fef2f2;--warning-600:#ea580c;--warning-200:#fed7aa;--warning-50:#fff7ed;--neutral-100:#f3f4f6;--neutral-400:#9ca3af;--neutral-500:#6b7280;--neutral-200:#e5e7eb;--neutral-50:#f9fafb;--neutral-900:#111827;--overlay-bg:#00000080}[data-theme=emerald]{--primary-600:#059669;--primary-700:#047857;--primary-100:#d1fae5;--primary-200:#a7f3d0;--primary-50:#ecfdf5;--primary-foreground:#fff}[data-theme=violet]{--primary-600:#7c3aed;--primary-700:#6d28d9;--primary-100:#ede9fe;--primary-200:#ddd6fe;--primary-50:#f5f3ff;--primary-foreground:#fff}[data-theme=amber]{--primary-600:#d97706;--primary-500:#f59e0b;--primary-400:#fbbf24;--primary-700:#b45309;--primary-100:#fef3c7;--primary-200:#fde68a;--primary-50:#fffbeb;--primary-foreground:#fff}[data-theme=blue]{--primary-600:#2563eb;--primary-700:#1d4ed8;--primary-100:#dbeafe;--primary-200:#bfdbfe;--primary-50:#eff6ff;--primary-foreground:#fff}[data-theme=rose]{--primary-600:#e11d48;--primary-700:#be123c;--primary-100:#ffe4e6;--primary-200:#fecdd3;--primary-50:#fff1f2;--primary-foreground:#fff}[data-theme=teal]{--primary-600:#0d9488;--primary-700:#0f766e;--primary-100:#ccfbf1;--primary-200:#99f6e4;--primary-50:#f0fdfa;--primary-foreground:#fff}[data-theme=indigo]{--primary-600:#4f46e5;--primary-700:#4338ca;--primary-100:#e0e7ff;--primary-200:#c7d2fe;--primary-50:#eef2ff;--primary-foreground:#fff}[data-theme=cyan]{--primary-600:#0891b2;--primary-700:#0e7490;--primary-100:#cffafe;--primary-200:#a5f3fc;--primary-50:#ecfeff;--primary-foreground:#fff}[data-theme=orange]{--primary-600:#ea580c;--primary-700:#c2410c;--primary-100:#ffedd5;--primary-200:#fed7aa;--primary-50:#fff7ed;--primary-foreground:#fff}[data-theme=lime]{--primary-600:#65a30d;--primary-700:#4d7c0f;--primary-100:#ecfccb;--primary-200:#d9f99d;--primary-50:#f7fee7;--primary-foreground:#fff}[data-theme=fuchsia]{--primary-600:#c026d3;--primary-700:#a21caf;--primary-100:#fae8ff;--primary-200:#f5d0fe;--primary-50:#fdf4ff;--primary-foreground:#fff}[data-theme=dark]{--primary-600:#60a5fa;--primary-700:#93c5fd;--primary-100:#1e3a8a;--primary-200:#475569;--primary-50:#1e293b;--primary-foreground:#fff;--error-600:#f87171;--error-200:#7f1d1d;--error-50:#450a0a;--warning-600:#fb923c;--warning-200:#7c2d12;--warning-50:#431407;--neutral-50:#0f172a;--neutral-100:#1e293b;--neutral-200:#334155;--neutral-400:#94a3b8;--neutral-500:#cbd5e1;--neutral-900:#f8fafc;--overlay-bg:#000000b3;--header-bg:#1e293b;--header-title:#f8fafc;--header-border:#334155;--color-background:#0f172a;--color-foreground:#f8fafc;--color-textBlack:#f1f5f9;--color-textGray:#94a3b8;--color-borderGray:#334155;--color-muted:#1e293b;--color-muted-foreground:#94a3b8;--color-border:#334155;--color-input:#334155;--color-ring:#60a5fa;--color-card:#1e293b;--color-card-foreground:#f8fafc;--color-popover:#1e293b;--color-popover-foreground:#f8fafc;--color-accent:#334155;--color-accent-foreground:#f8fafc;--color-destructive:#f87171;--color-destructive-foreground:#fef2f2}body.mobile-landscape{overflow:hidden}body.mobile-landscape #root{display:none}body.mobile-landscape:before{content:"Please rotate your device to portrait mode to use this app";background:var(--color-background);z-index:9999;text-align:center;color:var(--color-textBlack);justify-content:center;align-items:center;padding:2rem;font-size:1.25rem;font-weight:500;display:flex;position:fixed;top:0;right:0;bottom:0;left:0}@keyframes question-enter{0%{opacity:0;transform:translate(100px)}to{opacity:1;transform:translate(0)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}`)),document.head.appendChild(r)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
+ (function(_,M){typeof exports=="object"&&typeof module<"u"?M(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],M):(_=typeof globalThis<"u"?globalThis:_||self,M(_.SurveyRender={},_.React,_.ReactDOM))})(this,(function(_,M,Jr){"use strict";function Zr(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const m=Zr(M),Eo=Zr(Jr);var He={exports:{}},We={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var He;function Ur(){if(He)return ue;He=1;var e=y,r=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function f(l,c,u){var p,m={},v=null,x=null;u!==void 0&&(v=""+u),c.key!==void 0&&(v=""+c.key),c.ref!==void 0&&(x=c.ref);for(p in c)a.call(c,p)&&!i.hasOwnProperty(p)&&(m[p]=c[p]);if(l&&l.defaultProps)for(p in c=l.defaultProps,c)m[p]===void 0&&(m[p]=c[p]);return{$$typeof:r,type:l,key:v,ref:x,props:m,_owner:o.current}}return ue.Fragment=s,ue.jsx=f,ue.jsxs=f,ue}var de={};/**
10
+ */var qr;function ko(){if(qr)return We;qr=1;var e=M,r=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(i,u,c){var f,p={},h=null,b=null;c!==void 0&&(h=""+c),u.key!==void 0&&(h=""+u.key),u.ref!==void 0&&(b=u.ref);for(f in u)n.call(u,f)&&!s.hasOwnProperty(f)&&(p[f]=u[f]);if(i&&i.defaultProps)for(f in u=i.defaultProps,u)p[f]===void 0&&(p[f]=u[f]);return{$$typeof:r,type:i,key:h,ref:b,props:p,_owner:o.current}}return We.Fragment=t,We.jsx=l,We.jsxs=l,We}var Ue={};/**
11
11
  * @license React
12
12
  * react-jsx-runtime.development.js
13
13
  *
@@ -15,18 +15,92 @@
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var Ue;function Gr(){return Ue||(Ue=1,process.env.NODE_ENV!=="production"&&(function(){var e=y,r=Symbol.for("react.element"),s=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),b=Symbol.iterator,C="@@iterator";function P(n){if(n===null||typeof n!="object")return null;var d=b&&n[b]||n[C];return typeof d=="function"?d:null}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(n){{for(var d=arguments.length,h=new Array(d>1?d-1:0),w=1;w<d;w++)h[w-1]=arguments[w];V("error",n,h)}}function V(n,d,h){{var w=j.ReactDebugCurrentFrame,L=w.getStackAddendum();L!==""&&(d+="%s",h=h.concat([L]));var I=h.map(function(O){return String(O)});I.unshift("Warning: "+d),Function.prototype.apply.call(console[n],console,I)}}var B=!1,$=!1,Q=!1,S=!1,U=!1,z;z=Symbol.for("react.module.reference");function M(n){return!!(typeof n=="string"||typeof n=="function"||n===a||n===i||U||n===o||n===u||n===p||S||n===x||B||$||Q||typeof n=="object"&&n!==null&&(n.$$typeof===v||n.$$typeof===m||n.$$typeof===f||n.$$typeof===l||n.$$typeof===c||n.$$typeof===z||n.getModuleId!==void 0))}function A(n,d,h){var w=n.displayName;if(w)return w;var L=d.displayName||d.name||"";return L!==""?h+"("+L+")":h}function Y(n){return n.displayName||"Context"}function D(n){if(n==null)return null;if(typeof n.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case a:return"Fragment";case s:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case p:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case l:var d=n;return Y(d)+".Consumer";case f:var h=n;return Y(h._context)+".Provider";case c:return A(n,n.render,"ForwardRef");case m:var w=n.displayName||null;return w!==null?w:D(n.type)||"Memo";case v:{var L=n,I=L._payload,O=L._init;try{return D(O(I))}catch{return null}}}return null}var W=Object.assign,Z=0,be,ye,se,ge,je,we,Ne;function ke(){}ke.__reactDisabledLog=!0;function Be(){{if(Z===0){be=console.log,ye=console.info,se=console.warn,ge=console.error,je=console.group,we=console.groupCollapsed,Ne=console.groupEnd;var n={configurable:!0,enumerable:!0,value:ke,writable:!0};Object.defineProperties(console,{info:n,log:n,warn:n,error:n,group:n,groupCollapsed:n,groupEnd:n})}Z++}}function fe(){{if(Z--,Z===0){var n={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},n,{value:be}),info:W({},n,{value:ye}),warn:W({},n,{value:se}),error:W({},n,{value:ge}),group:W({},n,{value:je}),groupCollapsed:W({},n,{value:we}),groupEnd:W({},n,{value:Ne})})}Z<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=j.ReactCurrentDispatcher,oe;function N(n,d,h){{if(oe===void 0)try{throw Error()}catch(L){var w=L.stack.trim().match(/\n( *(at )?)/);oe=w&&w[1]||""}return`
19
- `+oe+n}}var T=!1,K;{var re=typeof WeakMap=="function"?WeakMap:Map;K=new re}function ie(n,d){if(!n||T)return"";{var h=K.get(n);if(h!==void 0)return h}var w;T=!0;var L=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var I;I=ae.current,ae.current=null,Be();try{if(d){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(O,[])}catch(G){w=G}Reflect.construct(n,[],O)}else{try{O.call()}catch(G){w=G}n.call(O.prototype)}}else{try{throw Error()}catch(G){w=G}n()}}catch(G){if(G&&w&&typeof G.stack=="string"){for(var E=G.stack.split(`
20
- `),H=w.stack.split(`
21
- `),R=E.length-1,F=H.length-1;R>=1&&F>=0&&E[R]!==H[F];)F--;for(;R>=1&&F>=0;R--,F--)if(E[R]!==H[F]){if(R!==1||F!==1)do if(R--,F--,F<0||E[R]!==H[F]){var J=`
22
- `+E[R].replace(" at new "," at ");return n.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",n.displayName)),typeof n=="function"&&K.set(n,J),J}while(R>=1&&F>=0);break}}}finally{T=!1,ae.current=I,fe(),Error.prepareStackTrace=L}var ce=n?n.displayName||n.name:"",te=ce?N(ce):"";return typeof n=="function"&&K.set(n,te),te}function Ve(n,d,h){return ie(n,!1)}function pe(n){var d=n.prototype;return!!(d&&d.isReactComponent)}function q(n,d,h){if(n==null)return"";if(typeof n=="function")return ie(n,pe(n));if(typeof n=="string")return N(n);switch(n){case u:return N("Suspense");case p:return N("SuspenseList")}if(typeof n=="object")switch(n.$$typeof){case c:return Ve(n.render);case m:return q(n.type,d,h);case v:{var w=n,L=w._payload,I=w._init;try{return q(I(L),d,h)}catch{}}}return""}var me=Object.prototype.hasOwnProperty,Lr={},Ir=j.ReactDebugCurrentFrame;function Ee(n){if(n){var d=n._owner,h=q(n.type,n._source,d?d.type:null);Ir.setExtraStackFrame(h)}else Ir.setExtraStackFrame(null)}function Ft(n,d,h,w,L){{var I=Function.call.bind(me);for(var O in n)if(I(n,O)){var E=void 0;try{if(typeof n[O]!="function"){var H=Error((w||"React class")+": "+h+" type `"+O+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof n[O]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw H.name="Invariant Violation",H}E=n[O](d,O,w,h,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){E=R}E&&!(E instanceof Error)&&(Ee(L),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",w||"React class",h,O,typeof E),Ee(null)),E instanceof Error&&!(E.message in Lr)&&(Lr[E.message]=!0,Ee(L),_("Failed %s type: %s",h,E.message),Ee(null))}}}var Bt=Array.isArray;function $e(n){return Bt(n)}function Vt(n){{var d=typeof Symbol=="function"&&Symbol.toStringTag,h=d&&n[Symbol.toStringTag]||n.constructor.name||"Object";return h}}function $t(n){try{return Pr(n),!1}catch{return!0}}function Pr(n){return""+n}function Tr(n){if($t(n))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Vt(n)),Pr(n)}var Dr=j.ReactCurrentOwner,Qt={key:!0,ref:!0,__self:!0,__source:!0},Rr,Ar;function Wt(n){if(me.call(n,"ref")){var d=Object.getOwnPropertyDescriptor(n,"ref").get;if(d&&d.isReactWarning)return!1}return n.ref!==void 0}function Yt(n){if(me.call(n,"key")){var d=Object.getOwnPropertyDescriptor(n,"key").get;if(d&&d.isReactWarning)return!1}return n.key!==void 0}function zt(n,d){typeof n.ref=="string"&&Dr.current}function Ht(n,d){{var h=function(){Rr||(Rr=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};h.isReactWarning=!0,Object.defineProperty(n,"key",{get:h,configurable:!0})}}function Ut(n,d){{var h=function(){Ar||(Ar=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};h.isReactWarning=!0,Object.defineProperty(n,"ref",{get:h,configurable:!0})}}var Gt=function(n,d,h,w,L,I,O){var E={$$typeof:r,type:n,key:d,ref:h,props:O,_owner:I};return E._store={},Object.defineProperty(E._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(E,"_self",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.defineProperty(E,"_source",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E};function Jt(n,d,h,w,L){{var I,O={},E=null,H=null;h!==void 0&&(Tr(h),E=""+h),Yt(d)&&(Tr(d.key),E=""+d.key),Wt(d)&&(H=d.ref,zt(d,L));for(I in d)me.call(d,I)&&!Qt.hasOwnProperty(I)&&(O[I]=d[I]);if(n&&n.defaultProps){var R=n.defaultProps;for(I in R)O[I]===void 0&&(O[I]=R[I])}if(E||H){var F=typeof n=="function"?n.displayName||n.name||"Unknown":n;E&&Ht(O,F),H&&Ut(O,F)}return Gt(n,E,H,L,w,Dr.current,O)}}var Qe=j.ReactCurrentOwner,Fr=j.ReactDebugCurrentFrame;function le(n){if(n){var d=n._owner,h=q(n.type,n._source,d?d.type:null);Fr.setExtraStackFrame(h)}else Fr.setExtraStackFrame(null)}var We;We=!1;function Ye(n){return typeof n=="object"&&n!==null&&n.$$typeof===r}function Br(){{if(Qe.current){var n=D(Qe.current.type);if(n)return`
18
+ */var et;function Co(){return et||(et=1,process.env.NODE_ENV!=="production"&&(function(){var e=M,r=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),i=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function g(d){if(d===null||typeof d!="object")return null;var x=y&&d[y]||d[v];return typeof x=="function"?x:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(d){{for(var x=arguments.length,C=new Array(x>1?x-1:0),I=1;I<x;I++)C[I-1]=arguments[I];T("error",d,C)}}function T(d,x,C){{var I=E.ReactDebugCurrentFrame,z=I.getStackAddendum();z!==""&&(x+="%s",C=C.concat([z]));var G=C.map(function(V){return String(V)});G.unshift("Warning: "+x),Function.prototype.apply.call(console[d],console,G)}}var R=!1,O=!1,$=!1,j=!1,k=!1,F;F=Symbol.for("react.module.reference");function L(d){return!!(typeof d=="string"||typeof d=="function"||d===n||d===s||k||d===o||d===c||d===f||j||d===b||R||O||$||typeof d=="object"&&d!==null&&(d.$$typeof===h||d.$$typeof===p||d.$$typeof===l||d.$$typeof===i||d.$$typeof===u||d.$$typeof===F||d.getModuleId!==void 0))}function U(d,x,C){var I=d.displayName;if(I)return I;var z=x.displayName||x.name||"";return z!==""?C+"("+z+")":C}function ee(d){return d.displayName||"Context"}function Q(d){if(d==null)return null;if(typeof d.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case n:return"Fragment";case t:return"Portal";case s:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case f:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case i:var x=d;return ee(x)+".Consumer";case l:var C=d;return ee(C._context)+".Provider";case u:return U(d,d.render,"ForwardRef");case p:var I=d.displayName||null;return I!==null?I:Q(d.type)||"Memo";case h:{var z=d,G=z._payload,V=z._init;try{return Q(V(G))}catch{return null}}}return null}var Y=Object.assign,K=0,re,ie,Ee,fe,A,Oe,Ae;function _e(){}_e.__reactDisabledLog=!0;function Te(){{if(K===0){re=console.log,ie=console.info,Ee=console.warn,fe=console.error,A=console.group,Oe=console.groupCollapsed,Ae=console.groupEnd;var d={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}K++}}function q(){{if(K--,K===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},d,{value:re}),info:Y({},d,{value:ie}),warn:Y({},d,{value:Ee}),error:Y({},d,{value:fe}),group:Y({},d,{value:A}),groupCollapsed:Y({},d,{value:Oe}),groupEnd:Y({},d,{value:Ae})})}K<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=E.ReactCurrentDispatcher,ue;function me(d,x,C){{if(ue===void 0)try{throw Error()}catch(z){var I=z.stack.trim().match(/\n( *(at )?)/);ue=I&&I[1]||""}return`
19
+ `+ue+d}}var P=!1,W;{var se=typeof WeakMap=="function"?WeakMap:Map;W=new se}function ae(d,x){if(!d||P)return"";{var C=W.get(d);if(C!==void 0)return C}var I;P=!0;var z=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var G;G=H.current,H.current=null,Te();try{if(x){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(oe){I=oe}Reflect.construct(d,[],V)}else{try{V.call()}catch(oe){I=oe}d.call(V.prototype)}}else{try{throw Error()}catch(oe){I=oe}d()}}catch(oe){if(oe&&I&&typeof oe.stack=="string"){for(var B=oe.stack.split(`
20
+ `),te=I.stack.split(`
21
+ `),X=B.length-1,J=te.length-1;X>=1&&J>=0&&B[X]!==te[J];)J--;for(;X>=1&&J>=0;X--,J--)if(B[X]!==te[J]){if(X!==1||J!==1)do if(X--,J--,J<0||B[X]!==te[J]){var le=`
22
+ `+B[X].replace(" at new "," at ");return d.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",d.displayName)),typeof d=="function"&&W.set(d,le),le}while(X>=1&&J>=0);break}}}finally{P=!1,H.current=G,q(),Error.prepareStackTrace=z}var ze=d?d.displayName||d.name:"",Ie=ze?me(ze):"";return typeof d=="function"&&W.set(d,Ie),Ie}function he(d,x,C){return ae(d,!1)}function ke(d){var x=d.prototype;return!!(x&&x.isReactComponent)}function Ce(d,x,C){if(d==null)return"";if(typeof d=="function")return ae(d,ke(d));if(typeof d=="string")return me(d);switch(d){case c:return me("Suspense");case f:return me("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case u:return he(d.render);case p:return Ce(d.type,x,C);case h:{var I=d,z=I._payload,G=I._init;try{return Ce(G(z),x,C)}catch{}}}return""}var be=Object.prototype.hasOwnProperty,lo={},co=E.ReactDebugCurrentFrame;function pr(d){if(d){var x=d._owner,C=Ce(d.type,d._source,x?x.type:null);co.setExtraStackFrame(C)}else co.setExtraStackFrame(null)}function gl(d,x,C,I,z){{var G=Function.call.bind(be);for(var V in d)if(G(d,V)){var B=void 0;try{if(typeof d[V]!="function"){var te=Error((I||"React class")+": "+C+" type `"+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[V]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw te.name="Invariant Violation",te}B=d[V](x,V,I,C,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(X){B=X}B&&!(B instanceof Error)&&(pr(z),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",I||"React class",C,V,typeof B),pr(null)),B instanceof Error&&!(B.message in lo)&&(lo[B.message]=!0,pr(z),w("Failed %s type: %s",C,B.message),pr(null))}}}var xl=Array.isArray;function Yr(d){return xl(d)}function yl(d){{var x=typeof Symbol=="function"&&Symbol.toStringTag,C=x&&d[Symbol.toStringTag]||d.constructor.name||"Object";return C}}function wl(d){try{return uo(d),!1}catch{return!0}}function uo(d){return""+d}function fo(d){if(wl(d))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",yl(d)),uo(d)}var mo=E.ReactCurrentOwner,jl={key:!0,ref:!0,__self:!0,__source:!0},po,vo;function El(d){if(be.call(d,"ref")){var x=Object.getOwnPropertyDescriptor(d,"ref").get;if(x&&x.isReactWarning)return!1}return d.ref!==void 0}function kl(d){if(be.call(d,"key")){var x=Object.getOwnPropertyDescriptor(d,"key").get;if(x&&x.isReactWarning)return!1}return d.key!==void 0}function Cl(d,x){typeof d.ref=="string"&&mo.current}function Nl(d,x){{var C=function(){po||(po=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",x))};C.isReactWarning=!0,Object.defineProperty(d,"key",{get:C,configurable:!0})}}function Sl(d,x){{var C=function(){vo||(vo=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",x))};C.isReactWarning=!0,Object.defineProperty(d,"ref",{get:C,configurable:!0})}}var Pl=function(d,x,C,I,z,G,V){var B={$$typeof:r,type:d,key:x,ref:C,props:V,_owner:G};return B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(B,"_self",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.defineProperty(B,"_source",{configurable:!1,enumerable:!1,writable:!1,value:z}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B};function Ml(d,x,C,I,z){{var G,V={},B=null,te=null;C!==void 0&&(fo(C),B=""+C),kl(x)&&(fo(x.key),B=""+x.key),El(x)&&(te=x.ref,Cl(x,z));for(G in x)be.call(x,G)&&!jl.hasOwnProperty(G)&&(V[G]=x[G]);if(d&&d.defaultProps){var X=d.defaultProps;for(G in X)V[G]===void 0&&(V[G]=X[G])}if(B||te){var J=typeof d=="function"?d.displayName||d.name||"Unknown":d;B&&Nl(V,J),te&&Sl(V,J)}return Pl(d,B,te,z,I,mo.current,V)}}var Qr=E.ReactCurrentOwner,ho=E.ReactDebugCurrentFrame;function Ve(d){if(d){var x=d._owner,C=Ce(d.type,d._source,x?x.type:null);ho.setExtraStackFrame(C)}else ho.setExtraStackFrame(null)}var Hr;Hr=!1;function Kr(d){return typeof d=="object"&&d!==null&&d.$$typeof===r}function bo(){{if(Qr.current){var d=Q(Qr.current.type);if(d)return`
23
23
 
24
- Check the render method of \``+n+"`."}return""}}function Kt(n){return""}var Vr={};function Xt(n){{var d=Br();if(!d){var h=typeof n=="string"?n:n.displayName||n.name;h&&(d=`
24
+ Check the render method of \``+d+"`."}return""}}function Rl(d){return""}var go={};function Ol(d){{var x=bo();if(!x){var C=typeof d=="string"?d:d.displayName||d.name;C&&(x=`
25
25
 
26
- Check the top-level render call using <`+h+">.")}return d}}function $r(n,d){{if(!n._store||n._store.validated||n.key!=null)return;n._store.validated=!0;var h=Xt(d);if(Vr[h])return;Vr[h]=!0;var w="";n&&n._owner&&n._owner!==Qe.current&&(w=" It was passed a child from "+D(n._owner.type)+"."),le(n),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',h,w),le(null)}}function Qr(n,d){{if(typeof n!="object")return;if($e(n))for(var h=0;h<n.length;h++){var w=n[h];Ye(w)&&$r(w,d)}else if(Ye(n))n._store&&(n._store.validated=!0);else if(n){var L=P(n);if(typeof L=="function"&&L!==n.entries)for(var I=L.call(n),O;!(O=I.next()).done;)Ye(O.value)&&$r(O.value,d)}}}function Zt(n){{var d=n.type;if(d==null||typeof d=="string")return;var h;if(typeof d=="function")h=d.propTypes;else if(typeof d=="object"&&(d.$$typeof===c||d.$$typeof===m))h=d.propTypes;else return;if(h){var w=D(d);Ft(h,n.props,"prop",w,n)}else if(d.PropTypes!==void 0&&!We){We=!0;var L=D(d);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",L||"Unknown")}typeof d.getDefaultProps=="function"&&!d.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qt(n){{for(var d=Object.keys(n.props),h=0;h<d.length;h++){var w=d[h];if(w!=="children"&&w!=="key"){le(n),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",w),le(null);break}}n.ref!==null&&(le(n),_("Invalid attribute `ref` supplied to `React.Fragment`."),le(null))}}var Wr={};function Yr(n,d,h,w,L,I){{var O=M(n);if(!O){var E="";(n===void 0||typeof n=="object"&&n!==null&&Object.keys(n).length===0)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var H=Kt();H?E+=H:E+=Br();var R;n===null?R="null":$e(n)?R="array":n!==void 0&&n.$$typeof===r?(R="<"+(D(n.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):R=typeof n,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,E)}var F=Jt(n,d,h,L,I);if(F==null)return F;if(O){var J=d.children;if(J!==void 0)if(w)if($e(J)){for(var ce=0;ce<J.length;ce++)Qr(J[ce],n);Object.freeze&&Object.freeze(J)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Qr(J,n)}if(me.call(d,"key")){var te=D(n),G=Object.keys(d).filter(function(an){return an!=="key"}),ze=G.length>0?"{key: someKey, "+G.join(": ..., ")+": ...}":"{key: someKey}";if(!Wr[te+ze]){var sn=G.length>0?"{"+G.join(": ..., ")+": ...}":"{}";_(`A props object containing a "key" prop is being spread into JSX:
26
+ Check the top-level render call using <`+C+">.")}return x}}function xo(d,x){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var C=Ol(x);if(go[C])return;go[C]=!0;var I="";d&&d._owner&&d._owner!==Qr.current&&(I=" It was passed a child from "+Q(d._owner.type)+"."),Ve(d),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',C,I),Ve(null)}}function yo(d,x){{if(typeof d!="object")return;if(Yr(d))for(var C=0;C<d.length;C++){var I=d[C];Kr(I)&&xo(I,x)}else if(Kr(d))d._store&&(d._store.validated=!0);else if(d){var z=g(d);if(typeof z=="function"&&z!==d.entries)for(var G=z.call(d),V;!(V=G.next()).done;)Kr(V.value)&&xo(V.value,x)}}}function Al(d){{var x=d.type;if(x==null||typeof x=="string")return;var C;if(typeof x=="function")C=x.propTypes;else if(typeof x=="object"&&(x.$$typeof===u||x.$$typeof===p))C=x.propTypes;else return;if(C){var I=Q(x);gl(C,d.props,"prop",I,d)}else if(x.PropTypes!==void 0&&!Hr){Hr=!0;var z=Q(x);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",z||"Unknown")}typeof x.getDefaultProps=="function"&&!x.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _l(d){{for(var x=Object.keys(d.props),C=0;C<x.length;C++){var I=x[C];if(I!=="children"&&I!=="key"){Ve(d),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",I),Ve(null);break}}d.ref!==null&&(Ve(d),w("Invalid attribute `ref` supplied to `React.Fragment`."),Ve(null))}}var wo={};function jo(d,x,C,I,z,G){{var V=L(d);if(!V){var B="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(B+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var te=Rl();te?B+=te:B+=bo();var X;d===null?X="null":Yr(d)?X="array":d!==void 0&&d.$$typeof===r?(X="<"+(Q(d.type)||"Unknown")+" />",B=" Did you accidentally export a JSX literal instead of a component?"):X=typeof d,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",X,B)}var J=Ml(d,x,C,z,G);if(J==null)return J;if(V){var le=x.children;if(le!==void 0)if(I)if(Yr(le)){for(var ze=0;ze<le.length;ze++)yo(le[ze],d);Object.freeze&&Object.freeze(le)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else yo(le,d)}if(be.call(x,"key")){var Ie=Q(d),oe=Object.keys(x).filter(function(Fl){return Fl!=="key"}),Xr=oe.length>0?"{key: someKey, "+oe.join(": ..., ")+": ...}":"{key: someKey}";if(!wo[Ie+Xr]){var $l=oe.length>0?"{"+oe.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
27
27
  let props = %s;
28
28
  <%s {...props} />
29
29
  React keys must be passed directly to JSX without using spread:
30
30
  let props = %s;
31
- <%s key={someKey} {...props} />`,ze,te,sn,te),Wr[te+ze]=!0}}return n===a?qt(F):Zt(F),F}}function en(n,d,h){return Yr(n,d,h,!0)}function rn(n,d,h){return Yr(n,d,h,!1)}var tn=rn,nn=en;de.Fragment=a,de.jsx=tn,de.jsxs=nn})()),de}var Ge;function Jr(){return Ge||(Ge=1,process.env.NODE_ENV==="production"?ve.exports=Ur():ve.exports=Gr()),ve.exports}var t=Jr();function Je(e){return e.type==="PLC"}function Kr(e){return e.type==="FMB"}function Ke(e){if(e==null||typeof e!="object")return"FMB";const r=e;if(r.type==="PLC")return"PLC";if(r.type==="FMB")return"FMB";const s=r.questionList;if(Array.isArray(s)&&s.length>0){const a=s[0];if(typeof a.question_number=="number"&&(a.question_type==="scq"||a.question_type==="mcq"))return"PLC"}return"FMB"}function Xr(e){return Je(e??{type:"FMB"})}function Zr(e){return e==null||typeof e!="object"?!1:e.type==="FMB"}const qr={scq:"single-select",mcq:"multi-select"};function et(e,r){const s=`Q${e.question_number}`,a=qr[e.question_type];return{surveyId:r,questionId:s,description:e.question,descriptionEN:e.question,type:a,isMandatory:e.isMandatory,options:e.options??[],optionsEN:e.options??[],outcomeDescription:"",questionDescriptionOptional:"",sourceQuestion:"",...e.image&&e.image.trim()!==""?{questionImage:e.image.trim()}:{}}}function Xe(e){const r=e.surveyId,s=e.questionList.map(a=>et(a,r));return{type:"FMB",surveyId:r,...e.surveyCode!=null&&{surveyCode:e.surveyCode},...e.surveyName!=null&&{surveyName:e.surveyName},medium:e.medium,...e.config!=null&&Object.keys(e.config).length>0&&{config:e.config},questionList:s}}function rt(e){const r=new Map;return e.questionList.forEach(s=>{r.set(s.question_number,s)}),r}function tt(e){const r=new Map;return e.questionList.forEach(s=>{r.set(`Q${s.question_number}`,s.question_number)}),r}function nt(e){return String.fromCharCode(65+e)}function st(e,r){const s=Array.isArray(e)?e:[e];if(s.length===0||s.length===1&&s[0]==="")return[];const a=[];for(const o of s){const i=r.findIndex(f=>f===o||f&&f.trim()===String(o).trim());i>=0&&a.push(nt(i))}return a}function Ce(e,r){const s=tt(r),a=rt(r),o=e.responses.map(i=>{const f=s.get(i.questionId);if(f===void 0)return null;const l=a.get(f);if(!l)return null;const c=i.userAnswer,u=Array.isArray(c)?c.map(String):String(c??""),p=st(u,l.options??[]);return{question_number:f,question:l.question,correct_answer:l.correct_answer??[],selected_answer:p,correct_answer_option:l.correct_answer_option??[]}}).filter(i=>i!==null);return{type:"PLC",surveyId:e.surveyId,...e.surveyCode!=null&&{surveyCode:e.surveyCode},...e.surveyName!=null&&{surveyName:e.surveyName},medium:r.medium,...r.config!=null&&{config:r.config},responses:o}}const Ze=["single-select","multi-select","drop-down","dropdown","text-response","calendar","video-response","voice-response","image-response","document-response","pdf-response","tabular-text-input","tabular-drop-down","tabular-check-box"];function qe(e){return Ze.includes(e)}function he(e){var r;switch(e.type){case"single-select":case"drop-down":case"dropdown":case"text-response":return"";case"multi-select":return[];case"calendar":case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return null;case"tabular-text-input":case"tabular-drop-down":return{};case"tabular-check-box":{const s={};return(r=e.tableQuestionValue)==null||r.forEach(a=>{s[a.rowId]=!1}),s}default:return null}}function at(e){const r=e.userAnswer;if(r==null)return he(e);switch(e.type){case"single-select":case"drop-down":case"dropdown":case"text-response":return typeof r=="string"?r:String(r);case"multi-select":return Array.isArray(r)?r.map(String):[];case"calendar":{if(typeof r=="string"){const s=new Date(r);return isNaN(s.getTime())?null:s}return r instanceof Date?r:null}case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{if(!Array.isArray(r))return he(e);const s=r,a={};return s.forEach(o=>{a[o.rowId]=o.rowAnswer}),a}case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return r&&typeof r=="object"&&"fileName"in r&&"binary"in r?r:null;default:return he(e)}}function ot(e){return e.questionId}function er(e,r){return Array.isArray(e)?e.includes(r):e===r}function Se(e,r,s=[]){const a=e.map(ot),o=new Set,i=new Set;e.forEach(v=>{Object.values(v.childrenQuestions??{}).forEach(x=>{x.forEach(b=>i.add(b))})}),e.filter(v=>!i.has(v.questionId)).forEach(v=>o.add(v.questionId)),e.forEach(v=>{var C;const x=v.childrenQuestions;if(!x||typeof x!="object")return;const b=(C=r[v.questionId])==null?void 0:C.value;Object.entries(x).forEach(([P,j])=>{Array.isArray(j)&&er(b,P)&&j.forEach(_=>{o.add(_),rr(e,r,_,o)})})});const l=a.filter(v=>o.has(v)),c=a.filter(v=>!o.has(v)),u=new Set(s),p=l.filter(v=>!u.has(v)),m=s.filter(v=>!o.has(v));return{visibleQuestions:l,hiddenQuestions:c,newlyVisible:p,newlyHidden:m}}function rr(e,r,s,a){var f;const o=e.find(l=>l.questionId===s);if(!(o!=null&&o.childrenQuestions))return;const i=(f=r[s])==null?void 0:f.value;Object.entries(o.childrenQuestions).forEach(([l,c])=>{Array.isArray(c)&&er(i,l)&&c.forEach(u=>{a.add(u),rr(e,r,u,a)})})}function tr(e,r){const s=new Set(r),a={};return Object.entries(e).forEach(([o,i])=>{s.has(o)||(a[o]=i)}),a}function nr(e,r){if(e==null)return!0;switch(r){case"single-select":case"drop-down":case"text-response":case"calendar":return e==="";case"multi-select":return!Array.isArray(e)||e.length===0;case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return!(e&&typeof e=="object"&&"binary"in e);case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{if(typeof e!="object"||e===null)return!0;const s=e;return Object.keys(s).length===0?!0:r==="tabular-check-box"?!Object.values(s).some(o=>o===!0):Object.values(s).every(o=>o===""||o===null||o===void 0)}default:return e===""||e===null||e===void 0}}function it(e,r){const s=e.textLimitCharacter;if(s==null||s<=0)return null;if(e.type==="text-response"&&typeof r=="string")return r.length>s?`Maximum ${s} characters allowed`:null;if(e.type==="tabular-text-input"&&typeof r=="object"&&r!==null){const a=r;for(const[o,i]of Object.entries(a))if(i!=null&&String(i).length>s)return`Field "${o}" exceeds ${s} characters`}return null}function lt(e,r){if(e.textInputType!=="Numeric")return null;if(e.type==="text-response"){if(r===""||r==null)return null;const s=String(r).trim();return/^\d+$/.test(s)?null:"Please enter numbers only"}if(e.type==="tabular-text-input"&&typeof r=="object"&&r!==null){const s=r;for(const[a,o]of Object.entries(s))if(o!=null&&o!==""){const i=String(o).trim();if(!/^\d+$/.test(i))return`Field "${a}" must contain numbers only`}}return null}function ct(e,r){const s=e.minValue!=null?Number(e.minValue):NaN,a=e.maxValue!=null?Number(e.maxValue):NaN;if(isNaN(s)&&isNaN(a))return null;if(e.type==="text-response"&&typeof r=="string"){if(r.trim()==="")return null;const o=Number(r);return isNaN(o)?null:!isNaN(s)&&!isNaN(a)&&(o<s||o>a)?`Value must be between ${s} and ${a}`:!isNaN(s)&&o<s?`Value must be at least ${s}`:!isNaN(a)&&o>a?`Value must be at most ${a}`:null}if(e.type==="tabular-text-input"&&typeof r=="object"&&r!==null){const o=r;for(const[i,f]of Object.entries(o))if(f!=null&&String(f).trim()!==""){const l=Number(f);if(!isNaN(l)){if(!isNaN(s)&&!isNaN(a)&&(l<s||l>a))return`Field "${i}" must be between ${s} and ${a}`;if(!isNaN(s)&&l<s)return`Field "${i}" must be at least ${s}`;if(!isNaN(a)&&l>a)return`Field "${i}" must be at most ${a}`}}}return null}function Me(e,r,s){const a=new Map(e.map(i=>[i.questionId,i])),o=[];return s.forEach(i=>{const f=a.get(i);if(!f)return;const l=r[i];if(f.isMandatory&&nr(l,f.type)){o.push({questionId:i,message:"This question is required"});return}if(nr(l,f.type))return;const c=it(f,l);if(c){o.push({questionId:i,message:c});return}const u=lt(f,l);if(u){o.push({questionId:i,message:u});return}const p=ct(f,l);p&&o.push({questionId:i,message:p})}),o}function ut(e,r,s){return Me(e,r,s).length===0}function dt(e){var r;if(e&&typeof e=="object"&&((r=e.constructor)==null?void 0:r.name)==="Date"){const s=e,a=s.getFullYear(),o=String(s.getMonth()+1).padStart(2,"0"),i=String(s.getDate()).padStart(2,"0");return`${a}-${o}-${i}`}if(typeof e=="string"&&e.includes("T"))try{const s=new Date(e);if(!isNaN(s.getTime())){const a=s.getFullYear(),o=String(s.getMonth()+1).padStart(2,"0"),i=String(s.getDate()).padStart(2,"0");return`${a}-${o}-${i}`}}catch{}return e}function ft(e,r){if(r==null)return e.type==="multi-select"?[]:"";switch(e.type){case"single-select":case"drop-down":case"text-response":return typeof r=="string"?r:String(r);case"multi-select":return Array.isArray(r)?r.map(String):[];case"calendar":return dt(r);case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return r&&typeof r=="object"&&"fileName"in r&&"binary"in r,r;case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{const s=e.tableQuestionValue??[];if(typeof r!="object"||r===null)return s.map(o=>({rowId:o.rowId,rowQuestion:o.rowQuestion,rowAnswer:""}));const a=r;return s.map(o=>({rowId:o.rowId,rowQuestion:o.rowQuestion,rowAnswer:a[o.rowId]??(e.type==="tabular-check-box"?!1:"")}))}default:return r}}function Oe(e,r,s){const a=new Map(e.questionList.map(i=>[i.questionId,i])),o=[];return s.forEach(i=>{const f=r[i],l=a.get(i);if(!l)return;const c=ft(l,f);o.push({questionId:i,userAnswer:c})}),{surveyId:e.surveyId,...e.surveyCode!=null&&{surveyCode:e.surveyCode},...e.surveyName!=null&&{surveyName:e.surveyName},...e.type!=null&&{type:e.type},responses:o}}const _e={"image-response":["image/jpeg","image/png"],"video-response":["video/mp4"],"voice-response":["audio/mpeg"],"document-response":["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/plain","application/json"],"pdf-response":["application/pdf"]},Le={"image-response":20,"video-response":60,"voice-response":20,"document-response":25,"pdf-response":25};function Ie(e){return e!=null&&typeof e=="object"&&"fileName"in e&&"binary"in e}const xe=_e,Pe=Le,pt=["image-response","video-response","voice-response","document-response","pdf-response"];function sr(e){const r={..._e},s={};for(const a of pt){const o=(e==null?void 0:e[a])??(a==="voice-response"?e==null?void 0:e["audio-response"]:void 0),i=(o==null?void 0:o.supportedType)??(o==null?void 0:o.suppotedType);i!=null&&i.length&&(r[a]=i);const f=o==null?void 0:o.supportedSize;if(f!=null&&f>0)s[a]=f*1024*1024;else{const l=Le[a]??10;s[a]=l*1024*1024}}return{allowedTypes:r,maxSizeBytes:s}}function ar(e,r,s){const a=(s==null?void 0:s.allowedTypes[r])??xe[r];return a!=null&&a.length?a.some(i=>e.type===i||e.type.startsWith(i.split("/")[0]+"/"))?{valid:!0}:{valid:!1,error:`File type ${e.type} is not allowed. Allowed: ${a.join(", ")}`}:{valid:!0}}function or(e,r,s){const a=(s==null?void 0:s.maxSizeBytes[r])??(Pe[r]??10)*1024*1024;return e.size>a?{valid:!1,error:`File size must be less than ${Math.round(a/1048576)}MB`}:{valid:!0}}function ir(e,r,s){const a=ar(e,r,s);return a.valid?or(e,r,s):a}function lr(e){return new Promise((r,s)=>{const a=new FileReader;a.onload=()=>{const o=a.result;if(typeof o!="string"){s(new Error("Failed to read file as base64"));return}const i=o.includes(",")?o.split(",")[1]:o;r({fileName:e.name,fileType:e.type,binary:i})},a.onerror=()=>s(a.error),a.readAsDataURL(e)})}function Te(e,r){if(!r||r==="None"||r==="Text")return!0;const s=e.trim();switch(r){case"Numeric":return/^\d+$/.test(s);case"Alphabet":case"AlphaNumeric":return/^[A-Za-z0-9]+$/.test(s);default:return!0}}function De(e,r){var s;if(r==null)return!1;switch(e.type){case"single-select":case"dropdown":case"drop-down":case"text-response":return r!==""&&r!==null&&r!==void 0;case"multi-select":return Array.isArray(r)&&r.length>0;case"calendar":return r!=null&&typeof r=="object"&&((s=r.constructor)==null?void 0:s.name)==="Date";case"video-response":case"voice-response":case"image-response":case"document-response":case"pdf-response":return Ie(r)||typeof r=="string"&&r!==""||r!=null&&typeof r=="object"&&"devicePath"in r;case"tabular-text-input":case"tabular-drop-down":{if(typeof r!="object")return!1;const a=r,o=e.tableQuestionValue||[];return o.length===0?Object.keys(a).length>0&&Object.values(a).some(i=>i!==""&&i!==null&&i!==void 0):e.isMandatory?o.every(i=>{const f=a[i.rowId];return f!==""&&f!==null&&f!==void 0}):o.some(i=>{const f=a[i.rowId];return f!==""&&f!==null&&f!==void 0})}case"tabular-check-box":{if(typeof r!="object")return!1;const a=r,o=e.tableQuestionValue||[];return o.length===0?Object.values(a).some(i=>i===!0):e.isMandatory?o.some(i=>a[i.rowId]===!0):o.length>0&&Object.keys(a).length>0}default:return!1}}function cr(e,r){if(!De(e,r))return!e.isMandatory;if(e.type==="tabular-text-input"||e.type==="tabular-drop-down"||e.type==="tabular-check-box"){if(typeof r=="object"&&r!==null){const s=r;if(e.textLimitCharacter){const a=parseInt(e.textLimitCharacter.toString(),10);for(const o of Object.values(s))if(o!=null&&String(o).length>a)return!1}if(e.textInputType){for(const a of Object.values(s))if(a!=null&&!Te(String(a),e.textInputType))return!1}}}else if(e.textLimitCharacter&&r!=null&&String(r).length>parseInt(e.textLimitCharacter.toString(),10)||e.textInputType&&r!=null&&!Te(String(r),e.textInputType))return!1;return!0}function Re(e,r,s,a=!1){if(a)return"completed";const o=r.find(c=>c.questionId===e);if(!o)return"unanswered";const i=s[e],f=De(o,i),l=cr(o,i);return f&&l?"completed":f&&!l?"error":!f&&o.isMandatory?"required":"unanswered"}function ur(e,r,s,a=!1){const o={};for(const i of s)o[i]=Re(i,e,r,a);return o}function k(...e){return e.filter(Boolean).join(" ").trim()||""}function dr({options:e,selectionMode:r,selectedOptions:s,onOptionSelect:a,className:o="",disabled:i=!1}){const f=c=>{if(r==="single")a(c);else{const u=Array.isArray(s)?s:[];u.includes(c)?a(u.filter(p=>p!==c)):a([...u,c])}},l=c=>r==="single"?s===c:Array.isArray(s)&&s.includes(c);return t.jsx("div",{className:k("mcqRoot",o),children:e.map(c=>{const u=l(c.id);return t.jsx("button",{type:"button",onClick:()=>f(c.id),className:k("mcqOption",u?"mcqOptionSelected":"mcqOptionUnselected"),disabled:i,children:t.jsxs("div",{className:"mcqOptionContent",children:[t.jsx("div",{className:"mcqOptionIcon",children:r==="single"?t.jsx("div",{className:k("mcqRadio",u&&"mcqRadioSelected"),children:u&&t.jsx("div",{style:{width:"100%",height:"100%",transform:"scale(0.5)",borderRadius:"9999px",background:"var(--primary-600)"}})}):t.jsx("div",{className:k("mcqCheckbox",u&&"mcqCheckboxSelected"),children:u&&t.jsx("svg",{fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})}),t.jsx("span",{className:"mcqOptionText",children:c.text})]})},c.id)})})}function mt({className:e,...r}){return t.jsx("textarea",{"data-slot":"textarea",className:k("textarea",e),...r})}function vt({value:e="",onChange:r,placeholder:s="Enter your response...",className:a="",disabled:o=!1,minRows:i=3,maxRows:f=8,characterLimit:l}){const c=v=>{let x=v.target.value;l&&x.length>l&&(x=x.slice(0,l)),r(x)},u=e.length,p=l&&u>=l*.9,m=l&&u>=l;return t.jsxs("div",{className:k("textResponseRoot",a),children:[t.jsx("div",{className:"textResponseFieldWrap",children:t.jsx(mt,{value:e,onChange:c,placeholder:s,disabled:o,rows:i,className:"textResponseTextarea",style:{minHeight:`${i*1.5}rem`,maxHeight:`${f*1.5}rem`,boxSizing:"border-box",overflow:"hidden",borderRadius:"0.5rem",border:"1px solid var(--neutral-200)",backgroundColor:"var(--neutral-50)",padding:"0.75rem 13px",width:"100%"}})}),l!=null&&t.jsx("div",{className:"textResponseCounterWrap",children:t.jsxs("span",{className:k("textResponseCounter",m?"textResponseCounterAtLimit":void 0,p&&!m?"textResponseCounterNearLimit":void 0),children:[u,"/",l]})})]})}function ht({options:e,value:r,onChange:s,placeholder:a="Select an option",disabled:o=!1,error:i,required:f=!1,className:l=""}){const[c,u]=y.useState(!1),[p,m]=y.useState(-1),v=y.useRef(null),x=e.find(j=>j.value===r),b=(x==null?void 0:x.label)||"";y.useEffect(()=>{function j(_){v.current&&!v.current.contains(_.target)&&(u(!1),m(-1))}return c&&document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[c]),y.useEffect(()=>{function j(_){if(!c)return;const V=e.filter(B=>!B.disabled);switch(_.key){case"ArrowDown":_.preventDefault(),m(B=>B+1>=V.length?0:B+1);break;case"ArrowUp":_.preventDefault(),m(B=>B-1<0?V.length-1:B-1);break;case"Enter":_.preventDefault(),p>=0&&V[p]&&(s(V[p].value),u(!1));break;case"Escape":u(!1),m(-1);break}}return c&&document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[c,p,e,s]);const C=()=>{o||(u(j=>!j),m(-1))},P=j=>{j.disabled||(s(j.value),u(!1),m(-1))};return t.jsxs("div",{className:k("dropdownRoot",l),ref:v,children:[t.jsxs("button",{type:"button",className:k("dropdownTrigger",i&&"dropdownTriggerError"),onClick:C,disabled:o,"aria-haspopup":"listbox","aria-expanded":c,children:[t.jsxs("span",{className:k("dropdownValue",!b&&"dropdownValuePlaceholder"),children:[b||a,f&&!b&&t.jsx("span",{style:{marginLeft:"0.25rem",color:"var(--color-error)"},children:"*"})]}),t.jsx("span",{className:k("dropdownChevron",c&&"dropdownChevronOpen"),children:t.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),i&&t.jsx("p",{className:"dropdownError",children:i}),c&&t.jsx("div",{className:"dropdownList",role:"listbox",children:e.length===0?t.jsx("div",{className:"dropdownEmpty",children:"No options available"}):e.map(j=>{const V=e.filter(Q=>!Q.disabled).findIndex(Q=>Q.value===j.value),B=V===p,$=j.value===r;return t.jsx("div",{className:k("dropdownItem",j.disabled&&"dropdownItemDisabled",!j.disabled&&B&&"dropdownItemHighlighted",!j.disabled&&$&&"dropdownItemSelected"),onClick:()=>P(j),onMouseEnter:()=>!j.disabled&&m(V),role:"option","aria-selected":$,children:j.label},j.value)})})]})}function xt({columns:e,rows:r,inputConfig:s,values:a,onValueChange:o,className:i=""}){const f=c=>{const u=a==null?void 0:a.find(p=>p.rowId===c);return u?u.value:s.type==="checkbox"?!1:""},l=c=>{var p;const u=f(c.id);switch(s.type){case"dropdown":return t.jsxs("select",{value:String(u),onChange:m=>o(c.id,m.target.value),className:"tabularSelect",children:[t.jsx("option",{value:"",children:"Select"}),(p=s.options)==null?void 0:p.map(m=>t.jsx("option",{value:m.id,children:m.text},m.id))]});case"number":return t.jsx("input",{type:"number",value:String(u),onChange:m=>o(c.id,m.target.value),placeholder:s.placeholder,min:s.min,max:s.max,step:s.step,required:s.required,className:"tabularInput"});case"checkbox":return t.jsxs("div",{className:"tabularCheckboxWrap",children:[t.jsx("input",{type:"checkbox",id:`cb-${c.id}`,checked:!!u,onChange:m=>o(c.id,m.target.checked),required:s.required,className:"tabularCheckbox"}),s.checkboxLabel&&t.jsx("label",{htmlFor:`cb-${c.id}`,className:"tabularCheckboxLabel",children:s.checkboxLabel})]});case"text":default:return t.jsx("input",{type:"text",value:String(u),onChange:m=>{let v=m.target.value;s.maxLength&&v.length>s.maxLength||s.inputType&&v.trim()!==""&&!Te(v,s.inputType)||o(c.id,v)},placeholder:s.placeholder,required:s.required,maxLength:s.maxLength,className:"tabularInput"})}};return t.jsxs("div",{className:k("tabularRoot",i),children:[t.jsx("div",{className:"tabularHeader",children:e.map(c=>t.jsx("div",{className:"tabularHeaderCell",style:{width:c.width},children:c.title},c.id))}),t.jsx("div",{children:r.map(c=>{var u,p;return t.jsxs("div",{className:"tabularRow",children:[t.jsx("div",{className:"tabularLabelCell",style:{width:(u=e[0])==null?void 0:u.width},children:c.label}),t.jsx("div",{className:"tabularInputCell",style:{width:(p=e[1])==null?void 0:p.width},children:l(c)})]},c.id)})})]})}function bt(e){return`${["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`}const yt=["January","February","March","April","May","June","July","August","September","October","November","December"],gt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function jt({selectedDate:e,onDateSelect:r,placeholder:s="Select a date",className:a="",disabled:o=!1,minDate:i,maxDate:f}){const[l,c]=y.useState(!1),[u,p]=y.useState(()=>e??new Date),m=y.useRef(null);y.useEffect(()=>{l&&p(e??new Date)},[l]),y.useEffect(()=>{if(!l)return;const M=A=>{m.current&&!m.current.contains(A.target)&&c(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[l]);const v=M=>{r(M),c(!1)},x=M=>{const A=new Date(u);A.setMonth(parseInt(M,10)),p(A)},b=M=>{const A=new Date(u);A.setFullYear(parseInt(M,10)),p(A)},C=new Date().getFullYear(),P=i?i.getFullYear():C-100,j=f?f.getFullYear():C+100,_=Array.from({length:Math.max(1,j-P+1)},(M,A)=>P+A),V=M=>!!(i&&M<i||f&&M>f),B=u.getFullYear(),$=u.getMonth(),Q=new Date(B,$,1).getDay(),S=new Date(B,$+1,0).getDate(),U=Q,z=e?bt(e):"";return t.jsxs("div",{ref:m,className:k("datePickerRoot",a),children:[t.jsxs("button",{type:"button",onClick:()=>!o&&c(M=>!M),className:k("datePickerTrigger",!z&&"datePickerTriggerPlaceholder"),style:{backgroundColor:"white"},children:[t.jsx("svg",{className:"datePickerIcon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),z||s]}),l&&t.jsxs("div",{className:"datePickerDropdown",children:[t.jsxs("div",{className:"datePickerHeader",children:[t.jsx("select",{value:u.getMonth().toString(),onChange:M=>x(M.target.value),className:"datePickerSelect",style:{width:"8rem"},children:yt.map((M,A)=>t.jsx("option",{value:A.toString(),children:M},M))}),t.jsx("select",{value:u.getFullYear().toString(),onChange:M=>b(M.target.value),className:"datePickerSelect",style:{width:"6rem"},children:_.map(M=>t.jsx("option",{value:M.toString(),children:M},M))})]}),t.jsxs("div",{className:"datePickerGrid",children:[t.jsx("div",{className:"datePickerWeekdays",children:gt.map(M=>t.jsx("div",{children:M},M))}),t.jsxs("div",{className:"datePickerDays",children:[Array.from({length:U},(M,A)=>t.jsx("div",{},`empty-${A}`)),Array.from({length:S},(M,A)=>{const Y=A+1,D=new Date(B,$,Y),W=V(D),Z=e&&e.getFullYear()===B&&e.getMonth()===$&&e.getDate()===Y;return t.jsx("button",{type:"button",disabled:W,onClick:()=>!W&&v(D),className:k("datePickerDay",Z&&"datePickerDaySelected"),children:Y},Y)})]})]})]})]})}const wt={"image-response":{label:"Image",showPreview:!0},"video-response":{label:"Video",showPreview:!0},"voice-response":{label:"Audio",showPreview:!0},"document-response":{label:"Document",showPreview:!0},"pdf-response":{label:"PDF",showPreview:!0}};function Ae({questionType:e}){const r="h-8 w-8 text-[var(--primary-600)]";return e==="image-response"?t.jsx("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}):e==="video-response"?t.jsx("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}):e==="document-response"?t.jsx("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}):e==="pdf-response"?t.jsx("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}):t.jsx("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z"})})}function Nt({questionType:e,value:r,onChange:s,className:a="",disabled:o=!1,mediaConfig:i}){var $,Q;const[f,l]=y.useState(!1),[c,u]=y.useState(null),p=y.useRef(null),m=wt[e],v=(($=i==null?void 0:i.allowedTypes[e])==null?void 0:$.join(","))??((Q=xe[e])==null?void 0:Q.join(","))??"",x=(i==null?void 0:i.maxSizeBytes[e])!=null?Math.round(i.maxSizeBytes[e]/(1024*1024)):Pe[e]??10,b=(i==null?void 0:i.allowedTypes[e])??xe[e]??[],C=b.length>0?`Supported: ${b.join(", ")} (max ${x}MB)`:`Max size: ${x}MB`,P=async S=>{u(null);const U=ir(S,e,i);if(!U.valid){u(U.error??"Invalid file"),s(null);return}try{const z=await lr(S);s(z)}catch{u("Failed to read file"),s(null)}},j=S=>{var z;if(S.preventDefault(),S.stopPropagation(),l(!1),o)return;const U=(z=S.dataTransfer.files)==null?void 0:z[0];U&&P(U)},_=S=>{var z;const U=(z=S.target.files)==null?void 0:z[0];U&&P(U),S.target.value=""},V=()=>{s(null),u(null)};if((r==null?void 0:r.binary)&&r){const S=`data:${r.fileType};base64,${r.binary}`;return t.jsxs("div",{className:`relative border border-rounded rounded-xl border-[var(--neutral-200)] bg-[var(--neutral-50)] ${a}`,children:[t.jsx("button",{type:"button",onClick:V,disabled:o,className:"absolute -top-3 -right-3 z-10 rounded-full border border-[var(--neutral-200)] bg-[var(--neutral-500)] p-1 text-[var(--primary-foreground)] transition-all hover:bg-[var(--primary-600)] hover:text-[var(--primary-foreground)] disabled:opacity-50","aria-label":"Remove",children:t.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),t.jsxs("div",{className:"p-4",children:[e==="image-response"&&t.jsx("img",{src:S,alt:"Uploaded",className:"max-h-64 w-full object-contain"}),e==="video-response"&&t.jsx("video",{src:S,controls:!0,className:"max-h-64 w-full",children:"Your browser does not support the video tag."}),e==="voice-response"&&t.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[t.jsx(Ae,{questionType:"voice-response"}),t.jsx("p",{className:"text-sm font-medium text-textBlack",children:r.fileName}),t.jsx("audio",{src:S,controls:!0,className:"w-full max-w-sm",children:"Your browser does not support the audio tag."})]}),e==="pdf-response"&&t.jsxs("div",{className:"flex flex-col space-y-2",children:[t.jsx("iframe",{src:S,title:"PDF preview",className:"h-96 w-full rounded border border-[var(--neutral-200)] bg-[var(--neutral-50)]"}),t.jsx("p",{className:"text-sm text-textGray",children:r.fileName})]}),e==="document-response"&&t.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[t.jsx(Ae,{questionType:"document-response"}),t.jsx("p",{className:"text-sm font-medium text-textBlack",children:r.fileName}),t.jsx("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-[var(--primary-600)] hover:underline",children:"View / Open file"})]}),m.showPreview&&e!=="voice-response"&&e!=="document-response"&&e!=="pdf-response"&&t.jsx("p",{className:"mt-2 text-sm text-textGray",children:r.fileName})]})]})}return t.jsxs("div",{className:a,children:[t.jsxs("div",{className:`relative border-2 border-rounded rounded-xl border-dashed p-8 text-center transition-all ${f?"border-[var(--primary-600)] bg-[var(--primary-50)]":"border-[var(--neutral-200)] bg-[var(--neutral-50)] hover:border-[var(--primary-600)] hover:bg-[var(--primary-50)]"} ${o?"cursor-not-allowed opacity-50":"cursor-pointer"}`,onDragEnter:S=>{S.preventDefault(),S.stopPropagation(),o||l(!0)},onDragLeave:S=>{S.preventDefault(),S.stopPropagation(),l(!1)},onDragOver:S=>{S.preventDefault(),S.stopPropagation()},onDrop:j,onClick:()=>{var S;return!o&&((S=p.current)==null?void 0:S.click())},children:[t.jsx("input",{ref:p,type:"file",accept:v,onChange:_,disabled:o,className:"hidden","aria-label":`Select ${m.label} file`}),t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"flex justify-center",children:t.jsx(Ae,{questionType:e})}),t.jsxs("div",{children:[t.jsxs("p",{className:"text-sm font-medium text-[var(--primary-600)]",children:["Tap to Upload ",m.label]}),t.jsxs("p",{className:"mt-1 text-xs text-textGray",children:["or drag and drop your ",m.label.toLowerCase()," here"]})]}),t.jsx("div",{className:"text-xs text-textGray",children:t.jsx("p",{children:C})})]})]}),c&&t.jsx("div",{className:"mt-4 rounded-lg border border-[var(--error-200)] bg-[var(--error-50)] p-3",children:t.jsx("p",{className:"text-xs text-error",children:c})})]})}function ne({error:e,className:r=""}){return e?t.jsx("p",{className:k("errorMessage",r),children:e}):null}function kt({questionType:e,question:r,value:s,onChange:a,error:o,disabled:i=!1,mediaConfig:f,className:l=""}){return t.jsxs("div",{className:l,children:[t.jsx(Nt,{questionType:e,value:s,onChange:a,disabled:i,mediaConfig:f}),t.jsx(ne,{error:o})]})}function Et({question:e,value:r,onChange:s,error:a,touched:o=!0,disabled:i=!1,mediaConfig:f,className:l=""}){const c=()=>e.options?e.options.map((x,b)=>{var C;return{value:x,label:((C=e.optionsEN)==null?void 0:C[b])??x,disabled:!1}}):[],u=()=>e.options?e.options.map((x,b)=>{var C;return{id:x,text:((C=e.optionsEN)==null?void 0:C[b])??x}}):[],p=()=>{if(!e.tableHeaderValue||!e.tableQuestionValue)return null;const x=e.tableHeaderValue.map((P,j)=>({id:`col-${j}`,title:P,width:j===0?"60%":"40%"})),b=e.tableQuestionValue.map(P=>({id:P.rowId,label:P.rowQuestion}));let C;switch(e.type){case"tabular-text-input":C={type:"text",placeholder:"Enter text",required:e.isMandatory,maxLength:e.textLimitCharacter?parseInt(e.textLimitCharacter.toString(),10):void 0,inputType:e.textInputType};break;case"tabular-drop-down":{C={type:"dropdown",options:(e.optionsEN??e.options??[]).map(j=>({id:j,text:j})),required:e.isMandatory};break}case"tabular-check-box":C={type:"checkbox",checkboxLabel:"Yes",required:e.isMandatory};break;default:C={type:"text",required:e.isMandatory}}return{columns:x,rows:b,inputConfig:C}},m=()=>!r||typeof r!="object"?[]:Array.isArray(r)?r.map(b=>({rowId:b.rowId,value:b.rowAnswer??""})):Object.entries(r).map(([b,C])=>({rowId:b,value:C})),v=(x,b)=>{s({...r||{},[x]:b})};switch(e.type){case"single-select":return t.jsxs("div",{className:l,children:[t.jsx(dr,{options:u(),selectedOptions:String(r??""),onOptionSelect:x=>s(x),selectionMode:"single",disabled:i}),o&&t.jsx(ne,{error:a})]});case"multi-select":return t.jsxs("div",{className:l,children:[t.jsx(dr,{options:u(),selectedOptions:Array.isArray(r)?r.map(String):[],onOptionSelect:x=>s(x),selectionMode:"multiple",disabled:i}),o&&t.jsx(ne,{error:a})]});case"dropdown":case"drop-down":return t.jsx("div",{className:l,children:t.jsx(ht,{options:c(),value:String(r??""),onChange:x=>s(x),placeholder:"Select an option",disabled:i,error:o?a:void 0,required:e.isMandatory})});case"text-response":return t.jsxs("div",{className:l,children:[t.jsx(vt,{value:String(r??""),onChange:x=>s(x),characterLimit:e.textLimitCharacter??void 0,placeholder:"Enter your response...",disabled:i}),o&&t.jsx(ne,{error:a})]});case"calendar":return t.jsxs("div",{className:l,children:[t.jsx(jt,{selectedDate:r instanceof Date?r:void 0,onDateSelect:x=>s(x??null),disabled:i,placeholder:"Select a date"}),o&&t.jsx(ne,{error:a})]});case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":{const x=Ie(r)?r:null;return t.jsx("div",{className:l,children:t.jsx(kt,{questionType:e.type,question:e,value:x,onChange:b=>s(b),error:o?a:void 0,disabled:i,mediaConfig:f})})}case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{const x=p();return x?t.jsxs("div",{className:l,children:[t.jsx(xt,{columns:x.columns,rows:x.rows,inputConfig:x.inputConfig,values:m(),onValueChange:v}),o&&t.jsx(ne,{error:a})]}):t.jsx("div",{className:k("textError",l),children:"Invalid tabular question configuration"})}default:return t.jsxs("div",{className:k("textError",l),children:[t.jsxs("p",{children:["Unsupported question type: ",e.type]}),t.jsxs("p",{className:"textMuted",style:{marginTop:"0.25rem",fontSize:"0.875rem"},children:["Question: ",e.description]})]})}}function fr({question:e,value:r,onChange:s,disabled:a=!1,error:o,validationErrors:i=[],mediaConfig:f,className:l=""}){const c=i.filter(p=>p.questionId===e.questionId),u=o??c.map(p=>p.message).join("; ");return qe(e.type)?t.jsx(Et,{question:e,value:r,onChange:s,error:u,touched:!0,disabled:a,mediaConfig:f,className:l}):t.jsx("div",{className:l,children:t.jsxs("p",{className:"textError",children:["Unsupported question type: ",e.type]})})}function pr(e){switch(e){case"completed":return"statusCompleted";case"error":return"statusError";default:return"statusDefault"}}function mr(e){switch(e){case"completed":return"statusCompleted";case"error":return"statusError";case"required":return"statusRequired";default:return"statusDefault"}}function vr(e){switch(e){case"completed":return"statusIconCompleted";case"error":return"statusIconError";case"required":return"statusIconRequired";default:return"statusIconDefault"}}function hr({questions:e,activeQuestionId:r,onQuestionSelect:s,questionStatusMap:a={},className:o=""}){const i=y.useRef(null),f=y.useRef([]),l=r!=null?e.indexOf(r):-1,c=e.length>1;y.useEffect(()=>{if(l<0||l>=f.current.length)return;const m=f.current[l];m==null||m.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},[l,r]);const u=y.useCallback(()=>{if(l<=0)return;const m=e[l-1];m&&s(m)},[l,e,s]),p=y.useCallback(()=>{if(l>=e.length-1||l<0)return;const m=e[l+1];m&&s(m)},[l,e,s]);return e.length===0?null:t.jsxs("div",{className:k("carouselRoot",o),role:"navigation","aria-label":"Question navigation",children:[c&&t.jsx("button",{type:"button",onClick:u,disabled:l<=0,"aria-label":"Previous question",className:"carouselNavButton",children:t.jsx("svg",{fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})})}),t.jsx("div",{ref:i,className:k("carouselScroll","no-scrollbar"),style:{minHeight:0},children:e.map((m,v)=>{const x=m===r,b=a[m],C=pr(b);return t.jsx("button",{ref:P=>{f.current[v]=P},type:"button",onClick:()=>s(m),className:k("carouselPill",C),"aria-current":x?"step":void 0,"aria-label":`Question ${m}`,children:m},m)})}),c&&t.jsx("button",{type:"button",onClick:p,disabled:l>=e.length-1,"aria-label":"Next question",className:"carouselNavButton",children:t.jsx("svg",{fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})})})]})}function Ct(e){const r=vr(e);switch(e){case"completed":return t.jsx("svg",{className:k("overviewCardIcon",r),fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})});case"error":return t.jsx("svg",{className:k("overviewCardIcon",r),fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})});case"required":return t.jsx("svg",{className:k("overviewCardIcon",r),fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})});default:return t.jsx("div",{className:k("overviewCardIcon"),style:{width:"1.25rem",height:"1.25rem",borderRadius:"9999px",border:"2px solid var(--neutral-200)"}})}}function xr({isOpen:e,onClose:r,questions:s,visibleQuestionIds:a,responses:o,currentQuestionIndex:i,onGoToQuestion:f,readOnly:l=!1}){return e?t.jsxs(t.Fragment,{children:[t.jsx("div",{role:"presentation",onClick:r,className:"overviewBackdrop"}),t.jsx("div",{className:"overviewPanel",children:t.jsxs("div",{className:"overviewLayout",children:[t.jsxs("div",{className:"overviewHeader",children:[t.jsx("h2",{className:"overviewTitle",children:"Question Overview"}),t.jsx("button",{type:"button",onClick:r,className:"overviewCloseButton","aria-label":"Close",children:t.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),t.jsx("div",{className:"overviewBody",children:t.jsx("div",{className:"overviewList",children:a.map((c,u)=>{const p=s.find(x=>x.questionId===c);if(!p)return null;const m=Re(c,s,o,l),v=u===i;return t.jsx("button",{type:"button",onClick:()=>f(u),className:k("overviewCard",mr(m),v&&"overviewCardCurrent"),children:t.jsxs("div",{className:"overviewCardContent",children:[t.jsx("div",{className:"overviewCardIcon",children:Ct(m)}),t.jsxs("div",{className:"overviewCardMain",children:[t.jsxs("div",{className:"overviewCardMeta",children:[t.jsx("span",{className:"overviewCardId",children:p.questionId}),p.isMandatory&&t.jsx("span",{style:{fontSize:"0.75rem",color:"var(--color-error)"},children:"*"}),v&&t.jsx("span",{style:{fontSize:"0.75rem",fontWeight:500,color:"var(--primary-600)"},children:"Current"})]}),t.jsx("p",{className:"overviewCardDescription",children:p.description})]}),t.jsx("div",{className:"overviewCardIndex",children:u+1})]})},c)})})}),t.jsx("div",{className:"overviewFooter",children:t.jsxs("div",{className:"overviewLegend",children:[t.jsxs("div",{className:"overviewLegendItem",children:[t.jsx("div",{className:"overviewLegendDot",style:{background:"var(--primary-600)"}}),t.jsx("span",{className:"overviewCardIndex",children:"Completed"})]}),t.jsxs("div",{className:"overviewLegendItem",children:[t.jsx("div",{className:"overviewLegendDot",style:{background:"var(--warning-600)"}}),t.jsx("span",{className:"overviewCardIndex",children:"Required"})]}),t.jsxs("div",{className:"overviewLegendItem",children:[t.jsx("div",{className:"overviewLegendDot",style:{background:"var(--error-600)"}}),t.jsx("span",{className:"overviewCardIndex",children:"Error"})]})]})})]})})]}):null}const St={default:"buttonVariantDefault",destructive:"buttonVariantDestructive",outline:"buttonVariantOutline",secondary:"buttonVariantSecondary",ghost:"buttonVariantGhost",link:"buttonVariantLink"},Mt={default:"buttonDefault",sm:"buttonSm",lg:"buttonLg",icon:"buttonIcon"},Ot=e=>({primary:"var(--primary-600)",secondary:"var(--color-secondary)",destructive:"var(--color-destructive)",muted:"var(--color-muted)",error:"var(--color-error)",success:"#22c55e",warning:"#eab308",white:"#fff",gray:"#6b7280",lightGray:"#E5E7EB",borderGray:"var(--color-borderGray)"})[e]??e,_t=e=>({white:"#fff",black:"#000",primary:"var(--primary-600)","primary-foreground":"var(--primary-foreground)",secondary:"var(--color-secondary)",muted:"var(--color-muted-foreground)"})[e]??e;function ee({className:e,variant:r="default",size:s="default",asChild:a=!1,bgColor:o,textColor:i,text:f,prefixIcon:l,suffixIcon:c,children:u,...p}){const m=St[r],v=Mt[s],x=k("button",!o&&!i&&m,v,e),b={};o&&(b.backgroundColor=Ot(o)),i&&(b.color=_t(i));const C=t.jsxs(t.Fragment,{children:[l&&t.jsx("span",{className:"buttonIconWrap",children:l}),f!=null&&t.jsx("span",{style:{flex:1,textAlign:"center"},children:f}),c&&t.jsx("span",{className:"buttonIconWrap",children:c}),u]});if(a&&X.isValidElement(u)){const P=u;return X.cloneElement(P,{className:k(x,P.props.className),style:{...b,...P.props.style}})}return t.jsx("button",{type:"button","data-slot":"button",className:x,style:Object.keys(b).length?b:void 0,...p,children:C})}function Lt({className:e,value:r,max:s=100,...a}){const i=`translateX(-${100-(r!=null?Math.min(s,Math.max(0,r)):0)}%)`;return t.jsx("div",{"data-slot":"progress",role:"progressbar","aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":r??void 0,className:k("progressRoot",e),...a,children:t.jsx("div",{"data-slot":"progress-indicator",className:"progressIndicator",style:{transform:i}})})}const It="Question {current} of {total}";function br({currentIndex:e,totalSteps:r,progressMode:s="completion",progressValue:a,showLabel:o=!0,showPercentage:i=!0,labelFormat:f=It,progressMaxWidth:l="100%",variant:c="default",className:u}){const p=e+1,m=s==="completion"&&a!=null?Math.min(100,Math.max(0,a)):r>0?p/r*100:0,v=f.replace("{current}",String(p)).replace("{total}",String(r));return t.jsxs("div",{className:k("progressBarRoot",u),role:"progressbar","aria-valuenow":p,"aria-valuemin":1,"aria-valuemax":r,"aria-label":v,children:[o&&t.jsx("span",{className:"progressBarLabel",children:v}),t.jsxs("div",{className:"progressBarTrack",style:{maxWidth:l},children:[c==="gradient"?t.jsx("div",{className:"progressBarGradient",children:t.jsx("div",{className:"progressBarGradientFill",style:{width:`${m}%`}})}):t.jsx(Lt,{value:m,className:"progressBarTrackProgress"}),i&&t.jsxs("span",{className:"progressBarPercentage",children:[Math.round(m),"%"]})]})]})}function Pt(e){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:t.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})}const yr=X.createContext(null);function Fe(){const e=X.useContext(yr);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function gr({open:e,onOpenChange:r,defaultOpen:s=!1,children:a}){const[o,i]=X.useState(s),f=e!==void 0,l=f?e:o,c=X.useCallback(p=>{f||i(p),r==null||r(p)},[f,r]),u=X.useMemo(()=>({open:!!l,onOpenChange:c}),[l,c]);return t.jsx(yr.Provider,{value:u,children:a})}function Tt({children:e,container:r}){const s=r??(typeof document<"u"?document.body:null);return s?zr.createPortal(e,s):null}function Dt({className:e,...r}){const{open:s,onOpenChange:a}=Fe();return s?t.jsx("div",{"data-slot":"dialog-overlay","data-state":s?"open":"closed",className:k("dialogOverlay",e),onClick:()=>a(!1),...r}):null}function Rt({className:e,children:r,...s}){const{onOpenChange:a}=Fe();return t.jsx("button",{type:"button","data-slot":"dialog-close",className:k("dialogCloseButton",e),onClick:()=>a(!1),...s,children:r})}function jr({className:e,children:r,showCloseButton:s=!0,container:a,...o}){const{open:i,onOpenChange:f}=Fe(),l=X.useRef(null);return X.useEffect(()=>{if(!i)return;const c=u=>{u.key==="Escape"&&f(!1)};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[i,f]),i?t.jsxs(Tt,{container:a,children:[t.jsx(Dt,{}),t.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","data-slot":"dialog-content","data-state":i?"open":"closed",className:k("dialogContent",e),onClick:c=>c.stopPropagation(),...o,children:[r,s&&t.jsxs(Rt,{"aria-label":"Close","data-state":i?"open":void 0,children:[t.jsx(Pt,{}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}):null}function wr({className:e,...r}){return t.jsx("div",{"data-slot":"dialog-header",className:k("dialogHeader",e),...r})}function Nr({className:e,...r}){return t.jsx("div",{"data-slot":"dialog-footer",className:k("dialogFooter",e),...r})}function kr({className:e,...r}){return t.jsx("div",{"data-slot":"dialog-title",role:"heading",className:k("dialogTitle",e),...r})}function Er({className:e,...r}){return t.jsx("div",{"data-slot":"dialog-description",className:k("dialogDescription",e),...r})}function Cr({open:e,onOpenChange:r,missingQuestionIds:s,errors:a=[],onOk:o,container:i}){return t.jsx(gr,{open:e,onOpenChange:r,children:t.jsxs(jr,{showCloseButton:!0,container:i,style:{maxWidth:"28rem"},children:[t.jsx(wr,{children:t.jsx(kr,{id:"validation-dialog-title",children:"Survey Incomplete"})}),t.jsxs(Er,{children:["Please fill all the required questions before submitting the survey.",t.jsx("br",{}),"Click OK to see which questions are still pending."]}),t.jsx(Nr,{children:t.jsx("div",{style:{display:"flex",width:"100%",gap:"0.75rem"},children:t.jsx(ee,{onClick:o,text:"OK",style:{flex:1}})})})]})})}function Sr(e,r,s){const a=e.filter(u=>s.includes(u.questionId)),o=a.filter(u=>u.isMandatory);let i=0,f=0,l=0;for(const u of a){const p=r[u.questionId],m=De(u,p),v=cr(u,p);m&&i++,v&&f++,u.isMandatory&&m&&v&&l++}const c=o.length===0?100:Math.round(l/o.length*100);return{overallProgress:Math.min(100,Math.max(0,c)),totalQuestions:e.length,visibleQuestions:a.length,answeredQuestions:i,validQuestions:f,mandatoryQuestions:o.length,answeredMandatory:l}}function Mr({open:e,onOpenChange:r,onConfirm:s,onCancel:a,readOnly:o=!1,container:i}){return t.jsx(gr,{open:e,onOpenChange:r,children:t.jsxs(jr,{showCloseButton:!0,container:i,style:{maxWidth:"28rem"},children:[t.jsx(wr,{children:t.jsx(kr,{id:"exit-dialog-title",children:"Exit Survey?"})}),t.jsx(Er,{children:o?"Are you sure you want to exit the survey?":"Are you sure you want to exit? Your progress will be lost."}),t.jsxs(Nr,{style:{display:"flex",gap:"0.5rem",padding:"1rem"},children:[t.jsx(ee,{variant:"outline",onClick:a,style:{flex:1},children:"Cancel"}),t.jsx(ee,{type:"button",variant:"default",onClick:s,style:{flex:1},children:"Yes, Exit"})]})]})})}function Or({show:e}){return e?t.jsx("div",{className:"submissionOverlay",role:"status","aria-live":"polite","aria-busy":"true",children:t.jsxs("div",{className:"submissionOverlayCard",children:[t.jsx("div",{className:"submissionOverlaySpinner","aria-hidden":!0}),t.jsx("p",{className:"submissionOverlayText",children:"Submitting..."})]})}):null}function _r({data:e,onSubmit:r,onSave:s,onExit:a,isSubmitting:o=!1,className:i="",showHeader:f=!0,theme:l,progressBar:c={}}){var oe;const u=e.questionList,[p,m]=y.useState(()=>{const N={};return u.forEach(T=>{N[T.questionId]=at(T)}),N}),[v,x]=y.useState(()=>{const{visibleQuestions:N}=Se(u,{},[]);return N}),[b,C]=y.useState(0),[P,j]=y.useState(!1),[_,V]=y.useState(!1),[B,$]=y.useState(!1),[Q,S]=y.useState([]),U=y.useMemo(()=>sr(e.config),[e.config]),z=y.useMemo(()=>{const N=ur(u,p,v);if(Q.length===0)return N;const T={...N};return Q.forEach(K=>{T[K.questionId]="error"}),T},[u,p,v,Q]),M=y.useMemo(()=>Sr(u,p,v),[u,p,v]),A=y.useMemo(()=>{const N={};return Object.entries(p).forEach(([T,K])=>{N[T]={value:K}}),N},[p]);y.useEffect(()=>{const{visibleQuestions:N,newlyHidden:T}=Se(u,A,v);!(N.length!==v.length||N.some((re,ie)=>re!==v[ie]))&&T.length===0||(x(N),C(re=>Math.min(re,Math.max(0,N.length-1))),T.length>0&&m(re=>{const ie=Object.fromEntries(Object.entries(re).map(([pe,q])=>[pe,{value:q}])),Ve=tr(ie,T);return Object.fromEntries(Object.entries(Ve).map(([pe,q])=>[pe,q.value]))}))},[A,u,v]);const Y=v[b],D=u.find(N=>N.questionId===Y),W=v.length,Z=y.useCallback(N=>{Y&&(m(T=>({...T,[Y]:N})),S(T=>T.filter(K=>K.questionId!==Y)))},[Y]),be=y.useCallback(()=>{b<W-1&&C(N=>N+1)},[b,W]),ye=y.useCallback(()=>{b>0&&C(N=>N-1)},[b]),se=y.useCallback(N=>{N>=0&&N<W&&(C(N),j(!1))},[W]),ge=y.useCallback(N=>{const T=v.indexOf(N);T>=0&&se(T)},[v,se]),je=y.useCallback(()=>{const N=Me(u,p,v);if(N.length>0){S(N),V(!0);return}const T=Oe(e,p,v);r(T)},[e,u,p,v,r]),we=y.useCallback(()=>{V(!1),j(!0)},[]),Ne=y.useCallback(()=>{$(!0)},[]),ke=y.useCallback(()=>{$(!1);const N=Oe(e,p,v);s==null||s(N),a==null||a()},[e,p,v,s,a]),Be=b===W-1,fe=y.useRef(null),ae=l?{"data-theme":l,ref:fe}:{};return D?t.jsxs("div",{...ae,className:k("surveyRoot",i),children:[f&&t.jsx("header",{className:"surveyHeader",children:t.jsxs("div",{className:"surveyHeaderInner",children:[t.jsx("h2",{className:"surveyTitle",children:e.surveyName}),t.jsx("div",{className:"surveyHeaderActions",children:a&&t.jsx(ee,{type:"button",variant:"ghost",size:"icon",onClick:Ne,style:{color:"var(--color-textGray)"},title:"Exit Survey","aria-label":"Exit survey",children:"✕"})})]})}),t.jsxs("div",{className:"surveyCarouselSection",children:[t.jsx(hr,{questions:v,activeQuestionId:Y,onQuestionSelect:ge,questionStatusMap:z}),c!==!1&&t.jsx(br,{currentIndex:b,totalSteps:W,progressMode:c.progressMode??"completion",progressValue:M.overallProgress,showLabel:c.showLabel,showPercentage:c.showPercentage,labelFormat:c.labelFormat,progressMaxWidth:c.progressMaxWidth,className:c.className})]}),t.jsxs("main",{className:"surveyMain",style:{minHeight:0},children:[t.jsx("div",{className:"surveyMainScroll",children:t.jsx("div",{className:"surveyMainScrollInner",children:t.jsxs("div",{className:k("surveyQuestionCard","animate-question-enter"),children:[t.jsx("span",{className:"surveyQuestionId",children:D.questionId}),t.jsxs("h2",{className:"surveyQuestionDescription",children:[D.description,D.isMandatory&&t.jsx("span",{className:"surveyQuestionDescriptionRequired",children:"*"})]}),(oe=D.questionImage)!=null&&oe.trim()?t.jsx("div",{className:"surveyQuestionImageWrap",children:t.jsx("img",{src:D.questionImage,alt:"",loading:"lazy",className:"surveyQuestionImage",style:{maxHeight:"min(60vh, 400px)"}})}):null,D.textLimitCharacter!=null&&t.jsxs("p",{className:"surveyQuestionHint",children:["Maximum ",D.textLimitCharacter," characters"]}),D.textInputType==="Numeric"&&t.jsx("p",{className:"surveyQuestionHint",children:"Please enter numeric value only (e.g. 1, 2, 3)"}),t.jsx("div",{className:"surveyQuestionBody",children:t.jsx(fr,{question:D,value:p[Y],onChange:Z,validationErrors:Q,mediaConfig:U})})]},Y)})}),t.jsx("footer",{className:"surveyFooter",children:t.jsxs("div",{className:"surveyFooterActions",children:[t.jsx(ee,{type:"button",variant:"outline",onClick:ye,disabled:b===0,className:"surveyFooterButton",prefixIcon:t.jsx("svg",{className:"h-5 w-5 transition-transform duration-200 group-hover:-translate-x-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),children:"Previous"}),Be?t.jsx(ee,{type:"button",onClick:je,className:"surveyFooterButton",suffixIcon:t.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),text:"Submit"}):t.jsx(ee,{type:"button",onClick:be,className:"surveyFooterButton",suffixIcon:t.jsx("svg",{className:"h-5 w-5 transition-transform duration-200 group-hover:translate-x-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),text:"Next"})]})})]}),t.jsx(xr,{isOpen:P,onClose:()=>j(!1),questions:u,visibleQuestionIds:v,responses:p,currentQuestionIndex:b,onGoToQuestion:se}),t.jsx(Cr,{open:_,onOpenChange:V,missingQuestionIds:Q.map(N=>N.questionId),errors:Q,onOk:we,container:fe.current}),t.jsx(Mr,{open:B,onOpenChange:$,onConfirm:ke,onCancel:()=>$(!1),container:fe.current}),t.jsx(Or,{show:o})]}):t.jsx("div",{...ae,className:"surveyLoading",children:t.jsx("p",{className:"surveyLoadingText",children:"Loading survey..."})})}function At({data:e,onSubmit:r,onSave:s,onExit:a,isSubmitting:o=!1,className:i="",showHeader:f=!0,theme:l,progressBar:c}){const u=y.useMemo(()=>Ke(e),[e]),p=y.useMemo(()=>u==="PLC"?Xe(e):e,[e,u]),m=y.useRef(null);u==="PLC"?m.current=e:m.current=null;const v=y.useCallback(b=>{u==="PLC"&&m.current?r(Ce(b,m.current)):r(b)},[u,r]),x=y.useCallback(b=>{s&&(u==="PLC"&&m.current?s(Ce(b,m.current)):s(b))},[u,s]);return t.jsx(_r,{data:p,onSubmit:v,onSave:x,onExit:a,isSubmitting:o,className:i,showHeader:f,theme:l,progressBar:c})}g.DEFAULT_MEDIA_ALLOWED_TYPES=_e,g.DEFAULT_MEDIA_MAX_SIZE_MB=Le,g.ExitConfirmationDialog=Mr,g.MEDIA_ALLOWED_TYPES=xe,g.MEDIA_MAX_SIZE_MB=Pe,g.QuestionListCarousel=hr,g.QuestionOverviewPanel=xr,g.QuestionRenderer=fr,g.SUPPORTED_QUESTION_TYPES=Ze,g.SubmissionLoadingOverlay=Or,g.SurveyContainer=_r,g.SurveyProgressBar=br,g.SurveyRenderer=At,g.ValidationDialog=Cr,g.calculateVisibility=Se,g.calculateWeightedProgress=Sr,g.canSubmit=ut,g.clearHiddenResponses=tr,g.convertFMBToPLC=Ce,g.convertPLCToFMB=Xe,g.detectSurveyFormat=Ke,g.fileToFileObject=lr,g.formatResponses=Oe,g.getDefaultValue=he,g.getEffectiveMediaConfig=sr,g.getQuestionStatus=Re,g.getQuestionStatusMap=ur,g.getStatusClass=pr,g.getStatusColor=mr,g.getStatusIconClass=vr,g.isFMBData=Zr,g.isFMBSurvey=Kr,g.isPLCData=Xr,g.isPLCSurvey=Je,g.isSupportedQuestionType=qe,g.isValueFileObject=Ie,g.validateFile=ir,g.validateFileSize=or,g.validateFileType=ar,g.validateResponses=Me,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})}));
31
+ <%s key={someKey} {...props} />`,Xr,Ie,$l,Ie),wo[Ie+Xr]=!0}}return d===n?_l(J):Al(J),J}}function Tl(d,x,C){return jo(d,x,C,!0)}function Il(d,x,C){return jo(d,x,C,!1)}var Ll=Il,Dl=Tl;Ue.Fragment=n,Ue.jsx=Ll,Ue.jsxs=Dl})()),Ue}var rt;function No(){return rt||(rt=1,process.env.NODE_ENV==="production"?He.exports=ko():He.exports=Co()),He.exports}var a=No();function tt(e){return e.type==="PLC"}function So(e){return e.type==="FMB"}function nt(e){if(e==null||typeof e!="object")return"FMB";const r=e;if(r.type==="PLC")return"PLC";if(r.type==="FMB")return"FMB";const t=r.questionList;if(Array.isArray(t)&&t.length>0){const n=t[0];if(typeof n.question_number=="number"&&(n.question_type==="scq"||n.question_type==="mcq"))return"PLC"}return"FMB"}function Po(e){return tt(e??{type:"FMB"})}function Mo(e){return e==null||typeof e!="object"?!1:e.type==="FMB"}const Ro={scq:"single-select",mcq:"multi-select"};function Oo(e,r){const t=`Q${e.question_number}`,n=Ro[e.question_type];return{surveyId:r,questionId:t,description:e.question,descriptionEN:e.question,type:n,isMandatory:e.isMandatory,options:e.options??[],optionsEN:e.options??[],outcomeDescription:"",questionDescriptionOptional:"",sourceQuestion:"",...e.image&&e.image.trim()!==""?{questionImage:e.image.trim()}:{}}}function ot(e){const r=e.surveyId,t=e.questionList.map(n=>Oo(n,r));return{type:"FMB",surveyId:r,...e.surveyCode!=null&&{surveyCode:e.surveyCode},...e.surveyName!=null&&{surveyName:e.surveyName},medium:e.medium,...e.config!=null&&Object.keys(e.config).length>0&&{config:e.config},questionList:t}}function Ao(e){const r=new Map;return e.questionList.forEach(t=>{r.set(t.question_number,t)}),r}function _o(e){const r=new Map;return e.questionList.forEach(t=>{r.set(`Q${t.question_number}`,t.question_number)}),r}function To(e){return String.fromCharCode(65+e)}function Io(e,r){const t=Array.isArray(e)?e:[e];if(t.length===0||t.length===1&&t[0]==="")return[];const n=[];for(const o of t){const s=r.findIndex(l=>l===o||l&&l.trim()===String(o).trim());s>=0&&n.push(To(s))}return n}function vr(e,r){const t=_o(r),n=Ao(r),o=e.responses.map(s=>{const l=t.get(s.questionId);if(l===void 0)return null;const i=n.get(l);if(!i)return null;const u=s.userAnswer,c=Array.isArray(u)?u.map(String):String(u??""),f=Io(c,i.options??[]);return{question_number:l,question:i.question,correct_answer:i.correct_answer??[],selected_answer:f,correct_answer_option:i.correct_answer_option??[]}}).filter(s=>s!==null);return{type:"PLC",surveyId:e.surveyId,...e.surveyCode!=null&&{surveyCode:e.surveyCode},...e.surveyName!=null&&{surveyName:e.surveyName},medium:r.medium,...r.config!=null&&{config:r.config},responses:o}}const st=["single-select","multi-select","drop-down","dropdown","text-response","calendar","video-response","voice-response","image-response","document-response","pdf-response","tabular-text-input","tabular-drop-down","tabular-check-box"];function at(e){return st.includes(e)}function Ke(e){var r;switch(e.type){case"single-select":case"drop-down":case"dropdown":case"text-response":return"";case"multi-select":return[];case"calendar":case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return null;case"tabular-text-input":case"tabular-drop-down":return{};case"tabular-check-box":{const t={};return(r=e.tableQuestionValue)==null||r.forEach(n=>{t[n.rowId]=!1}),t}default:return null}}function Lo(e){const r=e.userAnswer;if(r==null)return Ke(e);switch(e.type){case"single-select":case"drop-down":case"dropdown":case"text-response":return typeof r=="string"?r:String(r);case"multi-select":return Array.isArray(r)?r.map(String):[];case"calendar":{if(typeof r=="string"){const t=new Date(r);return isNaN(t.getTime())?null:t}return r instanceof Date?r:null}case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{if(!Array.isArray(r))return Ke(e);const t=r,n={};return t.forEach(o=>{n[o.rowId]=o.rowAnswer}),n}case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return r&&typeof r=="object"&&"fileName"in r&&"binary"in r?r:null;default:return Ke(e)}}function Do(e){return e.questionId}function it(e,r){return Array.isArray(e)?e.includes(r):e===r}function hr(e,r,t=[]){const n=e.map(Do),o=new Set,s=new Set;e.forEach(h=>{Object.values(h.childrenQuestions??{}).forEach(b=>{b.forEach(y=>s.add(y))})}),e.filter(h=>!s.has(h.questionId)).forEach(h=>o.add(h.questionId)),e.forEach(h=>{var v;const b=h.childrenQuestions;if(!b||typeof b!="object")return;const y=(v=r[h.questionId])==null?void 0:v.value;Object.entries(b).forEach(([g,E])=>{Array.isArray(E)&&it(y,g)&&E.forEach(w=>{o.add(w),lt(e,r,w,o)})})});const i=n.filter(h=>o.has(h)),u=n.filter(h=>!o.has(h)),c=new Set(t),f=i.filter(h=>!c.has(h)),p=t.filter(h=>!o.has(h));return{visibleQuestions:i,hiddenQuestions:u,newlyVisible:f,newlyHidden:p}}function lt(e,r,t,n){var l;const o=e.find(i=>i.questionId===t);if(!(o!=null&&o.childrenQuestions))return;const s=(l=r[t])==null?void 0:l.value;Object.entries(o.childrenQuestions).forEach(([i,u])=>{Array.isArray(u)&&it(s,i)&&u.forEach(c=>{n.add(c),lt(e,r,c,n)})})}function ct(e,r){const t=new Set(r),n={};return Object.entries(e).forEach(([o,s])=>{t.has(o)||(n[o]=s)}),n}function ut(e,r){if(e==null)return!0;switch(r){case"single-select":case"drop-down":case"text-response":case"calendar":return e==="";case"multi-select":return!Array.isArray(e)||e.length===0;case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return!(e&&typeof e=="object"&&"binary"in e);case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{if(typeof e!="object"||e===null)return!0;const t=e;return Object.keys(t).length===0?!0:r==="tabular-check-box"?!Object.values(t).some(o=>o===!0):Object.values(t).every(o=>o===""||o===null||o===void 0)}default:return e===""||e===null||e===void 0}}function $o(e,r){const t=e.textLimitCharacter;if(t==null||t<=0)return null;if(e.type==="text-response"&&typeof r=="string")return r.length>t?`Maximum ${t} characters allowed`:null;if(e.type==="tabular-text-input"&&typeof r=="object"&&r!==null){const n=r;for(const[o,s]of Object.entries(n))if(s!=null&&String(s).length>t)return`Field "${o}" exceeds ${t} characters`}return null}function Fo(e,r){if(e.textInputType!=="Numeric")return null;if(e.type==="text-response"){if(r===""||r==null)return null;const t=String(r).trim();return/^\d+$/.test(t)?null:"Please enter numbers only"}if(e.type==="tabular-text-input"&&typeof r=="object"&&r!==null){const t=r;for(const[n,o]of Object.entries(t))if(o!=null&&o!==""){const s=String(o).trim();if(!/^\d+$/.test(s))return`Field "${n}" must contain numbers only`}}return null}function Bo(e,r){const t=e.minValue!=null?Number(e.minValue):NaN,n=e.maxValue!=null?Number(e.maxValue):NaN;if(isNaN(t)&&isNaN(n))return null;if(e.type==="text-response"&&typeof r=="string"){if(r.trim()==="")return null;const o=Number(r);return isNaN(o)?null:!isNaN(t)&&!isNaN(n)&&(o<t||o>n)?`Value must be between ${t} and ${n}`:!isNaN(t)&&o<t?`Value must be at least ${t}`:!isNaN(n)&&o>n?`Value must be at most ${n}`:null}if(e.type==="tabular-text-input"&&typeof r=="object"&&r!==null){const o=r;for(const[s,l]of Object.entries(o))if(l!=null&&String(l).trim()!==""){const i=Number(l);if(!isNaN(i)){if(!isNaN(t)&&!isNaN(n)&&(i<t||i>n))return`Field "${s}" must be between ${t} and ${n}`;if(!isNaN(t)&&i<t)return`Field "${s}" must be at least ${t}`;if(!isNaN(n)&&i>n)return`Field "${s}" must be at most ${n}`}}}return null}function br(e,r,t){const n=new Map(e.map(s=>[s.questionId,s])),o=[];return t.forEach(s=>{const l=n.get(s);if(!l)return;const i=r[s];if(l.isMandatory&&ut(i,l.type)){o.push({questionId:s,message:"This question is required"});return}if(ut(i,l.type))return;const u=$o(l,i);if(u){o.push({questionId:s,message:u});return}const c=Fo(l,i);if(c){o.push({questionId:s,message:c});return}const f=Bo(l,i);f&&o.push({questionId:s,message:f})}),o}function Vo(e,r,t){return br(e,r,t).length===0}function zo(e){var r;if(e&&typeof e=="object"&&((r=e.constructor)==null?void 0:r.name)==="Date"){const t=e,n=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${n}-${o}-${s}`}if(typeof e=="string"&&e.includes("T"))try{const t=new Date(e);if(!isNaN(t.getTime())){const n=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${n}-${o}-${s}`}}catch{}return e}function Wo(e,r){if(r==null)return e.type==="multi-select"?[]:"";switch(e.type){case"single-select":case"drop-down":case"text-response":return typeof r=="string"?r:String(r);case"multi-select":return Array.isArray(r)?r.map(String):[];case"calendar":return zo(r);case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return r&&typeof r=="object"&&"fileName"in r&&"binary"in r,r;case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{const t=e.tableQuestionValue??[];if(typeof r!="object"||r===null)return t.map(o=>({rowId:o.rowId,rowQuestion:o.rowQuestion,rowAnswer:""}));const n=r;return t.map(o=>({rowId:o.rowId,rowQuestion:o.rowQuestion,rowAnswer:n[o.rowId]??(e.type==="tabular-check-box"?!1:"")}))}default:return r}}function gr(e,r,t){const n=new Map(e.questionList.map(s=>[s.questionId,s])),o=[];return t.forEach(s=>{const l=r[s],i=n.get(s);if(!i)return;const u=Wo(i,l);o.push({questionId:s,userAnswer:u})}),{surveyId:e.surveyId,...e.surveyCode!=null&&{surveyCode:e.surveyCode},...e.surveyName!=null&&{surveyName:e.surveyName},...e.type!=null&&{type:e.type},responses:o}}const xr={"image-response":["image/jpeg","image/png"],"video-response":["video/mp4"],"voice-response":["audio/mpeg"],"document-response":["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/plain","application/json"],"pdf-response":["application/pdf"]},yr={"image-response":20,"video-response":60,"voice-response":20,"document-response":25,"pdf-response":25};function wr(e){return e!=null&&typeof e=="object"&&"fileName"in e&&"binary"in e}const Xe=xr,jr=yr,Uo=["image-response","video-response","voice-response","document-response","pdf-response"];function dt(e){const r={...xr},t={};for(const n of Uo){const o=(e==null?void 0:e[n])??(n==="voice-response"?e==null?void 0:e["audio-response"]:void 0),s=(o==null?void 0:o.supportedType)??(o==null?void 0:o.suppotedType);s!=null&&s.length&&(r[n]=s);const l=o==null?void 0:o.supportedSize;if(l!=null&&l>0)t[n]=l*1024*1024;else{const i=yr[n]??10;t[n]=i*1024*1024}}return{allowedTypes:r,maxSizeBytes:t}}function ft(e,r,t){const n=(t==null?void 0:t.allowedTypes[r])??Xe[r];return n!=null&&n.length?n.some(s=>e.type===s||e.type.startsWith(s.split("/")[0]+"/"))?{valid:!0}:{valid:!1,error:`File type ${e.type} is not allowed. Allowed: ${n.join(", ")}`}:{valid:!0}}function mt(e,r,t){const n=(t==null?void 0:t.maxSizeBytes[r])??(jr[r]??10)*1024*1024;return e.size>n?{valid:!1,error:`File size must be less than ${Math.round(n/1048576)}MB`}:{valid:!0}}function pt(e,r,t){const n=ft(e,r,t);return n.valid?mt(e,r,t):n}function vt(e){return new Promise((r,t)=>{const n=new FileReader;n.onload=()=>{const o=n.result;if(typeof o!="string"){t(new Error("Failed to read file as base64"));return}const s=o.includes(",")?o.split(",")[1]:o;r({fileName:e.name,fileType:e.type,binary:s})},n.onerror=()=>t(n.error),n.readAsDataURL(e)})}function Er(e,r){if(!r||r==="None"||r==="Text")return!0;const t=e.trim();switch(r){case"Numeric":return/^\d+$/.test(t);case"Alphabet":case"AlphaNumeric":return/^[A-Za-z0-9]+$/.test(t);default:return!0}}function kr(e,r){var t;if(r==null)return!1;switch(e.type){case"single-select":case"dropdown":case"drop-down":case"text-response":return r!==""&&r!==null&&r!==void 0;case"multi-select":return Array.isArray(r)&&r.length>0;case"calendar":return r!=null&&typeof r=="object"&&((t=r.constructor)==null?void 0:t.name)==="Date";case"video-response":case"voice-response":case"image-response":case"document-response":case"pdf-response":return wr(r)||typeof r=="string"&&r!==""||r!=null&&typeof r=="object"&&"devicePath"in r;case"tabular-text-input":case"tabular-drop-down":{if(typeof r!="object")return!1;const n=r,o=e.tableQuestionValue||[];return o.length===0?Object.keys(n).length>0&&Object.values(n).some(s=>s!==""&&s!==null&&s!==void 0):e.isMandatory?o.every(s=>{const l=n[s.rowId];return l!==""&&l!==null&&l!==void 0}):o.some(s=>{const l=n[s.rowId];return l!==""&&l!==null&&l!==void 0})}case"tabular-check-box":{if(typeof r!="object")return!1;const n=r,o=e.tableQuestionValue||[];return o.length===0?Object.values(n).some(s=>s===!0):e.isMandatory?o.some(s=>n[s.rowId]===!0):o.length>0&&Object.keys(n).length>0}default:return!1}}function ht(e,r){if(!kr(e,r))return!e.isMandatory;if(e.type==="tabular-text-input"||e.type==="tabular-drop-down"||e.type==="tabular-check-box"){if(typeof r=="object"&&r!==null){const t=r;if(e.textLimitCharacter){const n=parseInt(e.textLimitCharacter.toString(),10);for(const o of Object.values(t))if(o!=null&&String(o).length>n)return!1}if(e.textInputType){for(const n of Object.values(t))if(n!=null&&!Er(String(n),e.textInputType))return!1}}}else if(e.textLimitCharacter&&r!=null&&String(r).length>parseInt(e.textLimitCharacter.toString(),10)||e.textInputType&&r!=null&&!Er(String(r),e.textInputType))return!1;return!0}function Cr(e,r,t,n=!1){if(n)return"completed";const o=r.find(u=>u.questionId===e);if(!o)return"unanswered";const s=t[e],l=kr(o,s),i=ht(o,s);return l&&i?"completed":l&&!i?"error":!l&&o.isMandatory?"required":"unanswered"}function bt(e,r,t,n=!1){const o={};for(const s of t)o[s]=Cr(s,e,r,n);return o}function gt({options:e,selectionMode:r,selectedOptions:t,onOptionSelect:n,className:o="",disabled:s=!1,variant:l="default"}){const i=c=>{if(r==="single")n(c);else{const f=Array.isArray(t)?t:[];f.includes(c)?n(f.filter(p=>p!==c)):n([...f,c])}},u=c=>r==="single"?t===c:Array.isArray(t)&&t.includes(c);return l==="PLC"?a.jsx("div",{className:`space-y-2 ${o}`,children:e.map((c,f)=>{const p=u(c.id);return a.jsxs("button",{type:"button",onClick:()=>i(c.id),disabled:s,className:`flex w-full items-center gap-3 rounded-xl border px-5 py-2.5 text-left transition-all duration-300 border-[var(--primary-600)] ${s?"cursor-not-allowed opacity-50":"cursor-pointer"} ${p?"bg-[var(--primary-100)]":"bg-white hover:bg-[var(--neutral-100)]"}`,children:[a.jsx("div",{className:"flex-shrink-0",children:r==="single"?a.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-[var(--primary-600)] text-sm font-medium text-white",children:String.fromCharCode(65+f)}):a.jsx("div",{className:`flex h-5 w-5 items-center justify-center rounded border-2 border-[var(--primary-600)] transition-all ${p?"bg-[var(--primary-600)]":"bg-white"}`,children:p&&a.jsx("svg",{className:"h-full w-full text-white",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})}),a.jsx("span",{className:"flex-1 text-sm font-medium text-[var(--color-textBlack)]",children:c.text})]},c.id)})}):a.jsx("div",{className:`space-y-3 ${o}`,children:e.map(c=>{const f=u(c.id);return a.jsx("button",{type:"button",onClick:()=>i(c.id),className:`w-full border px-4 py-3 text-left text-sm leading-5 font-normal transition-all border-rounded rounded-xl ${s?"cursor-not-allowed opacity-50":"cursor-pointer"} ${f?"border-[var(--primary-600)] bg-[var(--primary-600)] text-[var(--primary-foreground)]":"border-[var(--primary-600)] bg-[var(--neutral-50)] text-[var(--primary-600)] hover:bg-[var(--primary-50)]"}`,children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex-shrink-0",children:r==="single"?a.jsx("div",{className:`h-4 w-4 rounded-full border-2 transition-all ${f?"border-[var(--neutral-50)] bg-[var(--neutral-50)]":"border-[var(--primary-600)] bg-transparent"}`,children:f&&a.jsx("div",{className:"h-full w-full scale-50 rounded-full bg-[var(--primary-600)]"})}):a.jsx("div",{className:`h-4 w-4 rounded border-2 transition-all ${f?"border-[var(--neutral-50)] bg-[var(--neutral-50)]":"border-[var(--primary-600)] bg-transparent"}`,children:f&&a.jsx("svg",{className:"h-full w-full text-[var(--primary-600)]",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})}),a.jsx("span",{className:"flex-1",children:c.text})]})},c.id)})})}function xt(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(r=0;r<o;r++)e[r]&&(t=xt(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function yt(){for(var e,r,t=0,n="",o=arguments.length;t<o;t++)(e=arguments[t])&&(r=xt(e))&&(n&&(n+=" "),n+=r);return n}const Go=(e,r)=>{const t=new Array(e.length+r.length);for(let n=0;n<e.length;n++)t[n]=e[n];for(let n=0;n<r.length;n++)t[e.length+n]=r[n];return t},Yo=(e,r)=>({classGroupId:e,validator:r}),wt=(e=new Map,r=null,t)=>({nextPart:e,validators:r,classGroupId:t}),Je="-",jt=[],Qo="arbitrary..",Ho=e=>{const r=Xo(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Ko(l);const i=l.split(Je),u=i[0]===""&&i.length>1?1:0;return Et(i,u,r)},getConflictingClassGroupIds:(l,i)=>{if(i){const u=n[l],c=t[l];return u?c?Go(c,u):u:c||jt}return t[l]||jt}}},Et=(e,r,t)=>{if(e.length-r===0)return t.classGroupId;const o=e[r],s=t.nextPart.get(o);if(s){const c=Et(e,r+1,s);if(c)return c}const l=t.validators;if(l===null)return;const i=r===0?e.join(Je):e.slice(r).join(Je),u=l.length;for(let c=0;c<u;c++){const f=l[c];if(f.validator(i))return f.classGroupId}},Ko=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),t=r.indexOf(":"),n=r.slice(0,t);return n?Qo+n:void 0})(),Xo=e=>{const{theme:r,classGroups:t}=e;return Jo(t,r)},Jo=(e,r)=>{const t=wt();for(const n in e){const o=e[n];Nr(o,t,n,r)}return t},Nr=(e,r,t,n)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];Zo(l,r,t,n)}},Zo=(e,r,t,n)=>{if(typeof e=="string"){qo(e,r,t);return}if(typeof e=="function"){es(e,r,t,n);return}rs(e,r,t,n)},qo=(e,r,t)=>{const n=e===""?r:kt(r,e);n.classGroupId=t},es=(e,r,t,n)=>{if(ts(e)){Nr(e(n),r,t,n);return}r.validators===null&&(r.validators=[]),r.validators.push(Yo(t,e))},rs=(e,r,t,n)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[i,u]=o[l];Nr(u,kt(r,i),t,n)}},kt=(e,r)=>{let t=e;const n=r.split(Je),o=n.length;for(let s=0;s<o;s++){const l=n[s];let i=t.nextPart.get(l);i||(i=wt(),t.nextPart.set(l,i)),t=i}return t},ts=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ns=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=Object.create(null),n=Object.create(null);const o=(s,l)=>{t[s]=l,r++,r>e&&(r=0,n=t,t=Object.create(null))};return{get(s){let l=t[s];if(l!==void 0)return l;if((l=n[s])!==void 0)return o(s,l),l},set(s,l){s in t?t[s]=l:o(s,l)}}},Sr="!",Ct=":",os=[],Nt=(e,r,t,n,o)=>({modifiers:e,hasImportantModifier:r,baseClassName:t,maybePostfixModifierPosition:n,isExternal:o}),ss=e=>{const{prefix:r,experimentalParseClassName:t}=e;let n=o=>{const s=[];let l=0,i=0,u=0,c;const f=o.length;for(let v=0;v<f;v++){const g=o[v];if(l===0&&i===0){if(g===Ct){s.push(o.slice(u,v)),u=v+1;continue}if(g==="/"){c=v;continue}}g==="["?l++:g==="]"?l--:g==="("?i++:g===")"&&i--}const p=s.length===0?o:o.slice(u);let h=p,b=!1;p.endsWith(Sr)?(h=p.slice(0,-1),b=!0):p.startsWith(Sr)&&(h=p.slice(1),b=!0);const y=c&&c>u?c-u:void 0;return Nt(s,b,h,y)};if(r){const o=r+Ct,s=n;n=l=>l.startsWith(o)?s(l.slice(o.length)):Nt(os,!1,l,void 0,!0)}if(t){const o=n;n=s=>t({className:s,parseClassName:o})}return n},as=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((t,n)=>{r.set(t,1e6+n)}),t=>{const n=[];let o=[];for(let s=0;s<t.length;s++){const l=t[s],i=l[0]==="[",u=r.has(l);i||u?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(l)):o.push(l)}return o.length>0&&(o.sort(),n.push(...o)),n}},is=e=>({cache:ns(e.cacheSize),parseClassName:ss(e),sortModifiers:as(e),...Ho(e)}),ls=/\s+/,cs=(e,r)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=r,l=[],i=e.trim().split(ls);let u="";for(let c=i.length-1;c>=0;c-=1){const f=i[c],{isExternal:p,modifiers:h,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:v}=t(f);if(p){u=f+(u.length>0?" "+u:u);continue}let g=!!v,E=n(g?y.substring(0,v):y);if(!E){if(!g){u=f+(u.length>0?" "+u:u);continue}if(E=n(y),!E){u=f+(u.length>0?" "+u:u);continue}g=!1}const w=h.length===0?"":h.length===1?h[0]:s(h).join(":"),T=b?w+Sr:w,R=T+E;if(l.indexOf(R)>-1)continue;l.push(R);const O=o(E,g);for(let $=0;$<O.length;++$){const j=O[$];l.push(T+j)}u=f+(u.length>0?" "+u:u)}return u},us=(...e)=>{let r=0,t,n,o="";for(;r<e.length;)(t=e[r++])&&(n=St(t))&&(o&&(o+=" "),o+=n);return o},St=e=>{if(typeof e=="string")return e;let r,t="";for(let n=0;n<e.length;n++)e[n]&&(r=St(e[n]))&&(t&&(t+=" "),t+=r);return t},ds=(e,...r)=>{let t,n,o,s;const l=u=>{const c=r.reduce((f,p)=>p(f),e());return t=is(c),n=t.cache.get,o=t.cache.set,s=i,i(u)},i=u=>{const c=n(u);if(c)return c;const f=cs(u,t);return o(u,f),f};return s=l,(...u)=>s(us(...u))},fs=[],Z=e=>{const r=t=>t[e]||fs;return r.isThemeGetter=!0,r},Pt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ms=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ps=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vs=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,hs=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bs=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gs=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ge=e=>ms.test(e),D=e=>!!e&&!Number.isNaN(Number(e)),xe=e=>!!e&&Number.isInteger(Number(e)),Pr=e=>e.endsWith("%")&&D(e.slice(0,-1)),pe=e=>ps.test(e),Rt=()=>!0,xs=e=>vs.test(e)&&!hs.test(e),Mr=()=>!1,ys=e=>bs.test(e),ws=e=>gs.test(e),js=e=>!N(e)&&!S(e),Es=e=>ye(e,Lt,Mr),N=e=>Pt.test(e),Ne=e=>ye(e,Dt,xs),Ot=e=>ye(e,Os,D),ks=e=>ye(e,Ft,Rt),Cs=e=>ye(e,$t,Mr),At=e=>ye(e,Tt,Mr),Ns=e=>ye(e,It,ws),Ze=e=>ye(e,Bt,ys),S=e=>Mt.test(e),Ge=e=>Se(e,Dt),Ss=e=>Se(e,$t),_t=e=>Se(e,Tt),Ps=e=>Se(e,Lt),Ms=e=>Se(e,It),qe=e=>Se(e,Bt,!0),Rs=e=>Se(e,Ft,!0),ye=(e,r,t)=>{const n=Pt.exec(e);return n?n[1]?r(n[1]):t(n[2]):!1},Se=(e,r,t=!1)=>{const n=Mt.exec(e);return n?n[1]?r(n[1]):t:!1},Tt=e=>e==="position"||e==="percentage",It=e=>e==="image"||e==="url",Lt=e=>e==="length"||e==="size"||e==="bg-size",Dt=e=>e==="length",Os=e=>e==="number",$t=e=>e==="family-name",Ft=e=>e==="number"||e==="weight",Bt=e=>e==="shadow",As=ds(()=>{const e=Z("color"),r=Z("font"),t=Z("text"),n=Z("font-weight"),o=Z("tracking"),s=Z("leading"),l=Z("breakpoint"),i=Z("container"),u=Z("spacing"),c=Z("radius"),f=Z("shadow"),p=Z("inset-shadow"),h=Z("text-shadow"),b=Z("drop-shadow"),y=Z("blur"),v=Z("perspective"),g=Z("aspect"),E=Z("ease"),w=Z("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...R(),S,N],$=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],k=()=>[S,N,u],F=()=>[ge,"full","auto",...k()],L=()=>[xe,"none","subgrid",S,N],U=()=>["auto",{span:["full",xe,S,N]},xe,S,N],ee=()=>[xe,"auto",S,N],Q=()=>["auto","min","max","fr",S,N],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],re=()=>["auto",...k()],ie=()=>[ge,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],Ee=()=>[ge,"screen","full","dvw","lvw","svw","min","max","fit",...k()],fe=()=>[ge,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],A=()=>[e,S,N],Oe=()=>[...R(),_t,At,{position:[S,N]}],Ae=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_e=()=>["auto","cover","contain",Ps,Es,{size:[S,N]}],Te=()=>[Pr,Ge,Ne],q=()=>["","none","full",c,S,N],H=()=>["",D,Ge,Ne],ue=()=>["solid","dashed","dotted","double"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>[D,Pr,_t,At],W=()=>["","none",y,S,N],se=()=>["none",D,S,N],ae=()=>["none",D,S,N],he=()=>[D,S,N],ke=()=>[ge,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pe],breakpoint:[pe],color:[Rt],container:[pe],"drop-shadow":[pe],ease:["in","out","in-out"],font:[js],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pe],shadow:[pe],spacing:["px",D],text:[pe],"text-shadow":[pe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ge,N,S,g]}],container:["container"],columns:[{columns:[D,N,S,i]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[xe,"auto",S,N]}],basis:[{basis:[ge,"full","auto",i,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[D,ge,"auto","initial","none",N]}],grow:[{grow:["",D,S,N]}],shrink:[{shrink:["",D,S,N]}],order:[{order:[xe,"first","last","none",S,N]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:re()}],mx:[{mx:re()}],my:[{my:re()}],ms:[{ms:re()}],me:[{me:re()}],mbs:[{mbs:re()}],mbe:[{mbe:re()}],mt:[{mt:re()}],mr:[{mr:re()}],mb:[{mb:re()}],ml:[{ml:re()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:ie()}],"inline-size":[{inline:["auto",...Ee()]}],"min-inline-size":[{"min-inline":["auto",...Ee()]}],"max-inline-size":[{"max-inline":["none",...Ee()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[i,"screen",...ie()]}],"min-w":[{"min-w":[i,"screen","none",...ie()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...ie()]}],h:[{h:["screen","lh",...ie()]}],"min-h":[{"min-h":["screen","lh","none",...ie()]}],"max-h":[{"max-h":["screen","lh",...ie()]}],"font-size":[{text:["base",t,Ge,Ne]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Rs,ks]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pr,N]}],"font-family":[{font:[Ss,Cs,r]}],"font-features":[{"font-features":[N]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,S,N]}],"line-clamp":[{"line-clamp":[D,"none",S,Ot]}],leading:[{leading:[s,...k()]}],"list-image":[{"list-image":["none",S,N]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",S,N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[D,"from-font","auto",S,Ne]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[D,"auto",S,N]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",S,N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",S,N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Oe()}],"bg-repeat":[{bg:Ae()}],"bg-size":[{bg:_e()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xe,S,N],radial:["",S,N],conic:[xe,S,N]},Ms,Ns]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Te()}],"gradient-via-pos":[{via:Te()}],"gradient-to-pos":[{to:Te()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-bs":[{"border-bs":H()}],"border-w-be":[{"border-be":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[D,S,N]}],"outline-w":[{outline:["",D,Ge,Ne]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",f,qe,Ze]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",p,qe,Ze]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[D,Ne]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,qe,Ze]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[D,S,N]}],"mix-blend":[{"mix-blend":[...me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":me()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[D]}],"mask-image-linear-from-pos":[{"mask-linear-from":P()}],"mask-image-linear-to-pos":[{"mask-linear-to":P()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":P()}],"mask-image-t-to-pos":[{"mask-t-to":P()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":P()}],"mask-image-r-to-pos":[{"mask-r-to":P()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":P()}],"mask-image-b-to-pos":[{"mask-b-to":P()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":P()}],"mask-image-l-to-pos":[{"mask-l-to":P()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":P()}],"mask-image-x-to-pos":[{"mask-x-to":P()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":P()}],"mask-image-y-to-pos":[{"mask-y-to":P()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[S,N]}],"mask-image-radial-from-pos":[{"mask-radial-from":P()}],"mask-image-radial-to-pos":[{"mask-radial-to":P()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[D]}],"mask-image-conic-from-pos":[{"mask-conic-from":P()}],"mask-image-conic-to-pos":[{"mask-conic-to":P()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Oe()}],"mask-repeat":[{mask:Ae()}],"mask-size":[{mask:_e()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",S,N]}],filter:[{filter:["","none",S,N]}],blur:[{blur:W()}],brightness:[{brightness:[D,S,N]}],contrast:[{contrast:[D,S,N]}],"drop-shadow":[{"drop-shadow":["","none",b,qe,Ze]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",D,S,N]}],"hue-rotate":[{"hue-rotate":[D,S,N]}],invert:[{invert:["",D,S,N]}],saturate:[{saturate:[D,S,N]}],sepia:[{sepia:["",D,S,N]}],"backdrop-filter":[{"backdrop-filter":["","none",S,N]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[D,S,N]}],"backdrop-contrast":[{"backdrop-contrast":[D,S,N]}],"backdrop-grayscale":[{"backdrop-grayscale":["",D,S,N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[D,S,N]}],"backdrop-invert":[{"backdrop-invert":["",D,S,N]}],"backdrop-opacity":[{"backdrop-opacity":[D,S,N]}],"backdrop-saturate":[{"backdrop-saturate":[D,S,N]}],"backdrop-sepia":[{"backdrop-sepia":["",D,S,N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",S,N]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[D,"initial",S,N]}],ease:[{ease:["linear","initial",E,S,N]}],delay:[{delay:[D,S,N]}],animate:[{animate:["none",w,S,N]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,S,N]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[S,N,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",S,N]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",S,N]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[D,Ge,Ne,Ot]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function ne(...e){return As(yt(e))}function _s({className:e,...r}){return a.jsx("textarea",{"data-slot":"textarea",className:ne("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...r})}function Ts({value:e="",onChange:r,placeholder:t="Enter your response...",className:n="",disabled:o=!1,minRows:s=3,maxRows:l=8,characterLimit:i}){const u=h=>{let b=h.target.value;i&&b.length>i&&(b=b.slice(0,i)),r(b)},c=e.length,f=i&&c>=i*.9,p=i&&c>=i;return a.jsxs("div",{className:ne("space-y-2",n),children:[a.jsx("div",{className:"relative",children:a.jsx(_s,{value:e,onChange:u,placeholder:t,disabled:o,rows:s,className:ne("w-full resize-y rounded-lg border border-[var(--neutral-200)] bg-[var(--neutral-50)] px-[13px] py-3 text-sm font-normal","focus:border-[var(--primary-600)] focus:ring-0 focus:outline-none","placeholder:text-textGray","!field-sizing-auto !transition-none","resize-y",o&&"cursor-not-allowed opacity-50"),style:{minHeight:`${s*1.5}rem`,maxHeight:`${l*1.5}rem`,boxSizing:"border-box",overflow:"hidden",borderRadius:"0px",backgroundColor:"white"}})}),i!=null&&a.jsx("div",{className:"flex justify-end",children:a.jsxs("span",{className:ne("text-xs transition-colors",p?"text-error":f?"text-warning":"text-textGray"),children:[c,"/",i]})})]})}function Is({options:e,value:r,onChange:t,placeholder:n="Select an option",disabled:o=!1,error:s,required:l=!1,className:i=""}){const[u,c]=M.useState(!1),[f,p]=M.useState(-1),h=M.useRef(null),b=e.find(w=>w.value===r),y=(b==null?void 0:b.label)||"";M.useEffect(()=>{function w(T){h.current&&!h.current.contains(T.target)&&(c(!1),p(-1))}return u&&document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[u]),M.useEffect(()=>{function w(T){if(!u)return;const R=e.filter(O=>!O.disabled);switch(T.key){case"ArrowDown":T.preventDefault(),p(O=>O+1>=R.length?0:O+1);break;case"ArrowUp":T.preventDefault(),p(O=>O-1<0?R.length-1:O-1);break;case"Enter":T.preventDefault(),f>=0&&R[f]&&(t(R[f].value),c(!1));break;case"Escape":c(!1),p(-1);break}}return u&&document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[u,f,e,t]);const v=()=>{o||(c(w=>!w),p(-1))},g=w=>{w.disabled||(t(w.value),c(!1),p(-1))},E="relative w-full cursor-pointer border border-rounded rounded-xl border-[var(--neutral-200)] bg-[var(--neutral-50)] px-3 py-2 pr-10 text-left focus:border-[var(--primary-600)] focus:outline-none focus:ring-1 focus:ring-[var(--primary-200)] "+(o?"cursor-not-allowed bg-[var(--neutral-100)] text-[var(--neutral-500)] ":"")+(s?"border-error focus:border-error focus:ring-error ":"");return a.jsxs("div",{className:`relative ${i}`,ref:h,children:[a.jsxs("button",{type:"button",className:E,onClick:v,disabled:o,"aria-haspopup":"listbox","aria-expanded":u,children:[a.jsxs("span",{className:`block truncate ${y?"text-textBlack":"text-textGray"}`,children:[y||n,l&&!y&&a.jsx("span",{className:"ml-1 text-error",children:"*"})]}),a.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:a.jsx("svg",{className:`h-4 w-4 transition-transform duration-200 ${u?"rotate-180":""} ${o?"text-[var(--neutral-500)]":"text-textGray"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),s&&a.jsx("p",{className:"mt-1 text-sm text-error",children:s}),u&&a.jsx("div",{className:"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-[var(--neutral-200)] bg-[var(--neutral-50)] shadow-lg",role:"listbox",children:e.length===0?a.jsx("div",{className:"px-3 py-2 text-sm text-textGray",children:"No options available"}):e.map(w=>{const R=e.filter(j=>!j.disabled).findIndex(j=>j.value===w.value),O=R===f,$=w.value===r;return a.jsx("div",{className:`cursor-pointer px-3 py-2 text-sm transition-colors ${w.disabled?"cursor-not-allowed bg-[var(--neutral-100)] text-[var(--neutral-500)]":O?"bg-[var(--primary-100)] text-[var(--primary-600)]":$?"bg-[var(--primary-600)] text-[var(--primary-foreground)]":"text-textBlack hover:bg-[var(--neutral-100)]"}`,onClick:()=>g(w),onMouseEnter:()=>!w.disabled&&p(R),role:"option","aria-selected":$,children:w.label},w.value)})})]})}function Ls({columns:e,rows:r,inputConfig:t,values:n,onValueChange:o,className:s=""}){const l=c=>{const f=n==null?void 0:n.find(p=>p.rowId===c);return f?f.value:t.type==="checkbox"?!1:""},i="w-full border border-[var(--neutral-200)] bg-[var(--neutral-50)] px-3 py-2 text-sm leading-5 font-normal transition-all focus:border-[var(--primary-600)] focus:outline-none",u=c=>{var p;const f=l(c.id);switch(t.type){case"dropdown":return a.jsxs("select",{value:String(f),onChange:h=>o(c.id,h.target.value),className:`${i} cursor-pointer appearance-none bg-[var(--neutral-50)] pr-8`,style:{backgroundImage:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e")`,backgroundPosition:"right 8px center",backgroundRepeat:"no-repeat",backgroundSize:"16px",borderRadius:"0.75rem"},children:[a.jsx("option",{value:"",children:"Select"}),(p=t.options)==null?void 0:p.map(h=>a.jsx("option",{value:h.id,children:h.text},h.id))]});case"number":return a.jsx("input",{type:"number",value:String(f),onChange:h=>o(c.id,h.target.value),placeholder:t.placeholder,min:t.min,max:t.max,step:t.step,required:t.required,className:i,style:{borderRadius:"0.75rem"}});case"checkbox":return a.jsxs("div",{className:"flex items-center",children:[a.jsx("input",{type:"checkbox",id:`cb-${c.id}`,checked:!!f,onChange:h=>o(c.id,h.target.checked),required:t.required,className:"h-4 w-4 cursor-pointer border border-[var(--neutral-200)] text-[var(--primary-600)] focus:ring-2 focus:ring-[var(--primary-200)] focus:ring-offset-0"}),t.checkboxLabel&&a.jsx("label",{htmlFor:`cb-${c.id}`,className:"ml-2 cursor-pointer text-sm text-textBlack",children:t.checkboxLabel})]});case"text":default:return a.jsx("input",{type:"text",value:String(f),onChange:h=>{let b=h.target.value;t.maxLength&&b.length>t.maxLength||t.inputType&&b.trim()!==""&&!Er(b,t.inputType)||o(c.id,b)},placeholder:t.placeholder,required:t.required,maxLength:t.maxLength,className:i,style:{borderRadius:"0.75rem"}})}};return a.jsxs("div",{className:`overflow-hidden border border-rounded rounded-xl border-[var(--neutral-200)] bg-[var(--neutral-50)] ${s}`,children:[a.jsx("div",{className:"flex border-b border-[var(--neutral-200)] bg-[var(--neutral-100)]",children:e.map((c,f)=>a.jsx("div",{className:`flex-1 px-4 py-3 text-left text-sm font-medium text-textBlack ${f!==e.length-1?"border-r border-[var(--neutral-200)]":""}`,style:{width:c.width},children:c.title},c.id))}),a.jsx("div",{children:r.map((c,f)=>{var p,h;return a.jsxs("div",{className:f!==r.length-1?"flex border-b border-[var(--neutral-200)]":"flex",children:[a.jsx("div",{className:"flex flex-1 items-center border-r border-[var(--neutral-200)] px-4 py-3 text-sm text-textBlack",style:{width:(p=e[0])==null?void 0:p.width},children:c.label}),a.jsx("div",{className:"flex flex-1 items-center px-4 py-3",style:{width:(h=e[1])==null?void 0:h.width},children:u(c)})]},c.id)})})]})}function Ds(e){return`${["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`}const $s=["January","February","March","April","May","June","July","August","September","October","November","December"],Fs=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function Bs({selectedDate:e,onDateSelect:r,placeholder:t="Select a date",className:n="",disabled:o=!1,minDate:s,maxDate:l}){const[i,u]=M.useState(!1),[c,f]=M.useState(()=>e??new Date),p=M.useRef(null);M.useEffect(()=>{i&&f(e??new Date)},[i]),M.useEffect(()=>{if(!i)return;const L=U=>{p.current&&!p.current.contains(U.target)&&u(!1)};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[i]);const h=L=>{r(L),u(!1)},b=L=>{const U=new Date(c);U.setMonth(parseInt(L,10)),f(U)},y=L=>{const U=new Date(c);U.setFullYear(parseInt(L,10)),f(U)},v=new Date().getFullYear(),g=s?s.getFullYear():v-100,E=l?l.getFullYear():v+100,w=Array.from({length:Math.max(1,E-g+1)},(L,U)=>g+U),T=L=>!!(s&&L<s||l&&L>l),R=c.getFullYear(),O=c.getMonth(),$=new Date(R,O,1).getDay(),j=new Date(R,O+1,0).getDate(),k=$,F=e?Ds(e):"";return a.jsxs("div",{ref:p,className:`relative ${n}`.trim(),children:[a.jsxs("button",{type:"button",onClick:()=>!o&&u(L=>!L),className:`flex w-full items-center justify-start border border-[var(--neutral-200)] bg-[var(--neutral-50)] px-[13px] py-3 text-left text-sm font-normal hover:bg-[var(--neutral-100)] ${F?"text-textBlack":"text-textGray"} ${o?"cursor-not-allowed opacity-50":"cursor-pointer"}`,style:{borderRadius:"0.75rem",backgroundColor:"white"},children:[a.jsx("svg",{className:"mr-2 h-4 w-4 shrink-0 text-textGray",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),F||t]}),i&&a.jsx("div",{className:"absolute z-50 mt-1 w-auto rounded-md border border-[var(--neutral-200)] bg-[var(--neutral-50)] p-3 shadow-lg",style:{minWidth:"280px"},children:a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("select",{value:c.getMonth().toString(),onChange:L=>b(L.target.value),className:"h-8 w-32 rounded border border-[var(--primary-200)] bg-[var(--neutral-50)] px-2 text-sm focus:border-[var(--primary-600)] focus:outline-none",children:$s.map((L,U)=>a.jsx("option",{value:U.toString(),children:L},L))}),a.jsx("select",{value:c.getFullYear().toString(),onChange:L=>y(L.target.value),className:"h-8 w-24 rounded border border-[var(--primary-200)] bg-[var(--neutral-50)] px-2 text-sm focus:border-[var(--primary-600)] focus:outline-none",children:w.map(L=>a.jsx("option",{value:L.toString(),children:L},L))})]}),a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"grid grid-cols-7 gap-1 text-center text-xs font-medium text-textGray",children:Fs.map(L=>a.jsx("div",{children:L},L))}),a.jsxs("div",{className:"mt-1 grid grid-cols-7 gap-1 text-sm",children:[Array.from({length:k},(L,U)=>a.jsx("div",{},`empty-${U}`)),Array.from({length:j},(L,U)=>{const ee=U+1,Q=new Date(R,O,ee),Y=T(Q),K=e&&e.getFullYear()===R&&e.getMonth()===O&&e.getDate()===ee;return a.jsx("button",{type:"button",disabled:Y,onClick:()=>!Y&&h(Q),className:`flex h-8 w-8 items-center justify-center rounded-md transition-colors ${Y?"cursor-not-allowed text-[var(--neutral-400)]":"hover:bg-[var(--primary-50)] hover:text-[var(--primary-600)]"} ${K?"bg-[var(--primary-600)] text-[var(--primary-foreground)] hover:bg-[var(--primary-600)] hover:text-[var(--primary-foreground)]":""}`,children:ee},ee)})]})]})]})})]})}const Vs={"image-response":{label:"Image",showPreview:!0},"video-response":{label:"Video",showPreview:!0},"voice-response":{label:"Audio",showPreview:!0},"document-response":{label:"Document",showPreview:!0},"pdf-response":{label:"PDF",showPreview:!0}};function Rr({questionType:e}){const r="h-8 w-8 text-[var(--primary-600)]";return e==="image-response"?a.jsx("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}):e==="video-response"?a.jsx("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}):e==="document-response"?a.jsx("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}):e==="pdf-response"?a.jsx("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}):a.jsx("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z"})})}function zs({questionType:e,value:r,onChange:t,className:n="",disabled:o=!1,mediaConfig:s}){var O,$;const[l,i]=M.useState(!1),[u,c]=M.useState(null),f=M.useRef(null),p=Vs[e],h=((O=s==null?void 0:s.allowedTypes[e])==null?void 0:O.join(","))??(($=Xe[e])==null?void 0:$.join(","))??"",b=(s==null?void 0:s.maxSizeBytes[e])!=null?Math.round(s.maxSizeBytes[e]/(1024*1024)):jr[e]??10,y=(s==null?void 0:s.allowedTypes[e])??Xe[e]??[],v=y.length>0?`Supported: ${y.join(", ")} (max ${b}MB)`:`Max size: ${b}MB`,g=async j=>{c(null);const k=pt(j,e,s);if(!k.valid){c(k.error??"Invalid file"),t(null);return}try{const F=await vt(j);t(F)}catch{c("Failed to read file"),t(null)}},E=j=>{var F;if(j.preventDefault(),j.stopPropagation(),i(!1),o)return;const k=(F=j.dataTransfer.files)==null?void 0:F[0];k&&g(k)},w=j=>{var F;const k=(F=j.target.files)==null?void 0:F[0];k&&g(k),j.target.value=""},T=()=>{t(null),c(null)};if((r==null?void 0:r.binary)&&r){const j=`data:${r.fileType};base64,${r.binary}`;return a.jsxs("div",{className:`relative border border-rounded rounded-xl border-[var(--neutral-200)] bg-[var(--neutral-50)] ${n}`,children:[a.jsx("button",{type:"button",onClick:T,disabled:o,className:"absolute -top-3 -right-3 z-10 rounded-full border border-[var(--neutral-200)] bg-[var(--neutral-500)] p-1 text-[var(--primary-foreground)] transition-all hover:bg-[var(--primary-600)] hover:text-[var(--primary-foreground)] disabled:opacity-50","aria-label":"Remove",children:a.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a.jsxs("div",{className:"p-4",children:[e==="image-response"&&a.jsx("img",{src:j,alt:"Uploaded",className:"max-h-64 w-full object-contain"}),e==="video-response"&&a.jsx("video",{src:j,controls:!0,className:"max-h-64 w-full",children:"Your browser does not support the video tag."}),e==="voice-response"&&a.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[a.jsx(Rr,{questionType:"voice-response"}),a.jsx("p",{className:"text-sm font-medium text-textBlack",children:r.fileName}),a.jsx("audio",{src:j,controls:!0,className:"w-full max-w-sm",children:"Your browser does not support the audio tag."})]}),e==="pdf-response"&&a.jsxs("div",{className:"flex flex-col space-y-2",children:[a.jsx("iframe",{src:j,title:"PDF preview",className:"h-96 w-full rounded border border-[var(--neutral-200)] bg-[var(--neutral-50)]"}),a.jsx("p",{className:"text-sm text-textGray",children:r.fileName})]}),e==="document-response"&&a.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[a.jsx(Rr,{questionType:"document-response"}),a.jsx("p",{className:"text-sm font-medium text-textBlack",children:r.fileName}),a.jsx("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-[var(--primary-600)] hover:underline",children:"View / Open file"})]}),p.showPreview&&e!=="voice-response"&&e!=="document-response"&&e!=="pdf-response"&&a.jsx("p",{className:"mt-2 text-sm text-textGray",children:r.fileName})]})]})}return a.jsxs("div",{className:n,children:[a.jsxs("div",{className:`relative border-2 border-rounded rounded-xl border-dashed p-8 text-center transition-all ${l?"border-[var(--primary-600)] bg-[var(--primary-50)]":"border-[var(--neutral-200)] bg-[var(--neutral-50)] hover:border-[var(--primary-600)] hover:bg-[var(--primary-50)]"} ${o?"cursor-not-allowed opacity-50":"cursor-pointer"}`,onDragEnter:j=>{j.preventDefault(),j.stopPropagation(),o||i(!0)},onDragLeave:j=>{j.preventDefault(),j.stopPropagation(),i(!1)},onDragOver:j=>{j.preventDefault(),j.stopPropagation()},onDrop:E,onClick:()=>{var j;return!o&&((j=f.current)==null?void 0:j.click())},children:[a.jsx("input",{ref:f,type:"file",accept:h,onChange:w,disabled:o,className:"hidden","aria-label":`Select ${p.label} file`}),a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"flex justify-center",children:a.jsx(Rr,{questionType:e})}),a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-medium text-[var(--primary-600)]",children:["Tap to Upload ",p.label]}),a.jsxs("p",{className:"mt-1 text-xs text-textGray",children:["or drag and drop your ",p.label.toLowerCase()," here"]})]}),a.jsx("div",{className:"text-xs text-textGray",children:a.jsx("p",{children:v})})]})]}),u&&a.jsx("div",{className:"mt-4 rounded-lg border border-[var(--error-200)] bg-[var(--error-50)] p-3",children:a.jsx("p",{className:"text-xs text-error",children:u})})]})}function Le({error:e,className:r=""}){return e?a.jsx("p",{className:`mt-1 text-sm text-error ${r}`.trim(),children:e}):null}function Ws({questionType:e,question:r,value:t,onChange:n,error:o,disabled:s=!1,mediaConfig:l,className:i=""}){return a.jsxs("div",{className:i,children:[a.jsx(zs,{questionType:e,value:t,onChange:n,disabled:s,mediaConfig:l}),a.jsx(Le,{error:o})]})}function Us({question:e,value:r,onChange:t,error:n,touched:o=!0,disabled:s=!1,mediaConfig:l,className:i="",variant:u="default"}){const c=()=>e.options?e.options.map((y,v)=>{var g;return{value:y,label:((g=e.optionsEN)==null?void 0:g[v])??y,disabled:!1}}):[],f=()=>e.options?e.options.map((y,v)=>{var g;return{id:y,text:((g=e.optionsEN)==null?void 0:g[v])??y}}):[],p=()=>{if(!e.tableHeaderValue||!e.tableQuestionValue)return null;const y=e.tableHeaderValue.map((E,w)=>({id:`col-${w}`,title:E,width:w===0?"60%":"40%"})),v=e.tableQuestionValue.map(E=>({id:E.rowId,label:E.rowQuestion}));let g;switch(e.type){case"tabular-text-input":g={type:"text",placeholder:"Enter text",required:e.isMandatory,maxLength:e.textLimitCharacter?parseInt(e.textLimitCharacter.toString(),10):void 0,inputType:e.textInputType};break;case"tabular-drop-down":{g={type:"dropdown",options:(e.optionsEN??e.options??[]).map(w=>({id:w,text:w})),required:e.isMandatory};break}case"tabular-check-box":g={type:"checkbox",checkboxLabel:"Yes",required:e.isMandatory};break;default:g={type:"text",required:e.isMandatory}}return{columns:y,rows:v,inputConfig:g}},h=()=>!r||typeof r!="object"?[]:Array.isArray(r)?r.map(v=>({rowId:v.rowId,value:v.rowAnswer??""})):Object.entries(r).map(([v,g])=>({rowId:v,value:g})),b=(y,v)=>{t({...r||{},[y]:v})};switch(e.type){case"single-select":return a.jsxs("div",{className:i,children:[a.jsx(gt,{options:f(),selectedOptions:String(r??""),onOptionSelect:y=>t(y),selectionMode:"single",disabled:s,variant:u}),o&&a.jsx(Le,{error:n})]});case"multi-select":return a.jsxs("div",{className:i,children:[a.jsx(gt,{options:f(),selectedOptions:Array.isArray(r)?r.map(String):[],onOptionSelect:y=>t(y),selectionMode:"multiple",disabled:s,variant:u}),o&&a.jsx(Le,{error:n})]});case"dropdown":case"drop-down":return a.jsx("div",{className:i,children:a.jsx(Is,{options:c(),value:String(r??""),onChange:y=>t(y),placeholder:"Select an option",disabled:s,error:o?n:void 0,required:e.isMandatory})});case"text-response":return a.jsxs("div",{className:i,children:[a.jsx(Ts,{value:String(r??""),onChange:y=>t(y),characterLimit:e.textLimitCharacter??void 0,placeholder:"Enter your response...",disabled:s}),o&&a.jsx(Le,{error:n})]});case"calendar":return a.jsxs("div",{className:i,children:[a.jsx(Bs,{selectedDate:r instanceof Date?r:void 0,onDateSelect:y=>t(y??null),disabled:s,placeholder:"Select a date"}),o&&a.jsx(Le,{error:n})]});case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":{const y=wr(r)?r:null;return a.jsx("div",{className:i,children:a.jsx(Ws,{questionType:e.type,question:e,value:y,onChange:v=>t(v),error:o?n:void 0,disabled:s,mediaConfig:l})})}case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{const y=p();return y?a.jsxs("div",{className:i,children:[a.jsx(Ls,{columns:y.columns,rows:y.rows,inputConfig:y.inputConfig,values:h(),onValueChange:b}),o&&a.jsx(Le,{error:n})]}):a.jsx("div",{className:`text-error ${i}`,children:"Invalid tabular question configuration"})}default:return a.jsxs("div",{className:`text-error ${i}`,children:[a.jsxs("p",{children:["Unsupported question type: ",e.type]}),a.jsxs("p",{className:"mt-1 text-sm text-textGray",children:["Question: ",e.description]})]})}}function Vt({question:e,value:r,onChange:t,disabled:n=!1,error:o,validationErrors:s=[],mediaConfig:l,className:i="",variant:u="default"}){const c=s.filter(p=>p.questionId===e.questionId),f=o??c.map(p=>p.message).join("; ");return at(e.type)?a.jsx(Us,{question:e,value:r,onChange:t,error:f,touched:!0,disabled:n,mediaConfig:l,className:i,variant:u}):a.jsx("div",{className:i,children:a.jsxs("p",{className:"text-error",children:["Unsupported question type: ",e.type]})})}function zt(e){switch(console.log("status",e),e){case"completed":return"border-[var(--primary-200)] bg-[var(--primary-50)]";case"error":return"border-[var(--error-200)] bg-[var(--error-50)]";default:return"border-[var(--neutral-200)] bg-[var(--neutral-50)]"}}function Wt(e){switch(e){case"completed":return"border-[var(--primary-200)] bg-[var(--primary-50)]";case"error":return"border-[var(--error-200)] bg-[var(--error-50)]";case"required":return"border-[var(--warning-200)] bg-[var(--warning-50)]";default:return"border-[var(--neutral-200)] bg-[var(--neutral-50)]"}}function Ut(e){switch(e){case"completed":return"text-[var(--primary-600)]";case"error":return"text-[var(--error-600)]";case"required":return"text-[var(--warning-600)]";default:return"text-[var(--neutral-500)]"}}function Gt({questions:e,activeQuestionId:r,onQuestionSelect:t,questionStatusMap:n={},className:o="",variant:s="default"}){const l=M.useRef(null),i=M.useRef([]),u=r!=null?e.indexOf(r):-1,c=e.length>1;M.useEffect(()=>{if(u<0||u>=i.current.length)return;const v=i.current[u];v==null||v.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},[u,r]);const f=M.useCallback(()=>{if(u<=0)return;const v=e[u-1];v&&t(v)},[u,e,t]),p=M.useCallback(()=>{if(u>=e.length-1||u<0)return;const v=e[u+1];v&&t(v)},[u,e,t]);if(e.length===0)return null;const h=s==="PLC",b=h?"flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-md bg-transparent transition-colors":"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md border border-[var(--neutral-200)] bg-[var(--color-card)] text-[var(--color-foreground)] transition-colors hover:bg-[var(--neutral-100)] disabled:cursor-not-allowed disabled:opacity-50",y=v=>h?`${v?"cursor-not-allowed text-[var(--primary-200)]":"text-[var(--primary-600)]"}`:"";return a.jsxs("div",{className:`flex items-center gap-2 overflow-hidden ${o}`.trim(),role:"navigation","aria-label":"Question navigation",children:[c&&a.jsx("button",{type:"button",onClick:f,disabled:u<=0,"aria-label":"Previous question",className:`${b} ${y(u<=0)}`.trim(),children:a.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})})}),a.jsx("div",{ref:l,className:"flex flex-1 gap-2 overflow-x-auto scroll-smooth whitespace-nowrap no-scrollbar py-1",style:{minHeight:0},children:e.map((v,g)=>{const E=v===r,w=n[v];if(h){const R=w==="completed";let O="min-w-[45px] h-[41px] px-4 py-1.5 rounded-[9px] text-sm font-medium text-center transition-all cursor-pointer flex items-center justify-center ";return E&&R?O+="border-2 border-[var(--primary-600)] bg-[var(--primary-100)] text-[var(--primary-600)]":E?O+="border-2 border-[var(--primary-600)] bg-transparent text-[var(--color-textBlack)]":R?O+="border border-[var(--primary-600)] bg-[var(--primary-100)] text-[var(--primary-600)] font-semibold":O+="border border-transparent text-[var(--color-textBlack)]",a.jsx("button",{ref:$=>{i.current[g]=$},type:"button",onClick:()=>t(v),className:O,"aria-current":E?"step":void 0,"aria-label":`Question ${g+1}`,children:g+1},v)}const T=zt(w);return a.jsx("button",{ref:R=>{i.current[g]=R},type:"button",onClick:()=>t(v),className:`min-w-[60px] flex-shrink-0 rounded-full border px-4 py-2 text-center text-sm transition-all cursor-pointer ${E?"border-[var(--primary-600)] ring-2 ring-[var(--primary-200)] bg-[var(--primary-50)] text-[var(--primary-600)]":`${T} text-[var(--color-textBlack)] hover:border-[var(--primary-200)]`}`,"aria-current":E?"step":void 0,"aria-label":`Question ${v}`,children:v},v)})}),c&&a.jsx("button",{type:"button",onClick:p,disabled:u>=e.length-1,"aria-label":"Next question",className:`${b} ${y(u>=e.length-1)}`.trim(),children:a.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})})})]})}function Gs(e){const r=Ut(e);switch(e){case"completed":return a.jsx("svg",{className:`h-5 w-5 ${r}`,fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})});case"error":return a.jsx("svg",{className:`h-5 w-5 ${r}`,fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})});case"required":return a.jsx("svg",{className:`h-5 w-5 ${r}`,fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})});default:return a.jsx("div",{className:"h-5 w-5 rounded-full border-2 border-[var(--neutral-200)]"})}}function Yt({isOpen:e,onClose:r,questions:t,visibleQuestionIds:n,responses:o,currentQuestionIndex:s,onGoToQuestion:l,readOnly:i=!1}){return e?a.jsxs(a.Fragment,{children:[a.jsx("div",{role:"presentation",onClick:r,className:"fixed inset-0 z-50 bg-black/50"}),a.jsx("div",{className:"fixed top-0 right-0 z-50 h-full w-full max-w-md overflow-hidden bg-[var(--neutral-50)] shadow-2xl",children:a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsx("div",{className:"border-b border-[var(--neutral-200)] p-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h2",{className:"text-xl font-semibold text-textBlack",children:"Question Overview"}),a.jsx("button",{type:"button",onClick:r,className:"rounded-lg p-2 text-[var(--color-foreground)] transition-colors hover:bg-[var(--neutral-100)]","aria-label":"Close",children:a.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),a.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:a.jsx("div",{className:"space-y-3",children:n.map((u,c)=>{const f=t.find(b=>b.questionId===u);if(!f)return null;const p=Cr(u,t,o,i),h=c===s;return a.jsx("button",{type:"button",onClick:()=>l(c),className:`w-full rounded-lg border-2 p-4 text-left transition-all duration-200 ${h?"border-[var(--primary-600)] bg-[var(--primary-50)] shadow-md":`${Wt(p)} hover:shadow-md`}`,children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"mt-0.5 flex-shrink-0",children:Gs(p)}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[a.jsx("span",{className:"text-sm font-medium text-[var(--primary-600)]",children:f.questionId}),f.isMandatory&&a.jsx("span",{className:"text-xs text-error",children:"*"}),h&&a.jsx("span",{className:"text-xs font-medium text-[var(--primary-600)]",children:"Current"})]}),a.jsx("p",{className:"truncate text-sm font-medium text-textBlack",children:f.description})]}),a.jsx("div",{className:"flex-shrink-0 text-xs text-textGray",children:c+1})]})},u)})})}),a.jsx("div",{className:"border-t border-[var(--neutral-200)] bg-[var(--neutral-50)] p-6",children:a.jsx("div",{className:"flex items-center justify-between text-sm",children:a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:"h-3 w-3 rounded-full bg-[var(--primary-600)]"}),a.jsx("span",{className:"text-textGray",children:"Completed"})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:"h-3 w-3 rounded-full bg-[var(--warning-600)]"}),a.jsx("span",{className:"text-textGray",children:"Required"})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:"h-3 w-3 rounded-full bg-[var(--error-600)]"}),a.jsx("span",{className:"text-textGray",children:"Error"})]})]})})})]})})]}):null}function Qt(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function er(...e){return r=>{let t=!1;const n=e.map(o=>{const s=Qt(o,r);return!t&&typeof s=="function"&&(t=!0),s});if(t)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():Qt(e[o],null)}}}}function Pe(...e){return m.useCallback(er(...e),e)}var Ys=Symbol.for("react.lazy"),rr=m[" use ".trim().toString()];function Qs(e){return typeof e=="object"&&e!==null&&"then"in e}function Ht(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Ys&&"_payload"in e&&Qs(e._payload)}function Kt(e){const r=Ks(e),t=m.forwardRef((n,o)=>{let{children:s,...l}=n;Ht(s)&&typeof rr=="function"&&(s=rr(s._payload));const i=m.Children.toArray(s),u=i.find(Js);if(u){const c=u.props.children,f=i.map(p=>p===u?m.Children.count(c)>1?m.Children.only(null):m.isValidElement(c)?c.props.children:null:p);return a.jsx(r,{...l,ref:o,children:m.isValidElement(c)?m.cloneElement(c,void 0,f):null})}return a.jsx(r,{...l,ref:o,children:s})});return t.displayName=`${e}.Slot`,t}var Hs=Kt("Slot");function Ks(e){const r=m.forwardRef((t,n)=>{let{children:o,...s}=t;if(Ht(o)&&typeof rr=="function"&&(o=rr(o._payload)),m.isValidElement(o)){const l=qs(o),i=Zs(s,o.props);return o.type!==m.Fragment&&(i.ref=n?er(n,l):l),m.cloneElement(o,i)}return m.Children.count(o)>1?m.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Xs=Symbol("radix.slottable");function Js(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Xs}function Zs(e,r){const t={...r};for(const n in r){const o=e[n],s=r[n];/^on[A-Z]/.test(n)?o&&s?t[n]=(...i)=>{const u=s(...i);return o(...i),u}:o&&(t[n]=o):n==="style"?t[n]={...o,...s}:n==="className"&&(t[n]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}function qs(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}const Xt=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Jt=yt,ea=((e,r)=>t=>{var n;if((r==null?void 0:r.variants)==null)return Jt(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:o,defaultVariants:s}=r,l=Object.keys(o).map(c=>{const f=t==null?void 0:t[c],p=s==null?void 0:s[c];if(f===null)return null;const h=Xt(f)||Xt(p);return o[c][h]}),i=t&&Object.entries(t).reduce((c,f)=>{let[p,h]=f;return h===void 0||(c[p]=h),c},{}),u=r==null||(n=r.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:p,className:h,...b}=f;return Object.entries(b).every(y=>{let[v,g]=y;return Array.isArray(g)?g.includes({...s,...i}[v]):{...s,...i}[v]===g})?[...c,p,h]:c},[]);return Jt(e,l,u,t==null?void 0:t.class,t==null?void 0:t.className)})("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[14px] text-[14px] leading-[20px] font-medium transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:border-destructive hover:opacity-90",{variants:{variant:{default:"bg-[var(--primary-600)] text-[var(--primary-foreground)] shadow-xs hover:bg-[var(--primary-700)]",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border border-[var(--primary-200)] bg-transparent text-[var(--color-foreground)] shadow-xs hover:bg-[var(--primary-100)] hover:text-[var(--primary-700)]",secondary:"bg-[var(--primary-100)] text-[var(--primary-700)] border border-[var(--primary-200)] shadow-xs hover:bg-[var(--primary-200)]",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"px-3 py-3",sm:"px-3 py-2",lg:"px-4 py-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),ra=e=>{switch(e){case"primary":return"bg-primary";case"secondary":return"bg-secondary";case"destructive":return"bg-destructive";case"muted":return"bg-muted";case"error":return"bg-red-500";case"success":return"bg-green-500";case"warning":return"bg-yellow-500";case"white":return"bg-white";case"gray":return"bg-gray-500";case"lightGray":return"bg-[#E5E7EB]";case"borderGray":return"bg-borderGray";default:return`bg-[${e}]`}},ta=e=>{switch(e){case"white":return"text-white";case"black":return"text-black";case"primary":return"text-primary";case"primary-foreground":return"text-primary-foreground";case"secondary":return"text-secondary";case"muted":return"text-muted-foreground";default:return`text-[${e}]`}};function Me({className:e,variant:r,size:t,asChild:n=!1,bgColor:o,textColor:s,text:l,prefixIcon:i,suffixIcon:u,children:c,...f}){const p=n?Hs:"button",h=[o&&ra(o),s&&ta(s)].filter(Boolean).join(" "),b=h?ne("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[14px] text-[14px] leading-[20px] font-medium transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] hover:opacity-90 cursor-pointer",t==="sm"&&"px-3 py-2",t==="lg"&&"px-4 py-4",t==="icon"&&"size-9",(!t||t==="default")&&"px-3 py-3",h,e):ne(ea({variant:r,size:t,className:e}));return l||i||u?a.jsxs(p,{"data-slot":"button",className:b,...f,children:[i&&a.jsx("span",{className:"flex h-4 w-4 items-center justify-center",children:i}),l&&a.jsx("span",{className:"flex-1 text-center",children:l}),u&&a.jsx("span",{className:"flex h-4 w-4 items-center justify-center",children:u}),c]}):a.jsx(p,{"data-slot":"button",className:b,...f,children:c})}function na(e,r=[]){let t=[];function n(s,l){const i=m.createContext(l);i.displayName=s+"Context";const u=t.length;t=[...t,l];const c=p=>{var E;const{scope:h,children:b,...y}=p,v=((E=h==null?void 0:h[e])==null?void 0:E[u])||i,g=m.useMemo(()=>y,Object.values(y));return a.jsx(v.Provider,{value:g,children:b})};c.displayName=s+"Provider";function f(p,h){var v;const b=((v=h==null?void 0:h[e])==null?void 0:v[u])||i,y=m.useContext(b);if(y)return y;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[c,f]}const o=()=>{const s=t.map(l=>m.createContext(l));return function(i){const u=(i==null?void 0:i[e])||s;return m.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return o.scopeName=e,[n,oa(o,...r)]}function oa(...e){const r=e[0];if(e.length===1)return r;const t=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=n.reduce((i,{useScope:u,scopeName:c})=>{const p=u(s)[`__scope${c}`];return{...i,...p}},{});return m.useMemo(()=>({[`__scope${r.scopeName}`]:l}),[l])}};return t.scopeName=r.scopeName,t}var sa=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zt=sa.reduce((e,r)=>{const t=Kt(`Primitive.${r}`),n=m.forwardRef((o,s)=>{const{asChild:l,...i}=o,u=l?t:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...i,ref:s})});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{}),Or="Progress",Ar=100,[aa]=na(Or),[ia,la]=aa(Or),qt=m.forwardRef((e,r)=>{const{__scopeProgress:t,value:n=null,max:o,getValueLabel:s=ca,...l}=e;(o||o===0)&&!nn(o)&&console.error(ua(`${o}`,"Progress"));const i=nn(o)?o:Ar;n!==null&&!on(n,i)&&console.error(da(`${n}`,"Progress"));const u=on(n,i)?n:null,c=tr(u)?s(u,i):void 0;return a.jsx(ia,{scope:t,value:u,max:i,children:a.jsx(Zt.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":tr(u)?u:void 0,"aria-valuetext":c,role:"progressbar","data-state":tn(u,i),"data-value":u??void 0,"data-max":i,...l,ref:r})})});qt.displayName=Or;var en="ProgressIndicator",rn=m.forwardRef((e,r)=>{const{__scopeProgress:t,...n}=e,o=la(en,t);return a.jsx(Zt.div,{"data-state":tn(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:r})});rn.displayName=en;function ca(e,r){return`${Math.round(e/r*100)}%`}function tn(e,r){return e==null?"indeterminate":e===r?"complete":"loading"}function tr(e){return typeof e=="number"}function nn(e){return tr(e)&&!isNaN(e)&&e>0}function on(e,r){return tr(e)&&!isNaN(e)&&e<=r&&e>=0}function ua(e,r){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${r}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ar}\`.`}function da(e,r){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${r}\`. The \`value\` prop must be:
32
+ - a positive number
33
+ - less than the value passed to \`max\` (or ${Ar} if no \`max\` prop is set)
34
+ - \`null\` or \`undefined\` if the progress is indeterminate.
35
+
36
+ Defaulting to \`null\`.`}var fa=qt,ma=rn;function pa({className:e,value:r,...t}){return a.jsx(fa,{"data-slot":"progress",className:ne("relative h-2 w-full overflow-hidden rounded-full bg-[var(--primary-200)]/50",e),...t,children:a.jsx(ma,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-[var(--primary-600)] transition-all duration-300 ease-out",style:{transform:`translateX(-${100-(r||0)}%)`}})})}const va="Question {current} of {total}";function sn({currentIndex:e,totalSteps:r,progressMode:t="completion",progressValue:n,showLabel:o=!0,showPercentage:s=!0,labelFormat:l=va,progressMaxWidth:i="100%",variant:u="default",className:c}){const f=e+1,p=t==="completion"&&n!=null?Math.min(100,Math.max(0,n)):r>0?f/r*100:0,h=l.replace("{current}",String(f)).replace("{total}",String(r));return a.jsxs("div",{className:ne("flex items-center justify-between gap-4",c),role:"progressbar","aria-valuenow":f,"aria-valuemin":1,"aria-valuemax":r,"aria-label":h,children:[o&&a.jsx("span",{className:"text-sm font-medium text-[var(--color-textGray)]",children:h}),a.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",style:{maxWidth:i},children:[u==="gradient"?a.jsx("div",{className:"relative h-2 flex-1 min-w-0 overflow-hidden rounded-full bg-[var(--primary-200)]/50",children:a.jsx("div",{className:"h-2 rounded-full bg-gradient-to-r from-[var(--primary-600)] to-[var(--primary-700)] transition-all duration-300 ease-out",style:{width:`${p}%`}})}):a.jsx(pa,{value:p,className:"flex-1 min-w-0"}),s&&a.jsxs("span",{className:"text-sm font-medium text-[var(--color-textGray)] shrink-0",children:[Math.round(p),"%"]})]})]})}function we(e,r,{checkForDefaultPrevented:t=!0}={}){return function(o){if(e==null||e(o),t===!1||!o.defaultPrevented)return r==null?void 0:r(o)}}function ha(e,r){const t=m.createContext(r),n=s=>{const{children:l,...i}=s,u=m.useMemo(()=>i,Object.values(i));return a.jsx(t.Provider,{value:u,children:l})};n.displayName=e+"Provider";function o(s){const l=m.useContext(t);if(l)return l;if(r!==void 0)return r;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function ba(e,r=[]){let t=[];function n(s,l){const i=m.createContext(l),u=t.length;t=[...t,l];const c=p=>{var E;const{scope:h,children:b,...y}=p,v=((E=h==null?void 0:h[e])==null?void 0:E[u])||i,g=m.useMemo(()=>y,Object.values(y));return a.jsx(v.Provider,{value:g,children:b})};c.displayName=s+"Provider";function f(p,h){var v;const b=((v=h==null?void 0:h[e])==null?void 0:v[u])||i,y=m.useContext(b);if(y)return y;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[c,f]}const o=()=>{const s=t.map(l=>m.createContext(l));return function(i){const u=(i==null?void 0:i[e])||s;return m.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return o.scopeName=e,[n,ga(o,...r)]}function ga(...e){const r=e[0];if(e.length===1)return r;const t=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=n.reduce((i,{useScope:u,scopeName:c})=>{const p=u(s)[`__scope${c}`];return{...i,...p}},{});return m.useMemo(()=>({[`__scope${r.scopeName}`]:l}),[l])}};return t.scopeName=r.scopeName,t}var Ye=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},xa=m[" useId ".trim().toString()]||(()=>{}),ya=0;function _r(e){const[r,t]=m.useState(xa());return Ye(()=>{t(n=>n??String(ya++))},[e]),e||(r?`radix-${r}`:"")}var wa=m[" useInsertionEffect ".trim().toString()]||Ye;function ja({prop:e,defaultProp:r,onChange:t=()=>{},caller:n}){const[o,s,l]=Ea({defaultProp:r,onChange:t}),i=e!==void 0,u=i?e:o;{const f=m.useRef(e!==void 0);m.useEffect(()=>{const p=f.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,n])}const c=m.useCallback(f=>{var p;if(i){const h=ka(f)?f(e):f;h!==e&&((p=l.current)==null||p.call(l,h))}else s(f)},[i,e,s,l]);return[u,c]}function Ea({defaultProp:e,onChange:r}){const[t,n]=m.useState(e),o=m.useRef(t),s=m.useRef(r);return wa(()=>{s.current=r},[r]),m.useEffect(()=>{var l;o.current!==t&&((l=s.current)==null||l.call(s,t),o.current=t)},[t,o]),[t,n,s]}function ka(e){return typeof e=="function"}function Ca(e){const r=Na(e),t=m.forwardRef((n,o)=>{const{children:s,...l}=n,i=m.Children.toArray(s),u=i.find(Pa);if(u){const c=u.props.children,f=i.map(p=>p===u?m.Children.count(c)>1?m.Children.only(null):m.isValidElement(c)?c.props.children:null:p);return a.jsx(r,{...l,ref:o,children:m.isValidElement(c)?m.cloneElement(c,void 0,f):null})}return a.jsx(r,{...l,ref:o,children:s})});return t.displayName=`${e}.Slot`,t}function Na(e){const r=m.forwardRef((t,n)=>{const{children:o,...s}=t;if(m.isValidElement(o)){const l=Ra(o),i=Ma(s,o.props);return o.type!==m.Fragment&&(i.ref=n?er(n,l):l),m.cloneElement(o,i)}return m.Children.count(o)>1?m.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Sa=Symbol("radix.slottable");function Pa(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Sa}function Ma(e,r){const t={...r};for(const n in r){const o=e[n],s=r[n];/^on[A-Z]/.test(n)?o&&s?t[n]=(...i)=>{const u=s(...i);return o(...i),u}:o&&(t[n]=o):n==="style"?t[n]={...o,...s}:n==="className"&&(t[n]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}function Ra(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var Oa=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ve=Oa.reduce((e,r)=>{const t=Ca(`Primitive.${r}`),n=m.forwardRef((o,s)=>{const{asChild:l,...i}=o,u=l?t:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...i,ref:s})});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{});function Aa(e,r){e&&Eo.flushSync(()=>e.dispatchEvent(r))}function Qe(e){const r=m.useRef(e);return m.useEffect(()=>{r.current=e}),m.useMemo(()=>(...t)=>{var n;return(n=r.current)==null?void 0:n.call(r,...t)},[])}function _a(e,r=globalThis==null?void 0:globalThis.document){const t=Qe(e);m.useEffect(()=>{const n=o=>{o.key==="Escape"&&t(o)};return r.addEventListener("keydown",n,{capture:!0}),()=>r.removeEventListener("keydown",n,{capture:!0})},[t,r])}var Ta="DismissableLayer",Tr="dismissableLayer.update",Ia="dismissableLayer.pointerDownOutside",La="dismissableLayer.focusOutside",an,ln=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cn=m.forwardRef((e,r)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:i,...u}=e,c=m.useContext(ln),[f,p]=m.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=m.useState({}),y=Pe(r,j=>p(j)),v=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),E=v.indexOf(g),w=f?v.indexOf(f):-1,T=c.layersWithOutsidePointerEventsDisabled.size>0,R=w>=E,O=Fa(j=>{const k=j.target,F=[...c.branches].some(L=>L.contains(k));!R||F||(o==null||o(j),l==null||l(j),j.defaultPrevented||i==null||i())},h),$=Ba(j=>{const k=j.target;[...c.branches].some(L=>L.contains(k))||(s==null||s(j),l==null||l(j),j.defaultPrevented||i==null||i())},h);return _a(j=>{w===c.layers.size-1&&(n==null||n(j),!j.defaultPrevented&&i&&(j.preventDefault(),i()))},h),m.useEffect(()=>{if(f)return t&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(an=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),un(),()=>{t&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=an)}},[f,h,t,c]),m.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),un())},[f,c]),m.useEffect(()=>{const j=()=>b({});return document.addEventListener(Tr,j),()=>document.removeEventListener(Tr,j)},[]),a.jsx(ve.div,{...u,ref:y,style:{pointerEvents:T?R?"auto":"none":void 0,...e.style},onFocusCapture:we(e.onFocusCapture,$.onFocusCapture),onBlurCapture:we(e.onBlurCapture,$.onBlurCapture),onPointerDownCapture:we(e.onPointerDownCapture,O.onPointerDownCapture)})});cn.displayName=Ta;var Da="DismissableLayerBranch",$a=m.forwardRef((e,r)=>{const t=m.useContext(ln),n=m.useRef(null),o=Pe(r,n);return m.useEffect(()=>{const s=n.current;if(s)return t.branches.add(s),()=>{t.branches.delete(s)}},[t.branches]),a.jsx(ve.div,{...e,ref:o})});$a.displayName=Da;function Fa(e,r=globalThis==null?void 0:globalThis.document){const t=Qe(e),n=m.useRef(!1),o=m.useRef(()=>{});return m.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let u=function(){dn(Ia,t,c,{discrete:!0})};const c={originalEvent:i};i.pointerType==="touch"?(r.removeEventListener("click",o.current),o.current=u,r.addEventListener("click",o.current,{once:!0})):u()}else r.removeEventListener("click",o.current);n.current=!1},l=window.setTimeout(()=>{r.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),r.removeEventListener("pointerdown",s),r.removeEventListener("click",o.current)}},[r,t]),{onPointerDownCapture:()=>n.current=!0}}function Ba(e,r=globalThis==null?void 0:globalThis.document){const t=Qe(e),n=m.useRef(!1);return m.useEffect(()=>{const o=s=>{s.target&&!n.current&&dn(La,t,{originalEvent:s},{discrete:!1})};return r.addEventListener("focusin",o),()=>r.removeEventListener("focusin",o)},[r,t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function un(){const e=new CustomEvent(Tr);document.dispatchEvent(e)}function dn(e,r,t,{discrete:n}){const o=t.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});r&&o.addEventListener(e,r,{once:!0}),n?Aa(o,s):o.dispatchEvent(s)}var Ir="focusScope.autoFocusOnMount",Lr="focusScope.autoFocusOnUnmount",fn={bubbles:!1,cancelable:!0},Va="FocusScope",mn=m.forwardRef((e,r)=>{const{loop:t=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[i,u]=m.useState(null),c=Qe(o),f=Qe(s),p=m.useRef(null),h=Pe(r,v=>u(v)),b=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let v=function(T){if(b.paused||!i)return;const R=T.target;i.contains(R)?p.current=R:je(p.current,{select:!0})},g=function(T){if(b.paused||!i)return;const R=T.relatedTarget;R!==null&&(i.contains(R)||je(p.current,{select:!0}))},E=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&je(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",g);const w=new MutationObserver(E);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",g),w.disconnect()}}},[n,i,b.paused]),m.useEffect(()=>{if(i){hn.add(b);const v=document.activeElement;if(!i.contains(v)){const E=new CustomEvent(Ir,fn);i.addEventListener(Ir,c),i.dispatchEvent(E),E.defaultPrevented||(za(Qa(pn(i)),{select:!0}),document.activeElement===v&&je(i))}return()=>{i.removeEventListener(Ir,c),setTimeout(()=>{const E=new CustomEvent(Lr,fn);i.addEventListener(Lr,f),i.dispatchEvent(E),E.defaultPrevented||je(v??document.body,{select:!0}),i.removeEventListener(Lr,f),hn.remove(b)},0)}}},[i,c,f,b]);const y=m.useCallback(v=>{if(!t&&!n||b.paused)return;const g=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,E=document.activeElement;if(g&&E){const w=v.currentTarget,[T,R]=Wa(w);T&&R?!v.shiftKey&&E===R?(v.preventDefault(),t&&je(T,{select:!0})):v.shiftKey&&E===T&&(v.preventDefault(),t&&je(R,{select:!0})):E===w&&v.preventDefault()}},[t,n,b.paused]);return a.jsx(ve.div,{tabIndex:-1,...l,ref:h,onKeyDown:y})});mn.displayName=Va;function za(e,{select:r=!1}={}){const t=document.activeElement;for(const n of e)if(je(n,{select:r}),document.activeElement!==t)return}function Wa(e){const r=pn(e),t=vn(r,e),n=vn(r.reverse(),e);return[t,n]}function pn(e){const r=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)r.push(t.currentNode);return r}function vn(e,r){for(const t of e)if(!Ua(t,{upTo:r}))return t}function Ua(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ga(e){return e instanceof HTMLInputElement&&"select"in e}function je(e,{select:r=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Ga(e)&&r&&e.select()}}var hn=Ya();function Ya(){let e=[];return{add(r){const t=e[0];r!==t&&(t==null||t.pause()),e=bn(e,r),e.unshift(r)},remove(r){var t;e=bn(e,r),(t=e[0])==null||t.resume()}}}function bn(e,r){const t=[...e],n=t.indexOf(r);return n!==-1&&t.splice(n,1),t}function Qa(e){return e.filter(r=>r.tagName!=="A")}var Ha="Portal",gn=m.forwardRef((e,r)=>{var i;const{container:t,...n}=e,[o,s]=m.useState(!1);Ye(()=>s(!0),[]);const l=t||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return l?Jr.createPortal(a.jsx(ve.div,{...n,ref:r}),l):null});gn.displayName=Ha;function Ka(e,r){return m.useReducer((t,n)=>r[t][n]??t,e)}var nr=e=>{const{present:r,children:t}=e,n=Xa(r),o=typeof t=="function"?t({present:n.isPresent}):m.Children.only(t),s=Pe(n.ref,Ja(o));return typeof t=="function"||n.isPresent?m.cloneElement(o,{ref:s}):null};nr.displayName="Presence";function Xa(e){const[r,t]=m.useState(),n=m.useRef(null),o=m.useRef(e),s=m.useRef("none"),l=e?"mounted":"unmounted",[i,u]=Ka(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=or(n.current);s.current=i==="mounted"?c:"none"},[i]),Ye(()=>{const c=n.current,f=o.current;if(f!==e){const h=s.current,b=or(c);e?u("MOUNT"):b==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(f&&h!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Ye(()=>{if(r){let c;const f=r.ownerDocument.defaultView??window,p=b=>{const v=or(n.current).includes(CSS.escape(b.animationName));if(b.target===r&&v&&(u("ANIMATION_END"),!o.current)){const g=r.style.animationFillMode;r.style.animationFillMode="forwards",c=f.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=g)})}},h=b=>{b.target===r&&(s.current=or(n.current))};return r.addEventListener("animationstart",h),r.addEventListener("animationcancel",p),r.addEventListener("animationend",p),()=>{f.clearTimeout(c),r.removeEventListener("animationstart",h),r.removeEventListener("animationcancel",p),r.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[r,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:m.useCallback(c=>{n.current=c?getComputedStyle(c):null,t(c)},[])}}function or(e){return(e==null?void 0:e.animationName)||"none"}function Ja(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var Dr=0;function Za(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??xn()),document.body.insertAdjacentElement("beforeend",e[1]??xn()),Dr++,()=>{Dr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Dr--}},[])}function xn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var de=function(){return de=Object.assign||function(r){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}return r},de.apply(this,arguments)};function yn(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function qa(e,r,t){if(t||arguments.length===2)for(var n=0,o=r.length,s;n<o;n++)(s||!(n in r))&&(s||(s=Array.prototype.slice.call(r,0,n)),s[n]=r[n]);return e.concat(s||Array.prototype.slice.call(r))}typeof SuppressedError=="function"&&SuppressedError;var sr="right-scroll-bar-position",ar="width-before-scroll-bar",ei="with-scroll-bars-hidden",ri="--removed-body-scroll-bar-size";function $r(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function ti(e,r){var t=M.useState(function(){return{value:e,callback:r,facade:{get current(){return t.value},set current(n){var o=t.value;o!==n&&(t.value=n,t.callback(n,o))}}}})[0];return t.callback=r,t.facade}var ni=typeof window<"u"?m.useLayoutEffect:m.useEffect,wn=new WeakMap;function oi(e,r){var t=ti(null,function(n){return e.forEach(function(o){return $r(o,n)})});return ni(function(){var n=wn.get(t);if(n){var o=new Set(n),s=new Set(e),l=t.current;o.forEach(function(i){s.has(i)||$r(i,null)}),s.forEach(function(i){o.has(i)||$r(i,l)})}wn.set(t,e)},[e]),t}function si(e){return e}function ai(e,r){r===void 0&&(r=si);var t=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(s){var l=r(s,n);return t.push(l),function(){t=t.filter(function(i){return i!==l})}},assignSyncMedium:function(s){for(n=!0;t.length;){var l=t;t=[],l.forEach(s)}t={push:function(i){return s(i)},filter:function(){return t}}},assignMedium:function(s){n=!0;var l=[];if(t.length){var i=t;t=[],i.forEach(s),l=t}var u=function(){var f=l;l=[],f.forEach(s)},c=function(){return Promise.resolve().then(u)};c(),t={push:function(f){l.push(f),c()},filter:function(f){return l=l.filter(f),t}}}};return o}function ii(e){e===void 0&&(e={});var r=ai(null);return r.options=de({async:!0,ssr:!1},e),r}var jn=function(e){var r=e.sideCar,t=yn(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=r.read();if(!n)throw new Error("Sidecar medium not found");return m.createElement(n,de({},t))};jn.isSideCarExport=!0;function li(e,r){return e.useMedium(r),jn}var En=ii(),Fr=function(){},ir=m.forwardRef(function(e,r){var t=m.useRef(null),n=m.useState({onScrollCapture:Fr,onWheelCapture:Fr,onTouchMoveCapture:Fr}),o=n[0],s=n[1],l=e.forwardProps,i=e.children,u=e.className,c=e.removeScrollBar,f=e.enabled,p=e.shards,h=e.sideCar,b=e.noRelative,y=e.noIsolation,v=e.inert,g=e.allowPinchZoom,E=e.as,w=E===void 0?"div":E,T=e.gapMode,R=yn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=h,$=oi([t,r]),j=de(de({},R),o);return m.createElement(m.Fragment,null,f&&m.createElement(O,{sideCar:En,removeScrollBar:c,shards:p,noRelative:b,noIsolation:y,inert:v,setCallbacks:s,allowPinchZoom:!!g,lockRef:t,gapMode:T}),l?m.cloneElement(m.Children.only(i),de(de({},j),{ref:$})):m.createElement(w,de({},j,{className:u,ref:$}),i))});ir.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ir.classNames={fullWidth:ar,zeroRight:sr};var ci=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ui(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=ci();return r&&e.setAttribute("nonce",r),e}function di(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function fi(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var mi=function(){var e=0,r=null;return{add:function(t){e==0&&(r=ui())&&(di(r,t),fi(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},pi=function(){var e=mi();return function(r,t){m.useEffect(function(){return e.add(r),function(){e.remove()}},[r&&t])}},kn=function(){var e=pi(),r=function(t){var n=t.styles,o=t.dynamic;return e(n,o),null};return r},vi={left:0,top:0,right:0,gap:0},Br=function(e){return parseInt(e||"",10)||0},hi=function(e){var r=window.getComputedStyle(document.body),t=r[e==="padding"?"paddingLeft":"marginLeft"],n=r[e==="padding"?"paddingTop":"marginTop"],o=r[e==="padding"?"paddingRight":"marginRight"];return[Br(t),Br(n),Br(o)]},bi=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vi;var r=hi(e),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,n-t+r[2]-r[0])}},gi=kn(),De="data-scroll-locked",xi=function(e,r,t,n){var o=e.left,s=e.top,l=e.right,i=e.gap;return t===void 0&&(t="margin"),`
37
+ .`.concat(ei,` {
38
+ overflow: hidden `).concat(n,`;
39
+ padding-right: `).concat(i,"px ").concat(n,`;
40
+ }
41
+ body[`).concat(De,`] {
42
+ overflow: hidden `).concat(n,`;
43
+ overscroll-behavior: contain;
44
+ `).concat([r&&"position: relative ".concat(n,";"),t==="margin"&&`
45
+ padding-left: `.concat(o,`px;
46
+ padding-top: `).concat(s,`px;
47
+ padding-right: `).concat(l,`px;
48
+ margin-left:0;
49
+ margin-top:0;
50
+ margin-right: `).concat(i,"px ").concat(n,`;
51
+ `),t==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
52
+ }
53
+
54
+ .`).concat(sr,` {
55
+ right: `).concat(i,"px ").concat(n,`;
56
+ }
57
+
58
+ .`).concat(ar,` {
59
+ margin-right: `).concat(i,"px ").concat(n,`;
60
+ }
61
+
62
+ .`).concat(sr," .").concat(sr,` {
63
+ right: 0 `).concat(n,`;
64
+ }
65
+
66
+ .`).concat(ar," .").concat(ar,` {
67
+ margin-right: 0 `).concat(n,`;
68
+ }
69
+
70
+ body[`).concat(De,`] {
71
+ `).concat(ri,": ").concat(i,`px;
72
+ }
73
+ `)},Cn=function(){var e=parseInt(document.body.getAttribute(De)||"0",10);return isFinite(e)?e:0},yi=function(){m.useEffect(function(){return document.body.setAttribute(De,(Cn()+1).toString()),function(){var e=Cn()-1;e<=0?document.body.removeAttribute(De):document.body.setAttribute(De,e.toString())}},[])},wi=function(e){var r=e.noRelative,t=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;yi();var s=m.useMemo(function(){return bi(o)},[o]);return m.createElement(gi,{styles:xi(s,!r,o,t?"":"!important")})},Vr=!1;if(typeof window<"u")try{var lr=Object.defineProperty({},"passive",{get:function(){return Vr=!0,!0}});window.addEventListener("test",lr,lr),window.removeEventListener("test",lr,lr)}catch{Vr=!1}var $e=Vr?{passive:!1}:!1,ji=function(e){return e.tagName==="TEXTAREA"},Nn=function(e,r){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[r]!=="hidden"&&!(t.overflowY===t.overflowX&&!ji(e)&&t[r]==="visible")},Ei=function(e){return Nn(e,"overflowY")},ki=function(e){return Nn(e,"overflowX")},Sn=function(e,r){var t=r.ownerDocument,n=r;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Pn(e,n);if(o){var s=Mn(e,n),l=s[1],i=s[2];if(l>i)return!0}n=n.parentNode}while(n&&n!==t.body);return!1},Ci=function(e){var r=e.scrollTop,t=e.scrollHeight,n=e.clientHeight;return[r,t,n]},Ni=function(e){var r=e.scrollLeft,t=e.scrollWidth,n=e.clientWidth;return[r,t,n]},Pn=function(e,r){return e==="v"?Ei(r):ki(r)},Mn=function(e,r){return e==="v"?Ci(r):Ni(r)},Si=function(e,r){return e==="h"&&r==="rtl"?-1:1},Pi=function(e,r,t,n,o){var s=Si(e,window.getComputedStyle(r).direction),l=s*n,i=t.target,u=r.contains(i),c=!1,f=l>0,p=0,h=0;do{if(!i)break;var b=Mn(e,i),y=b[0],v=b[1],g=b[2],E=v-g-s*y;(y||E)&&Pn(e,i)&&(p+=E,h+=y);var w=i.parentNode;i=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!u&&i!==document.body||u&&(r.contains(i)||r===i));return(f&&Math.abs(p)<1||!f&&Math.abs(h)<1)&&(c=!0),c},cr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rn=function(e){return[e.deltaX,e.deltaY]},On=function(e){return e&&"current"in e?e.current:e},Mi=function(e,r){return e[0]===r[0]&&e[1]===r[1]},Ri=function(e){return`
74
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
75
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
76
+ `)},Oi=0,Fe=[];function Ai(e){var r=m.useRef([]),t=m.useRef([0,0]),n=m.useRef(),o=m.useState(Oi++)[0],s=m.useState(kn)[0],l=m.useRef(e);m.useEffect(function(){l.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=qa([e.lockRef.current],(e.shards||[]).map(On),!0).filter(Boolean);return v.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=m.useCallback(function(v,g){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!l.current.allowPinchZoom;var E=cr(v),w=t.current,T="deltaX"in v?v.deltaX:w[0]-E[0],R="deltaY"in v?v.deltaY:w[1]-E[1],O,$=v.target,j=Math.abs(T)>Math.abs(R)?"h":"v";if("touches"in v&&j==="h"&&$.type==="range")return!1;var k=window.getSelection(),F=k&&k.anchorNode,L=F?F===$||F.contains($):!1;if(L)return!1;var U=Sn(j,$);if(!U)return!0;if(U?O=j:(O=j==="v"?"h":"v",U=Sn(j,$)),!U)return!1;if(!n.current&&"changedTouches"in v&&(T||R)&&(n.current=O),!O)return!0;var ee=n.current||O;return Pi(ee,g,v,ee==="h"?T:R)},[]),u=m.useCallback(function(v){var g=v;if(!(!Fe.length||Fe[Fe.length-1]!==s)){var E="deltaY"in g?Rn(g):cr(g),w=r.current.filter(function(O){return O.name===g.type&&(O.target===g.target||g.target===O.shadowParent)&&Mi(O.delta,E)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var T=(l.current.shards||[]).map(On).filter(Boolean).filter(function(O){return O.contains(g.target)}),R=T.length>0?i(g,T[0]):!l.current.noIsolation;R&&g.cancelable&&g.preventDefault()}}},[]),c=m.useCallback(function(v,g,E,w){var T={name:v,delta:g,target:E,should:w,shadowParent:_i(E)};r.current.push(T),setTimeout(function(){r.current=r.current.filter(function(R){return R!==T})},1)},[]),f=m.useCallback(function(v){t.current=cr(v),n.current=void 0},[]),p=m.useCallback(function(v){c(v.type,Rn(v),v.target,i(v,e.lockRef.current))},[]),h=m.useCallback(function(v){c(v.type,cr(v),v.target,i(v,e.lockRef.current))},[]);m.useEffect(function(){return Fe.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",u,$e),document.addEventListener("touchmove",u,$e),document.addEventListener("touchstart",f,$e),function(){Fe=Fe.filter(function(v){return v!==s}),document.removeEventListener("wheel",u,$e),document.removeEventListener("touchmove",u,$e),document.removeEventListener("touchstart",f,$e)}},[]);var b=e.removeScrollBar,y=e.inert;return m.createElement(m.Fragment,null,y?m.createElement(s,{styles:Ri(o)}):null,b?m.createElement(wi,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function _i(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const Ti=li(En,Ai);var An=m.forwardRef(function(e,r){return m.createElement(ir,de({},e,{ref:r,sideCar:Ti}))});An.classNames=ir.classNames;var Ii=function(e){if(typeof document>"u")return null;var r=Array.isArray(e)?e[0]:e;return r.ownerDocument.body},Be=new WeakMap,ur=new WeakMap,dr={},zr=0,_n=function(e){return e&&(e.host||_n(e.parentNode))},Li=function(e,r){return r.map(function(t){if(e.contains(t))return t;var n=_n(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},Di=function(e,r,t,n){var o=Li(r,Array.isArray(e)?e:[e]);dr[t]||(dr[t]=new WeakMap);var s=dr[t],l=[],i=new Set,u=new Set(o),c=function(p){!p||i.has(p)||(i.add(p),c(p.parentNode))};o.forEach(c);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(h){if(i.has(h))f(h);else try{var b=h.getAttribute(n),y=b!==null&&b!=="false",v=(Be.get(h)||0)+1,g=(s.get(h)||0)+1;Be.set(h,v),s.set(h,g),l.push(h),v===1&&y&&ur.set(h,!0),g===1&&h.setAttribute(t,"true"),y||h.setAttribute(n,"true")}catch(E){console.error("aria-hidden: cannot operate on ",h,E)}})};return f(r),i.clear(),zr++,function(){l.forEach(function(p){var h=Be.get(p)-1,b=s.get(p)-1;Be.set(p,h),s.set(p,b),h||(ur.has(p)||p.removeAttribute(n),ur.delete(p)),b||p.removeAttribute(t)}),zr--,zr||(Be=new WeakMap,Be=new WeakMap,ur=new WeakMap,dr={})}},$i=function(e,r,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Ii(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Di(n,o,t,"aria-hidden")):function(){return null}};function Fi(e){const r=Bi(e),t=m.forwardRef((n,o)=>{const{children:s,...l}=n,i=m.Children.toArray(s),u=i.find(zi);if(u){const c=u.props.children,f=i.map(p=>p===u?m.Children.count(c)>1?m.Children.only(null):m.isValidElement(c)?c.props.children:null:p);return a.jsx(r,{...l,ref:o,children:m.isValidElement(c)?m.cloneElement(c,void 0,f):null})}return a.jsx(r,{...l,ref:o,children:s})});return t.displayName=`${e}.Slot`,t}function Bi(e){const r=m.forwardRef((t,n)=>{const{children:o,...s}=t;if(m.isValidElement(o)){const l=Ui(o),i=Wi(s,o.props);return o.type!==m.Fragment&&(i.ref=n?er(n,l):l),m.cloneElement(o,i)}return m.Children.count(o)>1?m.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Vi=Symbol("radix.slottable");function zi(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vi}function Wi(e,r){const t={...r};for(const n in r){const o=e[n],s=r[n];/^on[A-Z]/.test(n)?o&&s?t[n]=(...i)=>{const u=s(...i);return o(...i),u}:o&&(t[n]=o):n==="style"?t[n]={...o,...s}:n==="className"&&(t[n]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}function Ui(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var fr="Dialog",[Tn]=ba(fr),[Gi,ce]=Tn(fr),In=e=>{const{__scopeDialog:r,children:t,open:n,defaultOpen:o,onOpenChange:s,modal:l=!0}=e,i=m.useRef(null),u=m.useRef(null),[c,f]=ja({prop:n,defaultProp:o??!1,onChange:s,caller:fr});return a.jsx(Gi,{scope:r,triggerRef:i,contentRef:u,contentId:_r(),titleId:_r(),descriptionId:_r(),open:c,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(p=>!p),[f]),modal:l,children:t})};In.displayName=fr;var Ln="DialogTrigger",Yi=m.forwardRef((e,r)=>{const{__scopeDialog:t,...n}=e,o=ce(Ln,t),s=Pe(r,o.triggerRef);return a.jsx(ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Gr(o.open),...n,ref:s,onClick:we(e.onClick,o.onOpenToggle)})});Yi.displayName=Ln;var Wr="DialogPortal",[Qi,Dn]=Tn(Wr,{forceMount:void 0}),$n=e=>{const{__scopeDialog:r,forceMount:t,children:n,container:o}=e,s=ce(Wr,r);return a.jsx(Qi,{scope:r,forceMount:t,children:m.Children.map(n,l=>a.jsx(nr,{present:t||s.open,children:a.jsx(gn,{asChild:!0,container:o,children:l})}))})};$n.displayName=Wr;var mr="DialogOverlay",Fn=m.forwardRef((e,r)=>{const t=Dn(mr,e.__scopeDialog),{forceMount:n=t.forceMount,...o}=e,s=ce(mr,e.__scopeDialog);return s.modal?a.jsx(nr,{present:n||s.open,children:a.jsx(Ki,{...o,ref:r})}):null});Fn.displayName=mr;var Hi=Fi("DialogOverlay.RemoveScroll"),Ki=m.forwardRef((e,r)=>{const{__scopeDialog:t,...n}=e,o=ce(mr,t);return a.jsx(An,{as:Hi,allowPinchZoom:!0,shards:[o.contentRef],children:a.jsx(ve.div,{"data-state":Gr(o.open),...n,ref:r,style:{pointerEvents:"auto",...n.style}})})}),Re="DialogContent",Bn=m.forwardRef((e,r)=>{const t=Dn(Re,e.__scopeDialog),{forceMount:n=t.forceMount,...o}=e,s=ce(Re,e.__scopeDialog);return a.jsx(nr,{present:n||s.open,children:s.modal?a.jsx(Xi,{...o,ref:r}):a.jsx(Ji,{...o,ref:r})})});Bn.displayName=Re;var Xi=m.forwardRef((e,r)=>{const t=ce(Re,e.__scopeDialog),n=m.useRef(null),o=Pe(r,t.contentRef,n);return m.useEffect(()=>{const s=n.current;if(s)return $i(s)},[]),a.jsx(Vn,{...e,ref:o,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=t.triggerRef.current)==null||l.focus()}),onPointerDownOutside:we(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,i=l.button===0&&l.ctrlKey===!0;(l.button===2||i)&&s.preventDefault()}),onFocusOutside:we(e.onFocusOutside,s=>s.preventDefault())})}),Ji=m.forwardRef((e,r)=>{const t=ce(Re,e.__scopeDialog),n=m.useRef(!1),o=m.useRef(!1);return a.jsx(Vn,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,i;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(n.current||(i=t.triggerRef.current)==null||i.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=s.target;((c=t.triggerRef.current)==null?void 0:c.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Vn=m.forwardRef((e,r)=>{const{__scopeDialog:t,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...l}=e,i=ce(Re,t),u=m.useRef(null),c=Pe(r,u);return Za(),a.jsxs(a.Fragment,{children:[a.jsx(mn,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:a.jsx(cn,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Gr(i.open),...l,ref:c,onDismiss:()=>i.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(Zi,{titleId:i.titleId}),a.jsx(el,{contentRef:u,descriptionId:i.descriptionId})]})]})}),Ur="DialogTitle",zn=m.forwardRef((e,r)=>{const{__scopeDialog:t,...n}=e,o=ce(Ur,t);return a.jsx(ve.h2,{id:o.titleId,...n,ref:r})});zn.displayName=Ur;var Wn="DialogDescription",Un=m.forwardRef((e,r)=>{const{__scopeDialog:t,...n}=e,o=ce(Wn,t);return a.jsx(ve.p,{id:o.descriptionId,...n,ref:r})});Un.displayName=Wn;var Gn="DialogClose",Yn=m.forwardRef((e,r)=>{const{__scopeDialog:t,...n}=e,o=ce(Gn,t);return a.jsx(ve.button,{type:"button",...n,ref:r,onClick:we(e.onClick,()=>o.onOpenChange(!1))})});Yn.displayName=Gn;function Gr(e){return e?"open":"closed"}var Qn="DialogTitleWarning",[zl,Hn]=ha(Qn,{contentName:Re,titleName:Ur,docsSlug:"dialog"}),Zi=({titleId:e})=>{const r=Hn(Qn),t=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
77
+
78
+ If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
79
+
80
+ For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(t))},[t,e]),null},qi="DialogDescriptionWarning",el=({contentRef:e,descriptionId:r})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hn(qi).contentName}}.`;return m.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");r&&o&&(document.getElementById(r)||console.warn(n))},[n,e,r]),null},rl=In,tl=$n,nl=Fn,ol=Bn,sl=zn,al=Un,il=Yn;/**
81
+ * @license lucide-react v0.536.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const ll=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cl=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,t,n)=>n?n.toUpperCase():t.toLowerCase()),Kn=e=>{const r=cl(e);return r.charAt(0).toUpperCase()+r.slice(1)},Xn=(...e)=>e.filter((r,t,n)=>!!r&&r.trim()!==""&&n.indexOf(r)===t).join(" ").trim(),ul=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
86
+ * @license lucide-react v0.536.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */var dl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
91
+ * @license lucide-react v0.536.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const fl=M.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:t=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:l,...i},u)=>M.createElement("svg",{ref:u,...dl,width:r,height:r,stroke:e,strokeWidth:n?Number(t)*24/Number(r):t,className:Xn("lucide",o),...!s&&!ul(i)&&{"aria-hidden":"true"},...i},[...l.map(([c,f])=>M.createElement(c,f)),...Array.isArray(s)?s:[s]]));/**
96
+ * @license lucide-react v0.536.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const ml=(e,r)=>{const t=M.forwardRef(({className:n,...o},s)=>M.createElement(fl,{ref:s,iconNode:r,className:Xn(`lucide-${ll(Kn(e))}`,`lucide-${e}`,n),...o}));return t.displayName=Kn(e),t};/**
101
+ * @license lucide-react v0.536.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const pl=ml("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Jn({...e}){return a.jsx(rl,{"data-slot":"dialog",...e})}function vl({...e}){return a.jsx(tl,{"data-slot":"dialog-portal",...e})}function hl({className:e,...r}){return a.jsx(nl,{"data-slot":"dialog-overlay",className:ne("fixed inset-0 z-50 bg-[var(--overlay-bg)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...r})}function Zn({className:e,children:r,showCloseButton:t=!0,container:n,...o}){return a.jsxs(vl,{"data-slot":"dialog-portal",container:n??void 0,children:[a.jsx(hl,{}),a.jsxs(ol,{"data-slot":"dialog-content",className:ne("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-[var(--neutral-200)] bg-[var(--neutral-50)] p-4 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...o,children:[r,t&&a.jsxs(il,{"data-slot":"dialog-close",className:"absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-[var(--primary-200)] focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-[var(--primary-100)] data-[state=open]:text-[var(--primary-700)] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[a.jsx(pl,{}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function qn({className:e,...r}){return a.jsx("div",{"data-slot":"dialog-header",className:ne("flex flex-col gap-2 text-center sm:text-left",e),...r})}function eo({className:e,...r}){return a.jsx("div",{"data-slot":"dialog-footer",className:ne("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r})}function ro({className:e,...r}){return a.jsx(sl,{"data-slot":"dialog-title",className:ne("text-lg leading-none font-semibold text-[var(--neutral-900)]",e),...r})}function to({className:e,...r}){return a.jsx(al,{"data-slot":"dialog-description",className:ne("text-sm text-[var(--neutral-500)]",e),...r})}function no({open:e,onOpenChange:r,missingQuestionIds:t,errors:n=[],onOk:o,container:s}){return a.jsx(Jn,{open:e,onOpenChange:r,children:a.jsxs(Zn,{showCloseButton:!0,container:s,className:"max-w-md border-[var(--neutral-200)] bg-[var(--neutral-50)]",children:[a.jsx(qn,{children:a.jsx(ro,{id:"validation-dialog-title",children:"Survey Incomplete"})}),a.jsxs(to,{children:["Please fill all the required questions before submitting the survey.",a.jsx("br",{}),"Click OK to see which questions are still pending."]}),a.jsx(eo,{children:a.jsx("div",{className:"flex w-full gap-3",children:a.jsx(Me,{onClick:o,text:"OK",className:"flex-1"})})})]})})}function oo(e,r,t){const n=e.filter(c=>t.includes(c.questionId)),o=n.filter(c=>c.isMandatory);let s=0,l=0,i=0;for(const c of n){const f=r[c.questionId],p=kr(c,f),h=ht(c,f);p&&s++,h&&l++,c.isMandatory&&p&&h&&i++}const u=o.length===0?100:Math.round(i/o.length*100);return{overallProgress:Math.min(100,Math.max(0,u)),totalQuestions:e.length,visibleQuestions:n.length,answeredQuestions:s,validQuestions:l,mandatoryQuestions:o.length,answeredMandatory:i}}function so({open:e,onOpenChange:r,onConfirm:t,onCancel:n,readOnly:o=!1,container:s}){return a.jsx(Jn,{open:e,onOpenChange:r,children:a.jsxs(Zn,{showCloseButton:!0,container:s,className:"max-w-md border-[var(--neutral-200)] bg-[var(--neutral-50)]",children:[a.jsx(qn,{children:a.jsx(ro,{id:"exit-dialog-title",children:"Exit Survey?"})}),a.jsx(to,{children:o?"Are you sure you want to exit the survey?":"Are you sure you want to exit? Your progress will be lost."}),a.jsxs(eo,{className:"flex gap-2 p-4",children:[a.jsx(Me,{variant:"outline",onClick:n,className:"flex-1",children:"Cancel"}),a.jsx(Me,{type:"button",variant:"default",onClick:t,className:"flex-1",children:"Yes, Exit"})]})]})})}function ao({show:e}){return e?a.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/40",role:"status","aria-live":"polite","aria-busy":"true",children:a.jsxs("div",{className:"flex flex-col items-center gap-4 rounded-lg bg-[var(--color-card)] p-6 shadow-xl border border-[var(--color-border)]",children:[a.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-2 border-primary border-t-transparent","aria-hidden":!0}),a.jsx("p",{className:"text-sm font-medium text-textBlack",children:"Submitting..."})]})}):null}function io({data:e,onSubmit:r,onSave:t,onExit:n,isSubmitting:o=!1,className:s="",showHeader:l=!0,theme:i,progressBar:u={},variant:c="default"}){var me;const f=e.questionList,[p,h]=M.useState(()=>{const P={};return f.forEach(W=>{P[W.questionId]=Lo(W)}),P}),[b,y]=M.useState(()=>{const{visibleQuestions:P}=hr(f,{},[]);return P}),[v,g]=M.useState(0),[E,w]=M.useState(!1),[T,R]=M.useState(!1),[O,$]=M.useState(!1),[j,k]=M.useState([]),F=M.useMemo(()=>dt(e.config),[e.config]),L=M.useMemo(()=>{const P=bt(f,p,b);if(j.length===0)return P;const W={...P};return j.forEach(se=>{W[se.questionId]="error"}),W},[f,p,b,j]),U=M.useMemo(()=>oo(f,p,b),[f,p,b]),ee=M.useMemo(()=>{const P={};return Object.entries(p).forEach(([W,se])=>{P[W]={value:se}}),P},[p]);M.useEffect(()=>{const{visibleQuestions:P,newlyHidden:W}=hr(f,ee,b);!(P.length!==b.length||P.some((ae,he)=>ae!==b[he]))&&W.length===0||(y(P),g(ae=>Math.min(ae,Math.max(0,P.length-1))),W.length>0&&h(ae=>{const he=Object.fromEntries(Object.entries(ae).map(([Ce,be])=>[Ce,{value:be}])),ke=ct(he,W);return Object.fromEntries(Object.entries(ke).map(([Ce,be])=>[Ce,be.value]))}))},[ee,f,b]);const Q=b[v],Y=f.find(P=>P.questionId===Q),K=b.length,re=M.useCallback(P=>{Q&&(h(W=>({...W,[Q]:P})),k(W=>W.filter(se=>se.questionId!==Q)))},[Q]),ie=M.useCallback(()=>{v<K-1&&g(P=>P+1)},[v,K]),Ee=M.useCallback(()=>{v>0&&g(P=>P-1)},[v]),fe=M.useCallback(P=>{P>=0&&P<K&&(g(P),w(!1))},[K]),A=M.useCallback(P=>{const W=b.indexOf(P);W>=0&&fe(W)},[b,fe]),Oe=M.useCallback(()=>{const P=br(f,p,b);if(P.length>0){k(P),R(!0);return}const W=gr(e,p,b);r(W)},[e,f,p,b,r]),Ae=M.useCallback(()=>{R(!1),w(!0)},[]),_e=M.useCallback(()=>{$(!0)},[]),Te=M.useCallback(()=>{$(!1);const P=gr(e,p,b);t==null||t(P),n==null||n()},[e,p,b,t,n]),q=v===K-1,H=M.useRef(null),ue=i?{"data-theme":i,ref:H}:{};return Y?a.jsxs("div",{...ue,className:`min-h-screen rounded-lg shadow-sm bg-[var(--primary-foreground)] ${s}`,children:[l&&a.jsx("header",{className:"sticky top-0 z-40 border-b bg-[var(--header-bg,var(--primary-50))] border-[var(--header-border,var(--primary-200))]",children:a.jsx("div",{className:"",children:a.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[a.jsx("h2",{className:"text-xl font-medium text-[var(--header-title,var(--primary-700))]",children:e.surveyName}),a.jsx("div",{className:"flex items-center gap-4",children:n&&a.jsx(Me,{type:"button",variant:"ghost",size:"icon",onClick:_e,className:"text-[var(--color-textGray)] hover:bg-[var(--neutral-100)] hover:text-[var(--color-textBlack)]",title:"Exit Survey","aria-label":"Exit survey",children:"✕"})})]})})}),a.jsxs("div",{className:"space-y-3 bg-[var(--primary-foreground)] px-4 py-3 shadow-sm",children:[a.jsx(Gt,{questions:b,activeQuestionId:Q,onQuestionSelect:A,questionStatusMap:L,variant:c}),u!==!1&&a.jsx(sn,{currentIndex:v,totalSteps:K,progressMode:u.progressMode??"completion",progressValue:U.overallProgress,showLabel:u.showLabel,showPercentage:u.showPercentage,labelFormat:u.labelFormat,progressMaxWidth:u.progressMaxWidth,className:u.className})]}),a.jsxs("main",{className:"flex flex-col",style:{minHeight:l?"calc(100vh - 165px)":"calc(100vh - 70px)"},children:[a.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden p-4",children:a.jsx("div",{className:"relative flex-1 overflow-hidden min-h-0",children:a.jsx("div",{className:"absolute inset-0 overflow-y-auto",children:a.jsxs("div",{className:"animate-question-enter rounded-xl bg-[var(--color-card)] p-6 shadow-sm border border-[var(--color-border)]",children:[a.jsx("div",{className:"mb-3",children:a.jsx("span",{className:"rounded-full bg-[var(--primary-100)] px-3 py-1 text-md font-medium text-[var(--primary-600)]",children:Y.questionId})}),a.jsxs("h2",{className:"text-lg leading-relaxed font-medium text-[var(--color-textBlack)]",children:[Y.description,Y.isMandatory&&a.jsx("span",{className:"ml-1 text-error",children:"*"})]}),(me=Y.questionImage)!=null&&me.trim()?a.jsx("div",{className:"mt-4",children:a.jsx("img",{src:Y.questionImage,alt:"",loading:"lazy",className:"max-w-full h-auto rounded-lg border border-[var(--neutral-200)] object-contain",style:{maxHeight:"min(60vh, 400px)"}})}):null,Y.textLimitCharacter!=null&&a.jsxs("p",{className:"mt-2 text-xs text-[var(--color-textGray)]",children:["Maximum ",Y.textLimitCharacter," characters"]}),Y.textInputType==="Numeric"&&a.jsx("p",{className:"mt-2 text-xs text-[var(--color-textGray)]",children:"Please enter numeric value only (e.g. 1, 2, 3)"}),a.jsx("div",{className:"mt-6 flex max-w-4xl flex-1 flex-col justify-center",children:a.jsx(Vt,{question:Y,value:p[Q],onChange:re,validationErrors:j,mediaConfig:F,variant:c})})]},Q)})})}),a.jsx("footer",{className:"flex-shrink-0 p-4 border-t border-[var(--color-borderGray)]",children:a.jsxs("div",{className:"flex justify-center gap-3 md:justify-end",children:[a.jsx(Me,{type:"button",variant:"outline",onClick:Ee,disabled:v===0,className:"min-w-[140px] text-md font-semibold",prefixIcon:a.jsx("svg",{className:"h-5 w-5 transition-transform duration-200 group-hover:-translate-x-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),children:"Previous"}),q?a.jsx(Me,{type:"button",onClick:Oe,className:"min-w-[140px] text-md font-semibold",suffixIcon:a.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),text:"Submit"}):a.jsx(Me,{type:"button",onClick:ie,className:"min-w-[140px] text-md font-semibold",suffixIcon:a.jsx("svg",{className:"h-5 w-5 transition-transform duration-200 group-hover:translate-x-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),text:"Next"})]})})]}),a.jsx(Yt,{isOpen:E,onClose:()=>w(!1),questions:f,visibleQuestionIds:b,responses:p,currentQuestionIndex:v,onGoToQuestion:fe}),a.jsx(no,{open:T,onOpenChange:R,missingQuestionIds:j.map(P=>P.questionId),errors:j,onOk:Ae,container:H.current}),a.jsx(so,{open:O,onOpenChange:$,onConfirm:Te,onCancel:()=>$(!1),container:H.current}),a.jsx(ao,{show:o})]}):a.jsx("div",{...ue,className:"flex min-h-screen items-center justify-center",children:a.jsx("p",{className:"text-[var(--color-textGray)]",children:"Loading survey..."})})}function bl({data:e,onSubmit:r,onSave:t,onExit:n,isSubmitting:o=!1,className:s="",showHeader:l=!0,theme:i,progressBar:u}){const c=M.useMemo(()=>nt(e),[e]),f=M.useMemo(()=>c==="PLC"?ot(e):e,[e,c]),p=M.useRef(null);c==="PLC"?p.current=e:p.current=null;const h=M.useCallback(v=>{c==="PLC"&&p.current?r(vr(v,p.current)):r(v)},[c,r]),b=M.useCallback(v=>{t&&(c==="PLC"&&p.current?t(vr(v,p.current)):t(v))},[c,t]),y=c==="PLC"?"PLC":"default";return a.jsx(io,{data:f,onSubmit:h,onSave:b,onExit:n,isSubmitting:o,className:s,showHeader:l,theme:i,progressBar:u,variant:y})}_.DEFAULT_MEDIA_ALLOWED_TYPES=xr,_.DEFAULT_MEDIA_MAX_SIZE_MB=yr,_.ExitConfirmationDialog=so,_.MEDIA_ALLOWED_TYPES=Xe,_.MEDIA_MAX_SIZE_MB=jr,_.QuestionListCarousel=Gt,_.QuestionOverviewPanel=Yt,_.QuestionRenderer=Vt,_.SUPPORTED_QUESTION_TYPES=st,_.SubmissionLoadingOverlay=ao,_.SurveyContainer=io,_.SurveyProgressBar=sn,_.SurveyRenderer=bl,_.ValidationDialog=no,_.calculateVisibility=hr,_.calculateWeightedProgress=oo,_.canSubmit=Vo,_.clearHiddenResponses=ct,_.convertFMBToPLC=vr,_.convertPLCToFMB=ot,_.detectSurveyFormat=nt,_.fileToFileObject=vt,_.formatResponses=gr,_.getDefaultValue=Ke,_.getEffectiveMediaConfig=dt,_.getQuestionStatus=Cr,_.getQuestionStatusMap=bt,_.getStatusClass=zt,_.getStatusColor=Wt,_.getStatusIconClass=Ut,_.isFMBData=Mo,_.isFMBSurvey=So,_.isPLCData=Po,_.isPLCSurvey=tt,_.isSupportedQuestionType=at,_.isValueFileObject=wr,_.validateFile=pt,_.validateFileSize=mt,_.validateFileType=ft,_.validateResponses=br,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}));
32
106
  //# sourceMappingURL=surveyRender.umd.cjs.map