@htilabs/platform-common-models 0.39.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -3,13 +3,14 @@ export { ActiveServiceStateKey, DeprecatedServiceStateKey, IC48Catalog, IC48Cata
3
3
  export { D as DEFAULT_BOUND_STATE, a as DEFAULT_BOUND_STATE_DISPLAY, b as DEFAULT_BOUND_STATE_LABELS, c as DEFAULT_BOUND_STATE_VALUES, d as DefaultBoundStateValue, F as FUNCTION_STATUS, e as FUNCTION_STATUS_LABELS, f as FUNCTION_STATUS_VALUES, g as FunctionStatusValue, P as PERMISSION_STATE, h as PERMISSION_STATE_DISPLAY, i as PERMISSION_STATE_LABELS, j as PERMISSION_STATE_VALUES, k as PLATFORM_TOOL, l as PLATFORM_TOOL_LABELS, m as PLATFORM_TOOL_VALUES, n as PermissionStateValue, o as PlatformToolValue, R as ROLE_LEVEL, p as ROLE_LEVEL_LABELS, q as ROLE_LEVEL_VALUES, r as RoleLevelValue, S as SHARE_VIEW, s as SHARE_VIEW_LABELS, t as SHARE_VIEW_VALUES, u as ShareViewValue } from './platform-auth-DJO-r9Pf.cjs';
4
4
  export { A as AGENCY_TYPE_KEYS, a as AgencyTypeKey, H as HEALTHCARE_ORG_TYPE_KEYS, L as LAW_ENFORCEMENT_ORG_TYPE_KEYS, b as LEGACY_NUMERIC_TO_REFERRAL_ENTITY_KEY, c as LEGAL_ORG_TYPE_KEYS, d as LegacyNumericReferralEntity, N as NO_SECTOR_ORG_TYPE_KEYS, O as ORG_TYPE_HEADING_KEYS, e as ORG_TYPE_KEYS, f as ORG_TYPE_NONPICKABLE_LEAF_KEYS, g as ORG_TYPE_PARENT_KEY, h as ORG_TYPE_SELECTABLE_KEYS, i as OrgTypeHeadingKey, j as OrgTypeKey, k as OrgTypeSelectableKey, R as REPORT_AUTHORITY_ORG_TYPE_KEYS, V as VICTIM_SERVING_ORG_TYPE_KEYS, l as isAgencyTypeKey, m as isHealthcareOrgType, n as isLawEnforcementOrgType, o as isLegalOrgType, p as isOrgTypeKey, q as isReportAuthorityOrgType, r as isVictimServingOrgType, s as orgTypeAncestry, t as orgTypeCanonicalCode, u as orgTypeDefaultSessionRole, v as orgTypeDefaultSessionRoleOrNull, w as orgTypeDefaultVsp, x as orgTypeEnumConstant, y as orgTypeLabel, z as orgTypeSector, B as resolveAgencyTypeKey, C as resolveOrgTypeKey, D as resolveOrgTypeKeyFromLegacyNumeric, E as resolveReferralEntityKeyFromLegacyNumeric } from './org-type-D_FG4KdN.cjs';
5
5
  export { AddOrganizationProgramsFieldOptions, Address, Demographics, Email, ORGANIZATION_PROGRAM_VALIDATED_UPDATE_OPS, OrganizationProgram, PersonName, Phone, TEAM_MODEL_NAME, TeamDirectoryFields, addOrganizationProgramsField, addTeamDirectoryFields, addressSchema, buildOrganizationProgramSchema, buildOrganizationProgramsFieldDefinition, demographicsSchema, emailSchema, organizationProgramSchemaDefinition, personNameSchema, phoneSchema, teamDirectorySchemaDefinition } from './schemas/index.cjs';
6
- export { C as Choice, a as CvcEntry, b as CvcRegistry, F as Form, c as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, d as PlatformRole, Q as Question, S as ScoringCondition, e as ScoringRecommendation, f as ScoringRule, g as ScoringThreshold, h as Section, i as SectionQuestionRef, V as VisibilityRule, j as buildCvcEntrySchema, k as buildCvcRegistrySchema, l as buildFormSchema, m as buildPlatformFunctionSchema, n as buildPlatformRoleSchema, o as buildQuestionSchema, p as buildScoringRuleSchema, q as buildSectionSchema, r as choiceSchema, s as cvcEntrySchemaDefinition, t as cvcEntrySchemaOptions, u as cvcRegistrySchemaDefinition, v as cvcRegistrySchemaOptions, w as formSchemaDefinition, x as formSchemaOptions, y as formSectionRefSchema, z as guidanceSchema, A as layoutSchema, B as platformFunctionSchemaDefinition, D as platformFunctionSchemaOptions, E as platformRoleSchemaDefinition, H as platformRoleSchemaOptions, I as questionSchemaDefinition, J as questionSchemaOptions, K as scoringConditionSchema, M as scoringRecommendationSchema, N as scoringRuleSchemaDefinition, O as scoringRuleSchemaOptions, R as scoringThresholdSchema, T as sectionQuestionRefSchema, U as sectionSchemaDefinition, W as sectionSchemaOptions, X as visibilityRuleSchema } from './cvcEntry-DQEoFVL2.cjs';
6
+ export { C as Choice, a as CvcEntry, b as CvcRegistry, F as Form, c as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, d as PlatformRole, Q as Question, S as ScoringCondition, e as ScoringRecommendation, f as ScoringRule, g as ScoringThreshold, h as Section, i as SectionQuestionRef, V as VisibilityRule, j as buildCvcEntrySchema, k as buildCvcRegistrySchema, l as buildFormSchema, m as buildPlatformFunctionSchema, n as buildPlatformRoleSchema, o as buildQuestionSchema, p as buildScoringRuleSchema, q as buildSectionSchema, r as choiceSchema, s as cvcEntrySchemaDefinition, t as cvcEntrySchemaOptions, u as cvcRegistrySchemaDefinition, v as cvcRegistrySchemaOptions, w as formSchemaDefinition, x as formSchemaOptions, y as formSectionRefSchema, z as guidanceSchema, A as layoutSchema, B as platformFunctionSchemaDefinition, D as platformFunctionSchemaOptions, E as platformRoleSchemaDefinition, H as platformRoleSchemaOptions, I as questionSchemaDefinition, J as questionSchemaOptions, K as scoringConditionSchema, M as scoringRecommendationSchema, N as scoringRuleSchemaDefinition, O as scoringRuleSchemaOptions, R as scoringThresholdSchema, T as sectionQuestionRefSchema, U as sectionSchemaDefinition, W as sectionSchemaOptions, X as visibilityRuleSchema } from './cvcEntry-DAuhe0cd.cjs';
7
7
  export { A as AGENCY_ORG_TYPE_VALIDATED_UPDATE_OPS, a as AddAgencyOrgTypeFieldsOptions, b as AgencyOrgTypeFields, O as ORG_TYPE_FIELD_NAMES, c as OrgTypeFieldName, d as OrgTypeFields, e as OrgTypeFieldsHolder, V as VSP_TWO_STEP_ISSUE, f as addAgencyOrgTypeFields, g as addOrgTypeFields, h as agencyOrgTypeSchemaDefinition, i as applyRunValidatorsIfUnset, m as mirrorOrgTypeFields, o as orgTypeFieldsDiffer, j as orgTypeSchemaDefinition, r as resolveEffectiveOrgType, k as resolveEffectiveOrgTypeFields, v as vspTwoStepHolds, l as vspTwoStepHoldsOnUpdate } from './agency-DYCv839V.cjs';
8
- export { C as CvcEntryDoc, a as CvcRegistryDoc, F as FormDoc, P as PlatformFunctionDoc, b as PlatformModels, c as PlatformRoleDoc, Q as QuestionDoc, S as ScoringRuleDoc, d as SectionDoc, e as compileCvcEntryModel, f as compileCvcRegistryModel, g as createPlatformModels, h as cvcEntryModel, i as cvcRegistryModel, j as formModel, p as platformFunctionModel, k as platformRoleModel, q as questionModel, s as scoringRuleModel, l as sectionModel } from './index-DF469Qgd.cjs';
8
+ export { C as CvcEntryDoc, a as CvcRegistryDoc, F as FormDoc, P as PlatformFunctionDoc, b as PlatformModels, c as PlatformRoleDoc, Q as QuestionDoc, S as ScoringRuleDoc, d as SectionDoc, e as compileCvcEntryModel, f as compileCvcRegistryModel, g as createPlatformModels, h as cvcEntryModel, i as cvcRegistryModel, j as formModel, p as platformFunctionModel, k as platformRoleModel, q as questionModel, s as scoringRuleModel, l as sectionModel } from './index-1pWiqEBC.cjs';
9
9
  export { AccommodationTypeKey, AccommodationTypeKeys, ActionStepCompletionStatusKey, ActionStepCompletionStatusKeys, ActionStepTypeKey, ActionStepTypeKeys, ActivityTypeKey, ActivityTypeKeys, AdminRoleKey, AdminRoleKeys, AdministeringJurisdictionKey, AdministeringJurisdictionKeys, AgeBinReportingKey, AgeBinReportingKeys, AnnouncementAudienceScopeKey, AnnouncementAudienceScopeKeys, AnnouncementResponseTypeKey, AnnouncementResponseTypeKeys, AssertionDomainKey, AssertionDomainKeys, AssertionStatusKey, AssertionStatusKeys, BasisQuickPicksKey, BasisQuickPicksKeys, CarCorrectionReasonKey, CarCorrectionReasonKeys, CaseShareStateKey, CaseShareStateKeys, CheckInActivityKey, CheckInActivityKeys, CheckInPhaseKey, CheckInPhaseKeys, ChildBehavioralConcernsKey, ChildBehavioralConcernsKeys, ChildChangeTypeKey, ChildChangeTypeKeys, ChildCustodyArrangementKey, ChildCustodyArrangementKeys, CitizenshipKey, CitizenshipKeys, CollectionContextKey, CollectionContextKeys, ContactInfoTypeKey, ContactInfoTypeKeys, ContactInfoUseTypeKey, ContactInfoUseTypeKeys, ContactLinkTypeKey, ContactLinkTypeKeys, ContactSafetyStatusKey, ContactSafetyStatusKeys, CoreFunctionsKey, CoreFunctionsKeys, CoreIndicatorKey, CoreIndicatorKeys, CoreInformationScopeKey, CoreInformationScopeKeys, CoreReferralOutcomeKey, CoreReferralOutcomeKeys, CountryKey, CountryKeys, CreatedBySystemKey, CreatedBySystemKeys, CriminalOrgCategoryKey, CriminalOrgCategoryKeys, DaIncidentArchiveReasonKey, DaIncidentArchiveReasonKeys, DaIncidentConfidenceKey, DaIncidentConfidenceKeys, DaIncidentDayApproxKey, DaIncidentDayApproxKeys, DaIncidentSeverityKey, DaIncidentSeverityKeys, DeterminationHelperCategoryKey, DeterminationHelperCategoryKeys, DeterminationLevelKey, DeterminationLevelKeys, DhStateKey, DhStateKeys, DisabilitySubtypeKey, DisabilitySubtypeKeys, DiscretionLevelKey, DiscretionLevelKeys, EmergencyContactCallReasonKey, EmergencyContactCallReasonKeys, EmergencyContactPermissionsKey, EmergencyContactPermissionsKeys, EmergencyExitCascadeKey, EmergencyExitCascadeKeys, EmploymentStatusKey, EmploymentStatusKeys, EnrollmentApplicationStatusKey, EnrollmentApplicationStatusKeys, ExitProcessChecklistItemKey, ExitProcessChecklistItemKeys, ExitReasonsKey, ExitReasonsKeys, ExploitationTypeKey, ExploitationTypeKeys, EyeColorKey, EyeColorKeys, FacialHairKey, FacialHairKeys, FacilitatorEntityTypeKey, FacilitatorEntityTypeKeys, FacilitatorLabelUsedInSourceKey, FacilitatorLabelUsedInSourceKeys, FacilitatorSubroleKey, FacilitatorSubroleKeys, FrequencyCadenceKey, FrequencyCadenceKeys, FunderKey, FunderKeys, GenderIdentityKey, GenderIdentityKeys, GoalCategoryKey, GoalCategoryKeys, GoalPriorityKey, GoalPriorityKeys, GoalStatusKey, GoalStatusKeys, GoalWithdrawalReasonKey, GoalWithdrawalReasonKeys, HairColorKey, HairColorKeys, HasTattoosKey, HasTattoosKeys, HighestEducationLevelCompletedKey, HighestEducationLevelCompletedKeys, HivStatusKey, HivStatusKeys, HmisCurrentLivingSituationKey, HmisCurrentLivingSituationKeys, HmisProjectTypeKey, HmisProjectTypeKeys, HmisRelationshipToHohKey, HmisRelationshipToHohKeys, HomelessStatusKey, HomelessStatusKeys, HopeScaleCaptureContextKey, HopeScaleCaptureContextKeys, HopeScaleResponseOptionsKey, HopeScaleResponseOptionsKeys, HopeScaleTierKey, HopeScaleTierKeys, HousingSubsidyTypesKey, HousingSubsidyTypesKeys, HtTypeKey, HtTypeKeys, IdentificationStatusKey, IdentificationStatusKeys, ImmigrationLegalStatusChangeTypeKey, ImmigrationLegalStatusChangeTypeKeys, IncarcerationEpisodeTypeKey, IncarcerationEpisodeTypeKeys, IncidentInvolvementRoleKey, IncidentInvolvementRoleKeys, IncidentParticipationRoleKey, IncidentParticipationRoleKeys, IncomeBenefitsSourcesKey, IncomeBenefitsSourcesKeys, InferenceTypeKey, InferenceTypeKeys, InvestigativeRequestTypeKey, InvestigativeRequestTypeKeys, JuvenileJusticeEpisodeTypeKey, JuvenileJusticeEpisodeTypeKeys, JuvenileJusticeInvolvementStatusKey, JuvenileJusticeInvolvementStatusKeys, LanguagesKey, LanguagesKeys, LeReportStatusKey, LeReportStatusKeys, LegalActionTypeKey, LegalActionTypeKeys, LivingSituationKey, LivingSituationKeys, LocationTypeKey, LocationTypeKeys, MaritalStatusLegalKey, MaritalStatusLegalKeys, MentalHealthStatusKey, MentalHealthStatusKeys, MessageReportReasonKey, MessageReportReasonKeys, MidStayEventTypeKey, MidStayEventTypeKeys, MilestoneTypeKey, MilestoneTypeKeys, MilitaryBranchKey, MilitaryBranchKeys, MilitaryStatusKey, MilitaryStatusKeys, MinorAdultStatusKey, MinorAdultStatusKeys, NameTypeKey, NameTypeKeys, NeedsAssessmentChangeTypeKey, NeedsAssessmentChangeTypeKeys, NeedsResidentialAgainKey, NeedsResidentialAgainKeys, OffenderStatusFamilyKey, OffenderStatusFamilyKeys, OffenderStatusKey, OffenderStatusKeys, OrientationIdentityKey, OrientationIdentityKeys, PersonRelationshipsKey, PersonRelationshipsKeys, PetExitReasonKey, PetExitReasonKeys, PetRelationshipBasisKey, PetRelationshipBasisKeys, PoPetitionBasisKey, PoPetitionBasisKeys, PoStatusKey, PoStatusKeys, PoViolationStatusKey, PoViolationStatusKeys, PreferredContactMethodKey, PreferredContactMethodKeys, PrimaryLanguageKey, PrimaryLanguageKeys, ProgramEnrollmentChangeTypeKey, ProgramEnrollmentChangeTypeKeys, ProgramSpecificCodeKey, ProgramSpecificCodeKeys, PronounsKey, PronounsKeys, ProofOfIdTypeKey, ProofOfIdTypeKeys, ProvenanceSourceIdKey, ProvenanceSourceIdKeys, QualityFlagsKey, QualityFlagsKeys, RaceEthnicityKey, RaceEthnicityKeys, RadiusBucketKey, RadiusBucketKeys, RecencyBandKey, RecencyBandKeys, ReferenceLinkTypeKey, ReferenceLinkTypeKeys, ReferralEntityCategoryKey, ReferralEntityCategoryKeys, ReferralOriginKey, ReferralOriginKeys, RelationshipConcernKey, RelationshipConcernKeys, RelationshipDynamicsKey, RelationshipDynamicsKeys, RelationshipStatusCurrentKey, RelationshipStatusCurrentKeys, RelationshipTiesKey, RelationshipTiesKeys, ReturnedToAbuserStatusKey, ReturnedToAbuserStatusKeys, RiskCategoryKey, RiskCategoryKeys, RiskIdentificationMilestoneKey, RiskIdentificationMilestoneKeys, RiskSeverityBandKey, RiskSeverityBandKeys, RoiMethodKey, RoiMethodKeys, RoiScopeKey, RoiScopeKeys, RoiStatusKey, RoiStatusKeys, RoleContextKey, RoleContextKeys, RomanticRelationshipChangeTypeKey, RomanticRelationshipChangeTypeKeys, RsvpResponseKey, RsvpResponseKeys, ServiceAudienceKey, ServiceAudienceKeys, ServiceCategoryKey, ServiceCategoryKeys, ServiceDeliveryChannelKey, ServiceDeliveryChannelKeys, ServiceMechanismKey, ServiceMechanismKeys, ServicePlanClosureReasonKey, ServicePlanClosureReasonKeys, ServicePlanReviewSnoozeReasonKey, ServicePlanReviewSnoozeReasonKeys, ServiceSourceKey, ServiceSourceKeys, ServiceStateKey, ServiceStateKeys, SessionNoteVisibilityKey, SessionNoteVisibilityKeys, SessionStateKey, SessionStateKeys, SessionTemplateKey, SessionTemplateKeys, SeverityFollowUpKey, SeverityFollowUpKeys, SexProviderSubroleKey, SexProviderSubroleKeys, ShareCadenceKey, ShareCadenceKeys, SharePurposeKey, SharePurposeKeys, ShareResponseReasonKey, ShareResponseReasonKeys, SignatureMethodKey, SignatureMethodKeys, SignatureTypeKey, SignatureTypeKeys, SmtBodyLocationKey, SmtBodyLocationKeys, SmtNameRelationKey, SmtNameRelationKeys, SmtSignificanceFlagsKey, SmtSignificanceFlagsKeys, SmtTypeKey, SmtTypeKeys, SourceCategoryKey, SourceCategoryKeys, SourceInstrumentKey, SourceInstrumentKeys, SourceSubtypeKey, SourceSubtypeKeys, SourceSystemKey, SourceSystemKeys, SpecialNeedsDisabilitiesKey, SpecialNeedsDisabilitiesKeys, SubjectTypeKey, SubjectTypeKeys, SubstanceUseStatusKey, SubstanceUseStatusKeys, SuggestionSourceKey, SuggestionSourceKeys, SupportStrengthKey, SupportStrengthKeys, SupportTopicKey, SupportTopicKeys, ThreadStatusKey, ThreadStatusKeys, ThreadTypeKey, ThreadTypeKeys, TimeScopeKey, TimeScopeKeys, TraffickingRelevantRoleKey, TraffickingRelevantRoleKeys, TribesKey, TribesKeys, UserRoleKey, UserRoleKeys, VerificationMethodKey, VerificationMethodKeys, VerificationStatusKey, VerificationStatusKeys, VictimAbuseTypesKey, VictimAbuseTypesKeys, VictimStatusFamilyKey, VictimStatusFamilyKeys, VisaTypeKey, VisaTypeKeys, WhyNotKey, WhyNotKeys } from './enums/index.cjs';
10
10
  export { CvcRegistryService, CvcRegistryServiceOptions, EntryLoader, ICvcEntry, ICvcRegistry, RegistryLoader, RegistryScope, applyEntryOverrides, cascadeExclusions, cvcVersionsToRecord, resolveRegistryWithInheritance } from './services/index.cjs';
11
11
  export { C as CreateInformationScopeResolverInput, I as INFORMATION_SCOPE_POLICY_VERSION_ROW_NOTE, a as INFORMATION_SCOPE_READABLE_VERSIONS, b as INFORMATION_SCOPE_SYSTEM_INFO, c as INFORMATION_SCOPE_VERSION, d as InformationScopeResolver, S as ScopeApp, e as ScopeApps, f as ScopeCodeReading, g as ScopeKindBranch, h as ScopeMigration, i as ScopeMigrationRule, j as ScopePersonKind, k as ScopeReadOptions, l as ScopeReading, m as ScopeReadingRule, n as ScopeReadingSubject, o as ScopeRetainedReading, p as ScopeRow, q as ScopeRowStatus, r as ScopeRowType, s as ScopeShareOptions, t as ScopeShareReason, u as ScopeShareVerdict, v as ScopeSpecialDataType, w as ScopeSubjectKind, x as StoredScopeList, y as createInformationScopeResolver, z as isScopeInstrumentRow, A as isScopeRestRow, B as isSelectableScopeRow, D as kindForPerson } from './informationScopeResolver-BzYu97DE.cjs';
12
12
  export { CoreInformationScopeSot, CoreInformationScopeSotEntry, CoreInformationScopeSotMigrationLine, scopeMigrationsFromSot, scopeRowsFromSot } from './information-scope/index.cjs';
13
+ export { CalendarDate, CalendarDateLike, DOB_MIN_YEAR, DobLike, PartialDob, PartialDobLike, ageFromDob, ageInputFromStoredDob, calendarDateOf, normalizeDob } from './age/index.cjs';
13
14
  export { AuthzFunctionRow, AuthzRoleOverrides, AuthzRoleRow, AuthzStateMap, AuthzTeamPolicy, AuthzTier1StateMap, CORE_FUNCTION_DEFAULT_BOUNDS, CORE_FUNCTION_DEFAULT_BOUNDS_SOT_VERSION, ResolveEffectiveFunctionsInput, VIEWING_LEVEL_FUNCTIONS, ViewingLevel, codebookDefaultBound, isCanonEvaluableFunction, resolveEffectiveFunctions, resolveEffectiveViewingLevel, selectActingTeamId, viewingLevelFromFunctions } from './authz/index.cjs';
14
15
  export { EffectiveSharingCeiling, EffectiveSharingCeilingInputs, HTI_SHARE_PLATFORM_PURPOSE_ENABLED, HTI_SHARE_PLATFORM_STARTER, HTI_SHARE_PLATFORM_STARTER_SOURCE, INFORMATION_SCOPE_FIELD_HOME_ROWS, SHARING_CEILING_DEFAULT_ROW_KEY, SHARING_CEILING_EXTERNAL_ROW_KEY, SHARING_CEILING_SCOPE_VERSION, SharingCeilingAllowed, SharingCeilingCellLike, SharingCeilingRung, SharingCeilingScope, SharingPlatformStarter, SharingPurposeLists, SharingScopeEdits, ceilingCoverage, effectiveCeiling, hasOwnScopeContent, isCeilingCoverageRow, isSharingPurposeDisabled, maskSelectionToCeiling, rowsExpandedByCeiling, rowsOutsideCeiling, rowsOverCeiling, scopeRowWithinCeiling, sharingCeilingCellList, sharingCeilingRowKey, sharingScopeEditsFromCells } from './sharing-ceiling/index.cjs';
15
16
  export { A as AgencyOrgTypeFieldsInput, a as AgencyOrgTypeFieldsSchema, b as AgencyTypeKeyInput, c as AgencyTypeKeySchema, C as CvcCode, d as CvcCodeSchema, e as CvcDomain, f as CvcEntrySchema, g as CvcEnvelope, h as CvcEnvelopeSchema, i as CvcKey, j as CvcKeySchema, O as OrgTypeFieldsSchema, k as OrgTypeSelectableKeyInput, l as OrgTypeSelectableKeySchema, S as ServiceCategoryEntry, m as ServiceCategoryEntrySchema, n as SetOrgTypeInput, o as SetOrgTypeInputSchema, T as TeamApp, p as TeamAppSchema, q as TeamDirectoryFieldsInput, r as TeamDirectoryFieldsSchema, s as orgTypeFieldsShape, w as withOrgTypeFields } from './agency-8ufZJJDH.cjs';
package/dist/index.d.ts CHANGED
@@ -3,13 +3,14 @@ export { ActiveServiceStateKey, DeprecatedServiceStateKey, IC48Catalog, IC48Cata
3
3
  export { D as DEFAULT_BOUND_STATE, a as DEFAULT_BOUND_STATE_DISPLAY, b as DEFAULT_BOUND_STATE_LABELS, c as DEFAULT_BOUND_STATE_VALUES, d as DefaultBoundStateValue, F as FUNCTION_STATUS, e as FUNCTION_STATUS_LABELS, f as FUNCTION_STATUS_VALUES, g as FunctionStatusValue, P as PERMISSION_STATE, h as PERMISSION_STATE_DISPLAY, i as PERMISSION_STATE_LABELS, j as PERMISSION_STATE_VALUES, k as PLATFORM_TOOL, l as PLATFORM_TOOL_LABELS, m as PLATFORM_TOOL_VALUES, n as PermissionStateValue, o as PlatformToolValue, R as ROLE_LEVEL, p as ROLE_LEVEL_LABELS, q as ROLE_LEVEL_VALUES, r as RoleLevelValue, S as SHARE_VIEW, s as SHARE_VIEW_LABELS, t as SHARE_VIEW_VALUES, u as ShareViewValue } from './platform-auth-DJO-r9Pf.js';
4
4
  export { A as AGENCY_TYPE_KEYS, a as AgencyTypeKey, H as HEALTHCARE_ORG_TYPE_KEYS, L as LAW_ENFORCEMENT_ORG_TYPE_KEYS, b as LEGACY_NUMERIC_TO_REFERRAL_ENTITY_KEY, c as LEGAL_ORG_TYPE_KEYS, d as LegacyNumericReferralEntity, N as NO_SECTOR_ORG_TYPE_KEYS, O as ORG_TYPE_HEADING_KEYS, e as ORG_TYPE_KEYS, f as ORG_TYPE_NONPICKABLE_LEAF_KEYS, g as ORG_TYPE_PARENT_KEY, h as ORG_TYPE_SELECTABLE_KEYS, i as OrgTypeHeadingKey, j as OrgTypeKey, k as OrgTypeSelectableKey, R as REPORT_AUTHORITY_ORG_TYPE_KEYS, V as VICTIM_SERVING_ORG_TYPE_KEYS, l as isAgencyTypeKey, m as isHealthcareOrgType, n as isLawEnforcementOrgType, o as isLegalOrgType, p as isOrgTypeKey, q as isReportAuthorityOrgType, r as isVictimServingOrgType, s as orgTypeAncestry, t as orgTypeCanonicalCode, u as orgTypeDefaultSessionRole, v as orgTypeDefaultSessionRoleOrNull, w as orgTypeDefaultVsp, x as orgTypeEnumConstant, y as orgTypeLabel, z as orgTypeSector, B as resolveAgencyTypeKey, C as resolveOrgTypeKey, D as resolveOrgTypeKeyFromLegacyNumeric, E as resolveReferralEntityKeyFromLegacyNumeric } from './org-type-BYQb9Qzq.js';
5
5
  export { AddOrganizationProgramsFieldOptions, Address, Demographics, Email, ORGANIZATION_PROGRAM_VALIDATED_UPDATE_OPS, OrganizationProgram, PersonName, Phone, TEAM_MODEL_NAME, TeamDirectoryFields, addOrganizationProgramsField, addTeamDirectoryFields, addressSchema, buildOrganizationProgramSchema, buildOrganizationProgramsFieldDefinition, demographicsSchema, emailSchema, organizationProgramSchemaDefinition, personNameSchema, phoneSchema, teamDirectorySchemaDefinition } from './schemas/index.js';
6
- export { C as Choice, a as CvcEntry, b as CvcRegistry, F as Form, c as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, d as PlatformRole, Q as Question, S as ScoringCondition, e as ScoringRecommendation, f as ScoringRule, g as ScoringThreshold, h as Section, i as SectionQuestionRef, V as VisibilityRule, j as buildCvcEntrySchema, k as buildCvcRegistrySchema, l as buildFormSchema, m as buildPlatformFunctionSchema, n as buildPlatformRoleSchema, o as buildQuestionSchema, p as buildScoringRuleSchema, q as buildSectionSchema, r as choiceSchema, s as cvcEntrySchemaDefinition, t as cvcEntrySchemaOptions, u as cvcRegistrySchemaDefinition, v as cvcRegistrySchemaOptions, w as formSchemaDefinition, x as formSchemaOptions, y as formSectionRefSchema, z as guidanceSchema, A as layoutSchema, B as platformFunctionSchemaDefinition, D as platformFunctionSchemaOptions, E as platformRoleSchemaDefinition, H as platformRoleSchemaOptions, I as questionSchemaDefinition, J as questionSchemaOptions, K as scoringConditionSchema, M as scoringRecommendationSchema, N as scoringRuleSchemaDefinition, O as scoringRuleSchemaOptions, R as scoringThresholdSchema, T as sectionQuestionRefSchema, U as sectionSchemaDefinition, W as sectionSchemaOptions, X as visibilityRuleSchema } from './cvcEntry-DQEoFVL2.js';
6
+ export { C as Choice, a as CvcEntry, b as CvcRegistry, F as Form, c as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, d as PlatformRole, Q as Question, S as ScoringCondition, e as ScoringRecommendation, f as ScoringRule, g as ScoringThreshold, h as Section, i as SectionQuestionRef, V as VisibilityRule, j as buildCvcEntrySchema, k as buildCvcRegistrySchema, l as buildFormSchema, m as buildPlatformFunctionSchema, n as buildPlatformRoleSchema, o as buildQuestionSchema, p as buildScoringRuleSchema, q as buildSectionSchema, r as choiceSchema, s as cvcEntrySchemaDefinition, t as cvcEntrySchemaOptions, u as cvcRegistrySchemaDefinition, v as cvcRegistrySchemaOptions, w as formSchemaDefinition, x as formSchemaOptions, y as formSectionRefSchema, z as guidanceSchema, A as layoutSchema, B as platformFunctionSchemaDefinition, D as platformFunctionSchemaOptions, E as platformRoleSchemaDefinition, H as platformRoleSchemaOptions, I as questionSchemaDefinition, J as questionSchemaOptions, K as scoringConditionSchema, M as scoringRecommendationSchema, N as scoringRuleSchemaDefinition, O as scoringRuleSchemaOptions, R as scoringThresholdSchema, T as sectionQuestionRefSchema, U as sectionSchemaDefinition, W as sectionSchemaOptions, X as visibilityRuleSchema } from './cvcEntry-DAuhe0cd.js';
7
7
  export { A as AGENCY_ORG_TYPE_VALIDATED_UPDATE_OPS, a as AddAgencyOrgTypeFieldsOptions, b as AgencyOrgTypeFields, O as ORG_TYPE_FIELD_NAMES, c as OrgTypeFieldName, d as OrgTypeFields, e as OrgTypeFieldsHolder, V as VSP_TWO_STEP_ISSUE, f as addAgencyOrgTypeFields, g as addOrgTypeFields, h as agencyOrgTypeSchemaDefinition, i as applyRunValidatorsIfUnset, m as mirrorOrgTypeFields, o as orgTypeFieldsDiffer, j as orgTypeSchemaDefinition, r as resolveEffectiveOrgType, k as resolveEffectiveOrgTypeFields, v as vspTwoStepHolds, l as vspTwoStepHoldsOnUpdate } from './agency-Ca4pCOOf.js';
8
- export { C as CvcEntryDoc, a as CvcRegistryDoc, F as FormDoc, P as PlatformFunctionDoc, b as PlatformModels, c as PlatformRoleDoc, Q as QuestionDoc, S as ScoringRuleDoc, d as SectionDoc, e as compileCvcEntryModel, f as compileCvcRegistryModel, g as createPlatformModels, h as cvcEntryModel, i as cvcRegistryModel, j as formModel, p as platformFunctionModel, k as platformRoleModel, q as questionModel, s as scoringRuleModel, l as sectionModel } from './index-BHSRMJvd.js';
8
+ export { C as CvcEntryDoc, a as CvcRegistryDoc, F as FormDoc, P as PlatformFunctionDoc, b as PlatformModels, c as PlatformRoleDoc, Q as QuestionDoc, S as ScoringRuleDoc, d as SectionDoc, e as compileCvcEntryModel, f as compileCvcRegistryModel, g as createPlatformModels, h as cvcEntryModel, i as cvcRegistryModel, j as formModel, p as platformFunctionModel, k as platformRoleModel, q as questionModel, s as scoringRuleModel, l as sectionModel } from './index-uz57Fic9.js';
9
9
  export { AccommodationTypeKey, AccommodationTypeKeys, ActionStepCompletionStatusKey, ActionStepCompletionStatusKeys, ActionStepTypeKey, ActionStepTypeKeys, ActivityTypeKey, ActivityTypeKeys, AdminRoleKey, AdminRoleKeys, AdministeringJurisdictionKey, AdministeringJurisdictionKeys, AgeBinReportingKey, AgeBinReportingKeys, AnnouncementAudienceScopeKey, AnnouncementAudienceScopeKeys, AnnouncementResponseTypeKey, AnnouncementResponseTypeKeys, AssertionDomainKey, AssertionDomainKeys, AssertionStatusKey, AssertionStatusKeys, BasisQuickPicksKey, BasisQuickPicksKeys, CarCorrectionReasonKey, CarCorrectionReasonKeys, CaseShareStateKey, CaseShareStateKeys, CheckInActivityKey, CheckInActivityKeys, CheckInPhaseKey, CheckInPhaseKeys, ChildBehavioralConcernsKey, ChildBehavioralConcernsKeys, ChildChangeTypeKey, ChildChangeTypeKeys, ChildCustodyArrangementKey, ChildCustodyArrangementKeys, CitizenshipKey, CitizenshipKeys, CollectionContextKey, CollectionContextKeys, ContactInfoTypeKey, ContactInfoTypeKeys, ContactInfoUseTypeKey, ContactInfoUseTypeKeys, ContactLinkTypeKey, ContactLinkTypeKeys, ContactSafetyStatusKey, ContactSafetyStatusKeys, CoreFunctionsKey, CoreFunctionsKeys, CoreIndicatorKey, CoreIndicatorKeys, CoreInformationScopeKey, CoreInformationScopeKeys, CoreReferralOutcomeKey, CoreReferralOutcomeKeys, CountryKey, CountryKeys, CreatedBySystemKey, CreatedBySystemKeys, CriminalOrgCategoryKey, CriminalOrgCategoryKeys, DaIncidentArchiveReasonKey, DaIncidentArchiveReasonKeys, DaIncidentConfidenceKey, DaIncidentConfidenceKeys, DaIncidentDayApproxKey, DaIncidentDayApproxKeys, DaIncidentSeverityKey, DaIncidentSeverityKeys, DeterminationHelperCategoryKey, DeterminationHelperCategoryKeys, DeterminationLevelKey, DeterminationLevelKeys, DhStateKey, DhStateKeys, DisabilitySubtypeKey, DisabilitySubtypeKeys, DiscretionLevelKey, DiscretionLevelKeys, EmergencyContactCallReasonKey, EmergencyContactCallReasonKeys, EmergencyContactPermissionsKey, EmergencyContactPermissionsKeys, EmergencyExitCascadeKey, EmergencyExitCascadeKeys, EmploymentStatusKey, EmploymentStatusKeys, EnrollmentApplicationStatusKey, EnrollmentApplicationStatusKeys, ExitProcessChecklistItemKey, ExitProcessChecklistItemKeys, ExitReasonsKey, ExitReasonsKeys, ExploitationTypeKey, ExploitationTypeKeys, EyeColorKey, EyeColorKeys, FacialHairKey, FacialHairKeys, FacilitatorEntityTypeKey, FacilitatorEntityTypeKeys, FacilitatorLabelUsedInSourceKey, FacilitatorLabelUsedInSourceKeys, FacilitatorSubroleKey, FacilitatorSubroleKeys, FrequencyCadenceKey, FrequencyCadenceKeys, FunderKey, FunderKeys, GenderIdentityKey, GenderIdentityKeys, GoalCategoryKey, GoalCategoryKeys, GoalPriorityKey, GoalPriorityKeys, GoalStatusKey, GoalStatusKeys, GoalWithdrawalReasonKey, GoalWithdrawalReasonKeys, HairColorKey, HairColorKeys, HasTattoosKey, HasTattoosKeys, HighestEducationLevelCompletedKey, HighestEducationLevelCompletedKeys, HivStatusKey, HivStatusKeys, HmisCurrentLivingSituationKey, HmisCurrentLivingSituationKeys, HmisProjectTypeKey, HmisProjectTypeKeys, HmisRelationshipToHohKey, HmisRelationshipToHohKeys, HomelessStatusKey, HomelessStatusKeys, HopeScaleCaptureContextKey, HopeScaleCaptureContextKeys, HopeScaleResponseOptionsKey, HopeScaleResponseOptionsKeys, HopeScaleTierKey, HopeScaleTierKeys, HousingSubsidyTypesKey, HousingSubsidyTypesKeys, HtTypeKey, HtTypeKeys, IdentificationStatusKey, IdentificationStatusKeys, ImmigrationLegalStatusChangeTypeKey, ImmigrationLegalStatusChangeTypeKeys, IncarcerationEpisodeTypeKey, IncarcerationEpisodeTypeKeys, IncidentInvolvementRoleKey, IncidentInvolvementRoleKeys, IncidentParticipationRoleKey, IncidentParticipationRoleKeys, IncomeBenefitsSourcesKey, IncomeBenefitsSourcesKeys, InferenceTypeKey, InferenceTypeKeys, InvestigativeRequestTypeKey, InvestigativeRequestTypeKeys, JuvenileJusticeEpisodeTypeKey, JuvenileJusticeEpisodeTypeKeys, JuvenileJusticeInvolvementStatusKey, JuvenileJusticeInvolvementStatusKeys, LanguagesKey, LanguagesKeys, LeReportStatusKey, LeReportStatusKeys, LegalActionTypeKey, LegalActionTypeKeys, LivingSituationKey, LivingSituationKeys, LocationTypeKey, LocationTypeKeys, MaritalStatusLegalKey, MaritalStatusLegalKeys, MentalHealthStatusKey, MentalHealthStatusKeys, MessageReportReasonKey, MessageReportReasonKeys, MidStayEventTypeKey, MidStayEventTypeKeys, MilestoneTypeKey, MilestoneTypeKeys, MilitaryBranchKey, MilitaryBranchKeys, MilitaryStatusKey, MilitaryStatusKeys, MinorAdultStatusKey, MinorAdultStatusKeys, NameTypeKey, NameTypeKeys, NeedsAssessmentChangeTypeKey, NeedsAssessmentChangeTypeKeys, NeedsResidentialAgainKey, NeedsResidentialAgainKeys, OffenderStatusFamilyKey, OffenderStatusFamilyKeys, OffenderStatusKey, OffenderStatusKeys, OrientationIdentityKey, OrientationIdentityKeys, PersonRelationshipsKey, PersonRelationshipsKeys, PetExitReasonKey, PetExitReasonKeys, PetRelationshipBasisKey, PetRelationshipBasisKeys, PoPetitionBasisKey, PoPetitionBasisKeys, PoStatusKey, PoStatusKeys, PoViolationStatusKey, PoViolationStatusKeys, PreferredContactMethodKey, PreferredContactMethodKeys, PrimaryLanguageKey, PrimaryLanguageKeys, ProgramEnrollmentChangeTypeKey, ProgramEnrollmentChangeTypeKeys, ProgramSpecificCodeKey, ProgramSpecificCodeKeys, PronounsKey, PronounsKeys, ProofOfIdTypeKey, ProofOfIdTypeKeys, ProvenanceSourceIdKey, ProvenanceSourceIdKeys, QualityFlagsKey, QualityFlagsKeys, RaceEthnicityKey, RaceEthnicityKeys, RadiusBucketKey, RadiusBucketKeys, RecencyBandKey, RecencyBandKeys, ReferenceLinkTypeKey, ReferenceLinkTypeKeys, ReferralEntityCategoryKey, ReferralEntityCategoryKeys, ReferralOriginKey, ReferralOriginKeys, RelationshipConcernKey, RelationshipConcernKeys, RelationshipDynamicsKey, RelationshipDynamicsKeys, RelationshipStatusCurrentKey, RelationshipStatusCurrentKeys, RelationshipTiesKey, RelationshipTiesKeys, ReturnedToAbuserStatusKey, ReturnedToAbuserStatusKeys, RiskCategoryKey, RiskCategoryKeys, RiskIdentificationMilestoneKey, RiskIdentificationMilestoneKeys, RiskSeverityBandKey, RiskSeverityBandKeys, RoiMethodKey, RoiMethodKeys, RoiScopeKey, RoiScopeKeys, RoiStatusKey, RoiStatusKeys, RoleContextKey, RoleContextKeys, RomanticRelationshipChangeTypeKey, RomanticRelationshipChangeTypeKeys, RsvpResponseKey, RsvpResponseKeys, ServiceAudienceKey, ServiceAudienceKeys, ServiceCategoryKey, ServiceCategoryKeys, ServiceDeliveryChannelKey, ServiceDeliveryChannelKeys, ServiceMechanismKey, ServiceMechanismKeys, ServicePlanClosureReasonKey, ServicePlanClosureReasonKeys, ServicePlanReviewSnoozeReasonKey, ServicePlanReviewSnoozeReasonKeys, ServiceSourceKey, ServiceSourceKeys, ServiceStateKey, ServiceStateKeys, SessionNoteVisibilityKey, SessionNoteVisibilityKeys, SessionStateKey, SessionStateKeys, SessionTemplateKey, SessionTemplateKeys, SeverityFollowUpKey, SeverityFollowUpKeys, SexProviderSubroleKey, SexProviderSubroleKeys, ShareCadenceKey, ShareCadenceKeys, SharePurposeKey, SharePurposeKeys, ShareResponseReasonKey, ShareResponseReasonKeys, SignatureMethodKey, SignatureMethodKeys, SignatureTypeKey, SignatureTypeKeys, SmtBodyLocationKey, SmtBodyLocationKeys, SmtNameRelationKey, SmtNameRelationKeys, SmtSignificanceFlagsKey, SmtSignificanceFlagsKeys, SmtTypeKey, SmtTypeKeys, SourceCategoryKey, SourceCategoryKeys, SourceInstrumentKey, SourceInstrumentKeys, SourceSubtypeKey, SourceSubtypeKeys, SourceSystemKey, SourceSystemKeys, SpecialNeedsDisabilitiesKey, SpecialNeedsDisabilitiesKeys, SubjectTypeKey, SubjectTypeKeys, SubstanceUseStatusKey, SubstanceUseStatusKeys, SuggestionSourceKey, SuggestionSourceKeys, SupportStrengthKey, SupportStrengthKeys, SupportTopicKey, SupportTopicKeys, ThreadStatusKey, ThreadStatusKeys, ThreadTypeKey, ThreadTypeKeys, TimeScopeKey, TimeScopeKeys, TraffickingRelevantRoleKey, TraffickingRelevantRoleKeys, TribesKey, TribesKeys, UserRoleKey, UserRoleKeys, VerificationMethodKey, VerificationMethodKeys, VerificationStatusKey, VerificationStatusKeys, VictimAbuseTypesKey, VictimAbuseTypesKeys, VictimStatusFamilyKey, VictimStatusFamilyKeys, VisaTypeKey, VisaTypeKeys, WhyNotKey, WhyNotKeys } from './enums/index.js';
10
10
  export { CvcRegistryService, CvcRegistryServiceOptions, EntryLoader, ICvcEntry, ICvcRegistry, RegistryLoader, RegistryScope, applyEntryOverrides, cascadeExclusions, cvcVersionsToRecord, resolveRegistryWithInheritance } from './services/index.js';
11
11
  export { C as CreateInformationScopeResolverInput, I as INFORMATION_SCOPE_POLICY_VERSION_ROW_NOTE, a as INFORMATION_SCOPE_READABLE_VERSIONS, b as INFORMATION_SCOPE_SYSTEM_INFO, c as INFORMATION_SCOPE_VERSION, d as InformationScopeResolver, S as ScopeApp, e as ScopeApps, f as ScopeCodeReading, g as ScopeKindBranch, h as ScopeMigration, i as ScopeMigrationRule, j as ScopePersonKind, k as ScopeReadOptions, l as ScopeReading, m as ScopeReadingRule, n as ScopeReadingSubject, o as ScopeRetainedReading, p as ScopeRow, q as ScopeRowStatus, r as ScopeRowType, s as ScopeShareOptions, t as ScopeShareReason, u as ScopeShareVerdict, v as ScopeSpecialDataType, w as ScopeSubjectKind, x as StoredScopeList, y as createInformationScopeResolver, z as isScopeInstrumentRow, A as isScopeRestRow, B as isSelectableScopeRow, D as kindForPerson } from './informationScopeResolver-BzYu97DE.js';
12
12
  export { CoreInformationScopeSot, CoreInformationScopeSotEntry, CoreInformationScopeSotMigrationLine, scopeMigrationsFromSot, scopeRowsFromSot } from './information-scope/index.js';
13
+ export { CalendarDate, CalendarDateLike, DOB_MIN_YEAR, DobLike, PartialDob, PartialDobLike, ageFromDob, ageInputFromStoredDob, calendarDateOf, normalizeDob } from './age/index.js';
13
14
  export { AuthzFunctionRow, AuthzRoleOverrides, AuthzRoleRow, AuthzStateMap, AuthzTeamPolicy, AuthzTier1StateMap, CORE_FUNCTION_DEFAULT_BOUNDS, CORE_FUNCTION_DEFAULT_BOUNDS_SOT_VERSION, ResolveEffectiveFunctionsInput, VIEWING_LEVEL_FUNCTIONS, ViewingLevel, codebookDefaultBound, isCanonEvaluableFunction, resolveEffectiveFunctions, resolveEffectiveViewingLevel, selectActingTeamId, viewingLevelFromFunctions } from './authz/index.js';
14
15
  export { EffectiveSharingCeiling, EffectiveSharingCeilingInputs, HTI_SHARE_PLATFORM_PURPOSE_ENABLED, HTI_SHARE_PLATFORM_STARTER, HTI_SHARE_PLATFORM_STARTER_SOURCE, INFORMATION_SCOPE_FIELD_HOME_ROWS, SHARING_CEILING_DEFAULT_ROW_KEY, SHARING_CEILING_EXTERNAL_ROW_KEY, SHARING_CEILING_SCOPE_VERSION, SharingCeilingAllowed, SharingCeilingCellLike, SharingCeilingRung, SharingCeilingScope, SharingPlatformStarter, SharingPurposeLists, SharingScopeEdits, ceilingCoverage, effectiveCeiling, hasOwnScopeContent, isCeilingCoverageRow, isSharingPurposeDisabled, maskSelectionToCeiling, rowsExpandedByCeiling, rowsOutsideCeiling, rowsOverCeiling, scopeRowWithinCeiling, sharingCeilingCellList, sharingCeilingRowKey, sharingScopeEditsFromCells } from './sharing-ceiling/index.js';
15
16
  export { A as AgencyOrgTypeFieldsInput, a as AgencyOrgTypeFieldsSchema, b as AgencyTypeKeyInput, c as AgencyTypeKeySchema, C as CvcCode, d as CvcCodeSchema, e as CvcDomain, f as CvcEntrySchema, g as CvcEnvelope, h as CvcEnvelopeSchema, i as CvcKey, j as CvcKeySchema, O as OrgTypeFieldsSchema, k as OrgTypeSelectableKeyInput, l as OrgTypeSelectableKeySchema, S as ServiceCategoryEntry, m as ServiceCategoryEntrySchema, n as SetOrgTypeInput, o as SetOrgTypeInputSchema, T as TeamApp, p as TeamAppSchema, q as TeamDirectoryFieldsInput, r as TeamDirectoryFieldsSchema, s as orgTypeFieldsShape, w as withOrgTypeFields } from './agency-CnVTwLeV.js';
package/dist/index.js CHANGED
@@ -14867,6 +14867,104 @@ function scopeMigrationsFromSot(sot) {
14867
14867
  });
14868
14868
  }
