@dyedurham/search-and-file-widget 2.1.22 → 2.1.24

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.
@@ -58112,9 +58112,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
58112
58112
  return task?._taskType === TaskType.AnnualCompliance;
58113
58113
  }
58114
58114
  function getFilingProvider(task) {
58115
- if (task && isBritishColumbiaTask(task)) {
58116
- return "bcreg";
58117
- }
58118
58115
  return task && !isOntarioTask(task) ? "federal" : "obr";
58119
58116
  }
58120
58117
  function getSearchOrFilingType(task) {
@@ -81316,16 +81313,12 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
81316
81313
  bcChangeOfDirectorsInitialDelta = signal(null);
81317
81314
  bcFormationInitialDelta = signal(null);
81318
81315
  bcChangeOfOfficeAddressesInitialDelta = signal(null);
81319
- bcAnnualReportInitialDelta = signal(null);
81320
81316
  setFormationInitialDelta(delta) {
81321
81317
  this.formationInitialDelta.set(delta);
81322
81318
  }
81323
81319
  setBCFormationInitialDelta(delta) {
81324
81320
  this.bcFormationInitialDelta.set(delta);
81325
81321
  }
81326
- setBCAnnualReportInitialDelta(delta) {
81327
- this.bcAnnualReportInitialDelta.set(delta);
81328
- }
81329
81322
  setBCChangeOfOfficeAddressesInitialDelta(delta) {
81330
81323
  this.bcChangeOfOfficeAddressesInitialDelta.set(delta);
81331
81324
  }
@@ -81349,7 +81342,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
81349
81342
  this.bcChangeOfDirectorsInitialDelta.set(null);
81350
81343
  this.bcFormationInitialDelta.set(null);
81351
81344
  this.bcChangeOfOfficeAddressesInitialDelta.set(null);
81352
- this.bcAnnualReportInitialDelta.set(null);
81353
81345
  }
81354
81346
  static \u0275fac = function DeltaStateService_Factory(__ngFactoryType__) {
81355
81347
  return new (__ngFactoryType__ || _DeltaStateService)();
@@ -84210,7 +84202,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84210
84202
  });
84211
84203
 
84212
84204
  // src/app/enums/british-columbia-form.enums.ts
