@wix/form-public 0.183.0 → 0.185.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tsup-dts-rollup.d.cts +10 -2
- package/dist/_tsup-dts-rollup.d.ts +10 -2
- package/dist/index.cjs +585 -428
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +585 -428
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -70,7 +70,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
70
70
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
71
71
|
|
|
72
72
|
// ../../node_modules/@wix/ambassador-forms-v4-form/es/build/types.impl.js
|
|
73
|
-
var Format, ValidationFormat, ProductType, PriceType, FieldFieldType, StringTypeFormatEnumFormat, InputFieldStringComponentType, NodeType, WidthType, PluginContainerDataAlignment, Type, Target, TextAlignment, LineStyle, Width, Alignment, ViewMode, LayoutType, Orientation, Crop, ThumbnailsAlignment, GIFType, Source, Position, MapType, ViewRole, VoteRole, PollLayoutType, PollLayoutDirection, BackgroundType, DecorationType, FontType, ImageStylesPosition, AspectRatio, Resizing, Placement, CardStylesType, CardStylesAlignment, CardStylesLayout, AppType, InitialExpandedItems, Direction, VerticalAlignment, NullValue, Scaling, LayoutDataImagePosition, Origin, VerticalAlignmentAlignment, ResponsivenessBehaviour, DesignTarget, ImagePosition, AlignmentEnumAlignment, ImageFit, NumberOfColumns, FirstDayOfWeekEnumFirstDayOfWeek, InputFieldNumberComponentType, InputFieldBooleanComponentType, ArrayItemsItemType, PropertiesTypePropertiesTypeEnum, ArrayComponentType, InputFieldWixFileComponentType, UploadFileFormat, InputFieldPaymentComponentType, AddressComponentType, DefaultCountryConfigType, ObjectArrayComponentType, InputFieldSchedulingComponentType, AppointmentFormat, InputFieldInputType, FormFieldContactInfoEmailInfoTag, FormFieldContactInfoPhoneInfoTag, AddressInfoTag, ConfirmationLevel, FormFieldContactInfoContactField, DisplayFieldDisplayFieldType, OverrideEntityType, Kind, EmailInfoTag, PhoneInfoTag, Tag, OptInLevel, ContactField, SpamFilterProtectionLevel, RequiredIndicator, RequiredIndicatorPlacement, UrlTargetEnumTarget, SubmitSuccessAction, ChangeableProperty, OverrideEntityTypeEnumOverrideEntityType, Operator, ResultsDisplay, ContactAutofill, Fieldset, SortOrder, CountFormsFieldset, ListFormsOrderEnumListFormsOrder, FilterType, ListFormsOrder, ListDeletedFormsOrder, FieldInputType, WebhookIdentityType;
|
|
73
|
+
var Format, DayOfWeek, ValidationFormat, ProductType, PriceType, FieldFieldType, StringTypeFormatEnumFormat, InputFieldStringComponentType, NodeType, WidthType, PluginContainerDataAlignment, Type, Target, TextAlignment, LineStyle, Width, Alignment, ViewMode, LayoutType, Orientation, Crop, ThumbnailsAlignment, GIFType, Source, Position, MapType, ViewRole, VoteRole, PollLayoutType, PollLayoutDirection, BackgroundType, DecorationType, FontType, ImageStylesPosition, AspectRatio, Resizing, Placement, CardStylesType, CardStylesAlignment, CardStylesLayout, AppType, InitialExpandedItems, Direction, VerticalAlignment, NullValue, Scaling, LayoutDataImagePosition, Origin, VerticalAlignmentAlignment, ResponsivenessBehaviour, DesignTarget, ImagePosition, AlignmentEnumAlignment, ImageFit, NumberOfColumns, FirstDayOfWeekEnumFirstDayOfWeek, InputFieldNumberComponentType, InputFieldBooleanComponentType, ArrayItemsItemType, PropertiesTypePropertiesTypeEnum, ArrayComponentType, InputFieldWixFileComponentType, UploadFileFormat, InputFieldPaymentComponentType, AddressComponentType, DefaultCountryConfigType, ObjectArrayComponentType, InputFieldSchedulingComponentType, AppointmentFormat, MeetingType, StaffStrategySelection, InputFieldInputType, FormFieldContactInfoEmailInfoTag, FormFieldContactInfoPhoneInfoTag, AddressInfoTag, ConfirmationLevel, SubscriptionChannel, FormFieldContactInfoContactField, DisplayFieldDisplayFieldType, OverrideEntityType, Kind, EmailInfoTag, PhoneInfoTag, Tag, OptInLevel, ContactField, SpamFilterProtectionLevel, RequiredIndicator, RequiredIndicatorPlacement, UrlTargetEnumTarget, SubmitSuccessAction, ChangeableProperty, OverrideEntityTypeEnumOverrideEntityType, Operator, ResultsDisplay, ContactAutofill, Fieldset, SortOrder, CountFormsFieldset, ListFormsOrderEnumListFormsOrder, FilterType, ListFormsOrder, ListDeletedFormsOrder, FieldInputType, WebhookIdentityType;
|
|
74
74
|
var init_types_impl = __esm({
|
|
75
75
|
"../../node_modules/@wix/ambassador-forms-v4-form/es/build/types.impl.js"() {
|
|
76
76
|
(function(Format6) {
|
|
@@ -89,6 +89,15 @@ var init_types_impl = __esm({
|
|
|
89
89
|
Format6["LANGUAGE"] = "LANGUAGE";
|
|
90
90
|
Format6["DATE_OPTIONAL_TIME"] = "DATE_OPTIONAL_TIME";
|
|
91
91
|
})(Format || (Format = {}));
|
|
92
|
+
(function(DayOfWeek5) {
|
|
93
|
+
DayOfWeek5["MONDAY"] = "MONDAY";
|
|
94
|
+
DayOfWeek5["TUESDAY"] = "TUESDAY";
|
|
95
|
+
DayOfWeek5["WEDNESDAY"] = "WEDNESDAY";
|
|
96
|
+
DayOfWeek5["THURSDAY"] = "THURSDAY";
|
|
97
|
+
DayOfWeek5["FRIDAY"] = "FRIDAY";
|
|
98
|
+
DayOfWeek5["SATURDAY"] = "SATURDAY";
|
|
99
|
+
DayOfWeek5["SUNDAY"] = "SUNDAY";
|
|
100
|
+
})(DayOfWeek || (DayOfWeek = {}));
|
|
92
101
|
(function(ValidationFormat4) {
|
|
93
102
|
ValidationFormat4["UNDEFINED"] = "UNDEFINED";
|
|
94
103
|
ValidationFormat4["WIX_FILE"] = "WIX_FILE";
|
|
@@ -384,9 +393,9 @@ var init_types_impl = __esm({
|
|
|
384
393
|
LayoutDataImagePosition4["BOTTOM_LEFT"] = "BOTTOM_LEFT";
|
|
385
394
|
LayoutDataImagePosition4["BOTTOM_RIGHT"] = "BOTTOM_RIGHT";
|
|
386
395
|
})(LayoutDataImagePosition || (LayoutDataImagePosition = {}));
|
|
387
|
-
(function(
|
|
388
|
-
|
|
389
|
-
|
|
396
|
+
(function(Origin5) {
|
|
397
|
+
Origin5["IMAGE"] = "IMAGE";
|
|
398
|
+
Origin5["LAYOUT"] = "LAYOUT";
|
|
390
399
|
})(Origin || (Origin = {}));
|
|
391
400
|
(function(VerticalAlignmentAlignment5) {
|
|
392
401
|
VerticalAlignmentAlignment5["TOP"] = "TOP";
|
|
@@ -500,6 +509,17 @@ var init_types_impl = __esm({
|
|
|
500
509
|
AppointmentFormat4["VIDEO_CONFERENCE"] = "VIDEO_CONFERENCE";
|
|
501
510
|
AppointmentFormat4["PHONE"] = "PHONE";
|
|
502
511
|
})(AppointmentFormat || (AppointmentFormat = {}));
|
|
512
|
+
(function(MeetingType4) {
|
|
513
|
+
MeetingType4["UNKNOWN_MEETING_TYPE"] = "UNKNOWN_MEETING_TYPE";
|
|
514
|
+
MeetingType4["SINGLE_STAFF"] = "SINGLE_STAFF";
|
|
515
|
+
MeetingType4["ROUND_ROBIN"] = "ROUND_ROBIN";
|
|
516
|
+
})(MeetingType || (MeetingType = {}));
|
|
517
|
+
(function(StaffStrategySelection4) {
|
|
518
|
+
StaffStrategySelection4["UNKNOWN_STAFF_STRATEGY_SELECTION"] = "UNKNOWN_STAFF_STRATEGY_SELECTION";
|
|
519
|
+
StaffStrategySelection4["AUTOMATIC"] = "AUTOMATIC";
|
|
520
|
+
StaffStrategySelection4["HIGH_TO_LOW_PRIORITY"] = "HIGH_TO_LOW_PRIORITY";
|
|
521
|
+
StaffStrategySelection4["LOW_TO_HIGH_PRIORITY"] = "LOW_TO_HIGH_PRIORITY";
|
|
522
|
+
})(StaffStrategySelection || (StaffStrategySelection = {}));
|
|
503
523
|
(function(InputFieldInputType3) {
|
|
504
524
|
InputFieldInputType3["UNKNOWN_INPUT_TYPE"] = "UNKNOWN_INPUT_TYPE";
|
|
505
525
|
InputFieldInputType3["STRING"] = "STRING";
|
|
@@ -531,6 +551,11 @@ var init_types_impl = __esm({
|
|
|
531
551
|
ConfirmationLevel4["SINGLE_CONFIRMATION"] = "SINGLE_CONFIRMATION";
|
|
532
552
|
ConfirmationLevel4["DOUBLE_CONFIRMATION"] = "DOUBLE_CONFIRMATION";
|
|
533
553
|
})(ConfirmationLevel || (ConfirmationLevel = {}));
|
|
554
|
+
(function(SubscriptionChannel5) {
|
|
555
|
+
SubscriptionChannel5["UNKNOWN_SUBSCRIPTION_CHANNEL"] = "UNKNOWN_SUBSCRIPTION_CHANNEL";
|
|
556
|
+
SubscriptionChannel5["EMAIL"] = "EMAIL";
|
|
557
|
+
SubscriptionChannel5["SMS"] = "SMS";
|
|
558
|
+
})(SubscriptionChannel || (SubscriptionChannel = {}));
|
|
534
559
|
(function(FormFieldContactInfoContactField3) {
|
|
535
560
|
FormFieldContactInfoContactField3["UNKNOWN_CONTACT_FIELD"] = "UNKNOWN_CONTACT_FIELD";
|
|
536
561
|
FormFieldContactInfoContactField3["FIRST_NAME"] = "FIRST_NAME";
|
|
@@ -666,10 +691,10 @@ var init_types_impl = __esm({
|
|
|
666
691
|
ResultsDisplay3["PASSING_STATUS"] = "PASSING_STATUS";
|
|
667
692
|
ResultsDisplay3["SCORE_AND_PASSING_STATUS"] = "SCORE_AND_PASSING_STATUS";
|
|
668
693
|
})(ResultsDisplay || (ResultsDisplay = {}));
|
|
669
|
-
(function(
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
694
|
+
(function(ContactAutofill5) {
|
|
695
|
+
ContactAutofill5["UNKNOWN_CONTACT_AUTOFILL"] = "UNKNOWN_CONTACT_AUTOFILL";
|
|
696
|
+
ContactAutofill5["MEMBER_DATA"] = "MEMBER_DATA";
|
|
697
|
+
ContactAutofill5["FORM_INPUT"] = "FORM_INPUT";
|
|
673
698
|
})(ContactAutofill || (ContactAutofill = {}));
|
|
674
699
|
(function(Fieldset2) {
|
|
675
700
|
Fieldset2["UNKNOWN"] = "UNKNOWN";
|
|
@@ -5011,7 +5036,7 @@ var init_max = __esm({
|
|
|
5011
5036
|
});
|
|
5012
5037
|
|
|
5013
5038
|
// ../../node_modules/@wix/ambassador-forms-v1-validation-result/es/build/types.impl.js
|
|
5014
|
-
var ErrorType, Format2, ValidationFormat2, ProductType2, PriceType2, FieldFieldType2, StringTypeFormatEnumFormat2, InputFieldStringComponentType2, NodeType2, WidthType2, PluginContainerDataAlignment2, Type2, Target2, TextAlignment2, LineStyle2, Width2, Alignment2, ViewMode2, LayoutType2, Orientation2, Crop2, ThumbnailsAlignment2, GIFType2, Source2, Position2, MapType3, ViewRole2, VoteRole2, PollLayoutType2, PollLayoutDirection2, BackgroundType2, DecorationType2, FontType2, ImageStylesPosition2, AspectRatio2, Resizing2, Placement2, CardStylesType2, CardStylesAlignment2, CardStylesLayout2, AppType2, InitialExpandedItems2, Direction2, VerticalAlignment2, NullValue2, Scaling2, LayoutDataImagePosition2, Origin2, VerticalAlignmentAlignment2, ResponsivenessBehaviour2, DesignTarget2, ImagePosition2, AlignmentEnumAlignment2, ImageFit2, NumberOfColumns2, FirstDayOfWeekEnumFirstDayOfWeek2, InputFieldNumberComponentType2, InputFieldBooleanComponentType2, ArrayItemsItemType2, PropertiesTypePropertiesTypeEnum2, ArrayComponentType2, InputFieldWixFileComponentType2, UploadFileFormat2, InputFieldPaymentComponentType2, AddressComponentType2, DefaultCountryConfigType2, ObjectArrayComponentType2, InputFieldSchedulingComponentType2, AppointmentFormat2, InputFieldInputType2, FormFieldContactInfoEmailInfoTag2, FormFieldContactInfoPhoneInfoTag2, AddressInfoTag2, ConfirmationLevel2,
|
|
5039
|
+
var ErrorType, Format2, DayOfWeek2, ValidationFormat2, ProductType2, PriceType2, FieldFieldType2, StringTypeFormatEnumFormat2, InputFieldStringComponentType2, NodeType2, WidthType2, PluginContainerDataAlignment2, Type2, Target2, TextAlignment2, LineStyle2, Width2, Alignment2, ViewMode2, LayoutType2, Orientation2, Crop2, ThumbnailsAlignment2, GIFType2, Source2, Position2, MapType3, ViewRole2, VoteRole2, PollLayoutType2, PollLayoutDirection2, BackgroundType2, DecorationType2, FontType2, ImageStylesPosition2, AspectRatio2, Resizing2, Placement2, CardStylesType2, CardStylesAlignment2, CardStylesLayout2, AppType2, InitialExpandedItems2, Direction2, VerticalAlignment2, NullValue2, Scaling2, LayoutDataImagePosition2, Origin2, VerticalAlignmentAlignment2, ResponsivenessBehaviour2, DesignTarget2, ImagePosition2, AlignmentEnumAlignment2, ImageFit2, NumberOfColumns2, FirstDayOfWeekEnumFirstDayOfWeek2, InputFieldNumberComponentType2, InputFieldBooleanComponentType2, ArrayItemsItemType2, PropertiesTypePropertiesTypeEnum2, ArrayComponentType2, InputFieldWixFileComponentType2, UploadFileFormat2, InputFieldPaymentComponentType2, AddressComponentType2, DefaultCountryConfigType2, ObjectArrayComponentType2, InputFieldSchedulingComponentType2, AppointmentFormat2, MeetingType2, StaffStrategySelection2, InputFieldInputType2, FormFieldContactInfoEmailInfoTag2, FormFieldContactInfoPhoneInfoTag2, AddressInfoTag2, ConfirmationLevel2, SubscriptionChannel2, FormFieldContactInfoContactField2, DisplayFieldDisplayFieldType2, OverrideEntityType2, Kind2, EmailInfoTag2, PhoneInfoTag2, Tag2, OptInLevel2, ContactField2, SpamFilterProtectionLevel2, RequiredIndicator2, RequiredIndicatorPlacement2, UrlTargetEnumTarget2, SubmitSuccessAction2, ChangeableProperty2, OverrideEntityTypeEnumOverrideEntityType2, Operator2, ResultsDisplay2, ContactAutofill2, ValidationMode, Feature, AscendPlan, ActionType;
|
|
5015
5040
|
var init_types_impl2 = __esm({
|
|
5016
5041
|
"../../node_modules/@wix/ambassador-forms-v1-validation-result/es/build/types.impl.js"() {
|
|
5017
5042
|
(function(ErrorType2) {
|
|
@@ -5067,6 +5092,15 @@ var init_types_impl2 = __esm({
|
|
|
5067
5092
|
Format6["LANGUAGE"] = "LANGUAGE";
|
|
5068
5093
|
Format6["DATE_OPTIONAL_TIME"] = "DATE_OPTIONAL_TIME";
|
|
5069
5094
|
})(Format2 || (Format2 = {}));
|
|
5095
|
+
(function(DayOfWeek5) {
|
|
5096
|
+
DayOfWeek5["MONDAY"] = "MONDAY";
|
|
5097
|
+
DayOfWeek5["TUESDAY"] = "TUESDAY";
|
|
5098
|
+
DayOfWeek5["WEDNESDAY"] = "WEDNESDAY";
|
|
5099
|
+
DayOfWeek5["THURSDAY"] = "THURSDAY";
|
|
5100
|
+
DayOfWeek5["FRIDAY"] = "FRIDAY";
|
|
5101
|
+
DayOfWeek5["SATURDAY"] = "SATURDAY";
|
|
5102
|
+
DayOfWeek5["SUNDAY"] = "SUNDAY";
|
|
5103
|
+
})(DayOfWeek2 || (DayOfWeek2 = {}));
|
|
5070
5104
|
(function(ValidationFormat4) {
|
|
5071
5105
|
ValidationFormat4["UNDEFINED"] = "UNDEFINED";
|
|
5072
5106
|
ValidationFormat4["WIX_FILE"] = "WIX_FILE";
|
|
@@ -5362,9 +5396,9 @@ var init_types_impl2 = __esm({
|
|
|
5362
5396
|
LayoutDataImagePosition4["BOTTOM_LEFT"] = "BOTTOM_LEFT";
|
|
5363
5397
|
LayoutDataImagePosition4["BOTTOM_RIGHT"] = "BOTTOM_RIGHT";
|
|
5364
5398
|
})(LayoutDataImagePosition2 || (LayoutDataImagePosition2 = {}));
|
|
5365
|
-
(function(
|
|
5366
|
-
|
|
5367
|
-
|
|
5399
|
+
(function(Origin5) {
|
|
5400
|
+
Origin5["IMAGE"] = "IMAGE";
|
|
5401
|
+
Origin5["LAYOUT"] = "LAYOUT";
|
|
5368
5402
|
})(Origin2 || (Origin2 = {}));
|
|
5369
5403
|
(function(VerticalAlignmentAlignment5) {
|
|
5370
5404
|
VerticalAlignmentAlignment5["TOP"] = "TOP";
|
|
@@ -5478,6 +5512,17 @@ var init_types_impl2 = __esm({
|
|
|
5478
5512
|
AppointmentFormat4["VIDEO_CONFERENCE"] = "VIDEO_CONFERENCE";
|
|
5479
5513
|
AppointmentFormat4["PHONE"] = "PHONE";
|
|
5480
5514
|
})(AppointmentFormat2 || (AppointmentFormat2 = {}));
|
|
5515
|
+
(function(MeetingType4) {
|
|
5516
|
+
MeetingType4["UNKNOWN_MEETING_TYPE"] = "UNKNOWN_MEETING_TYPE";
|
|
5517
|
+
MeetingType4["SINGLE_STAFF"] = "SINGLE_STAFF";
|
|
5518
|
+
MeetingType4["ROUND_ROBIN"] = "ROUND_ROBIN";
|
|
5519
|
+
})(MeetingType2 || (MeetingType2 = {}));
|
|
5520
|
+
(function(StaffStrategySelection4) {
|
|
5521
|
+
StaffStrategySelection4["UNKNOWN_STAFF_STRATEGY_SELECTION"] = "UNKNOWN_STAFF_STRATEGY_SELECTION";
|
|
5522
|
+
StaffStrategySelection4["AUTOMATIC"] = "AUTOMATIC";
|
|
5523
|
+
StaffStrategySelection4["HIGH_TO_LOW_PRIORITY"] = "HIGH_TO_LOW_PRIORITY";
|
|
5524
|
+
StaffStrategySelection4["LOW_TO_HIGH_PRIORITY"] = "LOW_TO_HIGH_PRIORITY";
|
|
5525
|
+
})(StaffStrategySelection2 || (StaffStrategySelection2 = {}));
|
|
5481
5526
|
(function(InputFieldInputType3) {
|
|
5482
5527
|
InputFieldInputType3["UNKNOWN_INPUT_TYPE"] = "UNKNOWN_INPUT_TYPE";
|
|
5483
5528
|
InputFieldInputType3["STRING"] = "STRING";
|
|
@@ -5509,11 +5554,11 @@ var init_types_impl2 = __esm({
|
|
|
5509
5554
|
ConfirmationLevel4["SINGLE_CONFIRMATION"] = "SINGLE_CONFIRMATION";
|
|
5510
5555
|
ConfirmationLevel4["DOUBLE_CONFIRMATION"] = "DOUBLE_CONFIRMATION";
|
|
5511
5556
|
})(ConfirmationLevel2 || (ConfirmationLevel2 = {}));
|
|
5512
|
-
(function(
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
})(
|
|
5557
|
+
(function(SubscriptionChannel5) {
|
|
5558
|
+
SubscriptionChannel5["UNKNOWN_SUBSCRIPTION_CHANNEL"] = "UNKNOWN_SUBSCRIPTION_CHANNEL";
|
|
5559
|
+
SubscriptionChannel5["EMAIL"] = "EMAIL";
|
|
5560
|
+
SubscriptionChannel5["SMS"] = "SMS";
|
|
5561
|
+
})(SubscriptionChannel2 || (SubscriptionChannel2 = {}));
|
|
5517
5562
|
(function(FormFieldContactInfoContactField3) {
|
|
5518
5563
|
FormFieldContactInfoContactField3["UNKNOWN_CONTACT_FIELD"] = "UNKNOWN_CONTACT_FIELD";
|
|
5519
5564
|
FormFieldContactInfoContactField3["FIRST_NAME"] = "FIRST_NAME";
|
|
@@ -5649,10 +5694,10 @@ var init_types_impl2 = __esm({
|
|
|
5649
5694
|
ResultsDisplay3["PASSING_STATUS"] = "PASSING_STATUS";
|
|
5650
5695
|
ResultsDisplay3["SCORE_AND_PASSING_STATUS"] = "SCORE_AND_PASSING_STATUS";
|
|
5651
5696
|
})(ResultsDisplay2 || (ResultsDisplay2 = {}));
|
|
5652
|
-
(function(
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5697
|
+
(function(ContactAutofill5) {
|
|
5698
|
+
ContactAutofill5["UNKNOWN_CONTACT_AUTOFILL"] = "UNKNOWN_CONTACT_AUTOFILL";
|
|
5699
|
+
ContactAutofill5["MEMBER_DATA"] = "MEMBER_DATA";
|
|
5700
|
+
ContactAutofill5["FORM_INPUT"] = "FORM_INPUT";
|
|
5656
5701
|
})(ContactAutofill2 || (ContactAutofill2 = {}));
|
|
5657
5702
|
(function(ValidationMode2) {
|
|
5658
5703
|
ValidationMode2["UNKNOWN"] = "UNKNOWN";
|
|
@@ -22397,6 +22442,218 @@ var require_messages_en = __commonJS({
|
|
|
22397
22442
|
}
|
|
22398
22443
|
});
|
|
22399
22444
|
|
|
22445
|
+
// ../../node_modules/@wix/sdk-runtime/build/constants.js
|
|
22446
|
+
var SDKRequestToRESTRequestRenameMap, RESTResponseToSDKResponseRenameMap;
|
|
22447
|
+
var init_constants3 = __esm({
|
|
22448
|
+
"../../node_modules/@wix/sdk-runtime/build/constants.js"() {
|
|
22449
|
+
SDKRequestToRESTRequestRenameMap = {
|
|
22450
|
+
_id: "id",
|
|
22451
|
+
_createdDate: "createdDate",
|
|
22452
|
+
_updatedDate: "updatedDate"
|
|
22453
|
+
};
|
|
22454
|
+
RESTResponseToSDKResponseRenameMap = {
|
|
22455
|
+
id: "_id",
|
|
22456
|
+
createdDate: "_createdDate",
|
|
22457
|
+
updatedDate: "_updatedDate"
|
|
22458
|
+
};
|
|
22459
|
+
}
|
|
22460
|
+
});
|
|
22461
|
+
|
|
22462
|
+
// ../../node_modules/@wix/sdk-runtime/build/utils.js
|
|
22463
|
+
function removeUndefinedKeys(obj) {
|
|
22464
|
+
return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== void 0));
|
|
22465
|
+
}
|
|
22466
|
+
function constantCase(input) {
|
|
22467
|
+
return split(input).map((part) => part.toLocaleUpperCase()).join("_");
|
|
22468
|
+
}
|
|
22469
|
+
function split(value) {
|
|
22470
|
+
let result2 = value.trim();
|
|
22471
|
+
result2 = result2.replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);
|
|
22472
|
+
result2 = result2.replace(DEFAULT_STRIP_REGEXP, "\0");
|
|
22473
|
+
let start = 0;
|
|
22474
|
+
let end = result2.length;
|
|
22475
|
+
while (result2.charAt(start) === "\0") {
|
|
22476
|
+
start++;
|
|
22477
|
+
}
|
|
22478
|
+
if (start === end) {
|
|
22479
|
+
return [];
|
|
22480
|
+
}
|
|
22481
|
+
while (result2.charAt(end - 1) === "\0") {
|
|
22482
|
+
end--;
|
|
22483
|
+
}
|
|
22484
|
+
return result2.slice(start, end).split(/\0/g);
|
|
22485
|
+
}
|
|
22486
|
+
var SPLIT_LOWER_UPPER_RE, SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE, DEFAULT_STRIP_REGEXP;
|
|
22487
|
+
var init_utils2 = __esm({
|
|
22488
|
+
"../../node_modules/@wix/sdk-runtime/build/utils.js"() {
|
|
22489
|
+
SPLIT_LOWER_UPPER_RE = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
22490
|
+
SPLIT_UPPER_UPPER_RE = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
22491
|
+
SPLIT_REPLACE_VALUE = "$1\0$2";
|
|
22492
|
+
DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
|
|
22493
|
+
}
|
|
22494
|
+
});
|
|
22495
|
+
|
|
22496
|
+
// ../../node_modules/@wix/sdk-runtime/build/transform-error.js
|
|
22497
|
+
function transformError(httpClientError, pathsToArguments = {
|
|
22498
|
+
explicitPathsToArguments: {},
|
|
22499
|
+
spreadPathsToArguments: {},
|
|
22500
|
+
singleArgumentUnchanged: false
|
|
22501
|
+
}, argumentNames = []) {
|
|
22502
|
+
if (typeof httpClientError !== "object" || httpClientError === null) {
|
|
22503
|
+
throw httpClientError;
|
|
22504
|
+
}
|
|
22505
|
+
if (isValidationError(httpClientError)) {
|
|
22506
|
+
return buildValidationError(httpClientError, pathsToArguments, argumentNames);
|
|
22507
|
+
}
|
|
22508
|
+
if (isApplicationError(httpClientError)) {
|
|
22509
|
+
return buildApplicationError(httpClientError);
|
|
22510
|
+
}
|
|
22511
|
+
if (isClientError(httpClientError)) {
|
|
22512
|
+
const status = httpClientError.response?.status;
|
|
22513
|
+
const statusText = httpClientError.response?.statusText ?? "UNKNOWN";
|
|
22514
|
+
const message = httpClientError.response?.data?.message ?? statusText;
|
|
22515
|
+
const details = {
|
|
22516
|
+
applicationError: {
|
|
22517
|
+
description: statusText,
|
|
22518
|
+
code: constantCase(statusText),
|
|
22519
|
+
data: {}
|
|
22520
|
+
},
|
|
22521
|
+
requestId: httpClientError.requestId
|
|
22522
|
+
};
|
|
22523
|
+
return wrapError(httpClientError, {
|
|
22524
|
+
message: JSON.stringify({
|
|
22525
|
+
message,
|
|
22526
|
+
details
|
|
22527
|
+
}, null, 2),
|
|
22528
|
+
extraProperties: {
|
|
22529
|
+
details,
|
|
22530
|
+
status
|
|
22531
|
+
}
|
|
22532
|
+
});
|
|
22533
|
+
}
|
|
22534
|
+
return buildSystemError(httpClientError);
|
|
22535
|
+
}
|
|
22536
|
+
var isValidationError, isApplicationError, isClientError, buildValidationError, wrapError, buildApplicationError, buildSystemError, violationsWithRenamedFields, withRenamedArgument, getArgumentIndex;
|
|
22537
|
+
var init_transform_error = __esm({
|
|
22538
|
+
"../../node_modules/@wix/sdk-runtime/build/transform-error.js"() {
|
|
22539
|
+
init_utils2();
|
|
22540
|
+
isValidationError = (httpClientError) => "validationError" in (httpClientError.response?.data?.details ?? {});
|
|
22541
|
+
isApplicationError = (httpClientError) => "applicationError" in (httpClientError.response?.data?.details ?? {});
|
|
22542
|
+
isClientError = (httpClientError) => (httpClientError.response?.status ?? -1) >= 400 && (httpClientError.response?.status ?? -1) < 500;
|
|
22543
|
+
buildValidationError = (httpClientError, pathsToArguments, argumentNames) => {
|
|
22544
|
+
const validationErrorResponse = httpClientError.response?.data;
|
|
22545
|
+
const requestId = httpClientError.requestId;
|
|
22546
|
+
const { fieldViolations } = validationErrorResponse.details.validationError;
|
|
22547
|
+
const transformedFieldViolations = violationsWithRenamedFields(pathsToArguments, fieldViolations, argumentNames)?.sort((a, b) => a.field < b.field ? -1 : 1);
|
|
22548
|
+
const message = `INVALID_ARGUMENT: ${transformedFieldViolations?.map(({ field, description }) => `"${field}" ${description}`)?.join(", ")}`;
|
|
22549
|
+
const details = {
|
|
22550
|
+
validationError: { fieldViolations: transformedFieldViolations },
|
|
22551
|
+
requestId
|
|
22552
|
+
};
|
|
22553
|
+
return wrapError(httpClientError, {
|
|
22554
|
+
message: JSON.stringify({ message, details }, null, 2),
|
|
22555
|
+
extraProperties: {
|
|
22556
|
+
details,
|
|
22557
|
+
status: httpClientError.response?.status,
|
|
22558
|
+
requestId
|
|
22559
|
+
}
|
|
22560
|
+
});
|
|
22561
|
+
};
|
|
22562
|
+
wrapError = (baseError, { message, extraProperties }) => {
|
|
22563
|
+
return Object.assign(baseError, {
|
|
22564
|
+
...extraProperties,
|
|
22565
|
+
message
|
|
22566
|
+
});
|
|
22567
|
+
};
|
|
22568
|
+
buildApplicationError = (httpClientError) => {
|
|
22569
|
+
const status = httpClientError.response?.status;
|
|
22570
|
+
const statusText = httpClientError.response?.statusText ?? "UNKNOWN";
|
|
22571
|
+
const message = httpClientError.response?.data?.message ?? statusText;
|
|
22572
|
+
const description = httpClientError.response?.data?.details?.applicationError?.description ?? statusText;
|
|
22573
|
+
const code = httpClientError.response?.data?.details?.applicationError?.code ?? constantCase(statusText);
|
|
22574
|
+
const data = httpClientError.response?.data?.details?.applicationError?.data ?? {};
|
|
22575
|
+
const combinedMessage = message === description ? message : `${message}: ${description}`;
|
|
22576
|
+
const details = {
|
|
22577
|
+
applicationError: {
|
|
22578
|
+
description,
|
|
22579
|
+
code,
|
|
22580
|
+
data
|
|
22581
|
+
},
|
|
22582
|
+
requestId: httpClientError.requestId
|
|
22583
|
+
};
|
|
22584
|
+
return wrapError(httpClientError, {
|
|
22585
|
+
message: JSON.stringify({ message: combinedMessage, details }, null, 2),
|
|
22586
|
+
extraProperties: {
|
|
22587
|
+
details,
|
|
22588
|
+
status,
|
|
22589
|
+
requestId: httpClientError.requestId
|
|
22590
|
+
}
|
|
22591
|
+
});
|
|
22592
|
+
};
|
|
22593
|
+
buildSystemError = (httpClientError) => {
|
|
22594
|
+
const message = httpClientError.requestId ? `System error occurred, request-id: ${httpClientError.requestId}` : `System error occurred: ${JSON.stringify(httpClientError)}`;
|
|
22595
|
+
return wrapError(httpClientError, {
|
|
22596
|
+
message,
|
|
22597
|
+
extraProperties: {
|
|
22598
|
+
requestId: httpClientError.requestId,
|
|
22599
|
+
status: httpClientError.response?.status,
|
|
22600
|
+
code: constantCase(httpClientError.response?.statusText ?? "UNKNOWN"),
|
|
22601
|
+
...!httpClientError.response && {
|
|
22602
|
+
runtimeError: httpClientError
|
|
22603
|
+
}
|
|
22604
|
+
}
|
|
22605
|
+
});
|
|
22606
|
+
};
|
|
22607
|
+
violationsWithRenamedFields = ({ spreadPathsToArguments, explicitPathsToArguments, singleArgumentUnchanged }, fieldViolations, argumentNames) => {
|
|
22608
|
+
const allPathsToArguments = {
|
|
22609
|
+
...spreadPathsToArguments,
|
|
22610
|
+
...explicitPathsToArguments
|
|
22611
|
+
};
|
|
22612
|
+
const allPathsToArgumentsKeys = Object.keys(allPathsToArguments);
|
|
22613
|
+
return fieldViolations?.filter((fieldViolation) => {
|
|
22614
|
+
const containedInAMoreSpecificViolationField = fieldViolations.some((anotherViolation) => anotherViolation.field.length > fieldViolation.field.length && anotherViolation.field.startsWith(fieldViolation.field) && allPathsToArgumentsKeys.includes(anotherViolation.field));
|
|
22615
|
+
return !containedInAMoreSpecificViolationField;
|
|
22616
|
+
}).map((fieldViolation) => {
|
|
22617
|
+
const exactMatchArgumentExpression = explicitPathsToArguments[fieldViolation.field];
|
|
22618
|
+
if (exactMatchArgumentExpression) {
|
|
22619
|
+
return {
|
|
22620
|
+
...fieldViolation,
|
|
22621
|
+
field: withRenamedArgument(exactMatchArgumentExpression, argumentNames)
|
|
22622
|
+
};
|
|
22623
|
+
}
|
|
22624
|
+
const longestPartialPathMatch = allPathsToArgumentsKeys?.sort((a, b) => b.length - a.length)?.find((path) => fieldViolation.field.startsWith(path));
|
|
22625
|
+
if (longestPartialPathMatch) {
|
|
22626
|
+
const partialMatchArgumentExpression = allPathsToArguments[longestPartialPathMatch];
|
|
22627
|
+
if (partialMatchArgumentExpression) {
|
|
22628
|
+
return {
|
|
22629
|
+
...fieldViolation,
|
|
22630
|
+
field: fieldViolation.field.replace(longestPartialPathMatch, withRenamedArgument(partialMatchArgumentExpression, argumentNames))
|
|
22631
|
+
};
|
|
22632
|
+
}
|
|
22633
|
+
}
|
|
22634
|
+
if (singleArgumentUnchanged) {
|
|
22635
|
+
return {
|
|
22636
|
+
...fieldViolation,
|
|
22637
|
+
field: `${argumentNames[0]}.${fieldViolation.field}`
|
|
22638
|
+
};
|
|
22639
|
+
}
|
|
22640
|
+
return fieldViolation;
|
|
22641
|
+
});
|
|
22642
|
+
};
|
|
22643
|
+
withRenamedArgument = (fieldValue, argumentNames) => {
|
|
22644
|
+
const argIndex = getArgumentIndex(fieldValue);
|
|
22645
|
+
if (argIndex !== null && typeof argIndex !== "undefined") {
|
|
22646
|
+
return fieldValue.replace(`$[${argIndex}]`, argumentNames[argIndex]);
|
|
22647
|
+
}
|
|
22648
|
+
return fieldValue;
|
|
22649
|
+
};
|
|
22650
|
+
getArgumentIndex = (s) => {
|
|
22651
|
+
const match = s.match(/\$\[(?<argIndex>\d+)\]/);
|
|
22652
|
+
return match && match.groups && Number(match.groups.argIndex);
|
|
22653
|
+
};
|
|
22654
|
+
}
|
|
22655
|
+
});
|
|
22656
|
+
|
|
22400
22657
|
// ../../node_modules/@wix/sdk-context/build/browser/index.mjs
|
|
22401
22658
|
var wixContext;
|
|
22402
22659
|
var init_browser = __esm({
|
|
@@ -22405,6 +22662,231 @@ var init_browser = __esm({
|
|
|
22405
22662
|
}
|
|
22406
22663
|
});
|
|
22407
22664
|
|
|
22665
|
+
// ../../node_modules/@wix/sdk-runtime/build/context.js
|
|
22666
|
+
function resolveContext() {
|
|
22667
|
+
const oldContext = typeof $wixContext !== "undefined" && $wixContext.initWixModules ? $wixContext.initWixModules : typeof globalThis.__wix_context__ !== "undefined" && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
22668
|
+
if (oldContext) {
|
|
22669
|
+
return {
|
|
22670
|
+
// @ts-expect-error
|
|
22671
|
+
initWixModules(modules, elevated) {
|
|
22672
|
+
return runWithoutContext(() => oldContext(modules, elevated));
|
|
22673
|
+
},
|
|
22674
|
+
fetchWithAuth() {
|
|
22675
|
+
throw new Error("fetchWithAuth is not available in this context");
|
|
22676
|
+
},
|
|
22677
|
+
graphql() {
|
|
22678
|
+
throw new Error("graphql is not available in this context");
|
|
22679
|
+
}
|
|
22680
|
+
};
|
|
22681
|
+
}
|
|
22682
|
+
const contextualClient = typeof $wixContext !== "undefined" ? $wixContext.client : typeof wixContext.client !== "undefined" ? wixContext.client : typeof globalThis.__wix_context__ !== "undefined" ? globalThis.__wix_context__.client : void 0;
|
|
22683
|
+
const elevatedClient = typeof $wixContext !== "undefined" ? $wixContext.elevatedClient : typeof wixContext.elevatedClient !== "undefined" ? wixContext.elevatedClient : typeof globalThis.__wix_context__ !== "undefined" ? globalThis.__wix_context__.elevatedClient : void 0;
|
|
22684
|
+
if (!contextualClient && !elevatedClient) {
|
|
22685
|
+
return;
|
|
22686
|
+
}
|
|
22687
|
+
return {
|
|
22688
|
+
initWixModules(wixModules, elevated) {
|
|
22689
|
+
if (elevated) {
|
|
22690
|
+
if (!elevatedClient) {
|
|
22691
|
+
throw new Error("An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules");
|
|
22692
|
+
}
|
|
22693
|
+
return runWithoutContext(() => elevatedClient.use(wixModules));
|
|
22694
|
+
}
|
|
22695
|
+
if (!contextualClient) {
|
|
22696
|
+
throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
|
|
22697
|
+
}
|
|
22698
|
+
return runWithoutContext(() => contextualClient.use(wixModules));
|
|
22699
|
+
},
|
|
22700
|
+
fetchWithAuth: (urlOrRequest, requestInit) => {
|
|
22701
|
+
if (!contextualClient) {
|
|
22702
|
+
throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
|
|
22703
|
+
}
|
|
22704
|
+
return contextualClient.fetchWithAuth(urlOrRequest, requestInit);
|
|
22705
|
+
},
|
|
22706
|
+
getAuth() {
|
|
22707
|
+
if (!contextualClient) {
|
|
22708
|
+
throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
|
|
22709
|
+
}
|
|
22710
|
+
return contextualClient.auth;
|
|
22711
|
+
},
|
|
22712
|
+
async graphql(query, variables, opts) {
|
|
22713
|
+
if (!contextualClient) {
|
|
22714
|
+
throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
|
|
22715
|
+
}
|
|
22716
|
+
return contextualClient.graphql(query, variables, opts);
|
|
22717
|
+
}
|
|
22718
|
+
};
|
|
22719
|
+
}
|
|
22720
|
+
function runWithoutContext(fn) {
|
|
22721
|
+
const globalContext = globalThis.__wix_context__;
|
|
22722
|
+
const moduleContext = {
|
|
22723
|
+
client: wixContext.client,
|
|
22724
|
+
elevatedClient: wixContext.elevatedClient
|
|
22725
|
+
};
|
|
22726
|
+
let closureContext;
|
|
22727
|
+
globalThis.__wix_context__ = void 0;
|
|
22728
|
+
wixContext.client = void 0;
|
|
22729
|
+
wixContext.elevatedClient = void 0;
|
|
22730
|
+
if (typeof $wixContext !== "undefined") {
|
|
22731
|
+
closureContext = {
|
|
22732
|
+
client: $wixContext?.client,
|
|
22733
|
+
elevatedClient: $wixContext?.elevatedClient
|
|
22734
|
+
};
|
|
22735
|
+
delete $wixContext.client;
|
|
22736
|
+
delete $wixContext.elevatedClient;
|
|
22737
|
+
}
|
|
22738
|
+
try {
|
|
22739
|
+
return fn();
|
|
22740
|
+
} finally {
|
|
22741
|
+
globalThis.__wix_context__ = globalContext;
|
|
22742
|
+
wixContext.client = moduleContext.client;
|
|
22743
|
+
wixContext.elevatedClient = moduleContext.elevatedClient;
|
|
22744
|
+
if (typeof $wixContext !== "undefined") {
|
|
22745
|
+
$wixContext.client = closureContext.client;
|
|
22746
|
+
$wixContext.elevatedClient = closureContext.elevatedClient;
|
|
22747
|
+
}
|
|
22748
|
+
}
|
|
22749
|
+
}
|
|
22750
|
+
var init_context = __esm({
|
|
22751
|
+
"../../node_modules/@wix/sdk-runtime/build/context.js"() {
|
|
22752
|
+
init_browser();
|
|
22753
|
+
init_context_v2();
|
|
22754
|
+
}
|
|
22755
|
+
});
|
|
22756
|
+
|
|
22757
|
+
// ../../node_modules/@wix/sdk-runtime/build/context-v2.js
|
|
22758
|
+
function contextualizeRESTModuleV2(restModule, elevated) {
|
|
22759
|
+
return ((...args) => {
|
|
22760
|
+
const context = resolveContext();
|
|
22761
|
+
if (!context) {
|
|
22762
|
+
return restModule.apply(void 0, args);
|
|
22763
|
+
}
|
|
22764
|
+
return context.initWixModules(restModule, elevated).apply(void 0, args);
|
|
22765
|
+
});
|
|
22766
|
+
}
|
|
22767
|
+
var init_context_v2 = __esm({
|
|
22768
|
+
"../../node_modules/@wix/sdk-runtime/build/context-v2.js"() {
|
|
22769
|
+
init_context();
|
|
22770
|
+
}
|
|
22771
|
+
});
|
|
22772
|
+
|
|
22773
|
+
// ../../node_modules/@wix/sdk-runtime/build/rest-modules.js
|
|
22774
|
+
function createRESTModule(descriptor, elevated = false) {
|
|
22775
|
+
return contextualizeRESTModuleV2(descriptor, elevated);
|
|
22776
|
+
}
|
|
22777
|
+
function toURLSearchParams(params, isComplexRequest) {
|
|
22778
|
+
const flatten = flattenParams(params);
|
|
22779
|
+
Object.entries(flatten).some(([key, value]) => key.includes(".") || Array.isArray(value) && value.some((v) => typeof v === "object"));
|
|
22780
|
+
{
|
|
22781
|
+
return Object.entries(flatten).reduce((urlSearchParams, [key, value]) => {
|
|
22782
|
+
const keyParams = Array.isArray(value) ? value : [value];
|
|
22783
|
+
keyParams.forEach((param) => {
|
|
22784
|
+
if (param === void 0 || param === null || Array.isArray(value) && typeof param === "object") {
|
|
22785
|
+
return;
|
|
22786
|
+
}
|
|
22787
|
+
urlSearchParams.append(key, param);
|
|
22788
|
+
});
|
|
22789
|
+
return urlSearchParams;
|
|
22790
|
+
}, new URLSearchParams());
|
|
22791
|
+
}
|
|
22792
|
+
}
|
|
22793
|
+
function resolveUrl(opts) {
|
|
22794
|
+
const domain = resolveDomain(opts.host);
|
|
22795
|
+
const mappings = resolveMappingsByDomain(domain, opts.domainToMappings);
|
|
22796
|
+
const path = injectDataIntoProtoPath(opts.protoPath, opts.data || {});
|
|
22797
|
+
return resolvePathFromMappings(path, mappings);
|
|
22798
|
+
}
|
|
22799
|
+
function flattenParams(data, path = "") {
|
|
22800
|
+
const params = {};
|
|
22801
|
+
Object.entries(data).forEach(([key, value]) => {
|
|
22802
|
+
const isObject5 = value !== null && typeof value === "object" && !Array.isArray(value);
|
|
22803
|
+
const fieldPath = resolvePath(path, key);
|
|
22804
|
+
if (isObject5) {
|
|
22805
|
+
const serializedObject = flattenParams(value, fieldPath);
|
|
22806
|
+
Object.assign(params, serializedObject);
|
|
22807
|
+
} else {
|
|
22808
|
+
params[fieldPath] = value;
|
|
22809
|
+
}
|
|
22810
|
+
});
|
|
22811
|
+
return params;
|
|
22812
|
+
}
|
|
22813
|
+
function resolvePath(path, key) {
|
|
22814
|
+
return `${path}${path ? "." : ""}${key}`;
|
|
22815
|
+
}
|
|
22816
|
+
function resolveDomain(host) {
|
|
22817
|
+
const resolvedHost = fixHostExceptions(host);
|
|
22818
|
+
return resolvedHost.replace(REGEX_CAPTURE_DOMAINS, "._base_domain_").replace(REGEX_CAPTURE_API_DOMAINS, "._api_base_domain_").replace(REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, "*.dev.wix-code.com");
|
|
22819
|
+
}
|
|
22820
|
+
function fixHostExceptions(host) {
|
|
22821
|
+
return host.replace("create.editorx.com", "editor.editorx.com");
|
|
22822
|
+
}
|
|
22823
|
+
function resolveMappingsByDomain(domain, domainToMappings) {
|
|
22824
|
+
const mappings = domainToMappings[domain] || domainToMappings[USER_DOMAIN];
|
|
22825
|
+
if (mappings) {
|
|
22826
|
+
return mappings;
|
|
22827
|
+
}
|
|
22828
|
+
const rootDomainMappings = resolveRootDomain(domain, domainToMappings);
|
|
22829
|
+
if (!rootDomainMappings) {
|
|
22830
|
+
if (isBaseDomain(domain)) {
|
|
22831
|
+
return domainToMappings[wwwBaseDomain];
|
|
22832
|
+
}
|
|
22833
|
+
}
|
|
22834
|
+
return rootDomainMappings ?? [];
|
|
22835
|
+
}
|
|
22836
|
+
function resolveRootDomain(domain, domainToMappings) {
|
|
22837
|
+
return Object.entries(domainToMappings).find(([entryDomain]) => {
|
|
22838
|
+
const [, ...rooDomainSegments] = domain.split(".");
|
|
22839
|
+
return rooDomainSegments.join(".") === entryDomain;
|
|
22840
|
+
})?.[1];
|
|
22841
|
+
}
|
|
22842
|
+
function isBaseDomain(domain) {
|
|
22843
|
+
return !!domain.match(/\._base_domain_$/);
|
|
22844
|
+
}
|
|
22845
|
+
function injectDataIntoProtoPath(protoPath, data) {
|
|
22846
|
+
return protoPath.split("/").map((path) => maybeProtoPathToData(path, data)).join("/");
|
|
22847
|
+
}
|
|
22848
|
+
function maybeProtoPathToData(protoPath, data) {
|
|
22849
|
+
const protoRegExpMatch = protoPath.match(REGEX_CAPTURE_PROTO_FIELD) || [];
|
|
22850
|
+
const field = protoRegExpMatch[1];
|
|
22851
|
+
if (field) {
|
|
22852
|
+
const suffix = protoPath.replace(protoRegExpMatch[0], "");
|
|
22853
|
+
return findByPath(data, field, protoPath, suffix);
|
|
22854
|
+
}
|
|
22855
|
+
return protoPath;
|
|
22856
|
+
}
|
|
22857
|
+
function findByPath(obj, path, defaultValue, suffix) {
|
|
22858
|
+
let result2 = obj;
|
|
22859
|
+
for (const field of path.split(".")) {
|
|
22860
|
+
if (!result2) {
|
|
22861
|
+
return defaultValue;
|
|
22862
|
+
}
|
|
22863
|
+
result2 = result2[field];
|
|
22864
|
+
}
|
|
22865
|
+
return `${result2}${suffix}`;
|
|
22866
|
+
}
|
|
22867
|
+
function resolvePathFromMappings(protoPath, mappings) {
|
|
22868
|
+
const mapping = mappings?.find((m) => protoPath.startsWith(m.destPath));
|
|
22869
|
+
if (!mapping) {
|
|
22870
|
+
return protoPath;
|
|
22871
|
+
}
|
|
22872
|
+
return mapping.srcPath + protoPath.slice(mapping.destPath.length);
|
|
22873
|
+
}
|
|
22874
|
+
var DOMAINS, USER_DOMAIN, REGEX_CAPTURE_DOMAINS, WIX_API_DOMAINS, DEV_WIX_CODE_DOMAIN, REGEX_CAPTURE_PROTO_FIELD, REGEX_CAPTURE_API_DOMAINS, REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, wwwBaseDomain;
|
|
22875
|
+
var init_rest_modules = __esm({
|
|
22876
|
+
"../../node_modules/@wix/sdk-runtime/build/rest-modules.js"() {
|
|
22877
|
+
init_context_v2();
|
|
22878
|
+
DOMAINS = ["wix.com", "editorx.com"];
|
|
22879
|
+
USER_DOMAIN = "_";
|
|
22880
|
+
REGEX_CAPTURE_DOMAINS = new RegExp(`\\.(${DOMAINS.join("|")})$`);
|
|
22881
|
+
WIX_API_DOMAINS = ["42.wixprod.net", "uw2-edt-1.wixprod.net"];
|
|
22882
|
+
DEV_WIX_CODE_DOMAIN = "dev.wix-code.com";
|
|
22883
|
+
REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/;
|
|
22884
|
+
REGEX_CAPTURE_API_DOMAINS = new RegExp(`\\.(${WIX_API_DOMAINS.join("|")})$`);
|
|
22885
|
+
REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN = new RegExp(`.*\\.${DEV_WIX_CODE_DOMAIN}$`);
|
|
22886
|
+
wwwBaseDomain = "www._base_domain_";
|
|
22887
|
+
}
|
|
22888
|
+
});
|
|
22889
|
+
|
|
22408
22890
|
// ../../node_modules/@wix/json-proto-serializer/node_modules/long/src/long.js
|
|
22409
22891
|
var require_long = __commonJS({
|
|
22410
22892
|
"../../node_modules/@wix/json-proto-serializer/node_modules/long/src/long.js"(exports, module) {
|
|
@@ -24185,7 +24667,7 @@ function isCI() {
|
|
|
24185
24667
|
function isNode() {
|
|
24186
24668
|
return typeof process !== "undefined" && process.versions?.node != null;
|
|
24187
24669
|
}
|
|
24188
|
-
var
|
|
24670
|
+
var init_utils3 = __esm({
|
|
24189
24671
|
"../../node_modules/@wix/headers/dist/esm/utils.js"() {
|
|
24190
24672
|
}
|
|
24191
24673
|
});
|
|
@@ -24199,7 +24681,7 @@ function artifactId(override) {
|
|
|
24199
24681
|
}
|
|
24200
24682
|
var init_artifact_id = __esm({
|
|
24201
24683
|
"../../node_modules/@wix/headers/dist/esm/headers/artifact-id.js"() {
|
|
24202
|
-
|
|
24684
|
+
init_utils3();
|
|
24203
24685
|
}
|
|
24204
24686
|
});
|
|
24205
24687
|
|
|
@@ -27574,6 +28056,16 @@ var Format4;
|
|
|
27574
28056
|
Format6["LANGUAGE"] = "LANGUAGE";
|
|
27575
28057
|
Format6["DATE_OPTIONAL_TIME"] = "DATE_OPTIONAL_TIME";
|
|
27576
28058
|
})(Format4 || (Format4 = {}));
|
|
28059
|
+
var DayOfWeek3;
|
|
28060
|
+
(function(DayOfWeek5) {
|
|
28061
|
+
DayOfWeek5["MONDAY"] = "MONDAY";
|
|
28062
|
+
DayOfWeek5["TUESDAY"] = "TUESDAY";
|
|
28063
|
+
DayOfWeek5["WEDNESDAY"] = "WEDNESDAY";
|
|
28064
|
+
DayOfWeek5["THURSDAY"] = "THURSDAY";
|
|
28065
|
+
DayOfWeek5["FRIDAY"] = "FRIDAY";
|
|
28066
|
+
DayOfWeek5["SATURDAY"] = "SATURDAY";
|
|
28067
|
+
DayOfWeek5["SUNDAY"] = "SUNDAY";
|
|
28068
|
+
})(DayOfWeek3 || (DayOfWeek3 = {}));
|
|
27577
28069
|
var ValidationFormat3;
|
|
27578
28070
|
(function(ValidationFormat4) {
|
|
27579
28071
|
ValidationFormat4["UNDEFINED"] = "UNDEFINED";
|
|
@@ -27623,6 +28115,12 @@ var OptInLevel3;
|
|
|
27623
28115
|
OptInLevel4["SINGLE_CONFIRMATION"] = "SINGLE_CONFIRMATION";
|
|
27624
28116
|
OptInLevel4["DOUBLE_CONFIRMATION"] = "DOUBLE_CONFIRMATION";
|
|
27625
28117
|
})(OptInLevel3 || (OptInLevel3 = {}));
|
|
28118
|
+
var SubscriptionChannel3;
|
|
28119
|
+
(function(SubscriptionChannel5) {
|
|
28120
|
+
SubscriptionChannel5["UNKNOWN_SUBSCRIPTION_CHANNEL"] = "UNKNOWN_SUBSCRIPTION_CHANNEL";
|
|
28121
|
+
SubscriptionChannel5["EMAIL"] = "EMAIL";
|
|
28122
|
+
SubscriptionChannel5["SMS"] = "SMS";
|
|
28123
|
+
})(SubscriptionChannel3 || (SubscriptionChannel3 = {}));
|
|
27626
28124
|
var ContactField3;
|
|
27627
28125
|
(function(ContactField5) {
|
|
27628
28126
|
ContactField5["UNDEFINED"] = "UNDEFINED";
|
|
@@ -27945,6 +28443,11 @@ var ImagePosition3;
|
|
|
27945
28443
|
ImagePosition5["BOTTOM_LEFT"] = "BOTTOM_LEFT";
|
|
27946
28444
|
ImagePosition5["BOTTOM_RIGHT"] = "BOTTOM_RIGHT";
|
|
27947
28445
|
})(ImagePosition3 || (ImagePosition3 = {}));
|
|
28446
|
+
var Origin3;
|
|
28447
|
+
(function(Origin5) {
|
|
28448
|
+
Origin5["IMAGE"] = "IMAGE";
|
|
28449
|
+
Origin5["LAYOUT"] = "LAYOUT";
|
|
28450
|
+
})(Origin3 || (Origin3 = {}));
|
|
27948
28451
|
var VerticalAlignmentAlignment3;
|
|
27949
28452
|
(function(VerticalAlignmentAlignment5) {
|
|
27950
28453
|
VerticalAlignmentAlignment5["TOP"] = "TOP";
|
|
@@ -27987,6 +28490,12 @@ var RequiredIndicatorPlacement3;
|
|
|
27987
28490
|
RequiredIndicatorPlacement5["AFTER_FIELD_TITLE"] = "AFTER_FIELD_TITLE";
|
|
27988
28491
|
RequiredIndicatorPlacement5["BEFORE_FIELD_TITLE"] = "BEFORE_FIELD_TITLE";
|
|
27989
28492
|
})(RequiredIndicatorPlacement3 || (RequiredIndicatorPlacement3 = {}));
|
|
28493
|
+
var ContactAutofill3;
|
|
28494
|
+
(function(ContactAutofill5) {
|
|
28495
|
+
ContactAutofill5["UNKNOWN_CONTACT_AUTOFILL"] = "UNKNOWN_CONTACT_AUTOFILL";
|
|
28496
|
+
ContactAutofill5["MEMBER_DATA"] = "MEMBER_DATA";
|
|
28497
|
+
ContactAutofill5["FORM_INPUT"] = "FORM_INPUT";
|
|
28498
|
+
})(ContactAutofill3 || (ContactAutofill3 = {}));
|
|
27990
28499
|
var SortOrder2;
|
|
27991
28500
|
(function(SortOrder3) {
|
|
27992
28501
|
SortOrder3["ASC"] = "ASC";
|
|
@@ -28001,7 +28510,7 @@ var WebhookIdentityType2;
|
|
|
28001
28510
|
WebhookIdentityType3["APP"] = "APP";
|
|
28002
28511
|
})(WebhookIdentityType2 || (WebhookIdentityType2 = {}));
|
|
28003
28512
|
|
|
28004
|
-
// ../../node_modules/@wix/ambassador-forms-v2-form-template/build/
|
|
28513
|
+
// ../../node_modules/@wix/ambassador-forms-v2-form-template/es/build/types.impl.js
|
|
28005
28514
|
var FieldType;
|
|
28006
28515
|
(function(FieldType2) {
|
|
28007
28516
|
FieldType2["UNKNOWN_FIELD_TYPE"] = "UNKNOWN_FIELD_TYPE";
|
|
@@ -28025,6 +28534,16 @@ var Format5;
|
|
|
28025
28534
|
Format6["LANGUAGE"] = "LANGUAGE";
|
|
28026
28535
|
Format6["DATE_OPTIONAL_TIME"] = "DATE_OPTIONAL_TIME";
|
|
28027
28536
|
})(Format5 || (Format5 = {}));
|
|
28537
|
+
var DayOfWeek4;
|
|
28538
|
+
(function(DayOfWeek5) {
|
|
28539
|
+
DayOfWeek5["MONDAY"] = "MONDAY";
|
|
28540
|
+
DayOfWeek5["TUESDAY"] = "TUESDAY";
|
|
28541
|
+
DayOfWeek5["WEDNESDAY"] = "WEDNESDAY";
|
|
28542
|
+
DayOfWeek5["THURSDAY"] = "THURSDAY";
|
|
28543
|
+
DayOfWeek5["FRIDAY"] = "FRIDAY";
|
|
28544
|
+
DayOfWeek5["SATURDAY"] = "SATURDAY";
|
|
28545
|
+
DayOfWeek5["SUNDAY"] = "SUNDAY";
|
|
28546
|
+
})(DayOfWeek4 || (DayOfWeek4 = {}));
|
|
28028
28547
|
var StringComponentType;
|
|
28029
28548
|
(function(StringComponentType2) {
|
|
28030
28549
|
StringComponentType2["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
|
|
@@ -28321,6 +28840,11 @@ var LayoutDataImagePosition3;
|
|
|
28321
28840
|
LayoutDataImagePosition4["BOTTOM_LEFT"] = "BOTTOM_LEFT";
|
|
28322
28841
|
LayoutDataImagePosition4["BOTTOM_RIGHT"] = "BOTTOM_RIGHT";
|
|
28323
28842
|
})(LayoutDataImagePosition3 || (LayoutDataImagePosition3 = {}));
|
|
28843
|
+
var Origin4;
|
|
28844
|
+
(function(Origin5) {
|
|
28845
|
+
Origin5["IMAGE"] = "IMAGE";
|
|
28846
|
+
Origin5["LAYOUT"] = "LAYOUT";
|
|
28847
|
+
})(Origin4 || (Origin4 = {}));
|
|
28324
28848
|
var VerticalAlignmentAlignment4;
|
|
28325
28849
|
(function(VerticalAlignmentAlignment5) {
|
|
28326
28850
|
VerticalAlignmentAlignment5["TOP"] = "TOP";
|
|
@@ -28466,6 +28990,19 @@ var AppointmentFormat3;
|
|
|
28466
28990
|
AppointmentFormat4["VIDEO_CONFERENCE"] = "VIDEO_CONFERENCE";
|
|
28467
28991
|
AppointmentFormat4["PHONE"] = "PHONE";
|
|
28468
28992
|
})(AppointmentFormat3 || (AppointmentFormat3 = {}));
|
|
28993
|
+
var MeetingType3;
|
|
28994
|
+
(function(MeetingType4) {
|
|
28995
|
+
MeetingType4["UNKNOWN_MEETING_TYPE"] = "UNKNOWN_MEETING_TYPE";
|
|
28996
|
+
MeetingType4["SINGLE_STAFF"] = "SINGLE_STAFF";
|
|
28997
|
+
MeetingType4["ROUND_ROBIN"] = "ROUND_ROBIN";
|
|
28998
|
+
})(MeetingType3 || (MeetingType3 = {}));
|
|
28999
|
+
var StaffStrategySelection3;
|
|
29000
|
+
(function(StaffStrategySelection4) {
|
|
29001
|
+
StaffStrategySelection4["UNKNOWN_STAFF_STRATEGY_SELECTION"] = "UNKNOWN_STAFF_STRATEGY_SELECTION";
|
|
29002
|
+
StaffStrategySelection4["AUTOMATIC"] = "AUTOMATIC";
|
|
29003
|
+
StaffStrategySelection4["HIGH_TO_LOW_PRIORITY"] = "HIGH_TO_LOW_PRIORITY";
|
|
29004
|
+
StaffStrategySelection4["LOW_TO_HIGH_PRIORITY"] = "LOW_TO_HIGH_PRIORITY";
|
|
29005
|
+
})(StaffStrategySelection3 || (StaffStrategySelection3 = {}));
|
|
28469
29006
|
var InputType;
|
|
28470
29007
|
(function(InputType2) {
|
|
28471
29008
|
InputType2["UNKNOWN_INPUT_TYPE"] = "UNKNOWN_INPUT_TYPE";
|
|
@@ -28502,6 +29039,12 @@ var ConfirmationLevel3;
|
|
|
28502
29039
|
ConfirmationLevel4["SINGLE_CONFIRMATION"] = "SINGLE_CONFIRMATION";
|
|
28503
29040
|
ConfirmationLevel4["DOUBLE_CONFIRMATION"] = "DOUBLE_CONFIRMATION";
|
|
28504
29041
|
})(ConfirmationLevel3 || (ConfirmationLevel3 = {}));
|
|
29042
|
+
var SubscriptionChannel4;
|
|
29043
|
+
(function(SubscriptionChannel5) {
|
|
29044
|
+
SubscriptionChannel5["UNKNOWN_SUBSCRIPTION_CHANNEL"] = "UNKNOWN_SUBSCRIPTION_CHANNEL";
|
|
29045
|
+
SubscriptionChannel5["EMAIL"] = "EMAIL";
|
|
29046
|
+
SubscriptionChannel5["SMS"] = "SMS";
|
|
29047
|
+
})(SubscriptionChannel4 || (SubscriptionChannel4 = {}));
|
|
28505
29048
|
var ContactField4;
|
|
28506
29049
|
(function(ContactField5) {
|
|
28507
29050
|
ContactField5["UNKNOWN_CONTACT_FIELD"] = "UNKNOWN_CONTACT_FIELD";
|
|
@@ -28617,6 +29160,12 @@ var RequiredIndicatorPlacement4;
|
|
|
28617
29160
|
RequiredIndicatorPlacement5["AFTER_FIELD_TITLE"] = "AFTER_FIELD_TITLE";
|
|
28618
29161
|
RequiredIndicatorPlacement5["BEFORE_FIELD_TITLE"] = "BEFORE_FIELD_TITLE";
|
|
28619
29162
|
})(RequiredIndicatorPlacement4 || (RequiredIndicatorPlacement4 = {}));
|
|
29163
|
+
var ContactAutofill4;
|
|
29164
|
+
(function(ContactAutofill5) {
|
|
29165
|
+
ContactAutofill5["UNKNOWN_CONTACT_AUTOFILL"] = "UNKNOWN_CONTACT_AUTOFILL";
|
|
29166
|
+
ContactAutofill5["MEMBER_DATA"] = "MEMBER_DATA";
|
|
29167
|
+
ContactAutofill5["FORM_INPUT"] = "FORM_INPUT";
|
|
29168
|
+
})(ContactAutofill4 || (ContactAutofill4 = {}));
|
|
28620
29169
|
|
|
28621
29170
|
// ../form-transformer/dist/esm/lib/to-v1/make-view-of-input-field.js
|
|
28622
29171
|
var idKey = "id";
|
|
@@ -36837,204 +37386,10 @@ __export(es_exports, {
|
|
|
36837
37386
|
SubdivisionType: () => SubdivisionType,
|
|
36838
37387
|
getPlace: () => getPlace4
|
|
36839
37388
|
});
|
|
36840
|
-
|
|
36841
|
-
// ../../node_modules/@wix/sdk-runtime/build/constants.js
|
|
36842
|
-
var SDKRequestToRESTRequestRenameMap = {
|
|
36843
|
-
_id: "id",
|
|
36844
|
-
_createdDate: "createdDate",
|
|
36845
|
-
_updatedDate: "updatedDate"
|
|
36846
|
-
};
|
|
36847
|
-
var RESTResponseToSDKResponseRenameMap = {
|
|
36848
|
-
id: "_id",
|
|
36849
|
-
createdDate: "_createdDate",
|
|
36850
|
-
updatedDate: "_updatedDate"
|
|
36851
|
-
};
|
|
36852
|
-
|
|
36853
|
-
// ../../node_modules/@wix/sdk-runtime/build/utils.js
|
|
36854
|
-
function removeUndefinedKeys(obj) {
|
|
36855
|
-
return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== void 0));
|
|
36856
|
-
}
|
|
36857
|
-
function constantCase(input) {
|
|
36858
|
-
return split(input).map((part) => part.toLocaleUpperCase()).join("_");
|
|
36859
|
-
}
|
|
36860
|
-
var SPLIT_LOWER_UPPER_RE = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
36861
|
-
var SPLIT_UPPER_UPPER_RE = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
36862
|
-
var SPLIT_REPLACE_VALUE = "$1\0$2";
|
|
36863
|
-
var DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
|
|
36864
|
-
function split(value) {
|
|
36865
|
-
let result2 = value.trim();
|
|
36866
|
-
result2 = result2.replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);
|
|
36867
|
-
result2 = result2.replace(DEFAULT_STRIP_REGEXP, "\0");
|
|
36868
|
-
let start = 0;
|
|
36869
|
-
let end = result2.length;
|
|
36870
|
-
while (result2.charAt(start) === "\0") {
|
|
36871
|
-
start++;
|
|
36872
|
-
}
|
|
36873
|
-
if (start === end) {
|
|
36874
|
-
return [];
|
|
36875
|
-
}
|
|
36876
|
-
while (result2.charAt(end - 1) === "\0") {
|
|
36877
|
-
end--;
|
|
36878
|
-
}
|
|
36879
|
-
return result2.slice(start, end).split(/\0/g);
|
|
36880
|
-
}
|
|
36881
|
-
|
|
36882
|
-
// ../../node_modules/@wix/sdk-runtime/build/transform-error.js
|
|
36883
|
-
var isValidationError = (httpClientError) => "validationError" in (httpClientError.response?.data?.details ?? {});
|
|
36884
|
-
var isApplicationError = (httpClientError) => "applicationError" in (httpClientError.response?.data?.details ?? {});
|
|
36885
|
-
var isClientError = (httpClientError) => (httpClientError.response?.status ?? -1) >= 400 && (httpClientError.response?.status ?? -1) < 500;
|
|
36886
|
-
function transformError(httpClientError, pathsToArguments = {
|
|
36887
|
-
explicitPathsToArguments: {},
|
|
36888
|
-
spreadPathsToArguments: {},
|
|
36889
|
-
singleArgumentUnchanged: false
|
|
36890
|
-
}, argumentNames = []) {
|
|
36891
|
-
if (typeof httpClientError !== "object" || httpClientError === null) {
|
|
36892
|
-
throw httpClientError;
|
|
36893
|
-
}
|
|
36894
|
-
if (isValidationError(httpClientError)) {
|
|
36895
|
-
return buildValidationError(httpClientError, pathsToArguments, argumentNames);
|
|
36896
|
-
}
|
|
36897
|
-
if (isApplicationError(httpClientError)) {
|
|
36898
|
-
return buildApplicationError(httpClientError);
|
|
36899
|
-
}
|
|
36900
|
-
if (isClientError(httpClientError)) {
|
|
36901
|
-
const status = httpClientError.response?.status;
|
|
36902
|
-
const statusText = httpClientError.response?.statusText ?? "UNKNOWN";
|
|
36903
|
-
const message = httpClientError.response?.data?.message ?? statusText;
|
|
36904
|
-
const details = {
|
|
36905
|
-
applicationError: {
|
|
36906
|
-
description: statusText,
|
|
36907
|
-
code: constantCase(statusText),
|
|
36908
|
-
data: {}
|
|
36909
|
-
},
|
|
36910
|
-
requestId: httpClientError.requestId
|
|
36911
|
-
};
|
|
36912
|
-
return wrapError(httpClientError, {
|
|
36913
|
-
message: JSON.stringify({
|
|
36914
|
-
message,
|
|
36915
|
-
details
|
|
36916
|
-
}, null, 2),
|
|
36917
|
-
extraProperties: {
|
|
36918
|
-
details,
|
|
36919
|
-
status
|
|
36920
|
-
}
|
|
36921
|
-
});
|
|
36922
|
-
}
|
|
36923
|
-
return buildSystemError(httpClientError);
|
|
36924
|
-
}
|
|
36925
|
-
var buildValidationError = (httpClientError, pathsToArguments, argumentNames) => {
|
|
36926
|
-
const validationErrorResponse = httpClientError.response?.data;
|
|
36927
|
-
const requestId = httpClientError.requestId;
|
|
36928
|
-
const { fieldViolations } = validationErrorResponse.details.validationError;
|
|
36929
|
-
const transformedFieldViolations = violationsWithRenamedFields(pathsToArguments, fieldViolations, argumentNames)?.sort((a, b) => a.field < b.field ? -1 : 1);
|
|
36930
|
-
const message = `INVALID_ARGUMENT: ${transformedFieldViolations?.map(({ field, description }) => `"${field}" ${description}`)?.join(", ")}`;
|
|
36931
|
-
const details = {
|
|
36932
|
-
validationError: { fieldViolations: transformedFieldViolations },
|
|
36933
|
-
requestId
|
|
36934
|
-
};
|
|
36935
|
-
return wrapError(httpClientError, {
|
|
36936
|
-
message: JSON.stringify({ message, details }, null, 2),
|
|
36937
|
-
extraProperties: {
|
|
36938
|
-
details,
|
|
36939
|
-
status: httpClientError.response?.status,
|
|
36940
|
-
requestId
|
|
36941
|
-
}
|
|
36942
|
-
});
|
|
36943
|
-
};
|
|
36944
|
-
var wrapError = (baseError, { message, extraProperties }) => {
|
|
36945
|
-
return Object.assign(baseError, {
|
|
36946
|
-
...extraProperties,
|
|
36947
|
-
message
|
|
36948
|
-
});
|
|
36949
|
-
};
|
|
36950
|
-
var buildApplicationError = (httpClientError) => {
|
|
36951
|
-
const status = httpClientError.response?.status;
|
|
36952
|
-
const statusText = httpClientError.response?.statusText ?? "UNKNOWN";
|
|
36953
|
-
const message = httpClientError.response?.data?.message ?? statusText;
|
|
36954
|
-
const description = httpClientError.response?.data?.details?.applicationError?.description ?? statusText;
|
|
36955
|
-
const code = httpClientError.response?.data?.details?.applicationError?.code ?? constantCase(statusText);
|
|
36956
|
-
const data = httpClientError.response?.data?.details?.applicationError?.data ?? {};
|
|
36957
|
-
const combinedMessage = message === description ? message : `${message}: ${description}`;
|
|
36958
|
-
const details = {
|
|
36959
|
-
applicationError: {
|
|
36960
|
-
description,
|
|
36961
|
-
code,
|
|
36962
|
-
data
|
|
36963
|
-
},
|
|
36964
|
-
requestId: httpClientError.requestId
|
|
36965
|
-
};
|
|
36966
|
-
return wrapError(httpClientError, {
|
|
36967
|
-
message: JSON.stringify({ message: combinedMessage, details }, null, 2),
|
|
36968
|
-
extraProperties: {
|
|
36969
|
-
details,
|
|
36970
|
-
status,
|
|
36971
|
-
requestId: httpClientError.requestId
|
|
36972
|
-
}
|
|
36973
|
-
});
|
|
36974
|
-
};
|
|
36975
|
-
var buildSystemError = (httpClientError) => {
|
|
36976
|
-
const message = httpClientError.requestId ? `System error occurred, request-id: ${httpClientError.requestId}` : `System error occurred: ${JSON.stringify(httpClientError)}`;
|
|
36977
|
-
return wrapError(httpClientError, {
|
|
36978
|
-
message,
|
|
36979
|
-
extraProperties: {
|
|
36980
|
-
requestId: httpClientError.requestId,
|
|
36981
|
-
status: httpClientError.response?.status,
|
|
36982
|
-
code: constantCase(httpClientError.response?.statusText ?? "UNKNOWN"),
|
|
36983
|
-
...!httpClientError.response && {
|
|
36984
|
-
runtimeError: httpClientError
|
|
36985
|
-
}
|
|
36986
|
-
}
|
|
36987
|
-
});
|
|
36988
|
-
};
|
|
36989
|
-
var violationsWithRenamedFields = ({ spreadPathsToArguments, explicitPathsToArguments, singleArgumentUnchanged }, fieldViolations, argumentNames) => {
|
|
36990
|
-
const allPathsToArguments = {
|
|
36991
|
-
...spreadPathsToArguments,
|
|
36992
|
-
...explicitPathsToArguments
|
|
36993
|
-
};
|
|
36994
|
-
const allPathsToArgumentsKeys = Object.keys(allPathsToArguments);
|
|
36995
|
-
return fieldViolations?.filter((fieldViolation) => {
|
|
36996
|
-
const containedInAMoreSpecificViolationField = fieldViolations.some((anotherViolation) => anotherViolation.field.length > fieldViolation.field.length && anotherViolation.field.startsWith(fieldViolation.field) && allPathsToArgumentsKeys.includes(anotherViolation.field));
|
|
36997
|
-
return !containedInAMoreSpecificViolationField;
|
|
36998
|
-
}).map((fieldViolation) => {
|
|
36999
|
-
const exactMatchArgumentExpression = explicitPathsToArguments[fieldViolation.field];
|
|
37000
|
-
if (exactMatchArgumentExpression) {
|
|
37001
|
-
return {
|
|
37002
|
-
...fieldViolation,
|
|
37003
|
-
field: withRenamedArgument(exactMatchArgumentExpression, argumentNames)
|
|
37004
|
-
};
|
|
37005
|
-
}
|
|
37006
|
-
const longestPartialPathMatch = allPathsToArgumentsKeys?.sort((a, b) => b.length - a.length)?.find((path) => fieldViolation.field.startsWith(path));
|
|
37007
|
-
if (longestPartialPathMatch) {
|
|
37008
|
-
const partialMatchArgumentExpression = allPathsToArguments[longestPartialPathMatch];
|
|
37009
|
-
if (partialMatchArgumentExpression) {
|
|
37010
|
-
return {
|
|
37011
|
-
...fieldViolation,
|
|
37012
|
-
field: fieldViolation.field.replace(longestPartialPathMatch, withRenamedArgument(partialMatchArgumentExpression, argumentNames))
|
|
37013
|
-
};
|
|
37014
|
-
}
|
|
37015
|
-
}
|
|
37016
|
-
if (singleArgumentUnchanged) {
|
|
37017
|
-
return {
|
|
37018
|
-
...fieldViolation,
|
|
37019
|
-
field: `${argumentNames[0]}.${fieldViolation.field}`
|
|
37020
|
-
};
|
|
37021
|
-
}
|
|
37022
|
-
return fieldViolation;
|
|
37023
|
-
});
|
|
37024
|
-
};
|
|
37025
|
-
var withRenamedArgument = (fieldValue, argumentNames) => {
|
|
37026
|
-
const argIndex = getArgumentIndex(fieldValue);
|
|
37027
|
-
if (argIndex !== null && typeof argIndex !== "undefined") {
|
|
37028
|
-
return fieldValue.replace(`$[${argIndex}]`, argumentNames[argIndex]);
|
|
37029
|
-
}
|
|
37030
|
-
return fieldValue;
|
|
37031
|
-
};
|
|
37032
|
-
var getArgumentIndex = (s) => {
|
|
37033
|
-
const match = s.match(/\$\[(?<argIndex>\d+)\]/);
|
|
37034
|
-
return match && match.groups && Number(match.groups.argIndex);
|
|
37035
|
-
};
|
|
37389
|
+
init_transform_error();
|
|
37036
37390
|
|
|
37037
37391
|
// ../../node_modules/@wix/sdk-runtime/build/rename-all-nested-keys.js
|
|
37392
|
+
init_constants3();
|
|
37038
37393
|
function renameAllNestedKeys(payload, renameMap, ignorePaths) {
|
|
37039
37394
|
const isIgnored = (path) => ignorePaths.includes(path);
|
|
37040
37395
|
const traverse = (obj, path) => {
|
|
@@ -37079,214 +37434,8 @@ function renameKeysFromRESTResponseToSDKResponse(payload, ignorePaths = []) {
|
|
|
37079
37434
|
return renameAllNestedKeys(payload, RESTResponseToSDKResponseRenameMap, ignorePaths);
|
|
37080
37435
|
}
|
|
37081
37436
|
|
|
37082
|
-
// ../../node_modules/@wix/
|
|
37083
|
-
|
|
37084
|
-
function resolveContext() {
|
|
37085
|
-
const oldContext = typeof $wixContext !== "undefined" && $wixContext.initWixModules ? $wixContext.initWixModules : typeof globalThis.__wix_context__ !== "undefined" && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
37086
|
-
if (oldContext) {
|
|
37087
|
-
return {
|
|
37088
|
-
// @ts-expect-error
|
|
37089
|
-
initWixModules(modules, elevated) {
|
|
37090
|
-
return runWithoutContext(() => oldContext(modules, elevated));
|
|
37091
|
-
},
|
|
37092
|
-
fetchWithAuth() {
|
|
37093
|
-
throw new Error("fetchWithAuth is not available in this context");
|
|
37094
|
-
},
|
|
37095
|
-
graphql() {
|
|
37096
|
-
throw new Error("graphql is not available in this context");
|
|
37097
|
-
}
|
|
37098
|
-
};
|
|
37099
|
-
}
|
|
37100
|
-
const contextualClient = typeof $wixContext !== "undefined" ? $wixContext.client : typeof wixContext.client !== "undefined" ? wixContext.client : typeof globalThis.__wix_context__ !== "undefined" ? globalThis.__wix_context__.client : void 0;
|
|
37101
|
-
const elevatedClient = typeof $wixContext !== "undefined" ? $wixContext.elevatedClient : typeof wixContext.elevatedClient !== "undefined" ? wixContext.elevatedClient : typeof globalThis.__wix_context__ !== "undefined" ? globalThis.__wix_context__.elevatedClient : void 0;
|
|
37102
|
-
if (!contextualClient && !elevatedClient) {
|
|
37103
|
-
return;
|
|
37104
|
-
}
|
|
37105
|
-
return {
|
|
37106
|
-
initWixModules(wixModules, elevated) {
|
|
37107
|
-
if (elevated) {
|
|
37108
|
-
if (!elevatedClient) {
|
|
37109
|
-
throw new Error("An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules");
|
|
37110
|
-
}
|
|
37111
|
-
return runWithoutContext(() => elevatedClient.use(wixModules));
|
|
37112
|
-
}
|
|
37113
|
-
if (!contextualClient) {
|
|
37114
|
-
throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
|
|
37115
|
-
}
|
|
37116
|
-
return runWithoutContext(() => contextualClient.use(wixModules));
|
|
37117
|
-
},
|
|
37118
|
-
fetchWithAuth: (urlOrRequest, requestInit) => {
|
|
37119
|
-
if (!contextualClient) {
|
|
37120
|
-
throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
|
|
37121
|
-
}
|
|
37122
|
-
return contextualClient.fetchWithAuth(urlOrRequest, requestInit);
|
|
37123
|
-
},
|
|
37124
|
-
getAuth() {
|
|
37125
|
-
if (!contextualClient) {
|
|
37126
|
-
throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
|
|
37127
|
-
}
|
|
37128
|
-
return contextualClient.auth;
|
|
37129
|
-
},
|
|
37130
|
-
async graphql(query, variables, opts) {
|
|
37131
|
-
if (!contextualClient) {
|
|
37132
|
-
throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
|
|
37133
|
-
}
|
|
37134
|
-
return contextualClient.graphql(query, variables, opts);
|
|
37135
|
-
}
|
|
37136
|
-
};
|
|
37137
|
-
}
|
|
37138
|
-
function runWithoutContext(fn) {
|
|
37139
|
-
const globalContext = globalThis.__wix_context__;
|
|
37140
|
-
const moduleContext = {
|
|
37141
|
-
client: wixContext.client,
|
|
37142
|
-
elevatedClient: wixContext.elevatedClient
|
|
37143
|
-
};
|
|
37144
|
-
let closureContext;
|
|
37145
|
-
globalThis.__wix_context__ = void 0;
|
|
37146
|
-
wixContext.client = void 0;
|
|
37147
|
-
wixContext.elevatedClient = void 0;
|
|
37148
|
-
if (typeof $wixContext !== "undefined") {
|
|
37149
|
-
closureContext = {
|
|
37150
|
-
client: $wixContext?.client,
|
|
37151
|
-
elevatedClient: $wixContext?.elevatedClient
|
|
37152
|
-
};
|
|
37153
|
-
delete $wixContext.client;
|
|
37154
|
-
delete $wixContext.elevatedClient;
|
|
37155
|
-
}
|
|
37156
|
-
try {
|
|
37157
|
-
return fn();
|
|
37158
|
-
} finally {
|
|
37159
|
-
globalThis.__wix_context__ = globalContext;
|
|
37160
|
-
wixContext.client = moduleContext.client;
|
|
37161
|
-
wixContext.elevatedClient = moduleContext.elevatedClient;
|
|
37162
|
-
if (typeof $wixContext !== "undefined") {
|
|
37163
|
-
$wixContext.client = closureContext.client;
|
|
37164
|
-
$wixContext.elevatedClient = closureContext.elevatedClient;
|
|
37165
|
-
}
|
|
37166
|
-
}
|
|
37167
|
-
}
|
|
37168
|
-
|
|
37169
|
-
// ../../node_modules/@wix/sdk-runtime/build/context-v2.js
|
|
37170
|
-
function contextualizeRESTModuleV2(restModule, elevated) {
|
|
37171
|
-
return ((...args) => {
|
|
37172
|
-
const context = resolveContext();
|
|
37173
|
-
if (!context) {
|
|
37174
|
-
return restModule.apply(void 0, args);
|
|
37175
|
-
}
|
|
37176
|
-
return context.initWixModules(restModule, elevated).apply(void 0, args);
|
|
37177
|
-
});
|
|
37178
|
-
}
|
|
37179
|
-
|
|
37180
|
-
// ../../node_modules/@wix/sdk-runtime/build/rest-modules.js
|
|
37181
|
-
function createRESTModule(descriptor, elevated = false) {
|
|
37182
|
-
return contextualizeRESTModuleV2(descriptor, elevated);
|
|
37183
|
-
}
|
|
37184
|
-
function toURLSearchParams(params, isComplexRequest) {
|
|
37185
|
-
const flatten = flattenParams(params);
|
|
37186
|
-
Object.entries(flatten).some(([key, value]) => key.includes(".") || Array.isArray(value) && value.some((v) => typeof v === "object"));
|
|
37187
|
-
{
|
|
37188
|
-
return Object.entries(flatten).reduce((urlSearchParams, [key, value]) => {
|
|
37189
|
-
const keyParams = Array.isArray(value) ? value : [value];
|
|
37190
|
-
keyParams.forEach((param) => {
|
|
37191
|
-
if (param === void 0 || param === null || Array.isArray(value) && typeof param === "object") {
|
|
37192
|
-
return;
|
|
37193
|
-
}
|
|
37194
|
-
urlSearchParams.append(key, param);
|
|
37195
|
-
});
|
|
37196
|
-
return urlSearchParams;
|
|
37197
|
-
}, new URLSearchParams());
|
|
37198
|
-
}
|
|
37199
|
-
}
|
|
37200
|
-
function resolveUrl(opts) {
|
|
37201
|
-
const domain = resolveDomain(opts.host);
|
|
37202
|
-
const mappings = resolveMappingsByDomain(domain, opts.domainToMappings);
|
|
37203
|
-
const path = injectDataIntoProtoPath(opts.protoPath, opts.data || {});
|
|
37204
|
-
return resolvePathFromMappings(path, mappings);
|
|
37205
|
-
}
|
|
37206
|
-
function flattenParams(data, path = "") {
|
|
37207
|
-
const params = {};
|
|
37208
|
-
Object.entries(data).forEach(([key, value]) => {
|
|
37209
|
-
const isObject5 = value !== null && typeof value === "object" && !Array.isArray(value);
|
|
37210
|
-
const fieldPath = resolvePath(path, key);
|
|
37211
|
-
if (isObject5) {
|
|
37212
|
-
const serializedObject = flattenParams(value, fieldPath);
|
|
37213
|
-
Object.assign(params, serializedObject);
|
|
37214
|
-
} else {
|
|
37215
|
-
params[fieldPath] = value;
|
|
37216
|
-
}
|
|
37217
|
-
});
|
|
37218
|
-
return params;
|
|
37219
|
-
}
|
|
37220
|
-
function resolvePath(path, key) {
|
|
37221
|
-
return `${path}${path ? "." : ""}${key}`;
|
|
37222
|
-
}
|
|
37223
|
-
var DOMAINS = ["wix.com", "editorx.com"];
|
|
37224
|
-
var USER_DOMAIN = "_";
|
|
37225
|
-
var REGEX_CAPTURE_DOMAINS = new RegExp(`\\.(${DOMAINS.join("|")})$`);
|
|
37226
|
-
var WIX_API_DOMAINS = ["42.wixprod.net", "uw2-edt-1.wixprod.net"];
|
|
37227
|
-
var DEV_WIX_CODE_DOMAIN = "dev.wix-code.com";
|
|
37228
|
-
var REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/;
|
|
37229
|
-
var REGEX_CAPTURE_API_DOMAINS = new RegExp(`\\.(${WIX_API_DOMAINS.join("|")})$`);
|
|
37230
|
-
var REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN = new RegExp(`.*\\.${DEV_WIX_CODE_DOMAIN}$`);
|
|
37231
|
-
function resolveDomain(host) {
|
|
37232
|
-
const resolvedHost = fixHostExceptions(host);
|
|
37233
|
-
return resolvedHost.replace(REGEX_CAPTURE_DOMAINS, "._base_domain_").replace(REGEX_CAPTURE_API_DOMAINS, "._api_base_domain_").replace(REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, "*.dev.wix-code.com");
|
|
37234
|
-
}
|
|
37235
|
-
function fixHostExceptions(host) {
|
|
37236
|
-
return host.replace("create.editorx.com", "editor.editorx.com");
|
|
37237
|
-
}
|
|
37238
|
-
function resolveMappingsByDomain(domain, domainToMappings) {
|
|
37239
|
-
const mappings = domainToMappings[domain] || domainToMappings[USER_DOMAIN];
|
|
37240
|
-
if (mappings) {
|
|
37241
|
-
return mappings;
|
|
37242
|
-
}
|
|
37243
|
-
const rootDomainMappings = resolveRootDomain(domain, domainToMappings);
|
|
37244
|
-
if (!rootDomainMappings) {
|
|
37245
|
-
if (isBaseDomain(domain)) {
|
|
37246
|
-
return domainToMappings[wwwBaseDomain];
|
|
37247
|
-
}
|
|
37248
|
-
}
|
|
37249
|
-
return rootDomainMappings ?? [];
|
|
37250
|
-
}
|
|
37251
|
-
function resolveRootDomain(domain, domainToMappings) {
|
|
37252
|
-
return Object.entries(domainToMappings).find(([entryDomain]) => {
|
|
37253
|
-
const [, ...rooDomainSegments] = domain.split(".");
|
|
37254
|
-
return rooDomainSegments.join(".") === entryDomain;
|
|
37255
|
-
})?.[1];
|
|
37256
|
-
}
|
|
37257
|
-
function isBaseDomain(domain) {
|
|
37258
|
-
return !!domain.match(/\._base_domain_$/);
|
|
37259
|
-
}
|
|
37260
|
-
var wwwBaseDomain = "www._base_domain_";
|
|
37261
|
-
function injectDataIntoProtoPath(protoPath, data) {
|
|
37262
|
-
return protoPath.split("/").map((path) => maybeProtoPathToData(path, data)).join("/");
|
|
37263
|
-
}
|
|
37264
|
-
function maybeProtoPathToData(protoPath, data) {
|
|
37265
|
-
const protoRegExpMatch = protoPath.match(REGEX_CAPTURE_PROTO_FIELD) || [];
|
|
37266
|
-
const field = protoRegExpMatch[1];
|
|
37267
|
-
if (field) {
|
|
37268
|
-
const suffix = protoPath.replace(protoRegExpMatch[0], "");
|
|
37269
|
-
return findByPath(data, field, protoPath, suffix);
|
|
37270
|
-
}
|
|
37271
|
-
return protoPath;
|
|
37272
|
-
}
|
|
37273
|
-
function findByPath(obj, path, defaultValue, suffix) {
|
|
37274
|
-
let result2 = obj;
|
|
37275
|
-
for (const field of path.split(".")) {
|
|
37276
|
-
if (!result2) {
|
|
37277
|
-
return defaultValue;
|
|
37278
|
-
}
|
|
37279
|
-
result2 = result2[field];
|
|
37280
|
-
}
|
|
37281
|
-
return `${result2}${suffix}`;
|
|
37282
|
-
}
|
|
37283
|
-
function resolvePathFromMappings(protoPath, mappings) {
|
|
37284
|
-
const mapping = mappings?.find((m) => protoPath.startsWith(m.destPath));
|
|
37285
|
-
if (!mapping) {
|
|
37286
|
-
return protoPath;
|
|
37287
|
-
}
|
|
37288
|
-
return mapping.srcPath + protoPath.slice(mapping.destPath.length);
|
|
37289
|
-
}
|
|
37437
|
+
// ../../node_modules/@wix/auto_sdk_atlas_places/build/es/index.mjs
|
|
37438
|
+
init_rest_modules();
|
|
37290
37439
|
|
|
37291
37440
|
// ../../node_modules/@wix/sdk-runtime/build/transformations/float.js
|
|
37292
37441
|
function transformSDKFloatToRESTFloat(val) {
|
|
@@ -37335,7 +37484,11 @@ function transformPaths(obj, transformations) {
|
|
|
37335
37484
|
return transformations.reduce((acc, { paths, transformFn }) => paths.reduce((transformerAcc, path) => transformPath(transformerAcc, path, transformFn), acc), obj);
|
|
37336
37485
|
}
|
|
37337
37486
|
|
|
37487
|
+
// ../../node_modules/@wix/auto_sdk_atlas_places/build/es/index.mjs
|
|
37488
|
+
init_rest_modules();
|
|
37489
|
+
|
|
37338
37490
|
// ../../node_modules/@wix/sdk-runtime/build/transformations/address.js
|
|
37491
|
+
init_utils2();
|
|
37339
37492
|
function transformRESTAddressToSDKAddress(payload) {
|
|
37340
37493
|
return payload && removeUndefinedKeys({
|
|
37341
37494
|
formatted: payload.formattedAddress,
|
|
@@ -37359,6 +37512,7 @@ function transformRESTAddressToSDKAddress(payload) {
|
|
|
37359
37512
|
}
|
|
37360
37513
|
|
|
37361
37514
|
// ../../node_modules/@wix/auto_sdk_atlas_places/build/es/index.mjs
|
|
37515
|
+
init_rest_modules();
|
|
37362
37516
|
function resolveComWixpressViAtlasServiceV2PlacesServiceV2Url(opts) {
|
|
37363
37517
|
const domainToMappings = {
|
|
37364
37518
|
"api._api_base_domain_": [
|
|
@@ -37569,6 +37723,9 @@ __export(es_exports2, {
|
|
|
37569
37723
|
FilterType: () => FilterType2,
|
|
37570
37724
|
predict: () => predict4
|
|
37571
37725
|
});
|
|
37726
|
+
init_transform_error();
|
|
37727
|
+
init_rest_modules();
|
|
37728
|
+
init_rest_modules();
|
|
37572
37729
|
function resolveComWixpressViAtlasServiceV2AutocompleteServiceV2Url(opts) {
|
|
37573
37730
|
const domainToMappings = {
|
|
37574
37731
|
"api._api_base_domain_": [
|