14869
14869
 
14870
+ // src/age/ageFromDob.ts
14871
+ var DOB_MIN_YEAR = 1850;
14872
+ function toNullableNumber(v) {
14873
+ if (v == null) return null;
14874
+ if (typeof v === "string" && v.trim() === "") return null;
14875
+ const n = typeof v === "number" ? v : Number(v);
14876
+ return Number.isFinite(n) ? n : null;
14877
+ }
14878
+ function toNullableMonth(v) {
14879
+ const n = toNullableNumber(v);
14880
+ return n != null && n >= 1 && n <= 12 ? n : null;
14881
+ }
14882
+ function toNullableDay(v) {
14883
+ const n = toNullableNumber(v);
14884
+ return n != null && n >= 1 && n <= 31 ? n : null;
14885
+ }
14886
+ function toNullableYear(v) {
14887
+ const n = toNullableNumber(v);
14888
+ return n != null && Number.isInteger(n) && n > 0 ? n : null;
14889
+ }
14890
+ function isDate(v) {
14891
+ return v instanceof Date || Object.prototype.toString.call(v) === "[object Date]";
14892
+ }
14893
+ function calendarDateOf(date) {
14894
+ if (Number.isNaN(date.getTime())) return null;
14895
+ const utcMidnight = date.getUTCHours() === 0 && date.getUTCMinutes() === 0 && date.getUTCSeconds() === 0 && date.getUTCMilliseconds() === 0;
14896
+ return utcMidnight ? { y: date.getUTCFullYear(), m: date.getUTCMonth() + 1, d: date.getUTCDate() } : { y: date.getFullYear(), m: date.getMonth() + 1, d: date.getDate() };
14897
+ }
14898
+ function ageInputFromStoredDob(stored) {
14899
+ return { y: stored?.dobYear ?? null, m: stored?.dobMonth ?? null, d: stored?.dobDay ?? null };
14900
+ }
14901
+ function normalizeDob(dobLike) {
14902
+ if (dobLike == null) return null;
14903
+ if (isDate(dobLike)) return calendarDateOf(dobLike);
14904
+ if (typeof dobLike === "object") {
14905
+ const m = toNullableMonth(dobLike.m);
14906
+ const d = toNullableDay(dobLike.d);
14907
+ const y = toNullableYear(dobLike.y);
14908
+ if (m == null && d == null && y == null) return null;
14909
+ return { m, d, y };
14910
+ }
14911
+ if (typeof dobLike === "string") {
14912
+ const s = dobLike.trim();
14913
+ if (!s) return null;
14914
+ const iso = /^(\d{4})-(\d{1,2})-(\d{1,2})/.exec(s);
14915
+ if (iso) {
14916
+ return {
14917
+ y: toNullableYear(iso[1]),
14918
+ m: toNullableMonth(iso[2]),
14919
+ d: toNullableDay(iso[3])
14920
+ };
14921
+ }
14922
+ const isoPartial = /^(\d{4})(?:-(\d{1,2}))?$/.exec(s);
14923
+ if (isoPartial) {
14924
+ const y = toNullableYear(isoPartial[1]);
14925
+ return y == null ? null : { y, m: toNullableMonth(isoPartial[2]), d: null };
14926
+ }
14927
+ const slash = /^(\d{0,2})\/(\d{0,2})\/(\d{0,4})$/.exec(s);
14928
+ if (slash) {
14929
+ const m = toNullableMonth(slash[1]);
14930
+ const d = toNullableDay(slash[2]);
14931
+ const y = toNullableYear(slash[3]);
14932
+ if (m == null && d == null && y == null) return null;
14933
+ return { m, d, y };
14934
+ }
14935
+ return null;
14936
+ }
14937
+ return null;
14938
+ }
14939
+ function ageFromDob(dob, today) {
14940
+ const parts = normalizeDob(dob);
14941
+ if (!parts || parts.y == null) return null;
14942
+ const t = isDate(today) ? calendarDateOf(today) : today;
14943
+ if (t == null || !Number.isInteger(t.y) || toNullableMonth(t.m) == null || toNullableDay(t.d) == null) {
14944
+ return null;
14945
+ }
14946
+ const todayY = t.y;
14947
+ const todayM = t.m;
14948
+ const todayD = t.d;
14949
+ if (parts.y < DOB_MIN_YEAR) return null;
14950
+ if (parts.y > todayY) return null;
14951
+ if (parts.y === todayY && parts.m != null) {
14952
+ if (parts.m > todayM) return null;
14953
+ if (parts.m === todayM && parts.d != null && parts.d > todayD) return null;
14954
+ }
14955
+ let birthdayPassed;
14956
+ if (parts.m == null) {
14957
+ birthdayPassed = false;
14958
+ } else if (parts.m < todayM) {
14959
+ birthdayPassed = true;
14960
+ } else if (parts.m > todayM) {
14961
+ birthdayPassed = false;
14962
+ } else {
14963
+ birthdayPassed = parts.d == null ? false : parts.d <= todayD;
14964
+ }
14965
+ return Math.max(0, todayY - parts.y - (birthdayPassed ? 0 : 1));
14966
+ }
14967
+
14870
14968
  // src/generated/coreFunctionsEvaluable.ts