84213
- var BCChangeOfDirectorsFormControls, BCChangeOfDirectorsFormGroups, BCFormationFormControls, BCChangeOfOfficeAddressesFormControls, BCChangeOfOfficeAddressesFormGroups, BCAnnualReportFormControls, BCAnnualReportFormGroups, BCFormationFormGroups;
84205
+ var BCChangeOfDirectorsFormControls, BCChangeOfDirectorsFormGroups, BCFormationFormControls, BCChangeOfOfficeAddressesFormControls, BCChangeOfOfficeAddressesFormGroups, BCFormationFormGroups;
84214
84206
  var init_british_columbia_form_enums = __esm({
84215
84207
  "src/app/enums/british-columbia-form.enums.ts"() {
84216
84208
  (function(BCChangeOfDirectorsFormControls2) {
@@ -84302,26 +84294,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84302
84294
  BCChangeOfOfficeAddressesFormGroups2["RecordsOfficeAddress"] = "Records Office Address";
84303
84295
  BCChangeOfOfficeAddressesFormGroups2["AnnualReportReminder"] = "Annual Report Reminder";
84304
84296
  })(BCChangeOfOfficeAddressesFormGroups || (BCChangeOfOfficeAddressesFormGroups = {}));
84305
- (function(BCAnnualReportFormControls2) {
84306
- BCAnnualReportFormControls2["Id"] = "id";
84307
- BCAnnualReportFormControls2["AffiliationName"] = "entityName";
84308
- BCAnnualReportFormControls2["Role"] = "Role";
84309
- BCAnnualReportFormControls2["AffiliationType"] = "AffiliationType";
84310
- BCAnnualReportFormControls2["ClientMatterNumber"] = "ClientMatterNumber";
84311
- BCAnnualReportFormControls2["DocketNumber"] = "docketNumber";
84312
- BCAnnualReportFormControls2["EntityIdentifier"] = "entityIdentifier";
84313
- BCAnnualReportFormControls2["EffectiveDate"] = "effectiveDate";
84314
- BCAnnualReportFormControls2["CeaseDate"] = "ceaseDate";
84315
- BCAnnualReportFormControls2["FullAddress"] = "fullAddress";
84316
- BCAnnualReportFormControls2["CompanyEmail"] = "companyEmail";
84317
- BCAnnualReportFormControls2["IsAnnualReportReminderRequired"] = "isAnnualReportReminderRequired";
84318
- })(BCAnnualReportFormControls || (BCAnnualReportFormControls = {}));
84319
- (function(BCAnnualReportFormGroups2) {
84320
- BCAnnualReportFormGroups2["General"] = "General";
84321
- BCAnnualReportFormGroups2["Officers"] = "Officers";
84322
- BCAnnualReportFormGroups2["CompanyEmail"] = "Company Email";
84323
- BCAnnualReportFormGroups2["AnnualReportReminder"] = "Annual Report Reminder";
84324
- })(BCAnnualReportFormGroups || (BCAnnualReportFormGroups = {}));
84325
84297
  (function(BCFormationFormGroups2) {
84326
84298
  BCFormationFormGroups2["ReferenceNumbers"] = "Reference Numbers";
84327
84299
  BCFormationFormGroups2["CorporationDetails"] = "Corporation Details";
@@ -84340,12 +84312,12 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84340
84312
  const entityDetails = deltaData.entityDetails;
84341
84313
  const isNamed2 = entityDetails?.corporationNameType === BCNameType.Named;
84342
84314
  const nameTranslations = entityDetails?.usesNameTranslation ? (entityDetails.nameTranslations ?? []).filter(Boolean) : [];
84343
- const registeredOfficeAddresses = collectSharedAddresses(affiliations, AddressTitle2.REGISTERED_OFFICE);
84344
- const recordsOfficeAddresses = collectSharedAddresses(affiliations, AddressTitle2.RECORDS_OFFICE);
84345
- const regMailing = pickAddress(registeredOfficeAddresses, "Mailing");
84346
- const regDelivery = pickAddress(registeredOfficeAddresses, "Delivery");
84347
- const recMailing = pickAddress(recordsOfficeAddresses, "Mailing");
84348
- const recDelivery = pickAddress(recordsOfficeAddresses, "Delivery");
84315
+ const registeredOffice = findSharedAddressAffiliation(affiliations, AddressTitle2.REGISTERED_OFFICE);
84316
+ const recordsOffice = findSharedAddressAffiliation(affiliations, AddressTitle2.RECORDS_OFFICE);
84317
+ const regMailing = pickAddress(registeredOffice?.addresses, "Mailing");
84318
+ const regDelivery = pickAddress(registeredOffice?.addresses, "Delivery");
84319
+ const recMailing = pickAddress(recordsOffice?.addresses, "Mailing");
84320
+ const recDelivery = pickAddress(recordsOffice?.addresses, "Delivery");
84349
84321
  const regMailingBC = mapAddress(regMailing);
84350
84322
  const regDeliveryBC = regDelivery ? mapAddress(regDelivery) : void 0;
84351
84323
  const recMailingBC = recMailing ? mapAddress(recMailing) : void 0;
@@ -84386,26 +84358,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84386
84358
  };
84387
84359
  return pruneUndefined(request);
84388
84360
  }
84389
- function findBCOfficeAddressIssues(task) {
84390
- const affiliations = task.entity.affiliations ?? [];
84391
- const issues = [];
84392
- const offices = [
84393
- { name: "Registered Office", title: AddressTitle2.REGISTERED_OFFICE, required: true },
84394
- { name: "Records Office", title: AddressTitle2.RECORDS_OFFICE, required: false }
84395
- ];
84396
- for (const { name, title, required } of offices) {
84397
- const addresses = collectSharedAddresses(affiliations, title);
84398
- if (!addresses.length && !required) {
84399
- continue;
84400
- }
84401
- for (const type of ["Mailing", "Delivery"]) {
84402
- if (!pickAddress(addresses, type)) {
84403
- issues.push(`The ${name} has no ${type} address.`);
84404
- }
84405
- }
84406
- }
84407
- return issues;
84408
- }
84409
84361
  function findBCRequestIssues(request) {
84410
84362
  const issues = [];
84411
84363
  const email = request.companyEmail?.trim() ?? "";
@@ -84414,17 +84366,17 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84414
84366
  } else if (email.length > 150) {
84415
84367
  issues.push("Company Email must be 150 characters or fewer.");
84416
84368
  }
84369
+ if (!request.registeredOfficeMailingAddress?.streetAddress?.trim()) {
84370
+ issues.push("The Registered Office has no Mailing address. Add one in Athennian.");
84371
+ }
84417
84372
  for (const director of request.directors ?? []) {
84418
84373
  if (!director.mailingAddress?.streetAddress?.trim()) {
84419
- issues.push(`Director ${`${director.firstName} ${director.lastName}`.trim()} has no Mailing address.`);
84374
+ issues.push(`Director ${`${director.firstName} ${director.lastName}`.trim()} has no Mailing address. Add one in Athennian.`);
84420
84375
  }
84421
84376
  }
84422
- if (!request.authorizedShareStructure?.shareClasses?.length) {
84423
- issues.push("The Authorized Share Structure is required.");
84424
- }
84425
84377
  const password = request.password ?? "";
84426
84378
  if (password.length < BC_PASSWORD_MIN_LENGTH || password.length > BC_PASSWORD_MAX_LENGTH || !/^[A-Za-z0-9]+$/.test(password)) {
84427
- issues.push(`The company password (taken from the entity's registry ID) must be ${BC_PASSWORD_MIN_LENGTH} to ${BC_PASSWORD_MAX_LENGTH} letters or digits only.`);
84379
+ issues.push(`The company password (taken from the entity's registry ID) must be ${BC_PASSWORD_MIN_LENGTH} to ${BC_PASSWORD_MAX_LENGTH} letters or digits only. Update the registry ID in Athennian.`);
84428
84380
  }
84429
84381
  return issues;
84430
84382
  }
@@ -84479,8 +84431,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84479
84431
  return {
84480
84432
  incorporatorType: isIndividual ? "individual" : "corporationOrFirm",
84481
84433
  // Names are only accepted for an individual; a corporation or firm is identified by
84482
- // `corporationOrFirmName` (the deployed API rejects first/last name otherwise, although its
84483
- // published spec lists them as required).
84434
+ // `corporationOrFirmName` (the API rejects first/last name otherwise).
84484
84435
  firstName: isIndividual ? incorporator.firstName ?? "" : void 0,
84485
84436
  middleName: isIndividual ? incorporator.middleName || void 0 : void 0,
84486
84437
  lastName: isIndividual ? incorporator.lastName ?? "" : void 0,
@@ -84519,9 +84470,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84519
84470
  function findSharedAddressAffiliation(affiliations, staticTitle) {
84520
84471
  return affiliations.find((a) => a.role?.role_name === AddressRole2.SHARED_ADDRESS && a.role?.static_title === staticTitle && isActiveAffiliation(a));
84521
84472
  }
84522
- function collectSharedAddresses(affiliations, staticTitle) {
84523
- return affiliations.filter((a) => a.role?.role_name === AddressRole2.SHARED_ADDRESS && a.role?.static_title === staticTitle && isActiveAffiliation(a)).flatMap((a) => a.addresses ?? []);
84524
- }
84525
84473
  function pickAddress(addresses, locationType, fallbackToFirst = false) {
84526
84474
  const match = addresses?.find((a) => (a.computed_location_type ?? a.location_type)?.toLowerCase() === locationType.toLowerCase());
84527
84475
  return match ?? (fallbackToFirst ? addresses?.[0] : void 0);
@@ -84658,8 +84606,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84658
84606
  const affiliations = task.entity.affiliations ?? [];
84659
84607
  const delta = task.deltaData;
84660
84608
  const registeredOffice = findSharedAddressAffiliation(affiliations, AddressTitle2.REGISTERED_OFFICE);
84661
- const registeredOfficeAddresses = collectSharedAddresses(affiliations, AddressTitle2.REGISTERED_OFFICE);
84662
- const recordsOfficeAddresses = collectSharedAddresses(affiliations, AddressTitle2.RECORDS_OFFICE);
84609
+ const recordsOffice = findSharedAddressAffiliation(affiliations, AddressTitle2.RECORDS_OFFICE);
84663
84610
  const companyEmail = task.entity.emailOptions?.[0]?.value ?? registeredOffice?.addresses?.[0]?.communications?.find((c) => c.type === "Business Email")?.value ?? task.entity.communications?.find((c) => c.type === "Business Email")?.value ?? // Email only: the entity may carry its Business Email on another address (e.g. Head
84664
84611
  // Office) when no Registered Office shared address exists.
84665
84612
  task.entity.addresses?.flatMap((a) => a.communications ?? []).find((c) => c.type === "Business Email")?.value ?? "";
@@ -84668,19 +84615,19 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84668
84615
  config2[BCFormationFormGroups.CorporationDetails] = this.generateCorporationDetailsFormGroup(task, delta?.entityDetails, companyEmail);
84669
84616
  config2[BCFormationFormGroups.RegisteredOfficeAddress] = new FormGroup({
84670
84617
  [BCFormationFormControls.MailingAddress]: new FormControl({
84671
- value: this.formatFullAddress(this.pickAddress(registeredOfficeAddresses, "Mailing", true)),
84618
+ value: this.formatFullAddress(this.pickAddress(registeredOffice?.addresses, "Mailing", true)),
84672
84619
  disabled: true
84673
84620
  }),
84674
84621
  [BCFormationFormControls.DeliveryAddress]: new FormControl({
84675
- value: this.formatFullAddress(this.pickAddress(registeredOfficeAddresses, "Delivery", true)),
84622
+ value: this.formatFullAddress(this.pickAddress(registeredOffice?.addresses, "Delivery", true)),
84676
84623
  disabled: true
84677
84624
  }),
84678
84625
  [BCFormationFormControls.RecordsOfficeMailingAddress]: new FormControl({
84679
- value: this.formatFullAddress(this.pickAddress(recordsOfficeAddresses, "Mailing", true)),
84626
+ value: this.formatFullAddress(this.pickAddress(recordsOffice?.addresses, "Mailing", true)),
84680
84627
  disabled: true
84681
84628
  }),
84682
84629
  [BCFormationFormControls.RecordsOfficeDeliveryAddress]: new FormControl({
84683
- value: this.formatFullAddress(this.pickAddress(recordsOfficeAddresses, "Delivery", true)),
84630
+ value: this.formatFullAddress(this.pickAddress(recordsOffice?.addresses, "Delivery", true)),
84684
84631
  disabled: true
84685
84632
  })
84686
84633
  });
@@ -84958,479 +84905,8 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
84958
84905
  }
84959
84906
  });
84960
84907
 
84961
- // src/app/helpers/british-columbia/change-of-office-addresses/british-columbia-change-of-office-addresses-form.helper.ts
84962
- var Controls, COMPANY_EMAIL_TYPES, isCompanyEmail, incomingAddressByGrid, EDITABLE_ADDRESS_CONTROLS, BritishColumbiaChangeOfOfficeAddressesFormHelper;
84963
- var init_british_columbia_change_of_office_addresses_form_helper = __esm({
84964
- "src/app/helpers/british-columbia/change-of-office-addresses/british-columbia-change-of-office-addresses-form.helper.ts"() {
84965
- init_forms();
84966
- init_common_models();
84967
- init_british_columbia_form_enums();
84968
- init_BritishColumbiaConstants();
84969
- init_british_columbia_formation_form_helper();
84970
- init_BritishColumbiaConstants();
84971
- init_common_utils();
84972
- Controls = BCChangeOfOfficeAddressesFormControls;
84973
- COMPANY_EMAIL_TYPES = ["Business Email", "Email"];
84974
- isCompanyEmail = (communication) => Boolean(communication?.value) && COMPANY_EMAIL_TYPES.includes(communication?.type ?? "");
84975
- incomingAddressByGrid = /* @__PURE__ */ new WeakMap();
84976
- EDITABLE_ADDRESS_CONTROLS = [
84977
- Controls.AddressLine1,
84978
- Controls.AddressLine2,
84979
- Controls.City,
84980
- Controls.PostalCode
84981
- ];
84982
- BritishColumbiaChangeOfOfficeAddressesFormHelper = class {
84983
- static generateConfig(task, _translateFn) {
84984
- const affiliations = task.entity.affiliations ?? [];
84985
- const delta = task.deltaData;
84986
- const format = BritishColumbiaFormationFormHelper.formatFullAddress;
84987
- const pick = BritishColumbiaFormationFormHelper.pickAddress;
84988
- const registeredOffice = BritishColumbiaFormationFormHelper.findSharedAddressAffiliation(affiliations, AddressTitle2.REGISTERED_OFFICE);
84989
- const recordsOffice = BritishColumbiaFormationFormHelper.findSharedAddressAffiliation(affiliations, AddressTitle2.RECORDS_OFFICE);
84990
- const incoming = this.incomingOfficeAddresses(task);
84991
- const seed = delta?.registeredOffice ? this.fillEmptyAddresses(delta, incoming) : this.seedFromIncomingAffiliations(task);
84992
- const config2 = {};
84993
- config2[BCChangeOfOfficeAddressesFormGroups.ReferenceNumbers] = this.generateReferenceNumbersFormGroup(delta?.referenceNumbers, task.entity._profile.client_matter_number);
84994
- config2[BCChangeOfOfficeAddressesFormGroups.CorporationDetails] = new FormGroup({
84995
- [Controls.CorporationName]: this.readOnly(task.entity._profile.name),
84996
- [Controls.IncorporationNumber]: this.readOnly(task.entity._profile.corp_number),
84997
- [Controls.CompanyEmail]: new FormControl(delta?.companyEmail || this.resolveCompanyEmail(task), Validators.required)
84998
- });
84999
- config2[BCChangeOfOfficeAddressesFormGroups.AnnualReportReminder] = new FormGroup({
85000
- [Controls.AnnualReportReminder]: new FormControl(delta?.annualReportReminder ?? BCAnnualReportReminder.Yes, Validators.required)
85001
- });
85002
- const regDeliverySame = seed.registeredOffice?.deliverySameAsMailing ?? true;
85003
- config2[BCChangeOfOfficeAddressesFormGroups.RegisteredOfficeAddress] = new FormGroup({
85004
- [Controls.CurrentMailingAddress]: this.readOnly(format(pick(registeredOffice?.addresses, "Mailing"))),
85005
- [Controls.CurrentDeliveryAddress]: this.readOnly(format(pick(registeredOffice?.addresses, "Delivery"))),
85006
- [Controls.NewMailingAddress]: this.createOfficeAddressFormGroup(seed.registeredOffice?.mailingAddress, true),
85007
- [Controls.DeliverySameAsMailing]: new FormControl(regDeliverySame),
85008
- [Controls.NewDeliveryAddress]: this.createOfficeAddressFormGroup(seed.registeredOffice?.deliveryAddress, !regDeliverySame)
85009
- });
85010
- const recSameAsRegistered = seed.recordsOffice?.sameAsRegisteredOffice ?? true;
85011
- const recDeliverySame = seed.recordsOffice?.deliverySameAsMailing ?? true;
85012
- config2[BCChangeOfOfficeAddressesFormGroups.RecordsOfficeAddress] = new FormGroup({
85013
- [Controls.CurrentMailingAddress]: this.readOnly(format(pick(recordsOffice?.addresses, "Mailing"))),
85014
- [Controls.CurrentDeliveryAddress]: this.readOnly(format(pick(recordsOffice?.addresses, "Delivery"))),
85015
- [Controls.SameAsRegisteredOffice]: new FormControl(recSameAsRegistered),
85016
- [Controls.NewMailingAddress]: this.createOfficeAddressFormGroup(seed.recordsOffice?.mailingAddress, !recSameAsRegistered),
85017
- [Controls.DeliverySameAsMailing]: new FormControl(recDeliverySame),
85018
- [Controls.NewDeliveryAddress]: this.createOfficeAddressFormGroup(seed.recordsOffice?.deliveryAddress, !recSameAsRegistered && !recDeliverySame)
85019
- });
85020
- const grid = (group2, control) => config2[group2].get(control);
85021
- const register = (target, address) => address && incomingAddressByGrid.set(target, address);
85022
- register(grid(BCChangeOfOfficeAddressesFormGroups.RegisteredOfficeAddress, Controls.NewDeliveryAddress), incoming.regDelivery);
85023
- register(grid(BCChangeOfOfficeAddressesFormGroups.RecordsOfficeAddress, Controls.NewMailingAddress), incoming.recMailing);
85024
- register(grid(BCChangeOfOfficeAddressesFormGroups.RecordsOfficeAddress, Controls.NewDeliveryAddress), incoming.recDelivery);
85025
- return config2;
85026
- }
85027
- /** The company email choices: the entity's email options, plus the resolved default if it isn't one. */
85028
- static getCompanyEmailOptions(task) {
85029
- const values = (task.entity.emailOptions ?? []).filter(isCompanyEmail).map((o) => o.value);
85030
- const fallback = this.resolveCompanyEmail(task);
85031
- return [...new Set(fallback ? [...values, fallback] : values)].map((value) => ({
85032
- value,
85033
- label: value
85034
- }));
85035
- }
85036
- /**
85037
- * Pre-fills the new addresses from the task's incoming "Shared Address" affiliations (Registered
85038
- * Office / Records Office), taking each Mailing / Delivery address from the affiliation or, when
85039
- * it has none, from its parent affiliation. Nothing is pre-filled without an incoming address.
85040
- */
85041
- static seedFromIncomingAffiliations(task) {
85042
- const { regMailing, regDelivery, recMailing, recDelivery } = this.incomingOfficeAddresses(task);
85043
- if (!regMailing && !recMailing) {
85044
- return {};
85045
- }
85046
- const regDeliverySame = !regDelivery || this.isSameOfficeAddress(regDelivery, regMailing);
85047
- const recDeliverySame = !recDelivery || this.isSameOfficeAddress(recDelivery, recMailing);
85048
- const recSameAsRegistered = !recMailing || this.isSameOfficeAddress(recMailing, regMailing) && this.isSameOfficeAddress(recDelivery ?? recMailing, regDelivery ?? regMailing);
85049
- return {
85050
- registeredOffice: {
85051
- mailingAddress: regMailing,
85052
- deliverySameAsMailing: regDeliverySame,
85053
- deliveryAddress: regDeliverySame ? void 0 : regDelivery
85054
- },
85055
- recordsOffice: {
85056
- sameAsRegisteredOffice: recSameAsRegistered,
85057
- mailingAddress: recSameAsRegistered ? void 0 : recMailing,
85058
- deliverySameAsMailing: recDeliverySame,
85059
- deliveryAddress: recDeliverySame ? void 0 : recDelivery
85060
- }
85061
- };
85062
- }
85063
- /** Keeps the saved flags and addresses, but fills an address the draft left empty from `incoming`. */
85064
- static fillEmptyAddresses(saved, incoming) {
85065
- const hasValues = (address) => EDITABLE_ADDRESS_CONTROLS.some((name) => Boolean(address?.[name]));
85066
- const pick = (savedAddress, incomingAddress) => hasValues(savedAddress) ? savedAddress : incomingAddress ?? savedAddress;
85067
- return {
85068
- registeredOffice: __spreadProps(__spreadValues({}, saved.registeredOffice), {
85069
- mailingAddress: pick(saved.registeredOffice?.mailingAddress, incoming.regMailing),
85070
- deliveryAddress: pick(saved.registeredOffice?.deliveryAddress, incoming.regDelivery)
85071
- }),
85072
- recordsOffice: __spreadProps(__spreadValues({}, saved.recordsOffice), {
85073
- mailingAddress: pick(saved.recordsOffice?.mailingAddress, incoming.recMailing),
85074
- deliveryAddress: pick(saved.recordsOffice?.deliveryAddress, incoming.recDelivery)
85075
- })
85076
- };
85077
- }
85078
- /** The four office addresses of the task's incoming Shared Address, as form values. */
85079
- static incomingOfficeAddresses(task) {
85080
- const incoming = task.incomingAffiliations ?? [];
85081
- const pickBy = (title, locationType) => {
85082
- const pool = incoming.filter((a) => a.role?.role_name === AddressRole2.SHARED_ADDRESS && a.role?.static_title === title).flatMap((a) => a.addresses?.length ? a.addresses : a.parent_affiliation?.addresses ?? []);
85083
- const wanted = locationType.toLowerCase();
85084
- const address = pool.find((a) => (a.computed_location_type ?? "").toLowerCase() === wanted || (a.location_type ?? "").toLowerCase() === wanted);
85085
- return address && this.isBritishColumbia(address) ? this.toOfficeAddressDelta(address) : void 0;
85086
- };
85087
- return {
85088
- regMailing: pickBy(AddressTitle2.REGISTERED_OFFICE, "Mailing"),
85089
- regDelivery: pickBy(AddressTitle2.REGISTERED_OFFICE, "Delivery"),
85090
- recMailing: pickBy(AddressTitle2.RECORDS_OFFICE, "Mailing"),
85091
- recDelivery: pickBy(AddressTitle2.RECORDS_OFFICE, "Delivery")
85092
- };
85093
- }
85094
- /** Street = street number + street name; the suite goes to Address Line 2. */
85095
- static toOfficeAddressDelta(address) {
85096
- const street = [getAddressComponent(address, "Street Number Only"), getAddressComponent(address, "Street Only")].filter(Boolean).join(" ") || getAddressComponent(address, "Street Address") || address.street || "";
85097
- return {
85098
- addressLine1: street,
85099
- addressLine2: getAddressComponent(address, "Suite/Apartment") || address.address2 || "",
85100
- city: address.city ?? "",
85101
- postalCode: address.postal_zip ?? "",
85102
- province: BC_DEFAULT_PROVINCE_STATE,
85103
- country: BC_DEFAULT_COUNTRY
85104
- };
85105
- }
85106
- /** An address with no province is accepted; the form only ever deals in British Columbia. */
85107
- static isBritishColumbia(address) {
85108
- const province = (address.province_state ?? "").trim().toLowerCase();
85109
- return !province || ["bc", "b.c.", "british columbia"].includes(province);
85110
- }
85111
- static isSameOfficeAddress(a, b) {
85112
- const key = (x) => [x?.addressLine1, x?.addressLine2, x?.city, x?.postalCode].map((v) => (v ?? "").trim().toLowerCase().replace(/\s+/g, " ")).join("|");
85113
- return key(a) === key(b);
85114
- }
85115
- /**
85116
- * The company's email: the entity's email options, then the Registered Office's email, then the
85117
- * entity's own, then any other address of the entity (e.g. a Head Office). Only a Business Email
85118
- * or an Email counts; a Personal Email never does.
85119
- */
85120
- static resolveCompanyEmail(task) {
85121
- const affiliations = task.entity.affiliations ?? [];
85122
- const registeredOffice = BritishColumbiaFormationFormHelper.findSharedAddressAffiliation(affiliations, AddressTitle2.REGISTERED_OFFICE);
85123
- return task.entity.emailOptions?.find(isCompanyEmail)?.value || registeredOffice?.addresses?.[0]?.communications?.find(isCompanyEmail)?.value || task.entity.communications?.find(isCompanyEmail)?.value || task.entity.addresses?.flatMap((a) => a.communications ?? []).find(isCompanyEmail)?.value || "";
85124
- }
85125
- /**
85126
- * Address Line 1*, Address Line 2, City*, Postal Code*, Province (BC), Country (Canada).
85127
- * Province and Country are always disabled; the rest follow `enabled`.
85128
- */
85129
- static createOfficeAddressFormGroup(delta, enabled = true) {
85130
- const group2 = new FormGroup({
85131
- [Controls.AddressLine1]: new FormControl(delta?.addressLine1 ?? "", Validators.required),
85132
- [Controls.AddressLine2]: new FormControl(delta?.addressLine2 ?? ""),
85133
- [Controls.City]: new FormControl(delta?.city ?? "", Validators.required),
85134
- [Controls.PostalCode]: new FormControl(delta?.postalCode ?? "", Validators.required),
85135
- [Controls.Province]: this.readOnly(delta?.province ?? BC_DEFAULT_PROVINCE_STATE),
85136
- [Controls.Country]: this.readOnly(delta?.country ?? BC_DEFAULT_COUNTRY)
85137
- });
85138
- this.setOfficeAddressEnabled(group2, enabled);
85139
- return group2;
85140
- }
85141
- /**
85142
- * Enables or disables the editable controls of an address grid (used by "Same as…" checkboxes).
85143
- * Hiding a grid also clears it. Showing it again refills it with the address Athennian sent for
85144
- * it, or leaves it empty when there is none (and when the user has already typed something).
85145
- */
85146
- static setOfficeAddressEnabled(group2, enabled) {
85147
- if (!group2) {
85148
- return;
85149
- }
85150
- const restore = incomingAddressByGrid.get(group2);
85151
- const isEmpty = EDITABLE_ADDRESS_CONTROLS.every((name) => !group2.get(name)?.value);
85152
- EDITABLE_ADDRESS_CONTROLS.forEach((name) => {
85153
- const control = group2.get(name);
85154
- if (enabled) {
85155
- control?.enable({ emitEvent: false });
85156
- if (restore && isEmpty) {
85157
- control?.setValue(restore[name] ?? "", { emitEvent: false });
85158
- }
85159
- } else {
85160
- control?.setValue("", { emitEvent: false });
85161
- control?.disable({ emitEvent: false });
85162
- }
85163
- });
85164
- group2.updateValueAndValidity({ emitEvent: false });
85165
- }
85166
- static generateReferenceNumbersFormGroup(deltaData, clientMatterNumber) {
85167
- return new FormGroup({
85168
- [Controls.ClientMatterNumber]: new FormControl(
85169
- // `??`: an explicitly cleared value ('') in a saved draft must be preserved; the entity default applies only when absent.
85170
- deltaData?.referenceNumber ?? clientMatterNumber ?? ""
85171
- ),
85172
- [Controls.DocketNumber]: new FormControl(deltaData?.docketNumber ?? "")
85173
- });
85174
- }
85175
- static readOnly(value) {
85176
- return new FormControl({ value: value ?? "", disabled: true });
85177
- }
85178
- };
85179
- }
85180
- });
85181
-
85182
- // src/app/helpers/mappers/british-columbia-change-of-office-addresses.mapper.ts
85183
- function formatPostalCode(value) {
85184
- const compact = clean(value).replace(/[\s-]+/g, "").toUpperCase();
85185
- return compact.length === 6 ? `${compact.slice(0, 3)} ${compact.slice(3)}` : clean(value).toUpperCase();
85186
- }
85187
- function toEcoreAddress(address) {
85188
- const line2 = clean(address?.addressLine2);
85189
- return __spreadProps(__spreadValues({
85190
- streetAddress: clean(address?.addressLine1)
85191
- }, line2 ? { additionalStreetAddress: line2 } : {}), {
85192
- city: clean(address?.city),
85193
- provinceOrState: BC_PROVINCE_CODE,
85194
- postalOrZipCode: formatPostalCode(address?.postalCode),
85195
- country: CANADA_COUNTRY_CODE
85196
- });
85197
- }
85198
- function isSameAddress(a, b) {
85199
- const key = (x) => [x.streetAddress, x.additionalStreetAddress, x.city, x.provinceOrState, x.postalOrZipCode, x.country].map((v) => (v ?? "").trim().toLowerCase().replace(/\s+/g, " ")).join("|");
85200
- return key(a) === key(b);
85201
- }
85202
- function buildBCChangeOfOfficeAddressesValidateRequest(task, deltaData) {
85203
- const registered = deltaData.registeredOffice;
85204
- const records = deltaData.recordsOffice;
85205
- const registeredMailing = toEcoreAddress(registered?.mailingAddress);
85206
- const registeredDelivery = registered?.deliverySameAsMailing ? registeredMailing : toEcoreAddress(registered?.deliveryAddress);
85207
- const recordsMailing = records?.sameAsRegisteredOffice ? registeredMailing : toEcoreAddress(records?.mailingAddress);
85208
- const recordsDelivery = records?.sameAsRegisteredOffice ? registeredDelivery : records?.deliverySameAsMailing ? recordsMailing : toEcoreAddress(records?.deliveryAddress);
85209
- const registeredDeliverySame = isSameAddress(registeredDelivery, registeredMailing);
85210
- const recordsSameAsRegistered = isSameAddress(recordsMailing, registeredMailing);
85211
- const recordsDeliverySame = isSameAddress(recordsDelivery, recordsMailing);
85212
- const filing = {
85213
- registeredOfficeMailingAddress: registeredMailing,
85214
- isRegisteredOfficeDeliveryAddressSameAsMailing: registeredDeliverySame,
85215
- isRecordsOfficeMailingAddressSameAsRegisteredOfficeMailing: recordsSameAsRegistered,
85216
- isRecordsOfficeDeliveryAddressSameAsRecordsOfficeMailing: recordsDeliverySame,
85217
- // Both are picked on the form; the fallbacks only cover data saved before they were added.
85218
- companyEmail: clean(deltaData.companyEmail) || BritishColumbiaChangeOfOfficeAddressesFormHelper.resolveCompanyEmail(task),
85219
- isAnnualReportReminderRequired: deltaData.annualReportReminder === BCAnnualReportReminder.Yes
85220
- };
85221
- const reference = clean(deltaData.referenceNumbers?.referenceNumber);
85222
- const docket = clean(deltaData.referenceNumbers?.docketNumber);
85223
- if (reference) {
85224
- filing.reference = reference;
85225
- }
85226
- if (docket) {
85227
- filing.docket = docket;
85228
- }
85229
- if (!registeredDeliverySame) {
85230
- filing.registeredOfficeDeliveryAddress = registeredDelivery;
85231
- }
85232
- if (!recordsSameAsRegistered) {
85233
- filing.recordsOfficeMailingAddress = recordsMailing;
85234
- }
85235
- if (!recordsDeliverySame) {
85236
- filing.recordsOfficeDeliveryAddress = recordsDelivery;
85237
- }
85238
- return { filingType: "changeOfAddressFiling", filing };
85239
- }
85240
- function getBritishColumbiaAccessCode(task, env) {
85241
- const registryId = task.entity._profile.registry_id?.trim() ?? "";
85242
- if (registryId) {
85243
- return registryId;
85244
- }
85245
- return env === "TEST" ? TEMP_UAT_TEST_ACCESS_CODE : "";
85246
- }
85247
- var TEMP_UAT_TEST_ACCESS_CODE, BC_PROVINCE_CODE, CANADA_COUNTRY_CODE, clean;
85248
- var init_british_columbia_change_of_office_addresses_mapper = __esm({
85249
- "src/app/helpers/mappers/british-columbia-change-of-office-addresses.mapper.ts"() {
85250
- init_BritishColumbiaConstants();
85251
- init_british_columbia_change_of_office_addresses_form_helper();
85252
- TEMP_UAT_TEST_ACCESS_CODE = "12345678";
85253
- BC_PROVINCE_CODE = "BC";
85254
- CANADA_COUNTRY_CODE = "CA";
85255
- clean = (value) => (value ?? "").trim();
85256
- }
85257
- });
85258
-
85259
- // src/app/helpers/mappers/british-columbia-annual-report.mapper.ts
85260
- function toBCOfficerPosition(title) {
85261
- return OFFICER_POSITIONS.get((title ?? "").trim().toLowerCase()) ?? "otherOffices";
85262
- }
85263
- function getBCAnnualReportOfficerChanges(task) {
85264
- const isOfficer = (a) => isPrincipalAffiliation2(a) && a.role?.role_name === OFFICER_ROLE_NAME && a._participant?.participant_type === "person";
85265
- return {
85266
- added: (task.incomingAffiliations ?? []).filter(isOfficer),
85267
- ceased: (task.outgoingAffiliations ?? []).filter(isOfficer)
85268
- };
85269
- }
85270
- function buildBCAnnualReportContext(task, env) {
85271
- return {
85272
- corporationNumber: task.entity._profile.corp_number ?? "",
85273
- accessCodeOrPassword: getBritishColumbiaAccessCode(task, env),
85274
- incorporationDate: String(task.entity._compliance?.incorporation_date ?? "").slice(0, 10),
85275
- filingType: "annualReportFiling"
85276
- };
85277
- }
85278
- function buildBCAnnualReportValidateRequest(task, deltaData) {
85279
- const { added, ceased } = getBCAnnualReportOfficerChanges(task);
85280
- return pruneUndefined({
85281
- filingType: "annualReportFiling",
85282
- filing: {
85283
- reference: deltaData.referenceNumbers?.referenceNumber || void 0,
85284
- docket: deltaData.referenceNumbers?.docketNumber || void 0,
85285
- addOfficers: added.map(mapAddedOfficer),
85286
- ceaseOfficers: ceased.map(mapCeasedOfficer),
85287
- // Athennian does not populate edits (UEM-235 mapping: `editOfficers: []`).
85288
- editOfficers: [],
85289
- companyEmail: deltaData.companyEmail?.trim() ?? "",
85290
- isAnnualReportReminderRequired: Boolean(deltaData.isAnnualReportReminderRequired)
85291
- }
85292
- });
85293
- }
85294
- function officerAddresses(affiliation) {
85295
- const addresses = affiliation.addresses?.length ? affiliation.addresses : affiliation.parent_affiliation?.addresses ?? [];
85296
- const delivery = pickAddress(addresses, "Delivery");
85297
- return {
85298
- // Falls back to the first address when none is typed "Mailing", like the other BC filings.
85299
- mailing: mapAddress(pickAddress(addresses, "Mailing", true)),
85300
- delivery: delivery ? mapAddress(delivery) : void 0
85301
- };
85302
- }
85303
- function officerName(affiliation) {
85304
- const profile = affiliation.participant?._profile;
85305
- return {
85306
- firstName: profile?.firstName ?? "",
85307
- middleName: profile?.middleName || void 0,
85308
- lastName: profile?.lastName ?? ""
85309
- };
85310
- }
85311
- function mapAddedOfficer(affiliation) {
85312
- const { mailing, delivery } = officerAddresses(affiliation);
85313
- const isSame = !delivery || sameAddress(delivery, mailing);
85314
- return __spreadProps(__spreadValues({}, officerName(affiliation)), {
85315
- positions: toBCOfficerPosition(affiliation.role?.static_title),
85316
- mailingAddress: mailing,
85317
- isDeliveryAddressSameAsMailing: isSame,
85318
- deliveryAddress: isSame ? void 0 : delivery
85319
- });
85320
- }
85321
- function mapCeasedOfficer(affiliation) {
85322
- const { mailing, delivery } = officerAddresses(affiliation);
85323
- return __spreadProps(__spreadValues({}, officerName(affiliation)), {
85324
- mailingAddress: mailing,
85325
- // The API requires a delivery address to cease an officer; send the mailing address again.
85326
- deliveryAddress: delivery ?? mailing
85327
- });
85328
- }
85329
- var OFFICER_ROLE_NAME, OFFICER_POSITIONS;
85330
- var init_british_columbia_annual_report_mapper = __esm({
85331
- "src/app/helpers/mappers/british-columbia-annual-report.mapper.ts"() {
85332
- init_common_utils();
85333
- init_british_columbia_change_of_office_addresses_mapper();
85334
- init_british_columbia_formation_mapper();
85335
- OFFICER_ROLE_NAME = "Officer";
85336
- OFFICER_POSITIONS = /* @__PURE__ */ new Map([
85337
- ["chairman", "chair"],
85338
- ["chair", "chair"],
85339
- ["chair person", "chair"],
85340
- ["chairwoman", "chair"],
85341
- ["president", "president"],
85342
- ["vice-president", "vicePresident"],
85343
- ["chief executive officer", "ceo"],
85344
- ["chief financial officer", "cfo"],
85345
- ["assistant secretary", "assistantSecretary"],
85346
- ["secretary", "secretary"],
85347
- ["treasurer", "treasurer"]
85348
- ]);
85349
- }
85350
- });
85351
-
85352
- // src/app/helpers/british-columbia/annual-report/british-columbia-annual-report-form.helper.ts
85353
- var BritishColumbiaAnnualReportFormHelper;
85354
- var init_british_columbia_annual_report_form_helper = __esm({
85355
- "src/app/helpers/british-columbia/annual-report/british-columbia-annual-report-form.helper.ts"() {
85356
- init_forms();
85357
- init_british_columbia_form_enums();
85358
- init_initial_return_enums();
85359
- init_BritishColumbiaConstants();
85360
- init_common_utils();
85361
- init_british_columbia_annual_report_mapper();
85362
- init_british_columbia_formation_mapper();
85363
- init_british_columbia_formation_form_helper();
85364
- BritishColumbiaAnnualReportFormHelper = class {
85365
- static generateConfig(task) {
85366
- const delta = task.deltaData;
85367
- const { added, ceased } = getBCAnnualReportOfficerChanges(task);
85368
- const config2 = {};
85369
- config2[BCAnnualReportFormGroups.General] = new FormGroup({
85370
- [BCAnnualReportFormControls.ClientMatterNumber]: new FormControl(delta?.referenceNumbers?.referenceNumber ?? task.entity._profile.client_matter_number ?? ""),
85371
- [BCAnnualReportFormControls.DocketNumber]: new FormControl(delta?.referenceNumbers?.docketNumber ?? ""),
85372
- [BCAnnualReportFormControls.EntityIdentifier]: new FormControl({
85373
- value: task.entity._profile.corp_number ?? "",
85374
- disabled: true
85375
- })
85376
- });
85377
- config2[BCAnnualReportFormGroups.Officers] = new FormArray([
85378
- ...added.map((officer) => this.generateOfficerFormGroup(officer, IRAffiliationType.Add)),
85379
- ...ceased.map((officer) => this.generateOfficerFormGroup(officer, IRAffiliationType.Ceased))
85380
- ]);
85381
- const emailOptions = this.getCompanyEmailOptions(task);
85382
- config2[BCAnnualReportFormGroups.CompanyEmail] = new FormGroup({
85383
- // A saved choice wins; otherwise a lone entity email is preselected, else the user picks one.
85384
- [BCAnnualReportFormControls.CompanyEmail]: new FormControl(delta?.companyEmail ?? (emailOptions.length === 1 ? emailOptions[0].value : ""), [Validators.required, Validators.email, Validators.maxLength(BC_COMPANY_EMAIL_MAX_LENGTH)])
85385
- });
85386
- config2[BCAnnualReportFormGroups.AnnualReportReminder] = new FormGroup({
85387
- [BCAnnualReportFormControls.IsAnnualReportReminderRequired]: new FormControl(delta?.isAnnualReportReminderRequired ?? false)
85388
- });
85389
- return config2;
85390
- }
85391
- /** The entity's own emails (built by Athennian), plus a previously saved value that is no longer among them. */
85392
- static getCompanyEmailOptions(task) {
85393
- const options = (task.entity.emailOptions ?? []).filter((option) => option.value).map((option) => ({ value: option.value, label: option.value }));
85394
- const saved = task.deltaData?.companyEmail;
85395
- if (saved && !options.some((option) => option.value === saved)) {
85396
- options.push({ value: saved, label: saved });
85397
- }
85398
- return options.filter((option, index) => options.findIndex((other) => other.value === option.value) === index);
85399
- }
85400
- /** One read-only officer row; `AffiliationType` drives the Add / Cease chip. */
85401
- static generateOfficerFormGroup(affiliation, affiliationType) {
85402
- const addresses = affiliation.addresses?.length ? affiliation.addresses : affiliation.parent_affiliation?.addresses ?? [];
85403
- return new FormGroup({
85404
- [BCAnnualReportFormControls.Id]: new FormControl(affiliation._id),
85405
- [BCAnnualReportFormControls.AffiliationName]: new FormControl({
85406
- value: generateTaskAffiliationFullName(affiliation),
85407
- disabled: true
85408
- }),
85409
- [BCAnnualReportFormControls.Role]: new FormControl({
85410
- value: affiliation.role?.static_title ?? "",
85411
- disabled: true
85412
- }),
85413
- [BCAnnualReportFormControls.AffiliationType]: new FormControl(affiliationType),
85414
- [BCAnnualReportFormControls.EffectiveDate]: new FormControl({
85415
- value: affiliation.start_date ? toYyyyMmDd(affiliation.start_date) ?? "" : "",
85416
- disabled: true
85417
- }),
85418
- [BCAnnualReportFormControls.CeaseDate]: new FormControl({
85419
- value: affiliation.end_date ? toYyyyMmDd(affiliation.end_date) ?? "" : "",
85420
- disabled: true
85421
- }),
85422
- [BCAnnualReportFormControls.FullAddress]: new FormControl({
85423
- value: BritishColumbiaFormationFormHelper.formatFullAddress(pickAddress(addresses, "Mailing", true)),
85424
- disabled: true
85425
- })
85426
- });
85427
- }
85428
- };
85429
- }
85430
- });
85431
-
85432
84908
  // src/app/helpers/british-columbia/change-of-directors/british-columbia-change-of-directors-form.helper.ts
85433
- var Controls2, BritishColumbiaChangeOfDirectorsFormHelper;
84909
+ var Controls, BritishColumbiaChangeOfDirectorsFormHelper;
85434
84910
  var init_british_columbia_change_of_directors_form_helper = __esm({
85435
84911
  "src/app/helpers/british-columbia/change-of-directors/british-columbia-change-of-directors-form.helper.ts"() {
85436
84912
  init_forms();
@@ -85441,7 +84917,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
85441
84917
  init_BritishColumbiaConstants();
85442
84918
  init_custom_validators();
85443
84919
  init_british_columbia_formation_form_helper();
85444
- Controls2 = BCChangeOfDirectorsFormControls;
84920
+ Controls = BCChangeOfDirectorsFormControls;
85445
84921
  BritishColumbiaChangeOfDirectorsFormHelper = class {
85446
84922
  static generateConfig(task, _translateFn, currentDataExtract) {
85447
84923
  const affiliations = task.entity.affiliations ?? [];
@@ -85456,9 +84932,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
85456
84932
  const config2 = {};
85457
84933
  config2[BCChangeOfDirectorsFormGroups.ReferenceNumbers] = this.generateReferenceNumbersFormGroup(delta?.referenceNumbers, task.entity._profile?.client_matter_number, delta?.referenceNumbers?.referenceNumber);
85458
84934
  config2[BCChangeOfDirectorsFormGroups.CorporationDetails] = new FormGroup({
85459
- [Controls2.CorporationName]: this.readOnly(task.entity._profile.name),
85460
- [Controls2.IncorporationNumber]: this.readOnly(task.entity._profile.corp_number),
85461
- [Controls2.CompanyEmail]: new FormControl(companyEmail, [Validators.required, Validators.email])
84935
+ [Controls.CorporationName]: this.readOnly(task.entity._profile.name),
84936
+ [Controls.IncorporationNumber]: this.readOnly(task.entity._profile.corp_number),
84937
+ [Controls.CompanyEmail]: new FormControl(companyEmail, [Validators.required, Validators.email])
85462
84938
  });
85463
84939
  const isDirector = (a) => isPrincipalAffiliation2(a) && a.role?.role_name === "Director";
85464
84940
  const incoming = task.incomingAffiliations ?? [];
@@ -85466,13 +84942,12 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
85466
84942
  const ceasedIds = new Set(outgoing.filter(isDirector).map((a) => a._id));
85467
84943
  const hasAddOrCease = ceasedIds.size > 0 || incoming.filter(isDirector).length > 0;
85468
84944
  config2[BCChangeOfDirectorsFormGroups.FilingDetails] = new FormGroup({
85469
- [Controls2.DirectorsAddedOrDeleted]: new FormControl(delta?.filingDetails?.directorsAddedOrDeleted ?? hasAddOrCease),
85470
- [Controls2.ChangeDate]: this.readOnly(effectiveDate),
85471
- [Controls2.FilingFee]: this.readOnly(BC_CHANGE_OF_DIRECTORS_FILING_FEE)
84945
+ [Controls.DirectorsAddedOrDeleted]: new FormControl(delta?.filingDetails?.directorsAddedOrDeleted ?? hasAddOrCease),
84946
+ [Controls.ChangeDate]: this.readOnly(effectiveDate),
84947
+ [Controls.FilingFee]: this.readOnly(BC_CHANGE_OF_DIRECTORS_FILING_FEE)
85472
84948
  });
85473
- const currentDirectorKeys = this.getCurrentDirectorKeys(currentDataExtract);
85474
84949
  const directors = [
85475
- ...incoming.filter(isDirector).map((a) => this.generateDirectorFormGroup(a, currentDirectorKeys.has(this.getDirectorKey(a)) ? IRAffiliationType.Update : IRAffiliationType.Add)),
84950
+ ...incoming.filter(isDirector).map((a) => this.generateDirectorFormGroup(a, IRAffiliationType.Add)),
85476
84951
  ...outgoing.filter(isDirector).map((a) => this.generateDirectorFormGroup(a, IRAffiliationType.Ceased))
85477
84952
  ];
85478
84953
  const fallbackDirectors = directors.length ? [] : this.generateDirectorFormGroupsFromChangeDirectors(task);
@@ -85480,13 +84955,13 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
85480
84955
  config2[BCChangeOfDirectorsFormGroups.Directors] = new FormArray(directors.length ? directors : fallbackDirectors);
85481
84956
  }
85482
84957
  config2[BCChangeOfDirectorsFormGroups.Notification] = new FormGroup({
85483
- [Controls2.RegisterAsOfDate]: this.readOnly(today),
85484
- [Controls2.NotificationMethod]: new FormControl(delta?.notification?.method ?? BCNotificationMethod.Email, Validators.required),
85485
- [Controls2.NotificationEmail]: new FormControl(delta?.notification?.email ?? companyEmail, requiredIfValue(Controls2.NotificationMethod, BCNotificationMethod.Email)),
85486
- [Controls2.NotificationMailingAddress]: this.readOnly(registeredMailing)
84958
+ [Controls.RegisterAsOfDate]: this.readOnly(today),
84959
+ [Controls.NotificationMethod]: new FormControl(delta?.notification?.method ?? BCNotificationMethod.Email, Validators.required),
84960
+ [Controls.NotificationEmail]: new FormControl(delta?.notification?.email ?? companyEmail, requiredIfValue(Controls.NotificationMethod, BCNotificationMethod.Email)),
84961
+ [Controls.NotificationMailingAddress]: this.readOnly(registeredMailing)
85487
84962
  });
85488
84963
  config2[BCChangeOfDirectorsFormGroups.AnnualReportReminder] = new FormGroup({
85489
- [Controls2.AnnualReportReminder]: new FormControl(delta?.annualReportReminder ?? BCAnnualReportReminder.Yes, Validators.required)
84964
+ [Controls.AnnualReportReminder]: new FormControl(delta?.annualReportReminder ?? BCAnnualReportReminder.Yes, Validators.required)
85490
84965
  });
85491
84966
  return config2;
85492
84967
  }
@@ -85531,18 +85006,18 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
85531
85006
  }
85532
85007
  static generateReferenceNumbersFormGroup(deltaData, clientMatterNumber, savedClientMatterNumber) {
85533
85008
  return new FormGroup({
85534
- [Controls2.ClientMatterNumber]: new FormControl(clientMatterNumber ?? savedClientMatterNumber ?? ""),
85535
- [Controls2.DocketNumber]: new FormControl(deltaData?.docketNumber ?? "")
85009
+ [Controls.ClientMatterNumber]: new FormControl(clientMatterNumber ?? savedClientMatterNumber ?? ""),
85010
+ [Controls.DocketNumber]: new FormControl(deltaData?.docketNumber ?? "")
85536
85011
  });
85537
85012
  }
85538
85013
  static generateDirectorFormGroup(affiliation, affiliationType) {
85539
85014
  const addresses = affiliation.addresses?.length ? affiliation.addresses : affiliation.parent_affiliation?.addresses ?? [];
85540
85015
  return new FormGroup({
85541
- [Controls2.Id]: new FormControl(affiliation._id),
85542
- [Controls2.AffiliationName]: this.readOnly(generateTaskAffiliationFullName(affiliation)),
85543
- [Controls2.AffiliationType]: this.readOnly(affiliationType),
85544
- [Controls2.MailingAddress]: this.readOnly(BritishColumbiaFormationFormHelper.formatFullAddress(BritishColumbiaFormationFormHelper.pickAddress(addresses, "Mailing"))),
85545
- [Controls2.DeliveryAddress]: this.readOnly(BritishColumbiaFormationFormHelper.formatFullAddress(BritishColumbiaFormationFormHelper.pickAddress(addresses, "Delivery")))
85016
+ [Controls.Id]: new FormControl(affiliation._id),
85017
+ [Controls.AffiliationName]: this.readOnly(generateTaskAffiliationFullName(affiliation)),
85018
+ [Controls.AffiliationType]: this.readOnly(affiliationType),
85019
+ [Controls.MailingAddress]: this.readOnly(BritishColumbiaFormationFormHelper.formatFullAddress(BritishColumbiaFormationFormHelper.pickAddress(addresses, "Mailing"))),
85020
+ [Controls.DeliveryAddress]: this.readOnly(BritishColumbiaFormationFormHelper.formatFullAddress(BritishColumbiaFormationFormHelper.pickAddress(addresses, "Delivery")))
85546
85021
  });
85547
85022
  }
85548
85023
  static generateDirectorFormGroupsFromChangeDirectors(task) {
@@ -85573,11 +85048,11 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
85573
85048
  static generateDirectorFormGroupFromPayload(director, affiliationType) {
85574
85049
  const name = director?.PersonName ?? director?.personName ?? director;
85575
85050
  return new FormGroup({
85576
- [Controls2.Id]: new FormControl(director?.Id ?? director?.id ?? ""),
85577
- [Controls2.AffiliationName]: this.readOnly(this.formatDirectorName(name?.FirstName ?? name?.firstName, name?.MiddleName ?? name?.middleName, name?.LastName ?? name?.lastName)),
85578
- [Controls2.AffiliationType]: this.readOnly(affiliationType),
85579
- [Controls2.MailingAddress]: this.readOnly(this.formatPayloadAddress(director?.mailingAddress ?? director?.MailingAddress ?? director)),
85580
- [Controls2.DeliveryAddress]: this.readOnly(this.formatPayloadAddress(director?.deliveryAddress ?? director?.DeliveryAddress ?? director))
85051
+ [Controls.Id]: new FormControl(director?.Id ?? director?.id ?? ""),
85052
+ [Controls.AffiliationName]: this.readOnly(this.formatDirectorName(name?.FirstName ?? name?.firstName, name?.MiddleName ?? name?.middleName, name?.LastName ?? name?.lastName)),
85053
+ [Controls.AffiliationType]: this.readOnly(affiliationType),
85054
+ [Controls.MailingAddress]: this.readOnly(this.formatPayloadAddress(director?.mailingAddress ?? director?.MailingAddress ?? director)),
85055
+ [Controls.DeliveryAddress]: this.readOnly(this.formatPayloadAddress(director?.deliveryAddress ?? director?.DeliveryAddress ?? director))
85581
85056
  });
85582
85057
  }
85583
85058
  static formatDirectorName(firstName, middleName, lastName) {
@@ -85606,891 +85081,241 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
85606
85081
  }
85607
85082
  });
85608
85083
 
85609
- // src/app/constants/ui/british-columbia-formation-form.constants.ts
85610
- var BC_NAME_TYPE_OPTIONS, labelledValue, isNamed, BC_FORMATION_DELTA_CARD_FORM_REFERENCE_NUMBERS_FIELDS, BC_FORMATION_DELTA_CARD_FORM_CORPORATION_DETAILS_FIELDS, BC_FORMATION_DELTA_CARD_FORM_NAME_TRANSLATION_FIELDS, BC_FORMATION_DELTA_CARD_FORM_NAME_TRANSLATION_ROW_FIELDS, BC_FORMATION_CARD_FORM_REGISTERED_OFFICE_FIELDS, BC_FORMATION_CARD_FORM_RECORDS_OFFICE_FIELDS, BC_FORMATION_DELTA_CARD_FORM_COMPLETING_PARTY_FIELDS, BC_FORMATION_CARD_FORM_DIRECTORS_FIELDS, BC_FORMATION_CARD_FORM_INCORPORATORS_FIELDS;
85611
- var init_british_columbia_formation_form_constants = __esm({
85612
- "src/app/constants/ui/british-columbia-formation-form.constants.ts"() {
85613
- init_form_enums();
85084
+ // src/app/helpers/british-columbia/change-of-office-addresses/british-columbia-change-of-office-addresses-form.helper.ts
85085
+ var Controls2, COMPANY_EMAIL_TYPES, isCompanyEmail, incomingAddressByGrid, EDITABLE_ADDRESS_CONTROLS, BritishColumbiaChangeOfOfficeAddressesFormHelper;
85086
+ var init_british_columbia_change_of_office_addresses_form_helper = __esm({
85087
+ "src/app/helpers/british-columbia/change-of-office-addresses/british-columbia-change-of-office-addresses-form.helper.ts"() {
85088
+ init_forms();
85089
+ init_common_models();
85614
85090
  init_british_columbia_form_enums();
85615
85091
  init_BritishColumbiaConstants();
85616
85092
  init_british_columbia_formation_form_helper();
85617
- BC_NAME_TYPE_OPTIONS = Object.values(BCNameType).filter((v) => typeof v === "number").map((v) => ({ label: BCNameTypeLabel[v], value: v }));
85618
- labelledValue = (label, value, t) => `<span class="body-1-semibold">${t(label)}:</span> ${value || t("None")}`;
85619
- isNamed = (form) => form.get(BCFormationFormControls.CorporationNameType)?.value === BCNameType.Named;
85620
- BC_FORMATION_DELTA_CARD_FORM_REFERENCE_NUMBERS_FIELDS = [
85621
- {
85622
- type: FormType.Input,
85623
- label: "Client/Matter Number",
85624
- formControlName: BCFormationFormControls.ClientMatterNumber
85625
- },
85626
- {
85627
- type: FormType.Input,
85628
- label: "Docket Number",
85629
- formControlName: BCFormationFormControls.DocketNumber
85630
- }
85631
- ];
85632
- BC_FORMATION_DELTA_CARD_FORM_CORPORATION_DETAILS_FIELDS = [
85633
- {
85634
- type: FormType.Select,
85635
- label: "Corporation Name Type",
85636
- formControlName: BCFormationFormControls.CorporationNameType,
85637
- required: true,
85638
- options: BC_NAME_TYPE_OPTIONS,
85639
- needTranslate: true,
85640
- onChange: (form) => {
85641
- form.get(BCFormationFormControls.CompanyName)?.updateValueAndValidity({ emitEvent: false });
85642
- form.get(BCFormationFormControls.NameReservationNumber)?.updateValueAndValidity({ emitEvent: false });
85643
- }
85644
- },
85645
- {
85646
- type: FormType.Text,
85647
- formControlName: "",
85648
- class: "span-6 beside-select",
85649
- // Numbered only: a Named company shows no preview of the typed name.
85650
- isVisible: (form) => !isNamed(form),
85651
- dynamicLabel: () => BC_NUMBERED_NAME_PREVIEW
85652
- },
85653
- {
85654
- type: FormType.Input,
85655
- label: "Proposed Corporate Name",
85656
- formControlName: BCFormationFormControls.CompanyName,
85657
- required: true,
85658
- isVisible: isNamed,
85659
- class: "column-3"
85660
- },
85661
- {
85662
- type: FormType.Input,
85663
- label: "Name Reservation #",
85664
- formControlName: BCFormationFormControls.NameReservationNumber,
85665
- required: true,
85666
- maxLength: 9,
85667
- errorMessage: "Enter a valid Name Reservation number (for example NR1234567)",
85668
- showRequiredMessage: true,
85669
- isVisible: isNamed,
85670
- class: "span-6"
85671
- },
85672
- {
85673
- type: FormType.Text,
85674
- formControlName: BCFormationFormControls.RequestedDateForIncorporation,
85675
- class: "span-12 spaced-text",
85676
- dynamicLabel: (form, t) => labelledValue("Requested Date for Incorporation", form.get(BCFormationFormControls.RequestedDateForIncorporation)?.value, t)
85677
- },
85678
- {
85679
- type: FormType.Text,
85680
- formControlName: BCFormationFormControls.IsFutureEffectiveDate,
85681
- class: "span-12 fee-warning",
85682
- isVisible: (form) => Boolean(form.get(BCFormationFormControls.IsFutureEffectiveDate)?.value),
85683
- dynamicLabel: (_, t) => t("There is an additional fee of {{fee}} for an effective date in the future.").replace("{{fee}}", BC_FUTURE_EFFECTIVE_DATE_FEE)
85684
- },
85685
- {
85686
- // Options are filled per task from `task.entity.emailOptions` by the incorporation form.
85687
- type: FormType.Select,
85688
- label: "Company Email",
85689
- formControlName: BCFormationFormControls.CompanyEmail,
85690
- required: true,
85691
- options: [],
85692
- class: "span-6"
85693
- }
85694
- // The company password is not shown: it is taken from the entity's registry ID.
85695
- ];
85696
- BC_FORMATION_DELTA_CARD_FORM_NAME_TRANSLATION_FIELDS = [
85697
- {
85698
- type: FormType.Checkbox,
85699
- label: "This company uses one or more translations of its name outside of Canada.",
85700
- formControlName: BCFormationFormControls.UsesNameTranslation,
85701
- class: "span-12",
85702
- onChange: (form) => {
85703
- const rows = form.get(BCFormationFormControls.NameTranslations);
85704
- const enabled = Boolean(form.get(BCFormationFormControls.UsesNameTranslation)?.value);
85705
- if (!rows) {
85706
- return;
85707
- }
85708
- if (enabled && rows.length === 0) {
85709
- rows.push(BritishColumbiaFormationFormHelper.createNameTranslationFormGroup());
85710
- }
85711
- if (!enabled) {
85712
- rows.clear();
85713
- }
85714
- }
85715
- },
85716
- {
85717
- type: FormType.Text,
85718
- formControlName: "",
85719
- class: "span-12",
85720
- isVisible: (form) => Boolean(form.get(BCFormationFormControls.UsesNameTranslation)?.value),
85721
- dynamicLabel: (_, t) => `<span class="body-1-semibold">${t("Note")}:</span> ${t("Name translations must use the Latin Alphabet (English, French, etc.). Names that use other writing systems must spell the name phonetically in English or French.")}`
85722
- }
85723
- ];
85724
- BC_FORMATION_DELTA_CARD_FORM_NAME_TRANSLATION_ROW_FIELDS = [
85725
- {
85726
- type: FormType.Input,
85727
- label: "Name Translation",
85728
- formControlName: BCFormationFormControls.NameTranslation,
85729
- required: true,
85730
- class: "span-6"
85731
- }
85093
+ init_BritishColumbiaConstants();
85094
+ init_common_utils();
85095
+ Controls2 = BCChangeOfOfficeAddressesFormControls;
85096
+ COMPANY_EMAIL_TYPES = ["Business Email", "Email"];
85097
+ isCompanyEmail = (communication) => Boolean(communication?.value) && COMPANY_EMAIL_TYPES.includes(communication?.type ?? "");
85098
+ incomingAddressByGrid = /* @__PURE__ */ new WeakMap();
85099
+ EDITABLE_ADDRESS_CONTROLS = [
85100
+ Controls2.AddressLine1,
85101
+ Controls2.AddressLine2,
85102
+ Controls2.City,
85103
+ Controls2.PostalCode
85732
85104
  ];
85733
- BC_FORMATION_CARD_FORM_REGISTERED_OFFICE_FIELDS = [
85734
- {
85735
- type: FormType.Text,
85736
- formControlName: BCFormationFormControls.MailingAddress,
85737
- class: "span-12",
85738
- dynamicLabel: (form, t) => labelledValue("Mailing Address - Full Address", form.get(BCFormationFormControls.MailingAddress)?.value, t)
85739
- },
85740
- {
85741
- type: FormType.Text,
85742
- formControlName: BCFormationFormControls.DeliveryAddress,
85743
- class: "span-12",
85744
- dynamicLabel: (form, t) => labelledValue("Delivery Address - Full Address", form.get(BCFormationFormControls.DeliveryAddress)?.value, t)
85105
+ BritishColumbiaChangeOfOfficeAddressesFormHelper = class {
85106
+ static generateConfig(task, _translateFn) {
85107
+ const affiliations = task.entity.affiliations ?? [];
85108
+ const delta = task.deltaData;
85109
+ const format = BritishColumbiaFormationFormHelper.formatFullAddress;
85110
+ const pick = BritishColumbiaFormationFormHelper.pickAddress;
85111
+ const registeredOffice = BritishColumbiaFormationFormHelper.findSharedAddressAffiliation(affiliations, AddressTitle2.REGISTERED_OFFICE);
85112
+ const recordsOffice = BritishColumbiaFormationFormHelper.findSharedAddressAffiliation(affiliations, AddressTitle2.RECORDS_OFFICE);
85113
+ const incoming = this.incomingOfficeAddresses(task);
85114
+ const seed = delta?.registeredOffice ? this.fillEmptyAddresses(delta, incoming) : this.seedFromIncomingAffiliations(task);
85115
+ const config2 = {};
85116
+ config2[BCChangeOfOfficeAddressesFormGroups.ReferenceNumbers] = this.generateReferenceNumbersFormGroup(delta?.referenceNumbers, task.entity._profile.client_matter_number);
85117
+ config2[BCChangeOfOfficeAddressesFormGroups.CorporationDetails] = new FormGroup({
85118
+ [Controls2.CorporationName]: this.readOnly(task.entity._profile.name),
85119
+ [Controls2.IncorporationNumber]: this.readOnly(task.entity._profile.corp_number),
85120
+ [Controls2.CompanyEmail]: new FormControl(delta?.companyEmail || this.resolveCompanyEmail(task), Validators.required)
85121
+ });
85122
+ config2[BCChangeOfOfficeAddressesFormGroups.AnnualReportReminder] = new FormGroup({
85123
+ [Controls2.AnnualReportReminder]: new FormControl(delta?.annualReportReminder ?? BCAnnualReportReminder.Yes, Validators.required)
85124
+ });
85125
+ const regDeliverySame = seed.registeredOffice?.deliverySameAsMailing ?? true;
85126
+ config2[BCChangeOfOfficeAddressesFormGroups.RegisteredOfficeAddress] = new FormGroup({
85127
+ [Controls2.CurrentMailingAddress]: this.readOnly(format(pick(registeredOffice?.addresses, "Mailing"))),
85128
+ [Controls2.CurrentDeliveryAddress]: this.readOnly(format(pick(registeredOffice?.addresses, "Delivery"))),
85129
+ [Controls2.NewMailingAddress]: this.createOfficeAddressFormGroup(seed.registeredOffice?.mailingAddress, true),
85130
+ [Controls2.DeliverySameAsMailing]: new FormControl(regDeliverySame),
85131
+ [Controls2.NewDeliveryAddress]: this.createOfficeAddressFormGroup(seed.registeredOffice?.deliveryAddress, !regDeliverySame)
85132
+ });
85133
+ const recSameAsRegistered = seed.recordsOffice?.sameAsRegisteredOffice ?? true;
85134
+ const recDeliverySame = seed.recordsOffice?.deliverySameAsMailing ?? true;
85135
+ config2[BCChangeOfOfficeAddressesFormGroups.RecordsOfficeAddress] = new FormGroup({
85136
+ [Controls2.CurrentMailingAddress]: this.readOnly(format(pick(recordsOffice?.addresses, "Mailing"))),
85137
+ [Controls2.CurrentDeliveryAddress]: this.readOnly(format(pick(recordsOffice?.addresses, "Delivery"))),
85138
+ [Controls2.SameAsRegisteredOffice]: new FormControl(recSameAsRegistered),
85139
+ [Controls2.NewMailingAddress]: this.createOfficeAddressFormGroup(seed.recordsOffice?.mailingAddress, !recSameAsRegistered),
85140
+ [Controls2.DeliverySameAsMailing]: new FormControl(recDeliverySame),
85141
+ [Controls2.NewDeliveryAddress]: this.createOfficeAddressFormGroup(seed.recordsOffice?.deliveryAddress, !recSameAsRegistered && !recDeliverySame)
85142
+ });
85143
+ const grid = (group2, control) => config2[group2].get(control);
85144
+ const register = (target, address) => address && incomingAddressByGrid.set(target, address);
85145
+ register(grid(BCChangeOfOfficeAddressesFormGroups.RegisteredOfficeAddress, Controls2.NewDeliveryAddress), incoming.regDelivery);
85146
+ register(grid(BCChangeOfOfficeAddressesFormGroups.RecordsOfficeAddress, Controls2.NewMailingAddress), incoming.recMailing);
85147
+ register(grid(BCChangeOfOfficeAddressesFormGroups.RecordsOfficeAddress, Controls2.NewDeliveryAddress), incoming.recDelivery);
85148
+ return config2;
85745
85149
  }
85746
- ];
85747
- BC_FORMATION_CARD_FORM_RECORDS_OFFICE_FIELDS = [
85748
- {
85749
- type: FormType.Text,
85750
- formControlName: BCFormationFormControls.RecordsOfficeMailingAddress,
85751
- class: "span-12",
85752
- dynamicLabel: (form, t) => labelledValue("Mailing Address - Full Address", form.get(BCFormationFormControls.RecordsOfficeMailingAddress)?.value, t)
85753
- },
85754
- {
85755
- type: FormType.Text,
85756
- formControlName: BCFormationFormControls.RecordsOfficeDeliveryAddress,
85757
- class: "span-12",
85758
- dynamicLabel: (form, t) => labelledValue("Delivery Address - Full Address", form.get(BCFormationFormControls.RecordsOfficeDeliveryAddress)?.value, t)
85150
+ /** The company email choices: the entity's email options, plus the resolved default if it isn't one. */
85151
+ static getCompanyEmailOptions(task) {
85152
+ const values = (task.entity.emailOptions ?? []).filter(isCompanyEmail).map((o) => o.value);
85153
+ const fallback = this.resolveCompanyEmail(task);
85154
+ return [...new Set(fallback ? [...values, fallback] : values)].map((value) => ({
85155
+ value,
85156
+ label: value
85157
+ }));
85759
85158
  }
85760
- ];
85761
- BC_FORMATION_DELTA_CARD_FORM_COMPLETING_PARTY_FIELDS = [
85762
- {
85763
- type: FormType.Input,
85764
- label: "First Name",
85765
- formControlName: BCFormationFormControls.CompletingPartyFirstName,
85766
- required: true,
85767
- class: "column-3"
85768
- },
85769
- {
85770
- type: FormType.Input,
85771
- label: "Middle Name",
85772
- formControlName: BCFormationFormControls.CompletingPartyMiddleName,
85773
- class: "column-3"
85774
- },
85775
- {
85776
- type: FormType.Input,
85777
- label: "Last Name",
85778
- formControlName: BCFormationFormControls.CompletingPartyLastName,
85779
- required: true,
85780
- class: "column-3"
85781
- },
85782
- {
85783
- type: FormType.Input,
85784
- inputType: "email",
85785
- label: "Email",
85786
- formControlName: BCFormationFormControls.CompletingPartyEmail,
85787
- required: true,
85788
- errorMessage: "Enter a valid email address",
85789
- showRequiredMessage: true,
85790
- class: "column-3"
85791
- },
85792
- {
85793
- type: FormType.Text,
85794
- formControlName: "",
85795
- class: "span-12",
85796
- dynamicLabel: (_, t) => t("A copy of the filed Incorporation Application is emailed to this address.")
85797
- },
85798
- {
85799
- type: FormType.Input,
85800
- label: "Street Address",
85801
- formControlName: BCFormationFormControls.AddressLine1,
85802
- required: true,
85803
- class: "column-3"
85804
- },
85805
- {
85806
- type: FormType.Input,
85807
- label: "Additional Street Address",
85808
- formControlName: BCFormationFormControls.AddressLine2,
85809
- class: "column-3"
85810
- },
85811
- {
85812
- type: FormType.Input,
85813
- label: "City",
85814
- formControlName: BCFormationFormControls.City,
85815
- required: true,
85816
- class: "column-2"
85817
- },
85818
- {
85819
- type: FormType.Input,
85820
- label: "Province / State",
85821
- formControlName: BCFormationFormControls.ProvinceState,
85822
- required: true,
85823
- class: "column-2"
85824
- },
85825
- {
85826
- type: FormType.Input,
85827
- label: "Postal / Zip Code",
85828
- formControlName: BCFormationFormControls.PostalZip,
85829
- required: true,
85830
- errorMessage: "Enter a valid Canadian postal code (for example V8W 1X4)",
85831
- showRequiredMessage: true,
85832
- class: "column-2"
85833
- },
85834
- {
85835
- type: FormType.Select,
85836
- label: "Country",
85837
- formControlName: BCFormationFormControls.Country,
85838
- required: true,
85839
- options: BC_COMPLETING_PARTY_COUNTRY_OPTIONS,
85840
- class: "span-4",
85841
- // Province / State is required for Canada and the US, and the postal code format is Canada-only.
85842
- onChange: (form) => {
85843
- [BCFormationFormControls.ProvinceState, BCFormationFormControls.PostalZip].forEach((control) => form.get(control)?.updateValueAndValidity({ emitEvent: false }));
85159
+ /**
85160
+ * Pre-fills the new addresses from the task's incoming "Shared Address" affiliations (Registered
85161
+ * Office / Records Office), taking each Mailing / Delivery address from the affiliation or, when
85162
+ * it has none, from its parent affiliation. Nothing is pre-filled without an incoming address.
85163
+ */
85164
+ static seedFromIncomingAffiliations(task) {
85165
+ const { regMailing, regDelivery, recMailing, recDelivery } = this.incomingOfficeAddresses(task);
85166
+ if (!regMailing && !recMailing) {
85167
+ return {};
85844
85168
  }
85845
- },
85846
- {
85847
- type: FormType.Checkbox,
85848
- // Checkbox labels don't get the renderer's required asterisk, so it is added here (AC2).
85849
- dynamicLabel: (_, t) => `${t("The Completing Party confirms they have examined the Articles and the Incorporation Agreement, and the signature requirements have been met.")} *`,
85850
- formControlName: BCFormationFormControls.HasConfirmedCompletion,
85851
- required: true,
85852
- class: "span-12"
85853
- },
85854
- {
85855
- type: FormType.Checkbox,
85856
- // Checkbox labels don't get the renderer's required asterisk, so it is added here (AC2).
85857
- dynamicLabel: (_, t) => `${t("I have a signed Incorporation Agreement and a set of Articles for the company to be incorporated.")} *`,
85858
- formControlName: BCFormationFormControls.HasRequiredDocuments,
85859
- required: true,
85860
- class: "span-12"
85861
- }
85862
- ];
85863
- BC_FORMATION_CARD_FORM_DIRECTORS_FIELDS = [
85864
- {
85865
- type: FormType.Text,
85866
- formControlName: BCFormationFormControls.MailingAddress,
85867
- class: "span-12",
85868
- dynamicLabel: (form, t) => labelledValue("Mailing Address - Full Address", form.get(BCFormationFormControls.MailingAddress)?.value, t)
85869
- },
85870
- {
85871
- type: FormType.Text,
85872
- formControlName: BCFormationFormControls.DeliveryAddress,
85873
- class: "span-12",
85874
- // A director without a Delivery address is filed with "delivery same as mailing", so the
85875
- // Mailing address is shown, as in the draft.
85876
- dynamicLabel: (form, t) => labelledValue("Delivery Address - Full Address", form.get(BCFormationFormControls.DeliveryAddress)?.value || form.get(BCFormationFormControls.MailingAddress)?.value, t)
85877
- }
85878
- ];
85879
- BC_FORMATION_CARD_FORM_INCORPORATORS_FIELDS = [
85880
- {
85881
- type: FormType.Text,
85882
- formControlName: BCFormationFormControls.FullAddress,
85883
- class: "span-12",
85884
- dynamicLabel: (form, t) => labelledValue("Full Address", form.get(BCFormationFormControls.FullAddress)?.value, t)
85885
- }
85886
- ];
85887
- }
85888
- });
85889
-
85890
- // src/app/constants/ui/british-columbia-annual-report-form.constants.ts
85891
- var BC_ANNUAL_REPORT_GENERAL_FIELDS, BC_ANNUAL_REPORT_OFFICERS_FIELDS, buildBCAnnualReportCompanyEmailFields, BC_ANNUAL_REPORT_REMINDER_FIELDS;
85892
- var init_british_columbia_annual_report_form_constants = __esm({
85893
- "src/app/constants/ui/british-columbia-annual-report-form.constants.ts"() {
85894
- init_form_enums();
85895
- init_british_columbia_form_enums();
85896
- init_british_columbia_formation_form_constants();
85897
- BC_ANNUAL_REPORT_GENERAL_FIELDS = [
85898
- {
85899
- type: FormType.Input,
85900
- label: "Client/Matter Number",
85901
- formControlName: BCAnnualReportFormControls.ClientMatterNumber
85902
- },
85903
- {
85904
- type: FormType.Input,
85905
- label: "Docket Number",
85906
- formControlName: BCAnnualReportFormControls.DocketNumber
85907
- },
85908
- {
85909
- type: FormType.Text,
85910
- formControlName: BCAnnualReportFormControls.EntityIdentifier,
85911
- class: "span-12",
85912
- dynamicLabel: (form, t) => labelledValue("Entity Identifier", form.get(BCAnnualReportFormControls.EntityIdentifier)?.value, t)
85913
- }
85914
- ];
85915
- BC_ANNUAL_REPORT_OFFICERS_FIELDS = [
85916
- {
85917
- type: FormType.Text,
85918
- formControlName: BCAnnualReportFormControls.EffectiveDate,
85919
- class: "span-12",
85920
- dynamicLabel: (form, t) => labelledValue("Effective Date", form.get(BCAnnualReportFormControls.EffectiveDate)?.value, t)
85921
- },
85922
- {
85923
- type: FormType.Text,
85924
- formControlName: BCAnnualReportFormControls.CeaseDate,
85925
- class: "span-12",
85926
- dynamicLabel: (form, t) => labelledValue("Cease Date", form.get(BCAnnualReportFormControls.CeaseDate)?.value, t)
85927
- },
85928
- {
85929
- type: FormType.Text,
85930
- formControlName: BCAnnualReportFormControls.FullAddress,
85931
- class: "span-12",
85932
- dynamicLabel: (form, t) => labelledValue("Full Address", form.get(BCAnnualReportFormControls.FullAddress)?.value, t)
85169
+ const regDeliverySame = !regDelivery || this.isSameOfficeAddress(regDelivery, regMailing);
85170
+ const recDeliverySame = !recDelivery || this.isSameOfficeAddress(recDelivery, recMailing);
85171
+ const recSameAsRegistered = !recMailing || this.isSameOfficeAddress(recMailing, regMailing) && this.isSameOfficeAddress(recDelivery ?? recMailing, regDelivery ?? regMailing);
85172
+ return {
85173
+ registeredOffice: {
85174
+ mailingAddress: regMailing,
85175
+ deliverySameAsMailing: regDeliverySame,
85176
+ deliveryAddress: regDeliverySame ? void 0 : regDelivery
85177
+ },
85178
+ recordsOffice: {
85179
+ sameAsRegisteredOffice: recSameAsRegistered,
85180
+ mailingAddress: recSameAsRegistered ? void 0 : recMailing,
85181
+ deliverySameAsMailing: recDeliverySame,
85182
+ deliveryAddress: recDeliverySame ? void 0 : recDelivery
85183
+ }
85184
+ };
85933
85185
  }
85934
- ];
85935
- buildBCAnnualReportCompanyEmailFields = (options) => [
85936
- {
85937
- type: FormType.Select,
85938
- label: "Company Email",
85939
- formControlName: BCAnnualReportFormControls.CompanyEmail,
85940
- required: true,
85941
- options,
85942
- errorMessage: "Company Email is required",
85943
- class: "span-6"
85186
+ /** Keeps the saved flags and addresses, but fills an address the draft left empty from `incoming`. */
85187
+ static fillEmptyAddresses(saved, incoming) {
85188
+ const hasValues = (address) => EDITABLE_ADDRESS_CONTROLS.some((name) => Boolean(address?.[name]));
85189
+ const pick = (savedAddress, incomingAddress) => hasValues(savedAddress) ? savedAddress : incomingAddress ?? savedAddress;
85190
+ return {
85191
+ registeredOffice: __spreadProps(__spreadValues({}, saved.registeredOffice), {
85192
+ mailingAddress: pick(saved.registeredOffice?.mailingAddress, incoming.regMailing),
85193
+ deliveryAddress: pick(saved.registeredOffice?.deliveryAddress, incoming.regDelivery)
85194
+ }),
85195
+ recordsOffice: __spreadProps(__spreadValues({}, saved.recordsOffice), {
85196
+ mailingAddress: pick(saved.recordsOffice?.mailingAddress, incoming.recMailing),
85197
+ deliveryAddress: pick(saved.recordsOffice?.deliveryAddress, incoming.recDelivery)
85198
+ })
85199
+ };
85944
85200
  }
85945
- ];
85946
- BC_ANNUAL_REPORT_REMINDER_FIELDS = [
85947
- {
85948
- type: FormType.Checkbox,
85949
- label: "Would the company like to receive reminders to file its annual reports",
85950
- formControlName: BCAnnualReportFormControls.IsAnnualReportReminderRequired,
85951
- class: "span-12"
85201
+ /** The four office addresses of the task's incoming Shared Address, as form values. */
85202
+ static incomingOfficeAddresses(task) {
85203
+ const incoming = task.incomingAffiliations ?? [];
85204
+ const pickBy = (title, locationType) => {
85205
+ const pool = incoming.filter((a) => a.role?.role_name === AddressRole2.SHARED_ADDRESS && a.role?.static_title === title).flatMap((a) => a.addresses?.length ? a.addresses : a.parent_affiliation?.addresses ?? []);
85206
+ const wanted = locationType.toLowerCase();
85207
+ const address = pool.find((a) => (a.computed_location_type ?? "").toLowerCase() === wanted || (a.location_type ?? "").toLowerCase() === wanted);
85208
+ return address && this.isBritishColumbia(address) ? this.toOfficeAddressDelta(address) : void 0;
85209
+ };
85210
+ return {
85211
+ regMailing: pickBy(AddressTitle2.REGISTERED_OFFICE, "Mailing"),
85212
+ regDelivery: pickBy(AddressTitle2.REGISTERED_OFFICE, "Delivery"),
85213
+ recMailing: pickBy(AddressTitle2.RECORDS_OFFICE, "Mailing"),
85214
+ recDelivery: pickBy(AddressTitle2.RECORDS_OFFICE, "Delivery")
85215
+ };
85952
85216
  }
85953
- ];
85954
- }
85955
- });
85956
-
85957
- // src/app/components/british-columbia/annual-report/british-columbia-annual-report-form/british-columbia-annual-report-form.component.ts
85958
- function BritishColumbiaAnnualReportFormComponent_Conditional_1_Template(rf, ctx) {
85959
- if (rf & 1) {
85960
- \u0275\u0275element(0, "alert", 1);
85961
- }
85962
- if (rf & 2) {
85963
- const ctx_r0 = \u0275\u0275nextContext();
85964
- \u0275\u0275property("type", ctx_r0.alertType.Info);
85965
- }
85966
- }
85967
- function BritishColumbiaAnnualReportFormComponent_Conditional_2_Template(rf, ctx) {
85968
- if (rf & 1) {
85969
- \u0275\u0275element(0, "alert", 2);
85970
- }
85971
- if (rf & 2) {
85972
- const ctx_r0 = \u0275\u0275nextContext();
85973
- \u0275\u0275property("content", ctx_r0.errors());
85974
- }
85975
- }
85976
- function BritishColumbiaAnnualReportFormComponent_Conditional_5_Template(rf, ctx) {
85977
- if (rf & 1) {
85978
- const _r2 = \u0275\u0275getCurrentView();
85979
- \u0275\u0275elementStart(0, "expandable-card", 4)(1, "div", 8)(2, "filing-form-group", 9);
85980
- \u0275\u0275listener("visiblyValidChange", function BritishColumbiaAnnualReportFormComponent_Conditional_5_Template_filing_form_group_visiblyValidChange_2_listener($event) {
85981
- \u0275\u0275restoreView(_r2);
85982
- const ctx_r0 = \u0275\u0275nextContext();
85983
- return \u0275\u0275resetView(ctx_r0.onSectionValidChange("general", $event));
85984
- });
85985
- \u0275\u0275elementEnd()()();
85986
- }
85987
- if (rf & 2) {
85988
- const ctx_r0 = \u0275\u0275nextContext();
85989
- const general_r3 = \u0275\u0275readContextLet(4);
85990
- \u0275\u0275property("isStatusIcon", false)("title", ctx_r0.groups.General);
85991
- \u0275\u0275advance(2);
85992
- \u0275\u0275property("isSubmitted", ctx_r0.isSubmitted())("form", general_r3)("config", ctx_r0.generalFields);
85993
- }
85994
- }
85995
- function BritishColumbiaAnnualReportFormComponent_Conditional_8_Template(rf, ctx) {
85996
- if (rf & 1) {
85997
- \u0275\u0275element(0, "expandable-list-card", 5);
85998
- }
85999
- if (rf & 2) {
86000
- const ctx_r0 = \u0275\u0275nextContext();
86001
- const officersArray_r4 = \u0275\u0275readContextLet(6);
86002
- const isOpenOfficers_r5 = \u0275\u0275readContextLet(7);
86003
- \u0275\u0275property("isSubmitted", ctx_r0.isSubmitted())("isValid", true)("areItemsOpen", isOpenOfficers_r5)("isStatusIcon", false)("fields", ctx_r0.officersFields)("formArray", officersArray_r4)("title", ctx_r0.groups.Officers);
86004
- }
86005
- }
86006
- function BritishColumbiaAnnualReportFormComponent_Conditional_9_Template(rf, ctx) {
86007
- if (rf & 1) {
86008
- \u0275\u0275elementStart(0, "expandable-card", 6)(1, "h2", 10);
86009
- \u0275\u0275text(2);
86010
- \u0275\u0275pipe(3, "translate");
86011
- \u0275\u0275elementEnd()();
86012
- }
86013
- if (rf & 2) {
86014
- const ctx_r0 = \u0275\u0275nextContext();
86015
- \u0275\u0275property("title", ctx_r0.groups.Officers);
86016
- \u0275\u0275advance(2);
86017
- \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(3, 2, "Unchanged"));
86018
- }
86019
- }
86020
- function BritishColumbiaAnnualReportFormComponent_Conditional_11_Template(rf, ctx) {
86021
- if (rf & 1) {
86022
- const _r6 = \u0275\u0275getCurrentView();
86023
- \u0275\u0275elementStart(0, "expandable-card", 7)(1, "div", 8)(2, "filing-form-group", 9);
86024
- \u0275\u0275listener("visiblyValidChange", function BritishColumbiaAnnualReportFormComponent_Conditional_11_Template_filing_form_group_visiblyValidChange_2_listener($event) {
86025
- \u0275\u0275restoreView(_r6);
86026
- const ctx_r0 = \u0275\u0275nextContext();
86027
- return \u0275\u0275resetView(ctx_r0.onSectionValidChange("companyEmail", $event));
86028
- });
86029
- \u0275\u0275elementEnd()()();
86030
- }
86031
- if (rf & 2) {
86032
- const ctx_r0 = \u0275\u0275nextContext();
86033
- const companyEmail_r7 = \u0275\u0275readContextLet(10);
86034
- \u0275\u0275property("isValid", ctx_r0.sectionValidity["companyEmail"])("isStatusIcon", ctx_r0.statusIcon())("title", ctx_r0.groups.CompanyEmail);
86035
- \u0275\u0275advance(2);
86036
- \u0275\u0275property("isSubmitted", ctx_r0.isSubmitted())("form", companyEmail_r7)("config", ctx_r0.companyEmailFields());
86037
- }
86038
- }
86039
- function BritishColumbiaAnnualReportFormComponent_Conditional_13_Template(rf, ctx) {
86040
- if (rf & 1) {
86041
- \u0275\u0275elementStart(0, "expandable-card", 4)(1, "div", 8);
86042
- \u0275\u0275element(2, "filing-form-group", 11);
86043
- \u0275\u0275elementEnd()();
86044
- }
86045
- if (rf & 2) {
86046
- const ctx_r0 = \u0275\u0275nextContext();
86047
- const reminder_r8 = \u0275\u0275readContextLet(12);
86048
- \u0275\u0275property("isStatusIcon", false)("title", ctx_r0.groups.AnnualReportReminder);
86049
- \u0275\u0275advance(2);
86050
- \u0275\u0275property("isSubmitted", ctx_r0.isSubmitted())("form", reminder_r8)("config", ctx_r0.reminderFields);
86051
- }
86052
- }
86053
- var BritishColumbiaAnnualReportFormComponent;
86054
- var init_british_columbia_annual_report_form_component = __esm({
86055
- "src/app/components/british-columbia/annual-report/british-columbia-annual-report-form/british-columbia-annual-report-form.component.ts"() {
86056
- init_core();
86057
- init_ngx_translate_core();
86058
- init_expandable_card_component();
86059
- init_expandable_list_card_component();
86060
- init_filing_form_group_component();
86061
- init_alert_component();
86062
- init_alert_enum();
86063
- init_british_columbia_form_enums();
86064
- init_british_columbia_annual_report_form_constants();
86065
- init_british_columbia_annual_report_form_helper();
86066
- init_core();
86067
- BritishColumbiaAnnualReportFormComponent = class _BritishColumbiaAnnualReportFormComponent {
86068
- form = input.required();
86069
- task = input();
86070
- errors = input([]);
86071
- isNote = input(false);
86072
- statusIcon = input(true);
86073
- isSubmitted = input(false);
86074
- visiblyValidChange = output();
86075
- alertType = AlertType;
86076
- groups = BCAnnualReportFormGroups;
86077
- generalFields = BC_ANNUAL_REPORT_GENERAL_FIELDS;
86078
- officersFields = BC_ANNUAL_REPORT_OFFICERS_FIELDS;
86079
- reminderFields = BC_ANNUAL_REPORT_REMINDER_FIELDS;
86080
- companyEmailFields = computed(() => {
86081
- const task = this.task();
86082
- return buildBCAnnualReportCompanyEmailFields(task ? BritishColumbiaAnnualReportFormHelper.getCompanyEmailOptions(task) : []);
86083
- });
86084
- /** AC2: the Officers section starts expanded for 3 officers or fewer, collapsed for more. */
86085
- initiallyOpenCardsCount = 3;
86086
- sectionValidity = {};
86087
- isVisiblyValid() {
86088
- return Object.values(this.sectionValidity).every((v) => v);
85217
+ /** Street = street number + street name; the suite goes to Address Line 2. */
85218
+ static toOfficeAddressDelta(address) {
85219
+ const street = [getAddressComponent(address, "Street Number Only"), getAddressComponent(address, "Street Only")].filter(Boolean).join(" ") || getAddressComponent(address, "Street Address") || address.street || "";
85220
+ return {
85221
+ addressLine1: street,
85222
+ addressLine2: getAddressComponent(address, "Suite/Apartment") || address.address2 || "",
85223
+ city: address.city ?? "",
85224
+ postalCode: address.postal_zip ?? "",
85225
+ province: BC_DEFAULT_PROVINCE_STATE,
85226
+ country: BC_DEFAULT_COUNTRY
85227
+ };
86089
85228
  }
86090
- onSectionValidChange(section, valid) {
86091
- this.sectionValidity = __spreadProps(__spreadValues({}, this.sectionValidity), { [section]: valid });
86092
- this.visiblyValidChange.emit(this.isVisiblyValid());
85229
+ /** An address with no province is accepted; the form only ever deals in British Columbia. */
85230
+ static isBritishColumbia(address) {
85231
+ const province = (address.province_state ?? "").trim().toLowerCase();
85232
+ return !province || ["bc", "b.c.", "british columbia"].includes(province);
86093
85233
  }
86094
- getFormGroup(key) {
86095
- return this.form().get(key);
85234
+ static isSameOfficeAddress(a, b) {
85235
+ const key = (x) => [x?.addressLine1, x?.addressLine2, x?.city, x?.postalCode].map((v) => (v ?? "").trim().toLowerCase().replace(/\s+/g, " ")).join("|");
85236
+ return key(a) === key(b);
86096
85237
  }
86097
- getFormArray(key) {
86098
- return this.form().get(key);
85238
+ /**
85239
+ * The company's email: the entity's email options, then the Registered Office's email, then the
85240
+ * entity's own, then any other address of the entity (e.g. a Head Office). Only a Business Email
85241
+ * or an Email counts; a Personal Email never does.
85242
+ */
85243
+ static resolveCompanyEmail(task) {
85244
+ const affiliations = task.entity.affiliations ?? [];
85245
+ const registeredOffice = BritishColumbiaFormationFormHelper.findSharedAddressAffiliation(affiliations, AddressTitle2.REGISTERED_OFFICE);
85246
+ return task.entity.emailOptions?.find(isCompanyEmail)?.value || registeredOffice?.addresses?.[0]?.communications?.find(isCompanyEmail)?.value || task.entity.communications?.find(isCompanyEmail)?.value || task.entity.addresses?.flatMap((a) => a.communications ?? []).find(isCompanyEmail)?.value || "";
86099
85247
  }
86100
- static \u0275fac = function BritishColumbiaAnnualReportFormComponent_Factory(__ngFactoryType__) {
86101
- return new (__ngFactoryType__ || _BritishColumbiaAnnualReportFormComponent)();
86102
- };
86103
- static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _BritishColumbiaAnnualReportFormComponent, selectors: [["british-columbia-annual-report-form"]], inputs: { form: [1, "form"], task: [1, "task"], errors: [1, "errors"], isNote: [1, "isNote"], statusIcon: [1, "statusIcon"], isSubmitted: [1, "isSubmitted"] }, outputs: { visiblyValidChange: "visiblyValidChange" }, decls: 14, vars: 11, consts: [[1, "annual-report-form"], ["title", "Entity changed", "content", "A new draft needs to be generated as the Entity was changed since the last draft was produced.", 3, "type"], ["title", "The following issues need to be resolved before proceeding:", 3, "content"], [1, "annual-report-form-content"], [3, "isStatusIcon", "title"], [3, "isSubmitted", "isValid", "areItemsOpen", "isStatusIcon", "fields", "formArray", "title"], [3, "title"], [3, "isValid", "isStatusIcon", "title"], [1, "annual-report-form-item"], [3, "visiblyValidChange", "isSubmitted", "form", "config"], [1, "body-1-regular"], [3, "isSubmitted", "form", "config"]], template: function BritishColumbiaAnnualReportFormComponent_Template(rf, ctx) {
86104
- if (rf & 1) {
86105
- \u0275\u0275elementStart(0, "div", 0);
86106
- \u0275\u0275template(1, BritishColumbiaAnnualReportFormComponent_Conditional_1_Template, 1, 1, "alert", 1)(2, BritishColumbiaAnnualReportFormComponent_Conditional_2_Template, 1, 1, "alert", 2);
86107
- \u0275\u0275elementStart(3, "div", 3);
86108
- \u0275\u0275declareLet(4);
86109
- \u0275\u0275template(5, BritishColumbiaAnnualReportFormComponent_Conditional_5_Template, 3, 5, "expandable-card", 4);
86110
- \u0275\u0275declareLet(6)(7);
86111
- \u0275\u0275template(8, BritishColumbiaAnnualReportFormComponent_Conditional_8_Template, 1, 7, "expandable-list-card", 5)(9, BritishColumbiaAnnualReportFormComponent_Conditional_9_Template, 4, 4, "expandable-card", 6);
86112
- \u0275\u0275declareLet(10);
86113
- \u0275\u0275template(11, BritishColumbiaAnnualReportFormComponent_Conditional_11_Template, 3, 6, "expandable-card", 7);
86114
- \u0275\u0275declareLet(12);
86115
- \u0275\u0275template(13, BritishColumbiaAnnualReportFormComponent_Conditional_13_Template, 3, 5, "expandable-card", 4);
86116
- \u0275\u0275elementEnd()();
86117
- }
86118
- if (rf & 2) {
86119
- let tmp_5_0;
86120
- \u0275\u0275advance();
86121
- \u0275\u0275conditional(ctx.isNote() ? 1 : -1);
86122
- \u0275\u0275advance();
86123
- \u0275\u0275conditional(ctx.errors().length ? 2 : -1);
86124
- \u0275\u0275advance(2);
86125
- const general_r9 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.groups.General));
86126
- \u0275\u0275advance();
86127
- \u0275\u0275conditional(general_r9 ? 5 : -1);
86128
- \u0275\u0275advance();
86129
- const officersArray_r10 = \u0275\u0275storeLet(ctx.getFormArray(ctx.groups.Officers));
86130
- \u0275\u0275advance();
86131
- \u0275\u0275storeLet(((tmp_5_0 = officersArray_r10 == null ? null : officersArray_r10.length) !== null && tmp_5_0 !== void 0 ? tmp_5_0 : 0) <= ctx.initiallyOpenCardsCount);
86132
- \u0275\u0275advance();
86133
- \u0275\u0275conditional(officersArray_r10 && officersArray_r10.length ? 8 : 9);
86134
- \u0275\u0275advance(2);
86135
- const companyEmail_r11 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.groups.CompanyEmail));
86136
- \u0275\u0275advance();
86137
- \u0275\u0275conditional(companyEmail_r11 ? 11 : -1);
86138
- \u0275\u0275advance();
86139
- const reminder_r12 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.groups.AnnualReportReminder));
86140
- \u0275\u0275advance();
86141
- \u0275\u0275conditional(reminder_r12 ? 13 : -1);
86142
- }
86143
- }, dependencies: [
86144
- ExpandableCardComponent,
86145
- ExpandableListCardComponent,
86146
- FilingFormGroupComponent,
86147
- AlertComponent,
86148
- TranslatePipe
86149
- ], styles: ["\n\n[_nghost-%COMP%] {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n}\n[_nghost-%COMP%] .annual-report-form[_ngcontent-%COMP%] {\n display: flex;\n height: 100%;\n flex-direction: column;\n gap: 16px;\n}\n[_nghost-%COMP%] .annual-report-form-content[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n flex: 1;\n overflow: auto;\n min-height: 0;\n}\n[_nghost-%COMP%] .annual-report-form-item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n/*# sourceMappingURL=british-columbia-annual-report-form.component.css.map */"], changeDetection: 0 });
86150
- };
86151
- (() => {
86152
- (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(BritishColumbiaAnnualReportFormComponent, [{
86153
- type: Component,
86154
- args: [{ standalone: true, selector: "british-columbia-annual-report-form", changeDetection: ChangeDetectionStrategy.OnPush, imports: [
86155
- ExpandableCardComponent,
86156
- ExpandableListCardComponent,
86157
- FilingFormGroupComponent,
86158
- AlertComponent,
86159
- TranslatePipe
86160
- ], template: `<div class="annual-report-form">\r
86161
- @if (isNote()) {\r
86162
- <alert\r
86163
- [type]="alertType.Info"\r
86164
- title="Entity changed"\r
86165
- content="A new draft needs to be generated as the Entity was changed since the last draft was produced."\r
86166
- />\r
86167
- }\r
86168
- \r
86169
- @if (errors().length) {\r
86170
- <alert\r
86171
- title="The following issues need to be resolved before proceeding:"\r
86172
- [content]="errors()"\r
86173
- />\r
86174
- }\r
86175
- \r
86176
- <div class="annual-report-form-content">\r
86177
- @let general = getFormGroup(groups.General);\r
86178
- \r
86179
- @if (general) {\r
86180
- <expandable-card [isStatusIcon]="false" [title]="groups.General">\r
86181
- <div class="annual-report-form-item">\r
86182
- <filing-form-group\r
86183
- [isSubmitted]="isSubmitted()"\r
86184
- [form]="general"\r
86185
- [config]="generalFields"\r
86186
- (visiblyValidChange)="onSectionValidChange('general', $event)"\r
86187
- />\r
86188
- </div>\r
86189
- </expandable-card>\r
86190
- }\r
86191
- \r
86192
- @let officersArray = getFormArray(groups.Officers);\r
86193
- @let isOpenOfficers = (officersArray?.length ?? 0) <= initiallyOpenCardsCount;\r
86194
- \r
86195
- @if (officersArray && officersArray.length) {\r
86196
- <expandable-list-card\r
86197
- [isSubmitted]="isSubmitted()"\r
86198
- [isValid]="true"\r
86199
- [areItemsOpen]="isOpenOfficers"\r
86200
- [isStatusIcon]="false"\r
86201
- [fields]="officersFields"\r
86202
- [formArray]="officersArray"\r
86203
- [title]="groups.Officers"\r
86204
- />\r
86205
- } @else {\r
86206
- <expandable-card [title]="groups.Officers">\r
86207
- <h2 class="body-1-regular">{{ 'Unchanged' | translate }}</h2>\r
86208
- </expandable-card>\r
86209
- }\r
86210
- \r
86211
- @let companyEmail = getFormGroup(groups.CompanyEmail);\r
86212
- \r
86213
- @if (companyEmail) {\r
86214
- <expandable-card\r
86215
- [isValid]="sectionValidity['companyEmail']"\r
86216
- [isStatusIcon]="statusIcon()"\r
86217
- [title]="groups.CompanyEmail"\r
86218
- >\r
86219
- <div class="annual-report-form-item">\r
86220
- <filing-form-group\r
86221
- [isSubmitted]="isSubmitted()"\r
86222
- [form]="companyEmail"\r
86223
- [config]="companyEmailFields()"\r
86224
- (visiblyValidChange)="onSectionValidChange('companyEmail', $event)"\r
86225
- />\r
86226
- </div>\r
86227
- </expandable-card>\r
86228
- }\r
86229
- \r
86230
- @let reminder = getFormGroup(groups.AnnualReportReminder);\r
86231
- \r
86232
- @if (reminder) {\r
86233
- <expandable-card [isStatusIcon]="false" [title]="groups.AnnualReportReminder">\r
86234
- <div class="annual-report-form-item">\r
86235
- <filing-form-group\r
86236
- [isSubmitted]="isSubmitted()"\r
86237
- [form]="reminder"\r
86238
- [config]="reminderFields"\r
86239
- />\r
86240
- </div>\r
86241
- </expandable-card>\r
86242
- }\r
86243
- </div>\r
86244
- </div>\r
86245
- `, styles: ["/* src/app/components/british-columbia/annual-report/british-columbia-annual-report-form/british-columbia-annual-report-form.component.scss */\n:host {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n}\n:host .annual-report-form {\n display: flex;\n height: 100%;\n flex-direction: column;\n gap: 16px;\n}\n:host .annual-report-form-content {\n display: flex;\n flex-direction: column;\n gap: 16px;\n flex: 1;\n overflow: auto;\n min-height: 0;\n}\n:host .annual-report-form-item {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n/*# sourceMappingURL=british-columbia-annual-report-form.component.css.map */\n"] }]
86246
- }], null, null);
86247
- })();
86248
- (() => {
86249
- (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(BritishColumbiaAnnualReportFormComponent, { className: "BritishColumbiaAnnualReportFormComponent", filePath: "src/app/components/british-columbia/annual-report/british-columbia-annual-report-form/british-columbia-annual-report-form.component.ts", lineNumber: 43 });
86250
- })();
86251
- }
86252
- });
86253
-
86254
- // src/app/components/british-columbia/annual-report/steps/delta/british-columbia-annual-report-delta-form.component.ts
86255
- var BritishColumbiaAnnualReportDeltaFormComponent;
86256
- var init_british_columbia_annual_report_delta_form_component = __esm({
86257
- "src/app/components/british-columbia/annual-report/steps/delta/british-columbia-annual-report-delta-form.component.ts"() {
86258
- init_core();
86259
- init_button();
86260
- init_ngx_translate_core();
86261
- init_british_columbia_annual_report_form_component();
86262
- init_common_utils();
86263
- init_core();
86264
- BritishColumbiaAnnualReportDeltaFormComponent = class _BritishColumbiaAnnualReportDeltaFormComponent {
86265
- form = input.required();
86266
- actionsDisabled = input(false);
86267
- isNote = input(true);
86268
- task = input();
86269
- errors = input([]);
86270
- close = output();
86271
- save = output();
86272
- validate = output();
86273
- submitted = signal(false);
86274
- visiblyValid = signal(true);
86275
- clientErrors = signal([]);
86276
- translate = inject(TranslateService);
86277
- combinedErrors = computed(() => {
86278
- const client = this.clientErrors();
86279
- return client.length ? client : this.errors();
86280
- });
86281
- onVisiblyValidChange(valid) {
86282
- this.visiblyValid.set(valid);
85248
+ /**
85249
+ * Address Line 1*, Address Line 2, City*, Postal Code*, Province (BC), Country (Canada).
85250
+ * Province and Country are always disabled; the rest follow `enabled`.
85251
+ */
85252
+ static createOfficeAddressFormGroup(delta, enabled = true) {
85253
+ const group2 = new FormGroup({
85254
+ [Controls2.AddressLine1]: new FormControl(delta?.addressLine1 ?? "", Validators.required),
85255
+ [Controls2.AddressLine2]: new FormControl(delta?.addressLine2 ?? ""),
85256
+ [Controls2.City]: new FormControl(delta?.city ?? "", Validators.required),
85257
+ [Controls2.PostalCode]: new FormControl(delta?.postalCode ?? "", Validators.required),
85258
+ [Controls2.Province]: this.readOnly(delta?.province ?? BC_DEFAULT_PROVINCE_STATE),
85259
+ [Controls2.Country]: this.readOnly(delta?.country ?? BC_DEFAULT_COUNTRY)
85260
+ });
85261
+ this.setOfficeAddressEnabled(group2, enabled);
85262
+ return group2;
86283
85263
  }
86284
- /** AC5: highlights the incomplete fields and shows the "required fields" banner instead of calling the API. */
86285
- onValidate() {
86286
- this.submitted.set(true);
86287
- this.clientErrors.set([]);
86288
- markFormGroupTouched(this.form());
86289
- if (!this.visiblyValid()) {
86290
- this.clientErrors.set([this.translate.instant("Some required fields aren't completed.")]);
85264
+ /**
85265
+ * Enables or disables the editable controls of an address grid (used by "Same as…" checkboxes).
85266
+ * Hiding a grid also clears it. Showing it again refills it with the address Athennian sent for
85267
+ * it, or leaves it empty when there is none (and when the user has already typed something).
85268
+ */
85269
+ static setOfficeAddressEnabled(group2, enabled) {
85270
+ if (!group2) {
86291
85271
  return;
86292
85272
  }
86293
- this.validate.emit();
85273
+ const restore = incomingAddressByGrid.get(group2);
85274
+ const isEmpty = EDITABLE_ADDRESS_CONTROLS.every((name) => !group2.get(name)?.value);
85275
+ EDITABLE_ADDRESS_CONTROLS.forEach((name) => {
85276
+ const control = group2.get(name);
85277
+ if (enabled) {
85278
+ control?.enable({ emitEvent: false });
85279
+ if (restore && isEmpty) {
85280
+ control?.setValue(restore[name] ?? "", { emitEvent: false });
85281
+ }
85282
+ } else {
85283
+ control?.setValue("", { emitEvent: false });
85284
+ control?.disable({ emitEvent: false });
85285
+ }
85286
+ });
85287
+ group2.updateValueAndValidity({ emitEvent: false });
85288
+ }
85289
+ static generateReferenceNumbersFormGroup(deltaData, clientMatterNumber) {
85290
+ return new FormGroup({
85291
+ [Controls2.ClientMatterNumber]: new FormControl(
85292
+ // `??`: an explicitly cleared value ('') in a saved draft must be preserved; the entity default applies only when absent.
85293
+ deltaData?.referenceNumber ?? clientMatterNumber ?? ""
85294
+ ),
85295
+ [Controls2.DocketNumber]: new FormControl(deltaData?.docketNumber ?? "")
85296
+ });
85297
+ }
85298
+ static readOnly(value) {
85299
+ return new FormControl({ value: value ?? "", disabled: true });
86294
85300
  }
86295
- static \u0275fac = function BritishColumbiaAnnualReportDeltaFormComponent_Factory(__ngFactoryType__) {
86296
- return new (__ngFactoryType__ || _BritishColumbiaAnnualReportDeltaFormComponent)();
86297
- };
86298
- static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _BritishColumbiaAnnualReportDeltaFormComponent, selectors: [["british-columbia-annual-report-delta-form"]], inputs: { form: [1, "form"], actionsDisabled: [1, "actionsDisabled"], isNote: [1, "isNote"], task: [1, "task"], errors: [1, "errors"] }, outputs: { close: "close", save: "save", validate: "validate" }, decls: 15, vars: 18, consts: [[1, "annual-report-delta-form"], [1, "annual-report-delta-form-content", 3, "visiblyValidChange", "form", "task", "errors", "isNote", "isSubmitted", "statusIcon"], [1, "annual-report-delta-form-actions"], ["mat-stroked-button", "", "mat-button", "", 3, "click", "disabled"], [1, "body-1-semibold"], ["color", "primary", "mat-flat-button", "", 1, "submit", 3, "click", "disabled"]], template: function BritishColumbiaAnnualReportDeltaFormComponent_Template(rf, ctx) {
86299
- if (rf & 1) {
86300
- \u0275\u0275elementStart(0, "div", 0)(1, "british-columbia-annual-report-form", 1);
86301
- \u0275\u0275listener("visiblyValidChange", function BritishColumbiaAnnualReportDeltaFormComponent_Template_british_columbia_annual_report_form_visiblyValidChange_1_listener($event) {
86302
- return ctx.onVisiblyValidChange($event);
86303
- });
86304
- \u0275\u0275elementEnd();
86305
- \u0275\u0275elementStart(2, "div", 2)(3, "button", 3);
86306
- \u0275\u0275listener("click", function BritishColumbiaAnnualReportDeltaFormComponent_Template_button_click_3_listener() {
86307
- return ctx.close.emit();
86308
- });
86309
- \u0275\u0275elementStart(4, "span", 4);
86310
- \u0275\u0275text(5);
86311
- \u0275\u0275pipe(6, "translate");
86312
- \u0275\u0275elementEnd()();
86313
- \u0275\u0275elementStart(7, "button", 3);
86314
- \u0275\u0275listener("click", function BritishColumbiaAnnualReportDeltaFormComponent_Template_button_click_7_listener() {
86315
- return ctx.save.emit();
86316
- });
86317
- \u0275\u0275elementStart(8, "span", 4);
86318
- \u0275\u0275text(9);
86319
- \u0275\u0275pipe(10, "translate");
86320
- \u0275\u0275elementEnd()();
86321
- \u0275\u0275elementStart(11, "button", 5);
86322
- \u0275\u0275listener("click", function BritishColumbiaAnnualReportDeltaFormComponent_Template_button_click_11_listener() {
86323
- return ctx.onValidate();
86324
- });
86325
- \u0275\u0275elementStart(12, "span", 4);
86326
- \u0275\u0275text(13);
86327
- \u0275\u0275pipe(14, "translate");
86328
- \u0275\u0275elementEnd()()()();
86329
- }
86330
- if (rf & 2) {
86331
- \u0275\u0275advance();
86332
- \u0275\u0275property("form", ctx.form())("task", ctx.task())("errors", ctx.combinedErrors())("isNote", ctx.isNote())("isSubmitted", ctx.submitted())("statusIcon", true);
86333
- \u0275\u0275advance(2);
86334
- \u0275\u0275property("disabled", ctx.actionsDisabled());
86335
- \u0275\u0275advance(2);
86336
- \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(6, 12, "Close"));
86337
- \u0275\u0275advance(2);
86338
- \u0275\u0275property("disabled", ctx.actionsDisabled());
86339
- \u0275\u0275advance(2);
86340
- \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(10, 14, "Save Changes"));
86341
- \u0275\u0275advance(2);
86342
- \u0275\u0275property("disabled", ctx.actionsDisabled());
86343
- \u0275\u0275advance(2);
86344
- \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(14, 16, "Validate & Generate Draft"));
86345
- }
86346
- }, dependencies: [MatButton, TranslatePipe, BritishColumbiaAnnualReportFormComponent], styles: ["\n\n[_nghost-%COMP%] .annual-report-delta-form[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n height: 100%;\n}\n[_nghost-%COMP%] .annual-report-delta-form-content[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n}\n[_nghost-%COMP%] .annual-report-delta-form-actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 8px;\n padding-top: 16px;\n}\n[_nghost-%COMP%] .annual-report-delta-form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n margin: 0;\n}\n[_nghost-%COMP%] .annual-report-delta-form-actions[_ngcontent-%COMP%] .submit[_ngcontent-%COMP%] {\n padding-left: 30px;\n padding-right: 30px;\n}\n/*# sourceMappingURL=british-columbia-annual-report-delta-form.component.css.map */"], changeDetection: 0 });
86347
- };
86348
- (() => {
86349
- (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(BritishColumbiaAnnualReportDeltaFormComponent, [{
86350
- type: Component,
86351
- args: [{ standalone: true, selector: "british-columbia-annual-report-delta-form", changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButton, TranslatePipe, BritishColumbiaAnnualReportFormComponent], template: `<div class="annual-report-delta-form">\r
86352
- <british-columbia-annual-report-form\r
86353
- class="annual-report-delta-form-content"\r
86354
- [form]="form()"\r
86355
- [task]="task()"\r
86356
- [errors]="combinedErrors()"\r
86357
- [isNote]="isNote()"\r
86358
- [isSubmitted]="submitted()"\r
86359
- [statusIcon]="true"\r
86360
- (visiblyValidChange)="onVisiblyValidChange($event)"\r
86361
- />\r
86362
- \r
86363
- <div class="annual-report-delta-form-actions">\r
86364
- <button [disabled]="actionsDisabled()" mat-stroked-button mat-button (click)="close.emit()">\r
86365
- <span class="body-1-semibold">{{ 'Close' | translate }}</span>\r
86366
- </button>\r
86367
- <button (click)="save.emit()" [disabled]="actionsDisabled()" mat-stroked-button mat-button>\r
86368
- <span class="body-1-semibold">{{ 'Save Changes' | translate }}</span>\r
86369
- </button>\r
86370
- <button\r
86371
- class="submit"\r
86372
- color="primary"\r
86373
- mat-flat-button\r
86374
- [disabled]="actionsDisabled()"\r
86375
- (click)="onValidate()"\r
86376
- >\r
86377
- <span class="body-1-semibold">{{ 'Validate & Generate Draft' | translate }}</span>\r
86378
- </button>\r
86379
- </div>\r
86380
- </div>\r
86381
- `, styles: ["/* src/app/components/british-columbia/annual-report/steps/delta/british-columbia-annual-report-delta-form.component.scss */\n:host .annual-report-delta-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n height: 100%;\n}\n:host .annual-report-delta-form-content {\n flex: 1;\n min-height: 0;\n}\n:host .annual-report-delta-form-actions {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 8px;\n padding-top: 16px;\n}\n:host .annual-report-delta-form-actions button {\n margin: 0;\n}\n:host .annual-report-delta-form-actions .submit {\n padding-left: 30px;\n padding-right: 30px;\n}\n/*# sourceMappingURL=british-columbia-annual-report-delta-form.component.css.map */\n"] }]
86382
- }], null, null);
86383
- })();
86384
- (() => {
86385
- (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(BritishColumbiaAnnualReportDeltaFormComponent, { className: "BritishColumbiaAnnualReportDeltaFormComponent", filePath: "src/app/components/british-columbia/annual-report/steps/delta/british-columbia-annual-report-delta-form.component.ts", lineNumber: 25 });
86386
- })();
86387
- }
86388
- });
86389
-
86390
- // src/app/components/british-columbia/annual-report/steps/preview/british-columbia-annual-report-preview-form.component.ts
86391
- var BritishColumbiaAnnualReportPreviewFormComponent;
86392
- var init_british_columbia_annual_report_preview_form_component = __esm({
86393
- "src/app/components/british-columbia/annual-report/steps/preview/british-columbia-annual-report-preview-form.component.ts"() {
86394
- init_core();
86395
- init_button();
86396
- init_ngx_translate_core();
86397
- init_british_columbia_annual_report_form_component();
86398
- init_core();
86399
- BritishColumbiaAnnualReportPreviewFormComponent = class _BritishColumbiaAnnualReportPreviewFormComponent {
86400
- form = input.required();
86401
- actionsDisabled = input(false);
86402
- task = input();
86403
- errors = input([]);
86404
- close = output();
86405
- file = output();
86406
- static \u0275fac = function BritishColumbiaAnnualReportPreviewFormComponent_Factory(__ngFactoryType__) {
86407
- return new (__ngFactoryType__ || _BritishColumbiaAnnualReportPreviewFormComponent)();
86408
- };
86409
- static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _BritishColumbiaAnnualReportPreviewFormComponent, selectors: [["british-columbia-annual-report-preview-form"]], inputs: { form: [1, "form"], actionsDisabled: [1, "actionsDisabled"], task: [1, "task"], errors: [1, "errors"] }, outputs: { close: "close", file: "file" }, decls: 11, vars: 12, consts: [[1, "annual-report-preview-form"], [1, "annual-report-preview-form-content", 3, "form", "task", "errors", "statusIcon"], [1, "annual-report-preview-form-actions"], ["mat-stroked-button", "", "mat-button", "", 3, "click", "disabled"], [1, "body-1-semibold"], ["color", "primary", "mat-flat-button", "", 1, "submit", 3, "click", "disabled"]], template: function BritishColumbiaAnnualReportPreviewFormComponent_Template(rf, ctx) {
86410
- if (rf & 1) {
86411
- \u0275\u0275elementStart(0, "div", 0);
86412
- \u0275\u0275element(1, "british-columbia-annual-report-form", 1);
86413
- \u0275\u0275elementStart(2, "div", 2)(3, "button", 3);
86414
- \u0275\u0275listener("click", function BritishColumbiaAnnualReportPreviewFormComponent_Template_button_click_3_listener() {
86415
- return ctx.close.emit();
86416
- });
86417
- \u0275\u0275elementStart(4, "span", 4);
86418
- \u0275\u0275text(5);
86419
- \u0275\u0275pipe(6, "translate");
86420
- \u0275\u0275elementEnd()();
86421
- \u0275\u0275elementStart(7, "button", 5);
86422
- \u0275\u0275listener("click", function BritishColumbiaAnnualReportPreviewFormComponent_Template_button_click_7_listener() {
86423
- return ctx.file.emit();
86424
- });
86425
- \u0275\u0275elementStart(8, "span", 4);
86426
- \u0275\u0275text(9);
86427
- \u0275\u0275pipe(10, "translate");
86428
- \u0275\u0275elementEnd()()()();
86429
- }
86430
- if (rf & 2) {
86431
- \u0275\u0275advance();
86432
- \u0275\u0275property("form", ctx.form())("task", ctx.task())("errors", ctx.errors())("statusIcon", false);
86433
- \u0275\u0275advance(2);
86434
- \u0275\u0275property("disabled", ctx.actionsDisabled());
86435
- \u0275\u0275advance(2);
86436
- \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(6, 8, "Close"));
86437
- \u0275\u0275advance(2);
86438
- \u0275\u0275property("disabled", ctx.actionsDisabled());
86439
- \u0275\u0275advance(2);
86440
- \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(10, 10, "File"));
86441
- }
86442
- }, dependencies: [MatButton, TranslatePipe, BritishColumbiaAnnualReportFormComponent], styles: ["\n\n[_nghost-%COMP%] .annual-report-preview-form[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n height: 100%;\n}\n[_nghost-%COMP%] .annual-report-preview-form-content[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n height: 100%;\n}\n[_nghost-%COMP%] .annual-report-preview-form-actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 8px;\n padding-top: 16px;\n}\n[_nghost-%COMP%] .annual-report-preview-form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n margin: 0;\n}\n/*# sourceMappingURL=british-columbia-annual-report-preview-form.component.css.map */"], changeDetection: 0 });
86443
85301
  };
86444
- (() => {
86445
- (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(BritishColumbiaAnnualReportPreviewFormComponent, [{
86446
- type: Component,
86447
- args: [{ standalone: true, selector: "british-columbia-annual-report-preview-form", changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButton, TranslatePipe, BritishColumbiaAnnualReportFormComponent], template: `<div class="annual-report-preview-form">\r
86448
- <british-columbia-annual-report-form\r
86449
- class="annual-report-preview-form-content"\r
86450
- [form]="form()"\r
86451
- [task]="task()"\r
86452
- [errors]="errors()"\r
86453
- [statusIcon]="false"\r
86454
- />\r
86455
- \r
86456
- <div class="annual-report-preview-form-actions">\r
86457
- <button [disabled]="actionsDisabled()" mat-stroked-button mat-button (click)="close.emit()">\r
86458
- <span class="body-1-semibold">{{ 'Close' | translate }}</span>\r
86459
- </button>\r
86460
- <button\r
86461
- class="submit"\r
86462
- color="primary"\r
86463
- mat-flat-button\r
86464
- [disabled]="actionsDisabled()"\r
86465
- (click)="file.emit()"\r
86466
- >\r
86467
- <span class="body-1-semibold">{{ 'File' | translate }}</span>\r
86468
- </button>\r
86469
- </div>\r
86470
- </div>\r
86471
- `, styles: ["/* src/app/components/british-columbia/annual-report/steps/preview/british-columbia-annual-report-preview-form.component.scss */\n:host .annual-report-preview-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n height: 100%;\n}\n:host .annual-report-preview-form-content {\n display: flex;\n flex-direction: column;\n gap: 16px;\n height: 100%;\n}\n:host .annual-report-preview-form-actions {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 8px;\n padding-top: 16px;\n}\n:host .annual-report-preview-form-actions button {\n margin: 0;\n}\n/*# sourceMappingURL=british-columbia-annual-report-preview-form.component.css.map */\n"] }]
86472
- }], null, null);
86473
- })();
86474
- (() => {
86475
- (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(BritishColumbiaAnnualReportPreviewFormComponent, { className: "BritishColumbiaAnnualReportPreviewFormComponent", filePath: "src/app/components/british-columbia/annual-report/steps/preview/british-columbia-annual-report-preview-form.component.ts", lineNumber: 25 });
86476
- })();
86477
85302
  }
86478
85303
  });
86479
85304
 
86480
85305
  // src/app/constants/ui/british-columbia-change-of-directors-form.constants.ts
86481
- var Controls3, labelledValue2, readOnlyRow, directorsAddedOrDeleted, isNotifyByMail, BC_COD_DELTA_CARD_FORM_REFERENCE_NUMBERS_FIELDS, BC_COD_CARD_FORM_CORPORATION_DETAILS_FIELDS, BC_COD_DELTA_CARD_FORM_FILING_DETAILS_FIELDS, BC_COD_CARD_FORM_DIRECTORS_FIELDS, BC_COD_DELTA_CARD_FORM_ANNUAL_REPORT_REMINDER_FIELDS;
85306
+ var Controls3, labelledValue, readOnlyRow, directorsAddedOrDeleted, isNotifyByMail, BC_COD_DELTA_CARD_FORM_REFERENCE_NUMBERS_FIELDS, BC_COD_CARD_FORM_CORPORATION_DETAILS_FIELDS, BC_COD_DELTA_CARD_FORM_FILING_DETAILS_FIELDS, BC_COD_CARD_FORM_DIRECTORS_FIELDS, BC_COD_DELTA_CARD_FORM_ANNUAL_REPORT_REMINDER_FIELDS;
86482
85307
  var init_british_columbia_change_of_directors_form_constants = __esm({
86483
85308
  "src/app/constants/ui/british-columbia-change-of-directors-form.constants.ts"() {
86484
85309
  init_form_enums();
86485
85310
  init_british_columbia_form_enums();
86486
85311
  init_BritishColumbiaConstants();
86487
85312
  Controls3 = BCChangeOfDirectorsFormControls;
86488
- labelledValue2 = (label, value, t) => `<span class="body-1-semibold">${t(label)}:</span> ${value || t("Not specified")}`;
85313
+ labelledValue = (label, value, t) => `<span class="body-1-semibold">${t(label)}:</span> ${value || t("Not specified")}`;
86489
85314
  readOnlyRow = (label, control, className = "span-12") => ({
86490
85315
  type: FormType.Text,
86491
85316
  formControlName: control,
86492
85317
  class: className,
86493
- dynamicLabel: (form, t) => labelledValue2(label, form.get(control)?.value, t)
85318
+ dynamicLabel: (form, t) => labelledValue(label, form.get(control)?.value, t)
86494
85319
  });
86495
85320
  directorsAddedOrDeleted = (form) => Boolean(form.get(Controls3.DirectorsAddedOrDeleted)?.value);
86496
85321
  isNotifyByMail = (form) => form.get(Controls3.NotificationMethod)?.value === BCNotificationMethod.Mail;
@@ -87110,14 +85935,14 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87110
85935
  <strong>{{ 'Incorporation Number' | translate }}:</strong>\r
87111
85936
  {{ corporationDetails.get(controls.IncorporationNumber)?.value }}\r
87112
85937
  </p>\r
87113
- <div class="company-email-field">\r
87114
- <filing-form-group\r
87115
- [form]="corporationDetails"\r
87116
- [config]="companyEmailFields()"\r
87117
- [isSubmitted]="isSubmitted()"\r
87118
- (visiblyValidChange)="onSectionValidChange('corporationDetails', $event)"\r
87119
- />\r
87120
- </div>\r
85938
+ <div class="company-email-field">
85939
+ <filing-form-group
85940
+ [form]="corporationDetails"
85941
+ [config]="companyEmailFields()"
85942
+ [isSubmitted]="isSubmitted()"
85943
+ (visiblyValidChange)="onSectionValidChange('corporationDetails', $event)"
85944
+ />
85945
+ </div>
87121
85946
  </div>\r
87122
85947
  </expandable-card>\r
87123
85948
  }\r
@@ -87141,28 +85966,28 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87141
85966
  \r
87142
85967
  <mat-checkbox\r
87143
85968
  class="directors-change-checkbox"\r
87144
- [formControlName]="controls.DirectorsAddedOrDeleted"\r
87145
- (change)="\r
87146
- filingDetails.get(controls.ChangeDate)?.updateValueAndValidity({ emitEvent: false });\r
87147
- onSectionValidChange('filingDetails', filingDetails.valid)\r
87148
- "\r
85969
+ [formControlName]="controls.DirectorsAddedOrDeleted"
85970
+ (change)="
85971
+ filingDetails.get(controls.ChangeDate)?.updateValueAndValidity({ emitEvent: false });
85972
+ onSectionValidChange('filingDetails', filingDetails.valid)
85973
+ "
87149
85974
  >\r
87150
85975
  {{ 'Directors will be added and/or deleted as part of this filing' | translate }}\r
87151
85976
  </mat-checkbox>\r
87152
85977
  \r
87153
85978
  @if (filingDetails.get(controls.DirectorsAddedOrDeleted)?.value) {\r
87154
- <div class="filing-details-grid">\r
87155
- <div class="date-field">\r
87156
- <p class="effective-date-description">\r
87157
- {{\r
87158
- 'The date on which the individual(s) became or ceased to be a director:'\r
87159
- | translate\r
87160
- }}\r
87161
- <strong>{{ getEffectiveDateDisplay(filingDetails.get(controls.ChangeDate)?.value) }}</strong>\r
87162
- </p>\r
87163
- </div>\r
87164
- \r
87165
- <p class="filing-fee">\r
85979
+ <div class="filing-details-grid">
85980
+ <div class="date-field">
85981
+ <p class="effective-date-description">
85982
+ {{
85983
+ 'The date on which the individual(s) became or ceased to be a director:'
85984
+ | translate
85985
+ }}
85986
+ <strong>{{ getEffectiveDateDisplay(filingDetails.get(controls.ChangeDate)?.value) }}</strong>
85987
+ </p>
85988
+ </div>
85989
+
85990
+ <p class="filing-fee">
87166
85991
  <strong>{{ 'Filing Fee' | translate }}:</strong>\r
87167
85992
  {{ filingDetails.get(controls.FilingFee)?.value }}\r
87168
85993
  </p>\r
@@ -87174,8 +85999,8 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87174
85999
  \r
87175
86000
  @let directorsArray = getFormArray(groups.Directors);\r
87176
86001
  \r
87177
- <expandable-card [isStatusIcon]="false" [title]="groups.Directors">\r
87178
- @if (directorsArray && directorsArray.length) {\r
86002
+ <expandable-card [isStatusIcon]="false" [title]="groups.Directors">
86003
+ @if (directorsArray && directorsArray.length) {
87179
86004
  <div class="directors-table" role="table">\r
87180
86005
  <div class="directors-table-header" role="row">\r
87181
86006
  <div role="columnheader">{{ 'Name' | translate }}</div>\r
@@ -87473,6 +86298,285 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
87473
86298
  }
87474
86299
  });
87475
86300
 
86301
+ // src/app/constants/ui/british-columbia-formation-form.constants.ts
86302
+ var BC_NAME_TYPE_OPTIONS, labelledValue2, isNamed, BC_FORMATION_DELTA_CARD_FORM_REFERENCE_NUMBERS_FIELDS, BC_FORMATION_DELTA_CARD_FORM_CORPORATION_DETAILS_FIELDS, BC_FORMATION_DELTA_CARD_FORM_NAME_TRANSLATION_FIELDS, BC_FORMATION_DELTA_CARD_FORM_NAME_TRANSLATION_ROW_FIELDS, BC_FORMATION_CARD_FORM_REGISTERED_OFFICE_FIELDS, BC_FORMATION_CARD_FORM_RECORDS_OFFICE_FIELDS, BC_FORMATION_DELTA_CARD_FORM_COMPLETING_PARTY_FIELDS, BC_FORMATION_CARD_FORM_DIRECTORS_FIELDS, BC_FORMATION_CARD_FORM_INCORPORATORS_FIELDS;
86303
+ var init_british_columbia_formation_form_constants = __esm({
86304
+ "src/app/constants/ui/british-columbia-formation-form.constants.ts"() {
86305
+ init_form_enums();
86306
+ init_british_columbia_form_enums();
86307
+ init_BritishColumbiaConstants();
86308
+ init_british_columbia_formation_form_helper();
86309
+ BC_NAME_TYPE_OPTIONS = Object.values(BCNameType).filter((v) => typeof v === "number").map((v) => ({ label: BCNameTypeLabel[v], value: v }));
86310
+ labelledValue2 = (label, value, t) => `<span class="body-1-semibold">${t(label)}:</span> ${value || t("None")}`;
86311
+ isNamed = (form) => form.get(BCFormationFormControls.CorporationNameType)?.value === BCNameType.Named;
86312
+ BC_FORMATION_DELTA_CARD_FORM_REFERENCE_NUMBERS_FIELDS = [
86313
+ {
86314
+ type: FormType.Input,
86315
+ label: "Client/Matter Number",
86316
+ formControlName: BCFormationFormControls.ClientMatterNumber
86317
+ },
86318
+ {
86319
+ type: FormType.Input,
86320
+ label: "Docket Number",
86321
+ formControlName: BCFormationFormControls.DocketNumber
86322
+ }
86323
+ ];
86324
+ BC_FORMATION_DELTA_CARD_FORM_CORPORATION_DETAILS_FIELDS = [
86325
+ {
86326
+ type: FormType.Select,
86327
+ label: "Corporation Name Type",
86328
+ formControlName: BCFormationFormControls.CorporationNameType,
86329
+ required: true,
86330
+ options: BC_NAME_TYPE_OPTIONS,
86331
+ needTranslate: true,
86332
+ onChange: (form) => {
86333
+ form.get(BCFormationFormControls.CompanyName)?.updateValueAndValidity({ emitEvent: false });
86334
+ form.get(BCFormationFormControls.NameReservationNumber)?.updateValueAndValidity({ emitEvent: false });
86335
+ }
86336
+ },
86337
+ {
86338
+ type: FormType.Text,
86339
+ formControlName: "",
86340
+ class: "span-6 beside-select",
86341
+ // Numbered only: a Named company shows no preview of the typed name.
86342
+ isVisible: (form) => !isNamed(form),
86343
+ dynamicLabel: () => BC_NUMBERED_NAME_PREVIEW
86344
+ },
86345
+ {
86346
+ type: FormType.Input,
86347
+ label: "Proposed Corporate Name",
86348
+ formControlName: BCFormationFormControls.CompanyName,
86349
+ required: true,
86350
+ isVisible: isNamed,
86351
+ class: "column-3"
86352
+ },
86353
+ {
86354
+ type: FormType.Input,
86355
+ label: "Name Reservation #",
86356
+ formControlName: BCFormationFormControls.NameReservationNumber,
86357
+ required: true,
86358
+ maxLength: 9,
86359
+ errorMessage: "Enter a valid Name Reservation number (for example NR1234567)",
86360
+ showRequiredMessage: true,
86361
+ isVisible: isNamed,
86362
+ class: "span-6"
86363
+ },
86364
+ {
86365
+ type: FormType.Text,
86366
+ formControlName: BCFormationFormControls.RequestedDateForIncorporation,
86367
+ class: "span-12 spaced-text",
86368
+ dynamicLabel: (form, t) => labelledValue2("Requested Date for Incorporation", form.get(BCFormationFormControls.RequestedDateForIncorporation)?.value, t)
86369
+ },
86370
+ {
86371
+ type: FormType.Text,
86372
+ formControlName: BCFormationFormControls.IsFutureEffectiveDate,
86373
+ class: "span-12 fee-warning",
86374
+ isVisible: (form) => Boolean(form.get(BCFormationFormControls.IsFutureEffectiveDate)?.value),
86375
+ dynamicLabel: (_, t) => t("There is an additional fee of {{fee}} for an effective date in the future.").replace("{{fee}}", BC_FUTURE_EFFECTIVE_DATE_FEE)
86376
+ },
86377
+ {
86378
+ // Options are filled per task from `task.entity.emailOptions` by the incorporation form.
86379
+ type: FormType.Select,
86380
+ label: "Company Email",
86381
+ formControlName: BCFormationFormControls.CompanyEmail,
86382
+ required: true,
86383
+ options: [],
86384
+ class: "span-6"
86385
+ }
86386
+ // The company password is not shown: it is taken from the entity's registry ID.
86387
+ ];
86388
+ BC_FORMATION_DELTA_CARD_FORM_NAME_TRANSLATION_FIELDS = [
86389
+ {
86390
+ type: FormType.Checkbox,
86391
+ label: "This company uses one or more translations of its name outside of Canada.",
86392
+ formControlName: BCFormationFormControls.UsesNameTranslation,
86393
+ class: "span-12",
86394
+ onChange: (form) => {
86395
+ const rows = form.get(BCFormationFormControls.NameTranslations);
86396
+ const enabled = Boolean(form.get(BCFormationFormControls.UsesNameTranslation)?.value);
86397
+ if (!rows) {
86398
+ return;
86399
+ }
86400
+ if (enabled && rows.length === 0) {
86401
+ rows.push(BritishColumbiaFormationFormHelper.createNameTranslationFormGroup());
86402
+ }
86403
+ if (!enabled) {
86404
+ rows.clear();
86405
+ }
86406
+ }
86407
+ },
86408
+ {
86409
+ type: FormType.Text,
86410
+ formControlName: "",
86411
+ class: "span-12",
86412
+ isVisible: (form) => Boolean(form.get(BCFormationFormControls.UsesNameTranslation)?.value),
86413
+ dynamicLabel: (_, t) => `<span class="body-1-semibold">${t("Note")}:</span> ${t("Name translations must use the Latin Alphabet (English, French, etc.). Names that use other writing systems must spell the name phonetically in English or French.")}`
86414
+ }
86415
+ ];
86416
+ BC_FORMATION_DELTA_CARD_FORM_NAME_TRANSLATION_ROW_FIELDS = [
86417
+ {
86418
+ type: FormType.Input,
86419
+ label: "Name Translation",
86420
+ formControlName: BCFormationFormControls.NameTranslation,
86421
+ required: true,
86422
+ class: "span-6"
86423
+ }
86424
+ ];
86425
+ BC_FORMATION_CARD_FORM_REGISTERED_OFFICE_FIELDS = [
86426
+ {
86427
+ type: FormType.Text,
86428
+ formControlName: BCFormationFormControls.MailingAddress,
86429
+ class: "span-12",
86430
+ dynamicLabel: (form, t) => labelledValue2("Mailing Address - Full Address", form.get(BCFormationFormControls.MailingAddress)?.value, t)
86431
+ },
86432
+ {
86433
+ type: FormType.Text,
86434
+ formControlName: BCFormationFormControls.DeliveryAddress,
86435
+ class: "span-12",
86436
+ dynamicLabel: (form, t) => labelledValue2("Delivery Address - Full Address", form.get(BCFormationFormControls.DeliveryAddress)?.value, t)
86437
+ }
86438
+ ];
86439
+ BC_FORMATION_CARD_FORM_RECORDS_OFFICE_FIELDS = [
86440
+ {
86441
+ type: FormType.Text,
86442
+ formControlName: BCFormationFormControls.RecordsOfficeMailingAddress,
86443
+ class: "span-12",
86444
+ dynamicLabel: (form, t) => labelledValue2("Mailing Address - Full Address", form.get(BCFormationFormControls.RecordsOfficeMailingAddress)?.value, t)
86445
+ },
86446
+ {
86447
+ type: FormType.Text,
86448
+ formControlName: BCFormationFormControls.RecordsOfficeDeliveryAddress,
86449
+ class: "span-12",
86450
+ dynamicLabel: (form, t) => labelledValue2("Delivery Address - Full Address", form.get(BCFormationFormControls.RecordsOfficeDeliveryAddress)?.value, t)
86451
+ }
86452
+ ];
86453
+ BC_FORMATION_DELTA_CARD_FORM_COMPLETING_PARTY_FIELDS = [
86454
+ {
86455
+ type: FormType.Input,
86456
+ label: "First Name",
86457
+ formControlName: BCFormationFormControls.CompletingPartyFirstName,
86458
+ required: true,
86459
+ class: "column-3"
86460
+ },
86461
+ {
86462
+ type: FormType.Input,
86463
+ label: "Middle Name",
86464
+ formControlName: BCFormationFormControls.CompletingPartyMiddleName,
86465
+ class: "column-3"
86466
+ },
86467
+ {
86468
+ type: FormType.Input,
86469
+ label: "Last Name",
86470
+ formControlName: BCFormationFormControls.CompletingPartyLastName,
86471
+ required: true,
86472
+ class: "column-3"
86473
+ },
86474
+ {
86475
+ type: FormType.Input,
86476
+ inputType: "email",
86477
+ label: "Email",
86478
+ formControlName: BCFormationFormControls.CompletingPartyEmail,
86479
+ required: true,
86480
+ errorMessage: "Enter a valid email address",
86481
+ showRequiredMessage: true,
86482
+ class: "column-3"
86483
+ },
86484
+ {
86485
+ type: FormType.Text,
86486
+ formControlName: "",
86487
+ class: "span-12",
86488
+ dynamicLabel: (_, t) => t("A copy of the filed Incorporation Application is emailed to this address.")
86489
+ },
86490
+ {
86491
+ type: FormType.Input,
86492
+ label: "Street Address",
86493
+ formControlName: BCFormationFormControls.AddressLine1,
86494
+ required: true,
86495
+ class: "column-3"
86496
+ },
86497
+ {
86498
+ type: FormType.Input,
86499
+ label: "Additional Street Address",
86500
+ formControlName: BCFormationFormControls.AddressLine2,
86501
+ class: "column-3"
86502
+ },
86503
+ {
86504
+ type: FormType.Input,
86505
+ label: "City",
86506
+ formControlName: BCFormationFormControls.City,
86507
+ required: true,
86508
+ class: "column-2"
86509
+ },
86510
+ {
86511
+ type: FormType.Input,
86512
+ label: "Province / State",
86513
+ formControlName: BCFormationFormControls.ProvinceState,
86514
+ required: true,
86515
+ class: "column-2"
86516
+ },
86517
+ {
86518
+ type: FormType.Input,
86519
+ label: "Postal / Zip Code",
86520
+ formControlName: BCFormationFormControls.PostalZip,
86521
+ required: true,
86522
+ errorMessage: "Enter a valid Canadian postal code (for example V8W 1X4)",
86523
+ showRequiredMessage: true,
86524
+ class: "column-2"
86525
+ },
86526
+ {
86527
+ type: FormType.Select,
86528
+ label: "Country",
86529
+ formControlName: BCFormationFormControls.Country,
86530
+ required: true,
86531
+ options: BC_COMPLETING_PARTY_COUNTRY_OPTIONS,
86532
+ class: "span-4",
86533
+ // Province / State is required for Canada and the US, and the postal code format is Canada-only.
86534
+ onChange: (form) => {
86535
+ [BCFormationFormControls.ProvinceState, BCFormationFormControls.PostalZip].forEach((control) => form.get(control)?.updateValueAndValidity({ emitEvent: false }));
86536
+ }
86537
+ },
86538
+ {
86539
+ type: FormType.Checkbox,
86540
+ // Checkbox labels don't get the renderer's required asterisk, so it is added here (AC2).
86541
+ dynamicLabel: (_, t) => `${t("The Completing Party confirms they have examined the Articles and the Incorporation Agreement, and the signature requirements have been met.")} *`,
86542
+ formControlName: BCFormationFormControls.HasConfirmedCompletion,
86543
+ required: true,
86544
+ class: "span-12"
86545
+ },
86546
+ {
86547
+ type: FormType.Checkbox,
86548
+ // Checkbox labels don't get the renderer's required asterisk, so it is added here (AC2).
86549
+ dynamicLabel: (_, t) => `${t("I have a signed Incorporation Agreement and a set of Articles for the company to be incorporated.")} *`,
86550
+ formControlName: BCFormationFormControls.HasRequiredDocuments,
86551
+ required: true,
86552
+ class: "span-12"
86553
+ }
86554
+ ];
86555
+ BC_FORMATION_CARD_FORM_DIRECTORS_FIELDS = [
86556
+ {
86557
+ type: FormType.Text,
86558
+ formControlName: BCFormationFormControls.MailingAddress,
86559
+ class: "span-12",
86560
+ dynamicLabel: (form, t) => labelledValue2("Mailing Address - Full Address", form.get(BCFormationFormControls.MailingAddress)?.value, t)
86561
+ },
86562
+ {
86563
+ type: FormType.Text,
86564
+ formControlName: BCFormationFormControls.DeliveryAddress,
86565
+ class: "span-12",
86566
+ dynamicLabel: (form, t) => labelledValue2("Delivery Address - Full Address", form.get(BCFormationFormControls.DeliveryAddress)?.value, t)
86567
+ }
86568
+ ];
86569
+ BC_FORMATION_CARD_FORM_INCORPORATORS_FIELDS = [
86570
+ {
86571
+ type: FormType.Text,
86572
+ formControlName: BCFormationFormControls.FullAddress,
86573
+ class: "span-12",
86574
+ dynamicLabel: (form, t) => labelledValue2("Full Address", form.get(BCFormationFormControls.FullAddress)?.value, t)
86575
+ }
86576
+ ];
86577
+ }
86578
+ });
86579
+
87476
86580
  // src/app/components/british-columbia/incorporation/british-columbia-incorporation-form/british-columbia-incorporation-form.component.ts
87477
86581
  function BritishColumbiaIncorporationFormComponent_Conditional_1_Template(rf, ctx) {
87478
86582
  if (rf & 1) {
@@ -89545,52 +88649,52 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
89545
88649
  function BritishColumbiaComponent_Conditional_2_Conditional_0_Template(rf, ctx) {
89546
88650
  if (rf & 1) {
89547
88651
  const _r5 = \u0275\u0275getCurrentView();
89548
- \u0275\u0275elementStart(0, "british-columbia-annual-report-delta-form", 2);
89549
- \u0275\u0275listener("validate", function BritishColumbiaComponent_Conditional_2_Conditional_0_Template_british_columbia_annual_report_delta_form_validate_0_listener() {
88652
+ \u0275\u0275elementStart(0, "british-columbia-incorporation-delta-form", 6);
88653
+ \u0275\u0275listener("validate", function BritishColumbiaComponent_Conditional_2_Conditional_0_Template_british_columbia_incorporation_delta_form_validate_0_listener() {
89550
88654
  \u0275\u0275restoreView(_r5);
89551
88655
  const ctx_r1 = \u0275\u0275nextContext(2);
89552
- return \u0275\u0275resetView(ctx_r1.onAnnualReportValidate());
89553
- })("close", function BritishColumbiaComponent_Conditional_2_Conditional_0_Template_british_columbia_annual_report_delta_form_close_0_listener() {
88656
+ return \u0275\u0275resetView(ctx_r1.onFormationValidate());
88657
+ })("close", function BritishColumbiaComponent_Conditional_2_Conditional_0_Template_british_columbia_incorporation_delta_form_close_0_listener() {
89554
88658
  \u0275\u0275restoreView(_r5);
89555
88659
  const ctx_r1 = \u0275\u0275nextContext(2);
89556
88660
  return \u0275\u0275resetView(ctx_r1.onClose());
89557
- })("save", function BritishColumbiaComponent_Conditional_2_Conditional_0_Template_british_columbia_annual_report_delta_form_save_0_listener() {
88661
+ })("save", function BritishColumbiaComponent_Conditional_2_Conditional_0_Template_british_columbia_incorporation_delta_form_save_0_listener() {
89558
88662
  \u0275\u0275restoreView(_r5);
89559
88663
  const ctx_r1 = \u0275\u0275nextContext(2);
89560
- return \u0275\u0275resetView(ctx_r1.onAnnualReportSave());
88664
+ return \u0275\u0275resetView(ctx_r1.onFormationSave());
89561
88665
  });
89562
88666
  \u0275\u0275elementEnd();
89563
88667
  }
89564
88668
  if (rf & 2) {
89565
88669
  const ctx_r1 = \u0275\u0275nextContext(2);
89566
88670
  const taskData_r3 = \u0275\u0275readContextLet(0);
89567
- \u0275\u0275property("task", taskData_r3)("form", ctx_r1.deltaForm())("actionsDisabled", ctx_r1.actionsDisabled())("errors", ctx_r1.errors())("isNote", ctx_r1.isNote());
88671
+ \u0275\u0275property("task", taskData_r3)("errors", ctx_r1.errors())("isNote", ctx_r1.isNote())("actionsDisabled", ctx_r1.actionsDisabled())("form", ctx_r1.deltaForm());
89568
88672
  }
89569
88673
  }
89570
88674
  function BritishColumbiaComponent_Conditional_2_Conditional_1_Template(rf, ctx) {
89571
88675
  if (rf & 1) {
89572
88676
  const _r6 = \u0275\u0275getCurrentView();
89573
- \u0275\u0275elementStart(0, "british-columbia-annual-report-preview-form", 3);
89574
- \u0275\u0275listener("close", function BritishColumbiaComponent_Conditional_2_Conditional_1_Template_british_columbia_annual_report_preview_form_close_0_listener() {
88677
+ \u0275\u0275elementStart(0, "british-columbia-incorporation-preview-form", 7);
88678
+ \u0275\u0275listener("next", function BritishColumbiaComponent_Conditional_2_Conditional_1_Template_british_columbia_incorporation_preview_form_next_0_listener() {
89575
88679
  \u0275\u0275restoreView(_r6);
89576
88680
  const ctx_r1 = \u0275\u0275nextContext(2);
89577
- return \u0275\u0275resetView(ctx_r1.close.emit());
89578
- })("file", function BritishColumbiaComponent_Conditional_2_Conditional_1_Template_british_columbia_annual_report_preview_form_file_0_listener() {
88681
+ return \u0275\u0275resetView(ctx_r1.onFormationSubmit());
88682
+ })("close", function BritishColumbiaComponent_Conditional_2_Conditional_1_Template_british_columbia_incorporation_preview_form_close_0_listener() {
89579
88683
  \u0275\u0275restoreView(_r6);
89580
88684
  const ctx_r1 = \u0275\u0275nextContext(2);
89581
- return \u0275\u0275resetView(ctx_r1.onAnnualReportSubmit());
88685
+ return \u0275\u0275resetView(ctx_r1.close.emit());
89582
88686
  });
89583
88687
  \u0275\u0275elementEnd();
89584
88688
  }
89585
88689
  if (rf & 2) {
89586
88690
  const ctx_r1 = \u0275\u0275nextContext(2);
89587
88691
  const taskData_r3 = \u0275\u0275readContextLet(0);
89588
- \u0275\u0275property("task", taskData_r3)("form", ctx_r1.previewForm())("actionsDisabled", ctx_r1.actionsDisabled())("errors", ctx_r1.errors());
88692
+ \u0275\u0275property("task", taskData_r3)("form", ctx_r1.previewForm())("errors", ctx_r1.errors())("actionsDisabled", ctx_r1.actionsDisabled());
89589
88693
  }
89590
88694
  }
89591
88695
  function BritishColumbiaComponent_Conditional_2_Template(rf, ctx) {
89592
88696
  if (rf & 1) {
89593
- \u0275\u0275template(0, BritishColumbiaComponent_Conditional_2_Conditional_0_Template, 1, 5, "british-columbia-annual-report-delta-form", 0)(1, BritishColumbiaComponent_Conditional_2_Conditional_1_Template, 1, 4, "british-columbia-annual-report-preview-form", 1);
88697
+ \u0275\u0275template(0, BritishColumbiaComponent_Conditional_2_Conditional_0_Template, 1, 5, "british-columbia-incorporation-delta-form", 4)(1, BritishColumbiaComponent_Conditional_2_Conditional_1_Template, 1, 4, "british-columbia-incorporation-preview-form", 5);
89594
88698
  }
89595
88699
  if (rf & 2) {
89596
88700
  const ctx_r1 = \u0275\u0275nextContext();
@@ -89602,75 +88706,18 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
89602
88706
  function BritishColumbiaComponent_Conditional_3_Conditional_0_Template(rf, ctx) {
89603
88707
  if (rf & 1) {
89604
88708
  const _r7 = \u0275\u0275getCurrentView();
89605
- \u0275\u0275elementStart(0, "british-columbia-incorporation-delta-form", 6);
89606
- \u0275\u0275listener("validate", function BritishColumbiaComponent_Conditional_3_Conditional_0_Template_british_columbia_incorporation_delta_form_validate_0_listener() {
88709
+ \u0275\u0275elementStart(0, "british-columbia-change-of-office-addresses-delta-form", 2);
88710
+ \u0275\u0275listener("validate", function BritishColumbiaComponent_Conditional_3_Conditional_0_Template_british_columbia_change_of_office_addresses_delta_form_validate_0_listener() {
89607
88711
  \u0275\u0275restoreView(_r7);
89608
88712
  const ctx_r1 = \u0275\u0275nextContext(2);
89609
- return \u0275\u0275resetView(ctx_r1.onFormationValidate());
89610
- })("close", function BritishColumbiaComponent_Conditional_3_Conditional_0_Template_british_columbia_incorporation_delta_form_close_0_listener() {
88713
+ return \u0275\u0275resetView(ctx_r1.onChangeOfOfficeAddressesValidate());
88714
+ })("close", function BritishColumbiaComponent_Conditional_3_Conditional_0_Template_british_columbia_change_of_office_addresses_delta_form_close_0_listener() {
89611
88715
  \u0275\u0275restoreView(_r7);
89612
88716
  const ctx_r1 = \u0275\u0275nextContext(2);
89613
88717
  return \u0275\u0275resetView(ctx_r1.onClose());
89614
- })("save", function BritishColumbiaComponent_Conditional_3_Conditional_0_Template_british_columbia_incorporation_delta_form_save_0_listener() {
88718
+ })("save", function BritishColumbiaComponent_Conditional_3_Conditional_0_Template_british_columbia_change_of_office_addresses_delta_form_save_0_listener() {
89615
88719
  \u0275\u0275restoreView(_r7);
89616
88720
  const ctx_r1 = \u0275\u0275nextContext(2);
89617
- return \u0275\u0275resetView(ctx_r1.onFormationSave());
89618
- });
89619
- \u0275\u0275elementEnd();
89620
- }
89621
- if (rf & 2) {
89622
- const ctx_r1 = \u0275\u0275nextContext(2);
89623
- const taskData_r3 = \u0275\u0275readContextLet(0);
89624
- \u0275\u0275property("task", taskData_r3)("errors", ctx_r1.errors())("isNote", ctx_r1.isNote())("actionsDisabled", ctx_r1.actionsDisabled())("form", ctx_r1.deltaForm());
89625
- }
89626
- }
89627
- function BritishColumbiaComponent_Conditional_3_Conditional_1_Template(rf, ctx) {
89628
- if (rf & 1) {
89629
- const _r8 = \u0275\u0275getCurrentView();
89630
- \u0275\u0275elementStart(0, "british-columbia-incorporation-preview-form", 7);
89631
- \u0275\u0275listener("next", function BritishColumbiaComponent_Conditional_3_Conditional_1_Template_british_columbia_incorporation_preview_form_next_0_listener() {
89632
- \u0275\u0275restoreView(_r8);
89633
- const ctx_r1 = \u0275\u0275nextContext(2);
89634
- return \u0275\u0275resetView(ctx_r1.onFormationSubmit());
89635
- })("close", function BritishColumbiaComponent_Conditional_3_Conditional_1_Template_british_columbia_incorporation_preview_form_close_0_listener() {
89636
- \u0275\u0275restoreView(_r8);
89637
- const ctx_r1 = \u0275\u0275nextContext(2);
89638
- return \u0275\u0275resetView(ctx_r1.close.emit());
89639
- });
89640
- \u0275\u0275elementEnd();
89641
- }
89642
- if (rf & 2) {
89643
- const ctx_r1 = \u0275\u0275nextContext(2);
89644
- const taskData_r3 = \u0275\u0275readContextLet(0);
89645
- \u0275\u0275property("task", taskData_r3)("form", ctx_r1.previewForm())("errors", ctx_r1.errors())("actionsDisabled", ctx_r1.actionsDisabled());
89646
- }
89647
- }
89648
- function BritishColumbiaComponent_Conditional_3_Template(rf, ctx) {
89649
- if (rf & 1) {
89650
- \u0275\u0275template(0, BritishColumbiaComponent_Conditional_3_Conditional_0_Template, 1, 5, "british-columbia-incorporation-delta-form", 4)(1, BritishColumbiaComponent_Conditional_3_Conditional_1_Template, 1, 4, "british-columbia-incorporation-preview-form", 5);
89651
- }
89652
- if (rf & 2) {
89653
- const ctx_r1 = \u0275\u0275nextContext();
89654
- \u0275\u0275conditional(ctx_r1.activeStep() === ctx_r1.steps.Validate ? 0 : -1);
89655
- \u0275\u0275advance();
89656
- \u0275\u0275conditional(ctx_r1.activeStep() === ctx_r1.steps.FilingPreview ? 1 : -1);
89657
- }
89658
- }
89659
- function BritishColumbiaComponent_Conditional_4_Conditional_0_Template(rf, ctx) {
89660
- if (rf & 1) {
89661
- const _r9 = \u0275\u0275getCurrentView();
89662
- \u0275\u0275elementStart(0, "british-columbia-change-of-office-addresses-delta-form", 2);
89663
- \u0275\u0275listener("validate", function BritishColumbiaComponent_Conditional_4_Conditional_0_Template_british_columbia_change_of_office_addresses_delta_form_validate_0_listener() {
89664
- \u0275\u0275restoreView(_r9);
89665
- const ctx_r1 = \u0275\u0275nextContext(2);
89666
- return \u0275\u0275resetView(ctx_r1.onChangeOfOfficeAddressesValidate());
89667
- })("close", function BritishColumbiaComponent_Conditional_4_Conditional_0_Template_british_columbia_change_of_office_addresses_delta_form_close_0_listener() {
89668
- \u0275\u0275restoreView(_r9);
89669
- const ctx_r1 = \u0275\u0275nextContext(2);
89670
- return \u0275\u0275resetView(ctx_r1.onClose());
89671
- })("save", function BritishColumbiaComponent_Conditional_4_Conditional_0_Template_british_columbia_change_of_office_addresses_delta_form_save_0_listener() {
89672
- \u0275\u0275restoreView(_r9);
89673
- const ctx_r1 = \u0275\u0275nextContext(2);
89674
88721
  return \u0275\u0275resetView(ctx_r1.onChangeOfOfficeAddressesSave());
89675
88722
  });
89676
88723
  \u0275\u0275elementEnd();
@@ -89681,16 +88728,16 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
89681
88728
  \u0275\u0275property("task", taskData_r3)("form", ctx_r1.deltaForm())("actionsDisabled", ctx_r1.actionsDisabled())("errors", ctx_r1.errors())("isNote", ctx_r1.isNote());
89682
88729
  }
89683
88730
  }
89684
- function BritishColumbiaComponent_Conditional_4_Conditional_1_Template(rf, ctx) {
88731
+ function BritishColumbiaComponent_Conditional_3_Conditional_1_Template(rf, ctx) {
89685
88732
  if (rf & 1) {
89686
- const _r10 = \u0275\u0275getCurrentView();
88733
+ const _r8 = \u0275\u0275getCurrentView();
89687
88734
  \u0275\u0275elementStart(0, "british-columbia-change-of-office-addresses-preview-form", 3);
89688
- \u0275\u0275listener("close", function BritishColumbiaComponent_Conditional_4_Conditional_1_Template_british_columbia_change_of_office_addresses_preview_form_close_0_listener() {
89689
- \u0275\u0275restoreView(_r10);
88735
+ \u0275\u0275listener("close", function BritishColumbiaComponent_Conditional_3_Conditional_1_Template_british_columbia_change_of_office_addresses_preview_form_close_0_listener() {
88736
+ \u0275\u0275restoreView(_r8);
89690
88737
  const ctx_r1 = \u0275\u0275nextContext(2);
89691
88738
  return \u0275\u0275resetView(ctx_r1.close.emit());
89692
- })("file", function BritishColumbiaComponent_Conditional_4_Conditional_1_Template_british_columbia_change_of_office_addresses_preview_form_file_0_listener() {
89693
- \u0275\u0275restoreView(_r10);
88739
+ })("file", function BritishColumbiaComponent_Conditional_3_Conditional_1_Template_british_columbia_change_of_office_addresses_preview_form_file_0_listener() {
88740
+ \u0275\u0275restoreView(_r8);
89694
88741
  const ctx_r1 = \u0275\u0275nextContext(2);
89695
88742
  return \u0275\u0275resetView(ctx_r1.onChangeOfOfficeAddressesFile());
89696
88743
  });
@@ -89702,9 +88749,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
89702
88749
  \u0275\u0275property("task", taskData_r3)("form", ctx_r1.previewForm())("actionsDisabled", ctx_r1.actionsDisabled())("errors", ctx_r1.errors());
89703
88750
  }
89704
88751
  }
89705
- function BritishColumbiaComponent_Conditional_4_Template(rf, ctx) {
88752
+ function BritishColumbiaComponent_Conditional_3_Template(rf, ctx) {
89706
88753
  if (rf & 1) {
89707
- \u0275\u0275template(0, BritishColumbiaComponent_Conditional_4_Conditional_0_Template, 1, 5, "british-columbia-change-of-office-addresses-delta-form", 0)(1, BritishColumbiaComponent_Conditional_4_Conditional_1_Template, 1, 4, "british-columbia-change-of-office-addresses-preview-form", 1);
88754
+ \u0275\u0275template(0, BritishColumbiaComponent_Conditional_3_Conditional_0_Template, 1, 5, "british-columbia-change-of-office-addresses-delta-form", 0)(1, BritishColumbiaComponent_Conditional_3_Conditional_1_Template, 1, 4, "british-columbia-change-of-office-addresses-preview-form", 1);
89708
88755
  }
89709
88756
  if (rf & 2) {
89710
88757
  const ctx_r1 = \u0275\u0275nextContext();
@@ -89723,15 +88770,12 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
89723
88770
  init_app_enums();
89724
88771
  init_BritishColumbiaConstants();
89725
88772
  init_british_columbia_form_enums();
89726
- init_british_columbia_annual_report_form_helper();
89727
88773
  init_british_columbia_change_of_directors_form_helper();
89728
88774
  init_british_columbia_formation_form_helper();
89729
88775
  init_british_columbia_change_of_office_addresses_form_helper();
89730
88776
  init_delta_state_service();
89731
88777
  init_common_utils();
89732
88778
  init_confirm_modal_component();
89733
- init_british_columbia_annual_report_delta_form_component();
89734
- init_british_columbia_annual_report_preview_form_component();
89735
88779
  init_change_of_directors_delta_form_component();
89736
88780
  init_change_of_directors_preview_form_component();
89737
88781
  init_british_columbia_incorporation_delta_form_component();
@@ -89757,10 +88801,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
89757
88801
  nextStep = output();
89758
88802
  recheckStep = output();
89759
88803
  prevStep = output();
89760
- // Annual Report outputs
89761
- arValidate = output();
89762
- saveArDeltaData = output();
89763
- arSubmit = output();
89764
88804
  // Change of Office Addresses outputs
89765
88805
  coaValidate = output();
89766
88806
  saveCoaDeltaData = output();
@@ -89771,7 +88811,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
89771
88811
  steps = Step;
89772
88812
  isChangeOfDirectorsTask = isChangeOfPrincipalsTask;
89773
88813
  isFormationTask = isFormationTask2;
89774
- isAnnualReportTask = isAnnualReturnTask;
89775
88814
  isChangeOfOfficeAddressesTask = isChangeOfAddressTask;
89776
88815
  deltaForm = signal(new FormGroup({}));
89777
88816
  previewForm = signal(new FormGroup({}));
@@ -89790,12 +88829,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
89790
88829
  this.deltaForm.set(new FormGroup(BritishColumbiaChangeOfOfficeAddressesFormHelper.generateConfig(task, (key) => this.translate.instant(key))));
89791
88830
  this.deltaState.setBCChangeOfOfficeAddressesInitialDelta(this.generateChangeOfOfficeAddressesDeltaData());
89792
88831
  }
89793
- if (task && isAnnualReturnTask(task)) {
89794
- untracked2(() => {
89795
- this.deltaForm.set(new FormGroup(BritishColumbiaAnnualReportFormHelper.generateConfig(task)));
89796
- this.deltaState.setBCAnnualReportInitialDelta(this.generateAnnualReportDeltaData());
89797
- });
89798
- }
89799
88832
  });
89800
88833
  effect(() => {
89801
88834
  const task = this.task();
@@ -89819,14 +88852,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
89819
88852
  this.nextStep.emit();
89820
88853
  }
89821
88854
  }
89822
- if (isAnnualReturnTask(task)) {
89823
- const form = new FormGroup(BritishColumbiaAnnualReportFormHelper.generateConfig(task));
89824
- form.disable();
89825
- this.previewForm.set(form);
89826
- if (untracked2(() => this.activeStep()) === Step.Validate) {
89827
- this.nextStep.emit();
89828
- }
89829
- }
89830
88855
  if (task && isChangeOfAddressTask(task) && deltaData) {
89831
88856
  const form = new FormGroup(BritishColumbiaChangeOfOfficeAddressesFormHelper.generateConfig(task, (key) => this.translate.instant(key)));
89832
88857
  form.disable();
@@ -89840,33 +88865,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
89840
88865
  }
89841
88866
  });
89842
88867
  }
89843
- onAnnualReportValidate() {
89844
- markFormGroupTouched(this.deltaForm());
89845
- this.arValidate.emit(this.generateAnnualReportDeltaData());
89846
- }
89847
- onAnnualReportSave() {
89848
- const delta = this.generateAnnualReportDeltaData();
89849
- this.deltaState.setBCAnnualReportInitialDelta(delta);
89850
- this.saveArDeltaData.emit(delta);
89851
- }
89852
- /** No certification step for this filing: "File" submits the staged draft directly. */
89853
- onAnnualReportSubmit() {
89854
- this.arSubmit.emit();
89855
- }
89856
- generateAnnualReportDeltaData() {
89857
- const formData = this.deltaForm().getRawValue();
89858
- const general = formData[BCAnnualReportFormGroups.General];
89859
- const companyEmail = formData[BCAnnualReportFormGroups.CompanyEmail];
89860
- const reminder = formData[BCAnnualReportFormGroups.AnnualReportReminder];
89861
- return {
89862
- referenceNumbers: {
89863
- referenceNumber: general?.[BCAnnualReportFormControls.ClientMatterNumber] ?? null,
89864
- docketNumber: general?.[BCAnnualReportFormControls.DocketNumber] ?? null
89865
- },
89866
- companyEmail: companyEmail?.[BCAnnualReportFormControls.CompanyEmail] ?? null,
89867
- isAnnualReportReminderRequired: Boolean(reminder?.[BCAnnualReportFormControls.IsAnnualReportReminderRequired])
89868
- };
89869
- }
89870
88868
  onChangeOfOfficeAddressesValidate() {
89871
88869
  markFormGroupTouched(this.deltaForm());
89872
88870
  this.coaValidate.emit(this.generateChangeOfOfficeAddressesDeltaData());
@@ -89969,7 +88967,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
89969
88967
  annualReportReminder: reminder?.[c.AnnualReportReminder] ?? null,
89970
88968
  directorChanges: {
89971
88969
  addIds: directors.filter((d) => d[c.AffiliationType] === "Add").map((d) => d[c.Id]).filter(Boolean),
89972
- editIds: directors.filter((d) => d[c.AffiliationType] === "Update").map((d) => d[c.Id]).filter(Boolean),
88970
+ editIds: directors.filter((d) => d[c.AffiliationType] === "Update" || !d[c.AffiliationType]).map((d) => d[c.Id]).filter(Boolean),
89973
88971
  ceaseIds: directors.filter((d) => d[c.AffiliationType] === "Cease").map((d) => d[c.Id]).filter(Boolean)
89974
88972
  }
89975
88973
  };
@@ -90018,7 +89016,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
90018
89016
  }
90019
89017
  onClose() {
90020
89018
  const task = this.task();
90021
- const hasChanges = task && isAnnualReturnTask(task) ? !deepEqual(this.deltaState.bcAnnualReportInitialDelta(), this.generateAnnualReportDeltaData()) : task && isFormationTask2(task) ? !deepEqual(this.deltaState.bcFormationInitialDelta(), this.generateFormationDeltaData()) : task && isChangeOfAddressTask(task) ? !deepEqual(this.deltaState.bcChangeOfOfficeAddressesInitialDelta(), this.generateChangeOfOfficeAddressesDeltaData()) : !deepEqual(this.deltaState.bcChangeOfDirectorsInitialDelta(), this.generateChangeOfDirectorsDeltaData());
89019
+ const hasChanges = task && isFormationTask2(task) ? !deepEqual(this.deltaState.bcFormationInitialDelta(), this.generateFormationDeltaData()) : task && isChangeOfAddressTask(task) ? !deepEqual(this.deltaState.bcChangeOfOfficeAddressesInitialDelta(), this.generateChangeOfOfficeAddressesDeltaData()) : !deepEqual(this.deltaState.bcChangeOfDirectorsInitialDelta(), this.generateChangeOfDirectorsDeltaData());
90022
89020
  if (!hasChanges) {
90023
89021
  this.close.emit();
90024
89022
  return;
@@ -90034,9 +89032,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
90034
89032
  width: "65rem"
90035
89033
  }).afterClosed().subscribe((val) => {
90036
89034
  if (val) {
90037
- if (task && isAnnualReturnTask(task)) {
90038
- this.onAnnualReportSave();
90039
- } else if (task && isFormationTask2(task)) {
89035
+ if (task && isFormationTask2(task)) {
90040
89036
  this.onFormationSave();
90041
89037
  } else if (task && isChangeOfAddressTask(task)) {
90042
89038
  this.onChangeOfOfficeAddressesSave();
@@ -90050,25 +89046,21 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
90050
89046
  static \u0275fac = function BritishColumbiaComponent_Factory(__ngFactoryType__) {
90051
89047
  return new (__ngFactoryType__ || _BritishColumbiaComponent)();
90052
89048
  };
90053
- static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _BritishColumbiaComponent, selectors: [["british-columbia"]], inputs: { task: [1, "task"], currentUser: [1, "currentUser"], activeStep: [1, "activeStep"], isNote: [1, "isNote"], actionsDisabled: [1, "actionsDisabled"], errors: [1, "errors"], currentDataExtract: [1, "currentDataExtract"] }, outputs: { close: "close", codValidate: "codValidate", saveCodDeltaData: "saveCodDeltaData", codSubmit: "codSubmit", formationValidate: "formationValidate", formationSubmit: "formationSubmit", saveFormationDeltaData: "saveFormationDeltaData", nextStep: "nextStep", recheckStep: "recheckStep", prevStep: "prevStep", arValidate: "arValidate", saveArDeltaData: "saveArDeltaData", arSubmit: "arSubmit", coaValidate: "coaValidate", saveCoaDeltaData: "saveCoaDeltaData", coaSubmit: "coaSubmit" }, decls: 5, vars: 5, consts: [[3, "task", "form", "actionsDisabled", "errors", "isNote"], [3, "task", "form", "actionsDisabled", "errors"], [3, "validate", "close", "save", "task", "form", "actionsDisabled", "errors", "isNote"], [3, "close", "file", "task", "form", "actionsDisabled", "errors"], [3, "task", "errors", "isNote", "actionsDisabled", "form"], [3, "task", "form", "errors", "actionsDisabled"], [3, "validate", "close", "save", "task", "errors", "isNote", "actionsDisabled", "form"], [3, "next", "close", "task", "form", "errors", "actionsDisabled"]], template: function BritishColumbiaComponent_Template(rf, ctx) {
89049
+ static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _BritishColumbiaComponent, selectors: [["british-columbia"]], inputs: { task: [1, "task"], currentUser: [1, "currentUser"], activeStep: [1, "activeStep"], isNote: [1, "isNote"], actionsDisabled: [1, "actionsDisabled"], errors: [1, "errors"], currentDataExtract: [1, "currentDataExtract"] }, outputs: { close: "close", codValidate: "codValidate", saveCodDeltaData: "saveCodDeltaData", codSubmit: "codSubmit", formationValidate: "formationValidate", formationSubmit: "formationSubmit", saveFormationDeltaData: "saveFormationDeltaData", nextStep: "nextStep", recheckStep: "recheckStep", prevStep: "prevStep", coaValidate: "coaValidate", saveCoaDeltaData: "saveCoaDeltaData", coaSubmit: "coaSubmit" }, decls: 4, vars: 4, consts: [[3, "task", "form", "actionsDisabled", "errors", "isNote"], [3, "task", "form", "actionsDisabled", "errors"], [3, "validate", "close", "save", "task", "form", "actionsDisabled", "errors", "isNote"], [3, "close", "file", "task", "form", "actionsDisabled", "errors"], [3, "task", "errors", "isNote", "actionsDisabled", "form"], [3, "task", "form", "errors", "actionsDisabled"], [3, "validate", "close", "save", "task", "errors", "isNote", "actionsDisabled", "form"], [3, "next", "close", "task", "form", "errors", "actionsDisabled"]], template: function BritishColumbiaComponent_Template(rf, ctx) {
90054
89050
  if (rf & 1) {
90055
89051
  \u0275\u0275declareLet(0);
90056
- \u0275\u0275template(1, BritishColumbiaComponent_Conditional_1_Template, 2, 2)(2, BritishColumbiaComponent_Conditional_2_Template, 2, 2)(3, BritishColumbiaComponent_Conditional_3_Template, 2, 2)(4, BritishColumbiaComponent_Conditional_4_Template, 2, 2);
89052
+ \u0275\u0275template(1, BritishColumbiaComponent_Conditional_1_Template, 2, 2)(2, BritishColumbiaComponent_Conditional_2_Template, 2, 2)(3, BritishColumbiaComponent_Conditional_3_Template, 2, 2);
90057
89053
  }
90058
89054
  if (rf & 2) {
90059
- const taskData_r11 = \u0275\u0275storeLet(ctx.task());
90060
- \u0275\u0275advance();
90061
- \u0275\u0275conditional(ctx.isChangeOfDirectorsTask(taskData_r11) ? 1 : -1);
89055
+ const taskData_r9 = \u0275\u0275storeLet(ctx.task());
90062
89056
  \u0275\u0275advance();
90063
- \u0275\u0275conditional(ctx.isAnnualReportTask(taskData_r11) ? 2 : -1);
89057
+ \u0275\u0275conditional(ctx.isChangeOfDirectorsTask(taskData_r9) ? 1 : -1);
90064
89058
  \u0275\u0275advance();
90065
- \u0275\u0275conditional(ctx.isFormationTask(taskData_r11) ? 3 : -1);
89059
+ \u0275\u0275conditional(ctx.isFormationTask(taskData_r9) ? 2 : -1);
90066
89060
  \u0275\u0275advance();
90067
- \u0275\u0275conditional(ctx.isChangeOfOfficeAddressesTask(taskData_r11) ? 4 : -1);
89061
+ \u0275\u0275conditional(ctx.isChangeOfOfficeAddressesTask(taskData_r9) ? 3 : -1);
90068
89062
  }
90069
89063
  }, dependencies: [
90070
- BritishColumbiaAnnualReportDeltaFormComponent,
90071
- BritishColumbiaAnnualReportPreviewFormComponent,
90072
89064
  BritishColumbiaChangeOfDirectorsDeltaFormComponent,
90073
89065
  BritishColumbiaChangeOfDirectorsPreviewFormComponent,
90074
89066
  BritishColumbiaIncorporationDeltaFormComponent,
@@ -90081,19 +89073,17 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
90081
89073
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(BritishColumbiaComponent, [{
90082
89074
  type: Component,
90083
89075
  args: [{ standalone: true, selector: "british-columbia", changeDetection: ChangeDetectionStrategy.OnPush, imports: [
90084
- BritishColumbiaAnnualReportDeltaFormComponent,
90085
- BritishColumbiaAnnualReportPreviewFormComponent,
90086
89076
  BritishColumbiaChangeOfDirectorsDeltaFormComponent,
90087
89077
  BritishColumbiaChangeOfDirectorsPreviewFormComponent,
90088
89078
  BritishColumbiaIncorporationDeltaFormComponent,
90089
89079
  BritishColumbiaIncorporationPreviewFormComponent,
90090
89080
  BritishColumbiaChangeOfOfficeAddressesDeltaFormComponent,
90091
89081
  BritishColumbiaChangeOfOfficeAddressesPreviewFormComponent
90092
- ], template: '@let taskData = this.task();\r\n\r\n@if (isChangeOfDirectorsTask(taskData)) {\r\n @if (activeStep() === steps.Validate) {\r\n <british-columbia-change-of-directors-delta-form\r\n [task]="taskData"\r\n [form]="deltaForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n [isNote]="isNote()"\r\n (validate)="onChangeOfDirectorsValidate()"\r\n (close)="onClose()"\r\n (save)="onChangeOfDirectorsSave()"\r\n />\r\n }\r\n\r\n @if (activeStep() === steps.FilingPreview) {\r\n <british-columbia-change-of-directors-preview-form\r\n [task]="taskData"\r\n [form]="previewForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n (close)="close.emit()"\r\n (file)="onChangeOfDirectorsSubmit()"\r\n />\r\n }\r\n}\r\n\r\n@if (isAnnualReportTask(taskData)) {\r\n @if (activeStep() === steps.Validate) {\r\n <british-columbia-annual-report-delta-form\r\n [task]="taskData"\r\n [form]="deltaForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n [isNote]="isNote()"\r\n (validate)="onAnnualReportValidate()"\r\n (close)="onClose()"\r\n (save)="onAnnualReportSave()"\r\n />\r\n }\r\n\r\n @if (activeStep() === steps.FilingPreview) {\r\n <british-columbia-annual-report-preview-form\r\n [task]="taskData"\r\n [form]="previewForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n (close)="close.emit()"\r\n (file)="onAnnualReportSubmit()"\r\n />\r\n }\r\n}\r\n\r\n@if (isFormationTask(taskData)) {\r\n @if (activeStep() === steps.Validate) {\r\n <british-columbia-incorporation-delta-form\r\n [task]="taskData"\r\n [errors]="errors()"\r\n [isNote]="isNote()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [form]="deltaForm()"\r\n (validate)="onFormationValidate()"\r\n (close)="onClose()"\r\n (save)="onFormationSave()"\r\n />\r\n }\r\n\r\n @if (activeStep() === steps.FilingPreview) {\r\n <british-columbia-incorporation-preview-form\r\n [task]="taskData"\r\n [form]="previewForm()"\r\n [errors]="errors()"\r\n [actionsDisabled]="actionsDisabled()"\r\n (next)="onFormationSubmit()"\r\n (close)="close.emit()"\r\n />\r\n }\r\n}\r\n\r\n@if (isChangeOfOfficeAddressesTask(taskData)) {\r\n @if (activeStep() === steps.Validate) {\r\n <british-columbia-change-of-office-addresses-delta-form\r\n [task]="taskData"\r\n [form]="deltaForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n [isNote]="isNote()"\r\n (validate)="onChangeOfOfficeAddressesValidate()"\r\n (close)="onClose()"\r\n (save)="onChangeOfOfficeAddressesSave()"\r\n />\r\n }\r\n\r\n @if (activeStep() === steps.FilingPreview) {\r\n <british-columbia-change-of-office-addresses-preview-form\r\n [task]="taskData"\r\n [form]="previewForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n (close)="close.emit()"\r\n (file)="onChangeOfOfficeAddressesFile()"\r\n />\r\n }\r\n}\r\n', styles: ["/* src/app/components/british-columbia/british-columbia.component.scss */\n:host {\n display: contents;\n}\n/*# sourceMappingURL=british-columbia.component.css.map */\n"] }]
89082
+ ], template: '@let taskData = this.task();\r\n\r\n@if (isChangeOfDirectorsTask(taskData)) {\r\n @if (activeStep() === steps.Validate) {\r\n <british-columbia-change-of-directors-delta-form\r\n [task]="taskData"\r\n [form]="deltaForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n [isNote]="isNote()"\r\n (validate)="onChangeOfDirectorsValidate()"\r\n (close)="onClose()"\r\n (save)="onChangeOfDirectorsSave()"\r\n />\r\n }\r\n\r\n @if (activeStep() === steps.FilingPreview) {\r\n <british-columbia-change-of-directors-preview-form\r\n [task]="taskData"\r\n [form]="previewForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n (close)="close.emit()"\r\n (file)="onChangeOfDirectorsSubmit()"\r\n />\r\n }\r\n}\r\n\r\n@if (isFormationTask(taskData)) {\r\n @if (activeStep() === steps.Validate) {\r\n <british-columbia-incorporation-delta-form\r\n [task]="taskData"\r\n [errors]="errors()"\r\n [isNote]="isNote()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [form]="deltaForm()"\r\n (validate)="onFormationValidate()"\r\n (close)="onClose()"\r\n (save)="onFormationSave()"\r\n />\r\n }\r\n\r\n @if (activeStep() === steps.FilingPreview) {\r\n <british-columbia-incorporation-preview-form\r\n [task]="taskData"\r\n [form]="previewForm()"\r\n [errors]="errors()"\r\n [actionsDisabled]="actionsDisabled()"\r\n (next)="onFormationSubmit()"\r\n (close)="close.emit()"\r\n />\r\n }\r\n}\r\n\r\n@if (isChangeOfOfficeAddressesTask(taskData)) {\r\n @if (activeStep() === steps.Validate) {\r\n <british-columbia-change-of-office-addresses-delta-form\r\n [task]="taskData"\r\n [form]="deltaForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n [isNote]="isNote()"\r\n (validate)="onChangeOfOfficeAddressesValidate()"\r\n (close)="onClose()"\r\n (save)="onChangeOfOfficeAddressesSave()"\r\n />\r\n }\r\n\r\n @if (activeStep() === steps.FilingPreview) {\r\n <british-columbia-change-of-office-addresses-preview-form\r\n [task]="taskData"\r\n [form]="previewForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n (close)="close.emit()"\r\n (file)="onChangeOfOfficeAddressesFile()"\r\n />\r\n }\r\n}\r\n', styles: ["/* src/app/components/british-columbia/british-columbia.component.scss */\n:host {\n display: contents;\n}\n/*# sourceMappingURL=british-columbia.component.css.map */\n"] }]
90093
89083
  }], () => [], null);
90094
89084
  })();
90095
89085
  (() => {
90096
- (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(BritishColumbiaComponent, { className: "BritishColumbiaComponent", filePath: "src/app/components/british-columbia/british-columbia.component.ts", lineNumber: 82 });
89086
+ (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(BritishColumbiaComponent, { className: "BritishColumbiaComponent", filePath: "src/app/components/british-columbia/british-columbia.component.ts", lineNumber: 72 });
90097
89087
  })();
90098
89088
  }
90099
89089
  });
@@ -96316,10 +95306,10 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96316
95306
  /**
96317
95307
  * Orders the corporation's current data extract and waits until it is ready, returning the
96318
95308
  * `currentDataServiceOrderId` that Validate Filing needs. The registry bot can take a while,
96319
- * so the extract is polled every `intervalMs` for up to `maxAttempts` times.
95309
+ * so the extract is polled every `intervalMs` until the registry returns a terminal status.
96320
95310
  */
96321
95311
  ensureCurrentDataExtract(_0, _1) {
96322
- return __async(this, arguments, function* (signature, order, opts = {}, { intervalMs = 3e3, maxAttempts = 40 } = {}) {
95312
+ return __async(this, arguments, function* (signature, order, opts = {}, { intervalMs = 3e3 } = {}) {
96323
95313
  ensureAuthInputs(signature);
96324
95314
  const fetchFn = opts.fetchImpl ?? fetch;
96325
95315
  const dataExtractUrl = `${this.getOnbisOrigin()}/filings/ca/bc/data-extract`;
@@ -96333,7 +95323,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96333
95323
  errors: ordered.errors?.length ? ordered.errors : (ordered.additionalInformation ?? []).map((message) => ({ message }))
96334
95324
  }));
96335
95325
  }
96336
- for (let attempt = 0; attempt < maxAttempts; attempt++) {
95326
+ for (; ; ) {
96337
95327
  const extractResp = yield fetchWithJwtRetry(signature, () => fetchFn(signature.proxyApiUrl, {
96338
95328
  method: "GET",
96339
95329
  headers: __spreadValues({
@@ -96352,7 +95342,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96352
95342
  }
96353
95343
  yield new Promise((resolve) => setTimeout(resolve, intervalMs));
96354
95344
  }
96355
- throw new Error("BC current data extract is still processing. Please try again in a moment.");
96356
95345
  });
96357
95346
  }
96358
95347
  getCurrentDataExtract() {
@@ -96474,14 +95463,14 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96474
95463
  });
96475
95464
 
96476
95465
  // src/app/helpers/mappers/british-columbia-change-of-directors.mapper.ts
96477
- function getBritishColumbiaAccessCode2(task, password) {
95466
+ function getBritishColumbiaAccessCode(task, password) {
96478
95467
  return password?.trim() || task.entity._profile.registry_id?.trim() || "";
96479
95468
  }
96480
95469
  function buildBritishColumbiaDataExtractOrder(task, password) {
96481
95470
  const incorporationDate = toYyyyMmDd(task.entity._compliance.incorporation_date) ?? "";
96482
95471
  const request = {
96483
95472
  corporationNumber: task.entity._profile.corp_number?.trim() ?? "",
96484
- accessCodeOrPassword: getBritishColumbiaAccessCode2(task, password),
95473
+ accessCodeOrPassword: getBritishColumbiaAccessCode(task, password),
96485
95474
  incorporationDate: /^\d{4}-\d{2}-\d{2}$/.test(incorporationDate) ? incorporationDate : "",
96486
95475
  filingType: "changeOfDirectorsFiling"
96487
95476
  };
@@ -96510,8 +95499,8 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96510
95499
  ...outgoingDirectors
96511
95500
  ].map((affiliation) => [String(affiliation._id), affiliation]));
96512
95501
  const selected = deltaData.directorChanges;
96513
- const addSource = selected ? selected.addIds.map((id) => byId.get(String(id))).filter(Boolean) : incomingDirectors.length ? incomingDirectors : addedDirectors;
96514
- const editSource = selected ? selected.editIds.map((id) => byId.get(String(id))).filter(Boolean) : editedDirectors;
95502
+ const addSource = selected ? selected.addIds.length ? selected.addIds.map((id) => byId.get(String(id))).filter(Boolean) : incomingDirectors.length ? incomingDirectors : addedDirectors : incomingDirectors.length ? incomingDirectors : addedDirectors;
95503
+ const editSource = selected ? selected.editIds.length ? selected.editIds.map((id) => byId.get(String(id))).filter(Boolean) : editedDirectors : editedDirectors;
96515
95504
  const ceaseSource = selected ? selected.ceaseIds.map((id) => byId.get(String(id))).filter(Boolean) : outgoingDirectors.length ? outgoingDirectors : ceasedDirectors;
96516
95505
  const addDirectors = addSource.map((affiliation) => buildDirector(affiliation));
96517
95506
  const ceaseDirectors = ceaseSource.map((affiliation) => buildCeasedDirector(affiliation));
@@ -96525,7 +95514,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96525
95514
  currentDataServiceOrderId,
96526
95515
  filing: __spreadProps(__spreadValues({
96527
95516
  corporationNumber: task.entity._profile.corp_number ?? "",
96528
- accessCodeOrPassword: getBritishColumbiaAccessCode2(task),
95517
+ accessCodeOrPassword: getBritishColumbiaAccessCode(task),
96529
95518
  reference: deltaData.referenceNumbers.referenceNumber ?? null,
96530
95519
  docket: deltaData.referenceNumbers.docketNumber ?? null
96531
95520
  }, (addDirectors.length || ceaseDirectors.length) && effectiveDate ? { effectiveDate } : {}), {
@@ -96633,12 +95622,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96633
95622
  });
96634
95623
 
96635
95624
  // src/app/services/british-columbia/british-columbia-maintenance.service.ts
96636
- function isExtractNotCompleted(error) {
96637
- const result = error?.validateResult;
96638
- const fromResult = (result?.Errors ?? []).some((e) => e.Code === EXTRACT_NOT_COMPLETED_CODE || EXTRACT_NOT_COMPLETED_MESSAGE.test(e.Message ?? ""));
96639
- return fromResult || EXTRACT_NOT_COMPLETED_MESSAGE.test(error?.message ?? "");
96640
- }
96641
- var MAINTENANCE_FILING_PATH, TEMP_UAT_BC_FILING_URL2, DATA_EXTRACT_PATH, DEFAULT_EXTRACT_POLL, DEFAULT_RESULT_POLL, DEFAULT_VALIDATE_RETRY, EXTRACT_NOT_COMPLETED_CODE, EXTRACT_NOT_COMPLETED_MESSAGE, BritishColumbiaMaintenanceService;
95625
+ var MAINTENANCE_FILING_PATH, TEMP_UAT_BC_FILING_URL2, DATA_EXTRACT_PATH, DEFAULT_EXTRACT_POLL, DEFAULT_RESULT_POLL, BritishColumbiaMaintenanceService;
96642
95626
  var init_british_columbia_maintenance_service = __esm({
96643
95627
  "src/app/services/british-columbia/british-columbia-maintenance.service.ts"() {
96644
95628
  init_core();
@@ -96649,9 +95633,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96649
95633
  DATA_EXTRACT_PATH = "/filings/ca/bc/data-extract";
96650
95634
  DEFAULT_EXTRACT_POLL = { intervalMs: 3e3, timeoutMs: 6e5 };
96651
95635
  DEFAULT_RESULT_POLL = { intervalMs: 3e3, timeoutMs: 6e5 };
96652
- DEFAULT_VALIDATE_RETRY = { intervalMs: 3e3, timeoutMs: 12e4 };
96653
- EXTRACT_NOT_COMPLETED_CODE = "SVC1031";
96654
- EXTRACT_NOT_COMPLETED_MESSAGE = /extract has not completed/i;
96655
95636
  BritishColumbiaMaintenanceService = class _BritishColumbiaMaintenanceService {
96656
95637
  config;
96657
95638
  setConfig(config2) {
@@ -96664,7 +95645,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96664
95645
  corporationNumber: context2.corporationNumber,
96665
95646
  accessCodeOrPassword: context2.accessCodeOrPassword,
96666
95647
  incorporationDate: context2.incorporationDate,
96667
- filingType: context2.filingType ?? "changeOfAddressFiling"
95648
+ filingType: "changeOfAddressFiling"
96668
95649
  }, opts);
96669
95650
  const id = body?.currentDataServiceOrderId ?? body?.CurrentDataServiceOrderId;
96670
95651
  if (!ok || !id || String(body?.status ?? "").toLowerCase() === "failed") {
@@ -96700,23 +95681,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96700
95681
  * saved request used to detect Entity changes.
96701
95682
  */
96702
95683
  validate(_0, _1, _2, _3) {
96703
- return __async(this, arguments, function* (signature, requestBody, extractId, context2, opts = {}, retry = {}) {
96704
- const { intervalMs, timeoutMs } = __spreadValues(__spreadValues({}, DEFAULT_VALIDATE_RETRY), retry);
96705
- const deadline = Date.now() + timeoutMs;
96706
- for (; ; ) {
96707
- try {
96708
- return yield this.validateOnce(signature, requestBody, extractId, context2, opts);
96709
- } catch (error) {
96710
- if (!isExtractNotCompleted(error) || Date.now() >= deadline) {
96711
- throw error;
96712
- }
96713
- yield this.sleep(intervalMs);
96714
- }
96715
- }
96716
- });
96717
- }
96718
- validateOnce(signature, requestBody, extractId, context2, opts) {
96719
- return __async(this, null, function* () {
95684
+ return __async(this, arguments, function* (signature, requestBody, extractId, context2, opts = {}) {
96720
95685
  const { status, ok, body, raw } = yield this.send(signature, "POST", MAINTENANCE_FILING_PATH, {
96721
95686
  currentDataServiceOrderId: extractId,
96722
95687
  filingType: requestBody.filingType,
@@ -96866,6 +95831,83 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96866
95831
  }
96867
95832
  });
96868
95833
 
95834
+ // src/app/helpers/mappers/british-columbia-change-of-office-addresses.mapper.ts
95835
+ function formatPostalCode(value) {
95836
+ const compact = clean(value).replace(/[\s-]+/g, "").toUpperCase();
95837
+ return compact.length === 6 ? `${compact.slice(0, 3)} ${compact.slice(3)}` : clean(value).toUpperCase();
95838
+ }
95839
+ function toEcoreAddress(address) {
95840
+ const line2 = clean(address?.addressLine2);
95841
+ return __spreadProps(__spreadValues({
95842
+ streetAddress: clean(address?.addressLine1)
95843
+ }, line2 ? { additionalStreetAddress: line2 } : {}), {
95844
+ city: clean(address?.city),
95845
+ provinceOrState: BC_PROVINCE_CODE,
95846
+ postalOrZipCode: formatPostalCode(address?.postalCode),
95847
+ country: CANADA_COUNTRY_CODE
95848
+ });
95849
+ }
95850
+ function isSameAddress(a, b) {
95851
+ const key = (x) => [x.streetAddress, x.additionalStreetAddress, x.city, x.provinceOrState, x.postalOrZipCode, x.country].map((v) => (v ?? "").trim().toLowerCase().replace(/\s+/g, " ")).join("|");
95852
+ return key(a) === key(b);
95853
+ }
95854
+ function buildBCChangeOfOfficeAddressesValidateRequest(task, deltaData) {
95855
+ const registered = deltaData.registeredOffice;
95856
+ const records = deltaData.recordsOffice;
95857
+ const registeredMailing = toEcoreAddress(registered?.mailingAddress);
95858
+ const registeredDelivery = registered?.deliverySameAsMailing ? registeredMailing : toEcoreAddress(registered?.deliveryAddress);
95859
+ const recordsMailing = records?.sameAsRegisteredOffice ? registeredMailing : toEcoreAddress(records?.mailingAddress);
95860
+ const recordsDelivery = records?.sameAsRegisteredOffice ? registeredDelivery : records?.deliverySameAsMailing ? recordsMailing : toEcoreAddress(records?.deliveryAddress);
95861
+ const registeredDeliverySame = isSameAddress(registeredDelivery, registeredMailing);
95862
+ const recordsSameAsRegistered = isSameAddress(recordsMailing, registeredMailing);
95863
+ const recordsDeliverySame = isSameAddress(recordsDelivery, recordsMailing);
95864
+ const filing = {
95865
+ registeredOfficeMailingAddress: registeredMailing,
95866
+ isRegisteredOfficeDeliveryAddressSameAsMailing: registeredDeliverySame,
95867
+ isRecordsOfficeMailingAddressSameAsRegisteredOfficeMailing: recordsSameAsRegistered,
95868
+ isRecordsOfficeDeliveryAddressSameAsRecordsOfficeMailing: recordsDeliverySame,
95869
+ // Both are picked on the form; the fallbacks only cover data saved before they were added.
95870
+ companyEmail: clean(deltaData.companyEmail) || BritishColumbiaChangeOfOfficeAddressesFormHelper.resolveCompanyEmail(task),
95871
+ isAnnualReportReminderRequired: deltaData.annualReportReminder === BCAnnualReportReminder.Yes
95872
+ };
95873
+ const reference = clean(deltaData.referenceNumbers?.referenceNumber);
95874
+ const docket = clean(deltaData.referenceNumbers?.docketNumber);
95875
+ if (reference) {
95876
+ filing.reference = reference;
95877
+ }
95878
+ if (docket) {
95879
+ filing.docket = docket;
95880
+ }
95881
+ if (!registeredDeliverySame) {
95882
+ filing.registeredOfficeDeliveryAddress = registeredDelivery;
95883
+ }
95884
+ if (!recordsSameAsRegistered) {
95885
+ filing.recordsOfficeMailingAddress = recordsMailing;
95886
+ }
95887
+ if (!recordsDeliverySame) {
95888
+ filing.recordsOfficeDeliveryAddress = recordsDelivery;
95889
+ }
95890
+ return { filingType: "changeOfAddressFiling", filing };
95891
+ }
95892
+ function getBritishColumbiaAccessCode2(task, env) {
95893
+ const registryId = task.entity._profile.registry_id?.trim() ?? "";
95894
+ if (registryId) {
95895
+ return registryId;
95896
+ }
95897
+ return env === "TEST" ? TEMP_UAT_TEST_ACCESS_CODE : "";
95898
+ }
95899
+ var TEMP_UAT_TEST_ACCESS_CODE, BC_PROVINCE_CODE, CANADA_COUNTRY_CODE, clean;
95900
+ var init_british_columbia_change_of_office_addresses_mapper = __esm({
95901
+ "src/app/helpers/mappers/british-columbia-change-of-office-addresses.mapper.ts"() {
95902
+ init_BritishColumbiaConstants();
95903
+ init_british_columbia_change_of_office_addresses_form_helper();
95904
+ TEMP_UAT_TEST_ACCESS_CODE = "12345678";
95905
+ BC_PROVINCE_CODE = "BC";
95906
+ CANADA_COUNTRY_CODE = "CA";
95907
+ clean = (value) => (value ?? "").trim();
95908
+ }
95909
+ });
95910
+
96869
95911
  // src/app/components/filing/filing.component.ts
96870
95912
  function FilingComponent_Conditional_7_Template(rf, ctx) {
96871
95913
  if (rf & 1) {
@@ -96981,18 +96023,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
96981
96023
  \u0275\u0275restoreView(_r6);
96982
96024
  const ctx_r2 = \u0275\u0275nextContext(2);
96983
96025
  return \u0275\u0275resetView(ctx_r2.onBritishColumbiaChangeOfOfficeAddressesSubmit());
96984
- })("arValidate", function FilingComponent_Conditional_10_Conditional_1_Template_british_columbia_arValidate_0_listener($event) {
96985
- \u0275\u0275restoreView(_r6);
96986
- const ctx_r2 = \u0275\u0275nextContext(2);
96987
- return \u0275\u0275resetView(ctx_r2.onBritishColumbiaAnnualReportValidate($event));
96988
- })("saveArDeltaData", function FilingComponent_Conditional_10_Conditional_1_Template_british_columbia_saveArDeltaData_0_listener($event) {
96989
- \u0275\u0275restoreView(_r6);
96990
- const ctx_r2 = \u0275\u0275nextContext(2);
96991
- return \u0275\u0275resetView(ctx_r2.onBritishColumbiaAnnualReportSave($event));
96992
- })("arSubmit", function FilingComponent_Conditional_10_Conditional_1_Template_british_columbia_arSubmit_0_listener() {
96993
- \u0275\u0275restoreView(_r6);
96994
- const ctx_r2 = \u0275\u0275nextContext(2);
96995
- return \u0275\u0275resetView(ctx_r2.onBritishColumbiaAnnualReportSubmit());
96996
96026
  })("formationValidate", function FilingComponent_Conditional_10_Conditional_1_Template_british_columbia_formationValidate_0_listener($event) {
96997
96027
  \u0275\u0275restoreView(_r6);
96998
96028
  const ctx_r2 = \u0275\u0275nextContext(2);
@@ -97099,7 +96129,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
97099
96129
  init_federal_update_maintain_service();
97100
96130
  init_ontario_update_maintain_service();
97101
96131
  init_initial_return_payload_helper();
97102
- init_british_columbia_annual_report_mapper();
97103
96132
  init_ontario_formation_mapper();
97104
96133
  init_federal_formation_mapper();
97105
96134
  init_ontario_update_maintain_mapper();
@@ -97204,7 +96233,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
97204
96233
  return `File ${jurisdiction} Notice of Change`;
97205
96234
  }
97206
96235
  if (isAnnualReturnTask(task)) {
97207
- return isBritishColumbiaTask(task) ? `File ${jurisdiction} Annual Report` : `File ${jurisdiction} Annual Return`;
96236
+ return `File ${jurisdiction} Annual Return`;
97208
96237
  }
97209
96238
  if (isFormationTask2(task)) {
97210
96239
  return `File ${jurisdiction} Articles of Incorporation`;
@@ -97484,10 +96513,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
97484
96513
  const signature = this._signature();
97485
96514
  if (signature) {
97486
96515
  const requestBody = buildBCFormationValidateRequest(signature.task, deltaData);
97487
- const issues = [
97488
- ...findBCOfficeAddressIssues(signature.task),
97489
- ...findBCRequestIssues(requestBody)
97490
- ];
96516
+ const issues = findBCRequestIssues(requestBody);
97491
96517
  if (issues.length) {
97492
96518
  this.errors.set(issues);
97493
96519
  return;
@@ -97560,99 +96586,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
97560
96586
  }
97561
96587
  });
97562
96588
  }
97563
- /**
97564
- * British Columbia Annual Report "Validate & Generate Draft": orders the registry's current data,
97565
- * sends the filing to eCore, hands the draft PDF to the host, and saves the delta together with
97566
- * the ServiceOrderId and the request sent (`validatedData`) used to detect later Entity changes.
97567
- */
97568
- onBritishColumbiaAnnualReportValidate(deltaData) {
97569
- return __async(this, null, function* () {
97570
- const task = this.task();
97571
- const signature = this._signature();
97572
- try {
97573
- if (!task || !signature || !isAnnualReturnTask(task)) {
97574
- throw new Error("The filing is not ready yet. Please try again.");
97575
- }
97576
- this.isLoading.set(true);
97577
- this.errors.set([]);
97578
- const requestBody = buildBCAnnualReportValidateRequest(task, deltaData);
97579
- const opts = this.validateOptions() ?? {};
97580
- const context2 = buildBCAnnualReportContext(task, signature.env);
97581
- const extractId = yield this.bcMaintenanceService.orderCurrentDataExtract(signature, context2, opts);
97582
- yield this.bcMaintenanceService.waitForCurrentDataExtract(signature, extractId, opts);
97583
- const response = yield this.bcMaintenanceService.validate(signature, requestBody, extractId, context2, opts);
97584
- if (this.hasResponseErrors(response))
97585
- return;
97586
- const serviceOrderId = response.ServiceOrderId ?? "";
97587
- const draftPdf = response.Draft ?? "";
97588
- const searchOrFilingType = getSearchOrFilingType(task);
97589
- if (draftPdf && searchOrFilingType) {
97590
- this.filingValidateSuccess.emit({
97591
- searchOrFilingType,
97592
- serviceOrderId,
97593
- validatedOn: /* @__PURE__ */ new Date(),
97594
- provider: getFilingProvider(task),
97595
- draftPdf,
97596
- documentName: this.validateOptions()?.documentName ?? "British Columbia Annual Report Draft",
97597
- documentType: "pdf"
97598
- });
97599
- }
97600
- this.deltaDataChange.emit(__spreadProps(__spreadValues({}, deltaData), {
97601
- serviceOrderId,
97602
- // The corporation number is added by the service, not by the request builder, so it is
97603
- // stored explicitly (the access code is deliberately left out) to detect entity changes.
97604
- validatedData: __spreadProps(__spreadValues({}, JSON.parse(JSON.stringify(requestBody))), {
97605
- corporationNumber: context2.corporationNumber
97606
- })
97607
- }));
97608
- this.close.emit();
97609
- } catch (response) {
97610
- this.handleCatchError(response);
97611
- } finally {
97612
- this.isLoading.set(false);
97613
- }
97614
- });
97615
- }
97616
- /**
97617
- * British Columbia Annual Report save – propagates delta data to the host.
97618
- * The draft link (ServiceOrderId and the request it was generated from) is kept, so reopening
97619
- * can tell whether the saved data still matches the draft and show "Entity changed" if not.
97620
- */
97621
- onBritishColumbiaAnnualReportSave(deltaData) {
97622
- const oldDeltaData = this.task()?.deltaData;
97623
- const draftLink = oldDeltaData?.serviceOrderId && oldDeltaData?.validatedData ? {
97624
- serviceOrderId: oldDeltaData.serviceOrderId,
97625
- validatedData: oldDeltaData.validatedData
97626
- } : {};
97627
- if (oldDeltaData) {
97628
- delete this.task()?.deltaData;
97629
- }
97630
- this.deltaDataChange.emit(__spreadValues(__spreadValues({}, deltaData), draftLink));
97631
- }
97632
- /**
97633
- * British Columbia Annual Report submit/file: submits the filing staged by "Validate & Generate
97634
- * Draft" using the ServiceOrderId saved with the delta. There is no certification step.
97635
- */
97636
- onBritishColumbiaAnnualReportSubmit() {
97637
- return __async(this, null, function* () {
97638
- const signature = this._signature();
97639
- const serviceOrderId = this.task()?.deltaData?.serviceOrderId;
97640
- if (!signature || !serviceOrderId) {
97641
- this.handleCatchError(new Error("Missing serviceOrderId. Generate a draft before filing."));
97642
- return;
97643
- }
97644
- try {
97645
- this.isLoading.set(true);
97646
- this.errors.set([]);
97647
- yield this.bcMaintenanceService.submitAndWait(signature, serviceOrderId, this.validateOptions() ?? {});
97648
- this.close.emit();
97649
- } catch (response) {
97650
- this.handleCatchError(response);
97651
- } finally {
97652
- this.isLoading.set(false);
97653
- }
97654
- });
97655
- }
97656
96589
  /**
97657
96590
  * British Columbia Change of Office Addresses "Validate & Generate Draft": sends the filing
97658
96591
  * to eCore, hands the draft PDF to the host, and saves the delta together with the
@@ -97672,7 +96605,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
97672
96605
  const opts = this.validateOptions() ?? {};
97673
96606
  const context2 = {
97674
96607
  corporationNumber: task.entity._profile.corp_number ?? "",
97675
- accessCodeOrPassword: getBritishColumbiaAccessCode(task, signature.env),
96608
+ accessCodeOrPassword: getBritishColumbiaAccessCode2(task, signature.env),
97676
96609
  incorporationDate: String(task.entity._compliance?.incorporation_date ?? "").slice(0, 10)
97677
96610
  };
97678
96611
  const extractId = yield this.bcMaintenanceService.orderCurrentDataExtract(signature, context2, opts);
@@ -97712,19 +96645,13 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
97712
96645
  }
97713
96646
  /**
97714
96647
  * British Columbia Change of Office Addresses save – propagates delta data to the host.
97715
- * The draft link (ServiceOrderId and the request it was generated from) is kept, so reopening
97716
- * can tell whether the saved data still matches the draft and show "Entity changed" if not.
97717
96648
  */
97718
96649
  onBritishColumbiaChangeOfOfficeAddressesSave(deltaData) {
97719
96650
  const oldDeltaData = this.task()?.deltaData;
97720
- const draftLink = oldDeltaData?.serviceOrderId && oldDeltaData?.validatedData ? {
97721
- serviceOrderId: oldDeltaData.serviceOrderId,
97722
- validatedData: oldDeltaData.validatedData
97723
- } : {};
97724
96651
  if (oldDeltaData) {
97725
96652
  delete this.task()?.deltaData;
97726
96653
  }
97727
- this.deltaDataChange.emit(__spreadValues(__spreadValues({}, deltaData), draftLink));
96654
+ this.deltaDataChange.emit(deltaData);
97728
96655
  }
97729
96656
  /**
97730
96657
  * British Columbia Change of Office Addresses submit/file: submits the filing staged by
@@ -97972,7 +96899,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
97972
96899
  const task = this.task();
97973
96900
  if (!task)
97974
96901
  return;
97975
- if (isUpdateMaintain(task) && !isBritishColumbiaTask(task)) {
96902
+ if (isUpdateMaintain(task)) {
97976
96903
  this.serviceOrderId = "";
97977
96904
  void this.getCurrentData();
97978
96905
  } else if (isChangeOfPrincipalsTask(task) && isBritishColumbiaTask(task)) {
@@ -98116,8 +97043,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
98116
97043
  initialDelta = isOntarioTask(task) ? this.deltaState.formationInitialDelta() : isBritishColumbiaTask(task) ? this.deltaState.bcFormationInitialDelta() : this.deltaState.federalFormationInitialDelta();
98117
97044
  } else if (isChangeOfAddressTask(task) && isBritishColumbiaTask(task)) {
98118
97045
  initialDelta = this.deltaState.bcChangeOfOfficeAddressesInitialDelta();
98119
- } else if (isAnnualReturnTask(task) && isBritishColumbiaTask(task)) {
98120
- initialDelta = this.deltaState.bcAnnualReportInitialDelta();
98121
97046
  } else if (isUpdateMaintain(task)) {
98122
97047
  initialDelta = isOntarioTask(task) ? this.deltaState.initialReturnInitialDelta() : this.deltaState.federalUpdateMaintainInitialDelta();
98123
97048
  } else if (isChangeOfPrincipalsTask(task) && isBritishColumbiaTask(task)) {
@@ -98156,11 +97081,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
98156
97081
  corporationNumber: task.entity._profile.corp_number ?? ""
98157
97082
  });
98158
97083
  }
98159
- if (isAnnualReturnTask(task) && isBritishColumbiaTask(task)) {
98160
- return __spreadProps(__spreadValues({}, buildBCAnnualReportValidateRequest(task, deltaData)), {
98161
- corporationNumber: task.entity._profile.corp_number ?? ""
98162
- });
98163
- }
98164
97084
  if (isUpdateMaintain(task) && isOntarioTask(task)) {
98165
97085
  const serviceOrderId = deltaData?.serviceOrderId ?? this.serviceOrderId;
98166
97086
  if (!serviceOrderId) {
@@ -98189,7 +97109,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
98189
97109
  if (rf & 2) {
98190
97110
  \u0275\u0275styleProp("height", ctx.modalHeight());
98191
97111
  }
98192
- }, inputs: { env: [1, "env"], config: [1, "config"], language: [1, "language"], proxyApiUrl: [1, "proxyApiUrl"], jwtToken: [1, "jwtToken"], task: [1, "task"], currentUser: [1, "currentUser"], height: [1, "height"], validateOptions: [1, "validateOptions"], getDocumentBytes: [1, "getDocumentBytes"] }, outputs: { deltaDataChange: "deltaDataChange", filingValidateSuccess: "filingValidateSuccess", filingSubmitSuccess: "filingSubmitSuccess", close: "close" }, decls: 12, vars: 9, consts: [[1, "filing"], [1, "filing-title"], [1, "filing-title-text"], [1, "filing-title-action", 3, "click"], [1, "filing-header"], [1, "filing-content"], [1, "filing-content-loading"], ["mat-stroked-button", "", 3, "click", "disabled"], [3, "task", "activeStep", "isNote", "actionsDisabled", "errors", "prevData", "irValidationConfig"], [3, "task", "currentUser", "activeStep", "isNote", "actionsDisabled", "errors", "currentDataExtract"], [3, "actionsDisabled", "isNote", "activeStep", "task", "errors"], [3, "close", "formationValidate", "saveFormationDeltaData", "formationSubmit", "nextStep", "prevStep", "irValidate", "saveIrDeltaData", "irSubmit", "task", "activeStep", "isNote", "actionsDisabled", "errors", "prevData", "irValidationConfig"], [3, "close", "nextStep", "recheckStep", "prevStep", "codValidate", "saveCodDeltaData", "codSubmit", "coaValidate", "saveCoaDeltaData", "coaSubmit", "arValidate", "saveArDeltaData", "arSubmit", "formationValidate", "saveFormationDeltaData", "formationSubmit", "task", "currentUser", "activeStep", "isNote", "actionsDisabled", "errors", "currentDataExtract"], [3, "close", "deltaDataChange", "file", "validate", "umSave", "umValidate", "umSubmit", "nextStep", "actionsDisabled", "isNote", "activeStep", "task", "errors"], [3, "diameter"]], template: function FilingComponent_Template(rf, ctx) {
97112
+ }, inputs: { env: [1, "env"], config: [1, "config"], language: [1, "language"], proxyApiUrl: [1, "proxyApiUrl"], jwtToken: [1, "jwtToken"], task: [1, "task"], currentUser: [1, "currentUser"], height: [1, "height"], validateOptions: [1, "validateOptions"], getDocumentBytes: [1, "getDocumentBytes"] }, outputs: { deltaDataChange: "deltaDataChange", filingValidateSuccess: "filingValidateSuccess", filingSubmitSuccess: "filingSubmitSuccess", close: "close" }, decls: 12, vars: 9, consts: [[1, "filing"], [1, "filing-title"], [1, "filing-title-text"], [1, "filing-title-action", 3, "click"], [1, "filing-header"], [1, "filing-content"], [1, "filing-content-loading"], ["mat-stroked-button", "", 3, "click", "disabled"], [3, "task", "activeStep", "isNote", "actionsDisabled", "errors", "prevData", "irValidationConfig"], [3, "task", "currentUser", "activeStep", "isNote", "actionsDisabled", "errors", "currentDataExtract"], [3, "actionsDisabled", "isNote", "activeStep", "task", "errors"], [3, "close", "formationValidate", "saveFormationDeltaData", "formationSubmit", "nextStep", "prevStep", "irValidate", "saveIrDeltaData", "irSubmit", "task", "activeStep", "isNote", "actionsDisabled", "errors", "prevData", "irValidationConfig"], [3, "close", "nextStep", "recheckStep", "prevStep", "codValidate", "saveCodDeltaData", "codSubmit", "coaValidate", "saveCoaDeltaData", "coaSubmit", "formationValidate", "saveFormationDeltaData", "formationSubmit", "task", "currentUser", "activeStep", "isNote", "actionsDisabled", "errors", "currentDataExtract"], [3, "close", "deltaDataChange", "file", "validate", "umSave", "umValidate", "umSubmit", "nextStep", "actionsDisabled", "isNote", "activeStep", "task", "errors"], [3, "diameter"]], template: function FilingComponent_Template(rf, ctx) {
98193
97113
  if (rf & 1) {
98194
97114
  const _r1 = \u0275\u0275getCurrentView();
98195
97115
  \u0275\u0275elementStart(0, "div", 0)(1, "div", 1)(2, "h1", 2);
@@ -98303,9 +97223,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
98303
97223
  (coaValidate)="onBritishColumbiaChangeOfOfficeAddressesValidate($event)"\r
98304
97224
  (saveCoaDeltaData)="onBritishColumbiaChangeOfOfficeAddressesSave($event)"\r
98305
97225
  (coaSubmit)="onBritishColumbiaChangeOfOfficeAddressesSubmit()"\r
98306
- (arValidate)="onBritishColumbiaAnnualReportValidate($event)"\r
98307
- (saveArDeltaData)="onBritishColumbiaAnnualReportSave($event)"\r
98308
- (arSubmit)="onBritishColumbiaAnnualReportSubmit()"\r
98309
97226
  (formationValidate)="onBritishColumbiaFormationValidate($event)"\r
98310
97227
  (saveFormationDeltaData)="onBritishColumbiaFormationSave($event)"\r
98311
97228
  (formationSubmit)="onBritishColumbiaFormationSubmit()"\r
@@ -98339,7 +97256,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
98339
97256
  }], () => [], null);
98340
97257
  })();
98341
97258
  (() => {
98342
- (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(FilingComponent, { className: "FilingComponent", filePath: "src/app/components/filing/filing.component.ts", lineNumber: 103 });
97259
+ (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(FilingComponent, { className: "FilingComponent", filePath: "src/app/components/filing/filing.component.ts", lineNumber: 98 });
98343
97260
  })();
98344
97261
  }
98345
97262
  });
@@ -102995,13 +101912,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
102995
101912
  "New Delivery Address": "New Delivery Address",
102996
101913
  "Same as Mailing Address": "Same as Mailing Address",
102997
101914
  "Same as Registered Office": "Same as Registered Office",
102998
- "The delivery address must be a physical location in British Columbia where documents can be delivered during statutory business hours. A post office box is not acceptable.": "The delivery address must be a physical location in British Columbia where documents can be delivered during statutory business hours. A post office box is not acceptable.",
102999
- "Company Name": "Company Name",
103000
- "Name Reservation (NR) Number": "Name Reservation (NR) Number",
103001
- "File British Columbia Annual Report": "File British Columbia Annual Report",
103002
- "Would the company like to receive reminders to file its annual reports": "Would the company like to receive reminders to file its annual reports",
103003
- "Company Email is required": "Company Email is required",
103004
- "The draft is missing its Service Order ID. Close this window and generate a new draft.": "The draft is missing its Service Order ID. Close this window and generate a new draft."
101915
+ "The delivery address must be a physical location in British Columbia where documents can be delivered during statutory business hours. A post office box is not acceptable.": "The delivery address must be a physical location in British Columbia where documents can be delivered during statutory business hours. A post office box is not acceptable."
103005
101916
  };
103006
101917
  }
103007
101918
  });
@@ -103357,10 +102268,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
103357
102268
  "New Delivery Address": "Nouvelle adresse de livraison",
103358
102269
  "Same as Mailing Address": "Identique \xE0 l'adresse postale",
103359
102270
  "Same as Registered Office": "Identique au si\xE8ge social",
103360
- "The delivery address must be a physical location in British Columbia where documents can be delivered during statutory business hours. A post office box is not acceptable.": "L'adresse de livraison doit \xEAtre un lieu physique en Colombie-Britannique o\xF9 des documents peuvent \xEAtre livr\xE9s pendant les heures d'ouverture l\xE9gales. Une case postale n'est pas accept\xE9e.",
103361
- "File British Columbia Articles of Incorporation": "D\xE9poser les statuts constitutifs de la Colombie-Britannique",
103362
- "Company Name": "Nom de la soci\xE9t\xE9",
103363
- "Name Reservation (NR) Number": "Num\xE9ro de r\xE9servation de nom (NR)"
102271
+ "The delivery address must be a physical location in British Columbia where documents can be delivered during statutory business hours. A post office box is not acceptable.": "L'adresse de livraison doit \xEAtre un lieu physique en Colombie-Britannique o\xF9 des documents peuvent \xEAtre livr\xE9s pendant les heures d'ouverture l\xE9gales. Une case postale n'est pas accept\xE9e."
103364
102272
  };
103365
102273
  }
103366
102274
  });