14871
14969
  var CORE_FUNCTIONS_EVALUABLE_KEYS = [
14872
14970
  "agency_info_manage",
@@ -68473,6 +68571,7 @@ export {
68473
68571
  DEFAULT_BOUND_STATE_LABELS,
68474
68572
  DEFAULT_BOUND_STATE_VALUES,
68475
68573
  DEFAULT_PARTICIPATION_ROLE_BY_CATEGORY,
68574
+ DOB_MIN_YEAR,
68476
68575
  DaIncidentArchiveReasonKeys,
68477
68576
  DaIncidentConfidenceKeys,
68478
68577
  DaIncidentDayApproxKeys,
@@ -68793,6 +68892,8 @@ export {
68793
68892
  adminRoles_v2_0_0_default as adminRolesSot,
68794
68893
  administeringJurisdiction_v1_0_0_default as administeringJurisdictionSot,
68795
68894
  ageBinReporting_v1_0_0_default as ageBinReportingSot,
68895
+ ageFromDob,
68896
+ ageInputFromStoredDob,
68796
68897
  agencyOrgTypeSchemaDefinition,
68797
68898
  announcementAudienceScope_v1_0_0_default as announcementAudienceScopeSot,
68798
68899
  announcementResponseType_v1_0_0_default as announcementResponseTypeSot,
@@ -68811,6 +68912,7 @@ export {
68811
68912
  buildQuestionSchema,
68812
68913
  buildScoringRuleSchema,
68813
68914
  buildSectionSchema,
68915
+ calendarDateOf,
68814
68916
  canonicalCoreIndicator,
68815
68917
  canonicalIncidentParticipationRole,
68816
68918
  canonicalServiceState,
@@ -68970,6 +69072,7 @@ export {
68970
69072
  nameType_v1_0_0_default as nameTypeSot,
68971
69073
  needsAssessmentChangeType_v1_0_0_default as needsAssessmentChangeTypeSot,
68972
69074
  needsResidentialAgain_v1_0_0_default as needsResidentialAgainSot,
69075
+ normalizeDob,
68973
69076
  normalizeServiceMechanismKeys,
68974
69077
  normalizeServiceStampId,
68975
69078
  normalizeServiceStamps,