@atlassian/atlassian-connect-js 5.3.194 → 5.3.196

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.
@@ -22,40 +22,13 @@ var AP = (function () {
22
22
  _setPrototypeOf(subClass, superClass);
23
23
  }
24
24
 
25
- function _isNativeReflectConstruct$1() {
26
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
27
- if (Reflect.construct.sham) return false;
28
- if (typeof Proxy === "function") return true;
29
- try {
30
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
31
- return true;
32
- } catch (e) {
33
- return false;
34
- }
35
- }
36
-
37
- function _construct(Parent, args, Class) {
38
- if (_isNativeReflectConstruct$1()) {
39
- _construct = Reflect.construct.bind();
40
- } else {
41
- _construct = function _construct(Parent, args, Class) {
42
- var a = [null];
43
- a.push.apply(a, args);
44
- var Constructor = Function.bind.apply(Parent, a);
45
- var instance = new Constructor();
46
- if (Class) _setPrototypeOf(instance, Class.prototype);
47
- return instance;
48
- };
49
- }
50
- return _construct.apply(null, arguments);
51
- }
52
-
53
- var LOG_PREFIX = "[Simple-XDM] ";
25
+ // @ts-nocheck
26
+ var LOG_PREFIX = '[Simple-XDM] ';
54
27
  var nativeBind = Function.prototype.bind;
55
28
  var util = {
56
29
  locationOrigin: function locationOrigin() {
57
30
  if (!window.location.origin) {
58
- return window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port : '');
31
+ return window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '');
59
32
  } else {
60
33
  return window.location.origin;
61
34
  }
@@ -64,13 +37,13 @@ var AP = (function () {
64
37
  return Math.floor(Math.random() * 1000000000).toString(16);
65
38
  },
66
39
  isString: function isString(str) {
67
- return typeof str === "string" || str instanceof String;
40
+ return typeof str === 'string' || str instanceof String;
68
41
  },
69
42
  argumentsToArray: function argumentsToArray(arrayLike) {
70
43
  return Array.prototype.slice.call(arrayLike);
71
44
  },
72
45
  argumentNames: function argumentNames(fn) {
73
- return fn.toString().replace(/((\/\/.*$)|(\/\*[^]*?\*\/))/mg, '') // strip comments
46
+ return fn.toString().replace(/((\/\/.*$)|(\/\*[^]*?\*\/))/gm, '') // strip comments
74
47
  .replace(/[^(]+\(([^)]*)[^]+/, '$1') // get signature
75
48
  .match(/([^\s,]+)/g) || [];
76
49
  },
@@ -81,7 +54,7 @@ var AP = (function () {
81
54
  error: function error(msg) {
82
55
  if (window.console && window.console.error) {
83
56
  var outputError = [];
84
- if (typeof msg === "string") {
57
+ if (typeof msg === 'string') {
85
58
  outputError.push(LOG_PREFIX + msg);
86
59
  outputError = outputError.concat(Array.prototype.slice.call(arguments, 1));
87
60
  } else {
@@ -93,6 +66,7 @@ var AP = (function () {
93
66
  },
94
67
  warn: function warn(msg) {
95
68
  if (window.console) {
69
+ // eslint-disable-next-line no-console
96
70
  console.warn(LOG_PREFIX + msg);
97
71
  }
98
72
  },
@@ -147,7 +121,7 @@ var AP = (function () {
147
121
  var args = arguments;
148
122
  var srcs = [].slice.call(args, 1, args.length);
149
123
  srcs.forEach(function (source) {
150
- if (typeof source === "object") {
124
+ if (typeof source === 'object') {
151
125
  Object.getOwnPropertyNames(source).forEach(function (name) {
152
126
  dest[name] = source[name];
153
127
  });
@@ -162,7 +136,7 @@ var AP = (function () {
162
136
  var visitedObjects = [];
163
137
  function _clone(value) {
164
138
  if (typeof value === 'function') {
165
- warn("A function was detected and removed from the message.");
139
+ warn('A function was detected and removed from the message.');
166
140
  return null;
167
141
  }
168
142
  if (blackList.some(function (t) {
@@ -184,7 +158,7 @@ var AP = (function () {
184
158
  });
185
159
  } else {
186
160
  if (visitedObjects.indexOf(value) > -1) {
187
- warn("A circular reference was detected and removed from the message.");
161
+ warn('A circular reference was detected and removed from the message.');
188
162
  return null;
189
163
  }
190
164
  visitedObjects.push(value);
@@ -231,6 +205,47 @@ var AP = (function () {
231
205
  }
232
206
  };
233
207
 
208
+ // @ts-nocheck
209
+ var allowedPlatformFeatureFlags = ['platform-visual-refresh-icons'];
210
+ function getPlatformFeatureFlags() {
211
+ var flags = {};
212
+ if (window.connectHost && window.connectHost.getBooleanFeatureFlag) {
213
+ allowedPlatformFeatureFlags.forEach(function (key) {
214
+ return flags[key] = window.connectHost.getBooleanFeatureFlag(key);
215
+ });
216
+ }
217
+ return flags;
218
+ }
219
+
220
+ function _isNativeReflectConstruct$1() {
221
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
222
+ if (Reflect.construct.sham) return false;
223
+ if (typeof Proxy === "function") return true;
224
+ try {
225
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
226
+ return true;
227
+ } catch (e) {
228
+ return false;
229
+ }
230
+ }
231
+
232
+ function _construct(Parent, args, Class) {
233
+ if (_isNativeReflectConstruct$1()) {
234
+ _construct = Reflect.construct.bind();
235
+ } else {
236
+ _construct = function _construct(Parent, args, Class) {
237
+ var a = [null];
238
+ a.push.apply(a, args);
239
+ var Constructor = Function.bind.apply(Parent, a);
240
+ var instance = new Constructor();
241
+ if (Class) _setPrototypeOf(instance, Class.prototype);
242
+ return instance;
243
+ };
244
+ }
245
+ return _construct.apply(null, arguments);
246
+ }
247
+
248
+ // @ts-nocheck
234
249
  var PostMessage = /*#__PURE__*/function () {
235
250
  function PostMessage(data) {
236
251
  var d = data || {};
@@ -241,7 +256,8 @@ var AP = (function () {
241
256
  if (!listenOn || !listenOn.addEventListener) {
242
257
  listenOn = window;
243
258
  }
244
- listenOn.addEventListener("message", util._bind(this, this._receiveMessage), false);
259
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
260
+ listenOn.addEventListener('message', util._bind(this, this._receiveMessage), false);
245
261
  };
246
262
  _proto._receiveMessage = function _receiveMessage(event) {
247
263
  var handler = this._messageHandlers[event.data.type],
@@ -315,7 +331,8 @@ var AP = (function () {
315
331
  tampered: tampered
316
332
  }, reg.extension.url);
317
333
  } else {
318
- console.warn("_verifyAPI postMessage skipped as event source missing.");
334
+ // eslint-disable-next-line no-console
335
+ console.warn('_verifyAPI postMessage skipped as event source missing.');
319
336
  }
320
337
  };
321
338
  _proto._handleInit = function _handleInit(event, reg) {
@@ -325,7 +342,8 @@ var AP = (function () {
325
342
  type: 'init_received'
326
343
  }, reg.extension.url);
327
344
  } else {
328
- console.warn("_handleInit postMessage skipped as event source missing.");
345
+ // eslint-disable-next-line no-console
346
+ console.warn('_handleInit postMessage skipped as event source missing.');
329
347
  }
330
348
  this._registeredExtensions[reg.extension_id].source = event.source;
331
349
  if (reg.initCallback) {
@@ -359,7 +377,8 @@ var AP = (function () {
359
377
  hostFrameOffset: hostFrameOffset
360
378
  }, event.origin);
361
379
  } else {
362
- console.warn("_getHostOffset postMessage skipped as event source missing.");
380
+ // eslint-disable-next-line no-console
381
+ console.warn('_getHostOffset postMessage skipped as event source missing.');
363
382
  }
364
383
  };
365
384
  _proto._hasSameOrigin = function _hasSameOrigin(window) {
@@ -401,7 +420,8 @@ var AP = (function () {
401
420
  args: args
402
421
  }, reg.extension.url);
403
422
  } else {
404
- console.warn("_handleRequest postMessage skipped as event source missing.");
423
+ // eslint-disable-next-line no-console
424
+ console.warn('_handleRequest postMessage skipped as event source missing.');
405
425
  }
406
426
  }
407
427
  var data = event.data;
@@ -633,7 +653,7 @@ var AP = (function () {
633
653
  _proto._keycodeKey = function _keycodeKey(key, modifiers, extension_id) {
634
654
  var code = key;
635
655
  if (modifiers) {
636
- if (typeof modifiers === "string") {
656
+ if (typeof modifiers === 'string') {
637
657
  modifiers = [modifiers];
638
658
  }
639
659
  modifiers.sort();
@@ -644,7 +664,7 @@ var AP = (function () {
644
664
  return code + '__' + extension_id;
645
665
  };
646
666
  _proto.registerKeyListener = function registerKeyListener(extension_id, key, modifiers, callback) {
647
- if (typeof modifiers === "string") {
667
+ if (typeof modifiers === 'string') {
648
668
  modifiers = [modifiers];
649
669
  }
650
670
  var reg = this._registeredExtensions[extension_id];
@@ -791,17 +811,7 @@ var AP = (function () {
791
811
  return XDMRPC;
792
812
  }(PostMessage);
793
813
 
794
- var allowedPlatformFeatureFlags = ['platform-visual-refresh-icons'];
795
- function getPlatformFeatureFlags() {
796
- var flags = {};
797
- if (window.connectHost && window.connectHost.getBooleanFeatureFlag) {
798
- allowedPlatformFeatureFlags.forEach(function (key) {
799
- return flags[key] = window.connectHost.getBooleanFeatureFlag(key);
800
- });
801
- }
802
- return flags;
803
- }
804
-
814
+ // @ts-nocheck
805
815
  var Connect = /*#__PURE__*/function () {
806
816
  function Connect() {
807
817
  this._xdm = new XDMRPC();
@@ -843,23 +853,23 @@ var AP = (function () {
843
853
  return extension.addon_key + '__' + extension.key + '__' + util.randomString();
844
854
  }
845
855
  /**
846
- * Creates a new iframed module, without actually creating the DOM element.
847
- * The iframe attributes are passed to the 'setupCallback', which is responsible for creating
848
- * the DOM element and returning the window reference.
849
- *
850
- * @param extension The extension definition. Example:
851
- * {
852
- * addon_key: 'my-addon',
853
- * key: 'my-module',
854
- * url: 'https://example.com/my-module',
855
- * options: {
856
- * autoresize: false,
857
- * hostOrigin: 'https://connect-host.example.com/'
858
- * }
859
- * }
860
- *
861
- * @param initCallback The optional initCallback is called when the bridge between host and iframe is established.
862
- **/;
856
+ * Creates a new iframed module, without actually creating the DOM element.
857
+ * The iframe attributes are passed to the 'setupCallback', which is responsible for creating
858
+ * the DOM element and returning the window reference.
859
+ *
860
+ * @param extension The extension definition. Example:
861
+ * {
862
+ * addon_key: 'my-addon',
863
+ * key: 'my-module',
864
+ * url: 'https://example.com/my-module',
865
+ * options: {
866
+ * autoresize: false,
867
+ * hostOrigin: 'https://connect-host.example.com/'
868
+ * }
869
+ * }
870
+ *
871
+ * @param initCallback The optional initCallback is called when the bridge between host and iframe is established.
872
+ **/;
863
873
  _proto.create = function create(extension, initCallback, unloadCallback) {
864
874
  var extension_id = this.registerExtension(extension, initCallback, unloadCallback);
865
875
  var options = extension.options || {};
@@ -946,6 +956,40 @@ var AP = (function () {
946
956
  return _extends.apply(this, arguments);
947
957
  }
948
958
 
959
+ // @ts-nocheck
960
+ /**
961
+ * Extension wide configuration values
962
+ */
963
+ var ConfigurationOptions = /*#__PURE__*/function () {
964
+ function ConfigurationOptions() {
965
+ this.options = {};
966
+ }
967
+ var _proto = ConfigurationOptions.prototype;
968
+ _proto._flush = function _flush() {
969
+ this.options = {};
970
+ };
971
+ _proto.get = function get(item) {
972
+ return item ? this.options[item] : this.options;
973
+ };
974
+ _proto.set = function set(data, value) {
975
+ var _this = this;
976
+ if (!data) {
977
+ return;
978
+ }
979
+ if (value) {
980
+ var _data;
981
+ data = (_data = {}, _data[data] = value, _data);
982
+ }
983
+ var keys = Object.getOwnPropertyNames(data);
984
+ keys.forEach(function (key) {
985
+ _this.options[key] = data[key];
986
+ }, this);
987
+ };
988
+ return ConfigurationOptions;
989
+ }();
990
+ var ConfigurationOptions$1 = new ConfigurationOptions();
991
+
992
+ // @ts-nocheck
949
993
  var _each$1 = util.each,
950
994
  document$2 = window.document;
951
995
  function $$2(sel, context) {
@@ -1031,15 +1075,16 @@ var AP = (function () {
1031
1075
  $$2.onDomLoad = function (func) {
1032
1076
  var w = window,
1033
1077
  readyState = w.document.readyState;
1034
- if (readyState === "complete") {
1078
+ if (readyState === 'complete') {
1035
1079
  func.call(w);
1036
1080
  } else {
1037
- $$2.bind(w, "load", function () {
1081
+ $$2.bind(w, 'load', function () {
1038
1082
  func.call(w);
1039
1083
  });
1040
1084
  }
1041
1085
  };
1042
1086
 
1087
+ // @ts-nocheck
1043
1088
  function getContainer() {
1044
1089
  // Look for these two selectors first... you need these to allow for the auto-shrink to work
1045
1090
  // Otherwise, it'll default to document.body which can't auto-grow or auto-shrink
@@ -1047,38 +1092,7 @@ var AP = (function () {
1047
1092
  return container.length > 0 ? container[0] : document.body;
1048
1093
  }
1049
1094
 
1050
- /**
1051
- * Extension wide configuration values
1052
- */
1053
- var ConfigurationOptions = /*#__PURE__*/function () {
1054
- function ConfigurationOptions() {
1055
- this.options = {};
1056
- }
1057
- var _proto = ConfigurationOptions.prototype;
1058
- _proto._flush = function _flush() {
1059
- this.options = {};
1060
- };
1061
- _proto.get = function get(item) {
1062
- return item ? this.options[item] : this.options;
1063
- };
1064
- _proto.set = function set(data, value) {
1065
- var _this = this;
1066
- if (!data) {
1067
- return;
1068
- }
1069
- if (value) {
1070
- var _data;
1071
- data = (_data = {}, _data[data] = value, _data);
1072
- }
1073
- var keys = Object.getOwnPropertyNames(data);
1074
- keys.forEach(function (key) {
1075
- _this.options[key] = data[key];
1076
- }, this);
1077
- };
1078
- return ConfigurationOptions;
1079
- }();
1080
- var ConfigurationOptions$1 = new ConfigurationOptions();
1081
-
1095
+ // @ts-nocheck
1082
1096
  var size = function size(width, height, container) {
1083
1097
  var verticalScrollbarWidth = function verticalScrollbarWidth() {
1084
1098
  var sbWidth = window.innerWidth - container.clientWidth;
@@ -1102,7 +1116,7 @@ var AP = (function () {
1102
1116
  if (!container) {
1103
1117
  util.warn('size called before container or body appeared, ignoring');
1104
1118
  }
1105
- if (widthInPx && typeof w === "string" && w.search('%') !== -1) {
1119
+ if (widthInPx && typeof w === 'string' && w.search('%') !== -1) {
1106
1120
  w = Math.max(container.scrollWidth, container.offsetWidth, container.clientWidth);
1107
1121
  }
1108
1122
  if (height) {
@@ -1136,6 +1150,117 @@ var AP = (function () {
1136
1150
  };
1137
1151
  };
1138
1152
 
1153
+ // @ts-nocheck
1154
+ var AutoResizeAction = /*#__PURE__*/function () {
1155
+ function AutoResizeAction(callback) {
1156
+ this.resizeError = util.throttle(function (msg) {
1157
+ // eslint-disable-next-line no-console
1158
+ console.info(msg);
1159
+ }, 1000);
1160
+ this.dimensionStores = {
1161
+ width: [],
1162
+ height: []
1163
+ };
1164
+ this.callback = callback;
1165
+ }
1166
+ var _proto = AutoResizeAction.prototype;
1167
+ _proto._setVal = function _setVal(val, type, time) {
1168
+ this.dimensionStores[type] = this.dimensionStores[type].filter(function (entry) {
1169
+ return time - entry.setAt < 400;
1170
+ });
1171
+ this.dimensionStores[type].push({
1172
+ val: parseInt(val, 10),
1173
+ setAt: time
1174
+ });
1175
+ };
1176
+ _proto._isFlicker = function _isFlicker(val, type) {
1177
+ return this.dimensionStores[type].length >= 5;
1178
+ };
1179
+ _proto.triggered = function triggered(dimensions) {
1180
+ dimensions = dimensions || size();
1181
+ var now = Date.now();
1182
+ this._setVal(dimensions.w, 'width', now);
1183
+ this._setVal(dimensions.h, 'height', now);
1184
+ var isFlickerWidth = this._isFlicker(dimensions.w, 'width', now);
1185
+ var isFlickerHeight = this._isFlicker(dimensions.h, 'height', now);
1186
+ if (isFlickerWidth) {
1187
+ dimensions.w = '100%';
1188
+ this.resizeError('SIMPLE XDM: auto resize flickering width detected, setting to 100%');
1189
+ }
1190
+ if (isFlickerHeight) {
1191
+ var vals = this.dimensionStores['height'].map(function (x) {
1192
+ return x.val;
1193
+ });
1194
+ dimensions.h = Math.max.apply(null, vals) + 'px';
1195
+ this.resizeError('SIMPLE XDM: auto resize flickering height detected, setting to: ' + dimensions.h);
1196
+ }
1197
+ this.callback(dimensions.w, dimensions.h);
1198
+ };
1199
+ return AutoResizeAction;
1200
+ }();
1201
+
1202
+ // @ts-nocheck
1203
+ var ConsumerOptions = /*#__PURE__*/function () {
1204
+ function ConsumerOptions() {}
1205
+ var _proto = ConsumerOptions.prototype;
1206
+ _proto._elementExists = function _elementExists($el) {
1207
+ return $el && $el.length === 1;
1208
+ };
1209
+ _proto._elementOptions = function _elementOptions($el) {
1210
+ return $el.attr('data-options');
1211
+ };
1212
+ _proto._getConsumerOptions = function _getConsumerOptions() {
1213
+ var options = {},
1214
+ $optionElement = $$2('#ac-iframe-options'),
1215
+ $scriptElement = $$2("script[src*='/atlassian-connect/all']"),
1216
+ $cdnScriptElement = $$2("script[src*='/connect-cdn.atl-paas.net/all']"),
1217
+ $fedrampCdnScriptElement = $$2("script[src*='/connect-alljs-cdn-bifrost.frontend.cdn.atlassian-us-gov-mod.com/assets/all']");
1218
+ if (!this._elementExists($optionElement) || !this._elementOptions($optionElement)) {
1219
+ if (this._elementExists($scriptElement)) {
1220
+ $optionElement = $scriptElement;
1221
+ } else if (this._elementExists($cdnScriptElement)) {
1222
+ $optionElement = $cdnScriptElement;
1223
+ } else if (this._elementExists($fedrampCdnScriptElement)) {
1224
+ $optionElement = $fedrampCdnScriptElement;
1225
+ }
1226
+ }
1227
+ if (this._elementExists($optionElement)) {
1228
+ // get its data-options attribute, if any
1229
+ var optStr = this._elementOptions($optionElement);
1230
+ if (optStr) {
1231
+ // if found, parse the value into kv pairs following the format of a style element
1232
+ optStr.split(';').forEach(function (nvpair) {
1233
+ nvpair = nvpair.trim();
1234
+ if (nvpair) {
1235
+ var nv = nvpair.split(':'),
1236
+ k = nv[0].trim(),
1237
+ v = nv[1].trim();
1238
+ if (k && v != null) {
1239
+ options[k] = v === 'true' || v === 'false' ? v === 'true' : v;
1240
+ }
1241
+ }
1242
+ });
1243
+ }
1244
+ }
1245
+ return options;
1246
+ };
1247
+ _proto._flush = function _flush() {
1248
+ delete this._options;
1249
+ };
1250
+ _proto.get = function get(key) {
1251
+ if (!this._options) {
1252
+ this._options = this._getConsumerOptions();
1253
+ }
1254
+ if (key) {
1255
+ return this._options[key];
1256
+ }
1257
+ return this._options;
1258
+ };
1259
+ return ConsumerOptions;
1260
+ }();
1261
+ var consumerOptions = new ConsumerOptions();
1262
+
1263
+ // @ts-nocheck
1139
1264
  function EventQueue() {
1140
1265
  this.q = [];
1141
1266
  this.add = function (ev) {
@@ -1170,13 +1295,13 @@ var AP = (function () {
1170
1295
  var styleChild = 'position: absolute; left: 0; top: 0;';
1171
1296
  element.resizeSensor.style.cssText = style;
1172
1297
  var expand = document.createElement('div');
1173
- expand.className = "ac-resize-sensor-expand";
1298
+ expand.className = 'ac-resize-sensor-expand';
1174
1299
  expand.style.cssText = style;
1175
1300
  var expandChild = document.createElement('div');
1176
1301
  expand.appendChild(expandChild);
1177
1302
  expandChild.style.cssText = styleChild;
1178
1303
  var shrink = document.createElement('div');
1179
- shrink.className = "ac-resize-sensor-shrink";
1304
+ shrink.className = 'ac-resize-sensor-shrink';
1180
1305
  shrink.style.cssText = style;
1181
1306
  var shrinkChild = document.createElement('div');
1182
1307
  shrink.appendChild(shrinkChild);
@@ -1213,7 +1338,10 @@ var AP = (function () {
1213
1338
  }
1214
1339
  reset();
1215
1340
  };
1341
+
1342
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
1216
1343
  expand.addEventListener('scroll', onScroll);
1344
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
1217
1345
  shrink.addEventListener('scroll', onScroll);
1218
1346
  var observerConfig = {
1219
1347
  attributes: true,
@@ -1239,115 +1367,8 @@ var AP = (function () {
1239
1367
  }
1240
1368
  };
1241
1369
 
1242
- var AutoResizeAction = /*#__PURE__*/function () {
1243
- function AutoResizeAction(callback) {
1244
- this.resizeError = util.throttle(function (msg) {
1245
- console.info(msg);
1246
- }, 1000);
1247
- this.dimensionStores = {
1248
- width: [],
1249
- height: []
1250
- };
1251
- this.callback = callback;
1252
- }
1253
- var _proto = AutoResizeAction.prototype;
1254
- _proto._setVal = function _setVal(val, type, time) {
1255
- this.dimensionStores[type] = this.dimensionStores[type].filter(function (entry) {
1256
- return time - entry.setAt < 400;
1257
- });
1258
- this.dimensionStores[type].push({
1259
- val: parseInt(val, 10),
1260
- setAt: time
1261
- });
1262
- };
1263
- _proto._isFlicker = function _isFlicker(val, type) {
1264
- return this.dimensionStores[type].length >= 5;
1265
- };
1266
- _proto.triggered = function triggered(dimensions) {
1267
- dimensions = dimensions || size();
1268
- var now = Date.now();
1269
- this._setVal(dimensions.w, 'width', now);
1270
- this._setVal(dimensions.h, 'height', now);
1271
- var isFlickerWidth = this._isFlicker(dimensions.w, 'width', now);
1272
- var isFlickerHeight = this._isFlicker(dimensions.h, 'height', now);
1273
- if (isFlickerWidth) {
1274
- dimensions.w = "100%";
1275
- this.resizeError("SIMPLE XDM: auto resize flickering width detected, setting to 100%");
1276
- }
1277
- if (isFlickerHeight) {
1278
- var vals = this.dimensionStores['height'].map(function (x) {
1279
- return x.val;
1280
- });
1281
- dimensions.h = Math.max.apply(null, vals) + 'px';
1282
- this.resizeError("SIMPLE XDM: auto resize flickering height detected, setting to: " + dimensions.h);
1283
- }
1284
- this.callback(dimensions.w, dimensions.h);
1285
- };
1286
- return AutoResizeAction;
1287
- }();
1288
-
1289
- var ConsumerOptions = /*#__PURE__*/function () {
1290
- function ConsumerOptions() {}
1291
- var _proto = ConsumerOptions.prototype;
1292
- _proto._elementExists = function _elementExists($el) {
1293
- return $el && $el.length === 1;
1294
- };
1295
- _proto._elementOptions = function _elementOptions($el) {
1296
- return $el.attr("data-options");
1297
- };
1298
- _proto._getConsumerOptions = function _getConsumerOptions() {
1299
- var options = {},
1300
- $optionElement = $$2("#ac-iframe-options"),
1301
- $scriptElement = $$2("script[src*='/atlassian-connect/all']"),
1302
- $cdnScriptElement = $$2("script[src*='/connect-cdn.atl-paas.net/all']"),
1303
- $fedrampCdnScriptElement = $$2("script[src*='/connect-alljs-cdn-bifrost.frontend.cdn.atlassian-us-gov-mod.com/assets/all']");
1304
- if (!this._elementExists($optionElement) || !this._elementOptions($optionElement)) {
1305
- if (this._elementExists($scriptElement)) {
1306
- $optionElement = $scriptElement;
1307
- } else if (this._elementExists($cdnScriptElement)) {
1308
- $optionElement = $cdnScriptElement;
1309
- } else if (this._elementExists($fedrampCdnScriptElement)) {
1310
- $optionElement = $fedrampCdnScriptElement;
1311
- }
1312
- }
1313
- if (this._elementExists($optionElement)) {
1314
- // get its data-options attribute, if any
1315
- var optStr = this._elementOptions($optionElement);
1316
- if (optStr) {
1317
- // if found, parse the value into kv pairs following the format of a style element
1318
- optStr.split(";").forEach(function (nvpair) {
1319
- nvpair = nvpair.trim();
1320
- if (nvpair) {
1321
- var nv = nvpair.split(":"),
1322
- k = nv[0].trim(),
1323
- v = nv[1].trim();
1324
- if (k && v != null) {
1325
- options[k] = v === "true" || v === "false" ? v === "true" : v;
1326
- }
1327
- }
1328
- });
1329
- }
1330
- }
1331
- return options;
1332
- };
1333
- _proto._flush = function _flush() {
1334
- delete this._options;
1335
- };
1336
- _proto.get = function get(key) {
1337
- if (!this._options) {
1338
- this._options = this._getConsumerOptions();
1339
- }
1340
- if (key) {
1341
- return this._options[key];
1342
- }
1343
- return this._options;
1344
- };
1345
- return ConsumerOptions;
1346
- }();
1347
- var consumerOptions = new ConsumerOptions();
1348
-
1349
1370
  var POSSIBLE_MODIFIER_KEYS = ['ctrl', 'shift', 'alt', 'meta'];
1350
- var AP = /*#__PURE__*/function (_PostMessage) {
1371
+ var AP$1 = /*#__PURE__*/function (_PostMessage) {
1351
1372
  _inheritsLoose(AP, _PostMessage);
1352
1373
  function AP(options, initCheck) {
1353
1374
  var _this;
@@ -1374,7 +1395,7 @@ var AP = (function () {
1374
1395
  _this._eventHandlers = {};
1375
1396
  _this._pendingCallbacks = {};
1376
1397
  _this._keyListeners = [];
1377
- _this._version = "5.3.194";
1398
+ _this._version = '5.3.196';
1378
1399
  _this._apiTampered = undefined;
1379
1400
  _this._isSubIframe = _this._topHost !== window.parent;
1380
1401
  _this._onConfirmedFns = [];
@@ -1416,6 +1437,7 @@ var AP = (function () {
1416
1437
  $$2(util._bind(_assertThisInitialized(_this), _this._autoResizer));
1417
1438
  _this.container = getContainer;
1418
1439
  _this.size = size;
1440
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
1419
1441
  window.addEventListener('click', function (e) {
1420
1442
  _this._host.postMessage({
1421
1443
  eid: _this._data.extension_id,
@@ -1442,6 +1464,7 @@ var AP = (function () {
1442
1464
  // Asynchronously verify the host frame option with this._top
1443
1465
  var callback = function callback(e) {
1444
1466
  if (e.source === _this2._top && e.data && typeof e.data.hostFrameOffset === 'number') {
1467
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
1445
1468
  window.removeEventListener('message', callback);
1446
1469
  if (_this2._getHostFrame(e.data.hostFrameOffset) !== _this2._topHost) {
1447
1470
  util.error('hostFrameOffset tampering detected, setting host frame to top window');
@@ -1449,6 +1472,7 @@ var AP = (function () {
1449
1472
  }
1450
1473
  }
1451
1474
  };
1475
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
1452
1476
  window.addEventListener('message', callback);
1453
1477
  this._top.postMessage({
1454
1478
  type: 'get_host_offset'
@@ -1498,21 +1522,21 @@ var AP = (function () {
1498
1522
  }
1499
1523
 
1500
1524
  /**
1501
- * The initialization data is passed in when the iframe is created as its 'name' attribute.
1502
- * Example:
1503
- * {
1504
- * extension_id: The ID of this iframe as defined by the host
1505
- * origin: 'https://example.org' // The parent's window origin
1506
- * api: {
1507
- * _globals: { ... },
1508
- * messages = {
1509
- * clear: {},
1510
- * ...
1511
- * },
1512
- * ...
1513
- * }
1514
- * }
1515
- **/;
1525
+ * The initialization data is passed in when the iframe is created as its 'name' attribute.
1526
+ * Example:
1527
+ * {
1528
+ * extension_id: The ID of this iframe as defined by the host
1529
+ * origin: 'https://example.org' // The parent's window origin
1530
+ * api: {
1531
+ * _globals: { ... },
1532
+ * messages = {
1533
+ * clear: {},
1534
+ * ...
1535
+ * },
1536
+ * ...
1537
+ * }
1538
+ * }
1539
+ **/;
1516
1540
  _proto._parseInitData = function _parseInitData(data) {
1517
1541
  try {
1518
1542
  return JSON.parse(data || window.name);
@@ -1552,7 +1576,7 @@ var AP = (function () {
1552
1576
  _proto._setupAPIWithoutRequire = function _setupAPIWithoutRequire(api) {
1553
1577
  var _this5 = this;
1554
1578
  Object.getOwnPropertyNames(api).forEach(function (moduleName) {
1555
- if (typeof _this5[moduleName] !== "undefined") {
1579
+ if (typeof _this5[moduleName] !== 'undefined') {
1556
1580
  throw new Error('XDM module: ' + moduleName + ' will collide with existing variable');
1557
1581
  }
1558
1582
  _this5[moduleName] = _this5._createModule(moduleName, api[moduleName]);
@@ -1585,6 +1609,7 @@ var AP = (function () {
1585
1609
  return Cls;
1586
1610
  };
1587
1611
  _proto._createMethodHandler = function _createMethodHandler(methodData) {
1612
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
1588
1613
  var that = this;
1589
1614
  return function () {
1590
1615
  var args = util.argumentsToArray(arguments);
@@ -1658,7 +1683,7 @@ var AP = (function () {
1658
1683
  // Promise methods always return error result as first arg
1659
1684
  // If a promise method is invoked using callbacks, strip first arg.
1660
1685
  if (pendingCallback.useCallback && pendingCallback.isPromiseMethod) {
1661
- data.args.shift();
1686
+ data.shift();
1662
1687
  }
1663
1688
  pendingCallback.apply(window, data.args);
1664
1689
  } catch (e) {
@@ -1724,7 +1749,7 @@ var AP = (function () {
1724
1749
  _proto._keyListenerId = function _keyListenerId(keycode, modifiers) {
1725
1750
  var keyListenerId = keycode;
1726
1751
  if (modifiers) {
1727
- if (typeof modifiers === "string") {
1752
+ if (typeof modifiers === 'string') {
1728
1753
  modifiers = [modifiers];
1729
1754
  }
1730
1755
  modifiers.sort();
@@ -1736,10 +1761,10 @@ var AP = (function () {
1736
1761
  };
1737
1762
  _proto._handleKeyListen = function _handleKeyListen(postMessageEvent) {
1738
1763
  var keyListenerId = this._keyListenerId(postMessageEvent.data.keycode, postMessageEvent.data.modifiers);
1739
- if (postMessageEvent.data.action === "remove") {
1764
+ if (postMessageEvent.data.action === 'remove') {
1740
1765
  var index = this._keyListeners.indexOf(keyListenerId);
1741
1766
  this._keyListeners.splice(index, 1);
1742
- } else if (postMessageEvent.data.action === "add") {
1767
+ } else if (postMessageEvent.data.action === 'add') {
1743
1768
  // only bind onKeyDown once a key is registered.
1744
1769
  this._bindKeyDown();
1745
1770
  this._keyListeners.push(keyListenerId);
@@ -1771,13 +1796,13 @@ var AP = (function () {
1771
1796
  }, origin || '*');
1772
1797
  this._initCheck && this._data.options.globalOptions.check_init && setTimeout(function () {
1773
1798
  if (!_this6._initReceived) {
1774
- throw new Error("Initialization message not received");
1799
+ throw new Error('Initialization message not received');
1775
1800
  }
1776
1801
  }, this._initTimeout);
1777
1802
  };
1778
1803
  _proto.broadcast = function broadcast(event, evnt) {
1779
1804
  if (!util.isString(event)) {
1780
- throw new Error("Event type must be string");
1805
+ throw new Error('Event type must be string');
1781
1806
  }
1782
1807
  this._host.postMessage({
1783
1808
  eid: this._data.extension_id,
@@ -1795,7 +1820,7 @@ var AP = (function () {
1795
1820
  callback.apply(window, args);
1796
1821
  };
1797
1822
  _proto.register = function register(handlers) {
1798
- if (typeof handlers === "object") {
1823
+ if (typeof handlers === 'object') {
1799
1824
  this._eventHandlers = _extends({}, this._eventHandlers, handlers) || {};
1800
1825
  this._host.postMessage({
1801
1826
  eid: this._data.extension_id,
@@ -1806,7 +1831,7 @@ var AP = (function () {
1806
1831
  };
1807
1832
  _proto.registerAny = function registerAny(handlers) {
1808
1833
  this.register({
1809
- '_any': handlers
1834
+ _any: handlers
1810
1835
  });
1811
1836
  };
1812
1837
  _proto._initResize = function _initResize() {
@@ -1828,7 +1853,7 @@ var AP = (function () {
1828
1853
  _this.parentTargets = {
1829
1854
  _globals: {}
1830
1855
  };
1831
- var plugin = new AP(undefined, initCheck);
1856
+ var plugin = new AP$1(undefined, initCheck);
1832
1857
  // export options from plugin to host.
1833
1858
  Object.getOwnPropertyNames(plugin).forEach(function (prop) {
1834
1859
  if (['_hostModules', '_globals'].indexOf(prop) === -1 && this[prop] === undefined) {
@@ -1880,7 +1905,8 @@ var AP = (function () {
1880
1905
  return Combined;
1881
1906
  }(Connect);
1882
1907
 
1883
- var combined = new Combined();
1908
+ // @ts-nocheck
1909
+ var AP = new Combined();
1884
1910
 
1885
1911
  function deprecate (fn, name, alternate, sinceVersion) {
1886
1912
  var called = false;
@@ -1888,8 +1914,8 @@ var AP = (function () {
1888
1914
  if (!called && typeof console !== 'undefined' && console.warn) {
1889
1915
  called = true;
1890
1916
  console.warn("DEPRECATED API - " + name + " has been deprecated " + (sinceVersion ? "since ACJS " + sinceVersion : 'in ACJS') + (" and will be removed in a future release. " + (alternate ? "Use " + alternate + " instead." : 'No alternative will be provided.')));
1891
- if (combined._analytics) {
1892
- combined._analytics.trackDeprecatedMethodUsed(name);
1917
+ if (AP._analytics) {
1918
+ AP._analytics.trackDeprecatedMethodUsed(name);
1893
1919
  }
1894
1920
  }
1895
1921
  return fn.apply(void 0, arguments);
@@ -2371,9 +2397,9 @@ var AP = (function () {
2371
2397
 
2372
2398
  var customButtonIncrement = 1;
2373
2399
  var getCustomData = deprecate(function () {
2374
- return combined._data.options.customData;
2400
+ return AP._data.options.customData;
2375
2401
  }, 'AP.dialog.customData', 'AP.dialog.getCustomData()', '5.0');
2376
- if (combined._hostModules && combined._hostModules.dialog) {
2402
+ if (AP._hostModules && AP._hostModules.dialog) {
2377
2403
  /**
2378
2404
  * Returns the custom data Object passed to the dialog at creation.
2379
2405
  * @noDemo
@@ -2386,15 +2412,15 @@ var AP = (function () {
2386
2412
  *
2387
2413
  * @return {Object} Data Object passed to the dialog on creation.
2388
2414
  */
2389
- Object.defineProperty(combined._hostModules.dialog, 'customData', {
2415
+ Object.defineProperty(AP._hostModules.dialog, 'customData', {
2390
2416
  get: getCustomData
2391
2417
  });
2392
- Object.defineProperty(combined.dialog, 'customData', {
2418
+ Object.defineProperty(AP.dialog, 'customData', {
2393
2419
  get: getCustomData
2394
2420
  });
2395
- combined.dialog._disableCloseOnSubmit = false;
2396
- combined.dialog.disableCloseOnSubmit = function () {
2397
- combined.dialog._disableCloseOnSubmit = true;
2421
+ AP.dialog._disableCloseOnSubmit = false;
2422
+ AP.dialog.disableCloseOnSubmit = function () {
2423
+ AP.dialog._disableCloseOnSubmit = true;
2398
2424
  };
2399
2425
  }
2400
2426
  var dialogHandlers = {};
@@ -2433,13 +2459,13 @@ var AP = (function () {
2433
2459
  }
2434
2460
 
2435
2461
  // if the submit button has been set to not close on click
2436
- if (name === 'submit' && combined.dialog._disableCloseOnSubmit) {
2462
+ if (name === 'submit' && AP.dialog._disableCloseOnSubmit) {
2437
2463
  shouldClose = false;
2438
2464
  }
2439
2465
  try {
2440
2466
  if (handlers) {
2441
2467
  if (args && args.button && args.button.name) {
2442
- context = combined.dialog.getButton(args.button.name);
2468
+ context = AP.dialog.getButton(args.button.name);
2443
2469
  }
2444
2470
  shouldClose = handlers.reduce(function (result, cb) {
2445
2471
  return cb.call(context, args) && result;
@@ -2454,7 +2480,7 @@ var AP = (function () {
2454
2480
  }
2455
2481
  }
2456
2482
  if (shouldClose) {
2457
- combined.dialog.close();
2483
+ AP.dialog.close();
2458
2484
  }
2459
2485
  }
2460
2486
  function registerHandler(event, callback) {
@@ -2465,9 +2491,9 @@ var AP = (function () {
2465
2491
  dialogHandlers[event].push(callback);
2466
2492
  }
2467
2493
  }
2468
- if (combined.dialog && combined.dialog.create) {
2469
- var original_dialogCreate = combined.dialog.create.prototype.constructor.bind({});
2470
- combined.dialog.create = combined._hostModules.dialog.create = function () {
2494
+ if (AP.dialog && AP.dialog.create) {
2495
+ var original_dialogCreate = AP.dialog.create.prototype.constructor.bind({});
2496
+ AP.dialog.create = AP._hostModules.dialog.create = function () {
2471
2497
  var dialog = original_dialogCreate.apply(void 0, arguments);
2472
2498
  /**
2473
2499
  * Allows the add-on to register a callback function for the given event. The listener is only called once and must be re-registered if needed.
@@ -2485,9 +2511,9 @@ var AP = (function () {
2485
2511
  return dialog;
2486
2512
  };
2487
2513
  }
2488
- if (combined.dialog && combined.dialog.getButton) {
2489
- var original_dialogGetButton = combined.dialog.getButton.prototype.constructor.bind({});
2490
- combined.dialog.getButton = combined._hostModules.dialog.getButton = function (name) {
2514
+ if (AP.dialog && AP.dialog.getButton) {
2515
+ var original_dialogGetButton = AP.dialog.getButton.prototype.constructor.bind({});
2516
+ AP.dialog.getButton = AP._hostModules.dialog.getButton = function (name) {
2491
2517
  try {
2492
2518
  var button = original_dialogGetButton(name);
2493
2519
  /**
@@ -2512,9 +2538,9 @@ var AP = (function () {
2512
2538
  }
2513
2539
  };
2514
2540
  }
2515
- if (combined.dialog && combined.dialog.createButton) {
2516
- var original_dialogCreateButton = combined.dialog.createButton.prototype.constructor.bind({});
2517
- combined.dialog.createButton = combined._hostModules.dialog.createButton = function (options) {
2541
+ if (AP.dialog && AP.dialog.createButton) {
2542
+ var original_dialogCreateButton = AP.dialog.createButton.prototype.constructor.bind({});
2543
+ AP.dialog.createButton = AP._hostModules.dialog.createButton = function (options) {
2518
2544
  var buttonProperties = {};
2519
2545
  if (typeof options !== 'object') {
2520
2546
  buttonProperties.text = options;
@@ -2526,7 +2552,7 @@ var AP = (function () {
2526
2552
  buttonProperties.identifier = 'user.button.' + customButtonIncrement++;
2527
2553
  }
2528
2554
  original_dialogCreateButton(buttonProperties);
2529
- return combined.dialog.getButton(buttonProperties.identifier);
2555
+ return AP.dialog.getButton(buttonProperties.identifier);
2530
2556
  };
2531
2557
  }
2532
2558
 
@@ -2539,11 +2565,11 @@ var AP = (function () {
2539
2565
  * @param {String} buttonName - button either "cancel" or "submit"
2540
2566
  * @param {Function} listener - callback function invoked when the requested button is pressed
2541
2567
  */
2542
- if (combined.dialog) {
2543
- combined.dialog.onDialogMessage = combined._hostModules.dialog.onDialogMessage = deprecate(registerHandler, 'AP.dialog.onDialogMessage()', 'AP.events.on("dialog.message", callback)', '5.0');
2568
+ if (AP.dialog) {
2569
+ AP.dialog.onDialogMessage = AP._hostModules.dialog.onDialogMessage = deprecate(registerHandler, 'AP.dialog.onDialogMessage()', 'AP.events.on("dialog.message", callback)', '5.0');
2544
2570
  }
2545
- if (!combined.Dialog) {
2546
- combined.Dialog = combined._hostModules.Dialog = combined.dialog;
2571
+ if (!AP.Dialog) {
2572
+ AP.Dialog = AP._hostModules.Dialog = AP.dialog;
2547
2573
  }
2548
2574
 
2549
2575
  var modules = {};
@@ -2606,12 +2632,12 @@ var AP = (function () {
2606
2632
  }
2607
2633
  function getFromHostModules(name) {
2608
2634
  var module;
2609
- if (combined._hostModules) {
2610
- if (combined._hostModules[name]) {
2611
- module = combined._hostModules[name];
2635
+ if (AP._hostModules) {
2636
+ if (AP._hostModules[name]) {
2637
+ module = AP._hostModules[name];
2612
2638
  }
2613
- if (combined._hostModules._globals && combined._hostModules._globals[name]) {
2614
- module = combined._hostModules._globals[name];
2639
+ if (AP._hostModules._globals && AP._hostModules._globals[name]) {
2640
+ module = AP._hostModules._globals[name];
2615
2641
  }
2616
2642
  if (module) {
2617
2643
  return {
@@ -10873,7 +10899,7 @@ var AP = (function () {
10873
10899
  return regenerator.wrap(function _callee3$(_context3) {
10874
10900
  while (1) switch (_context3.prev = _context3.next) {
10875
10901
  case 0:
10876
- if (!(combined._data.options.moduleType !== 'dynamicContentMacros')) {
10902
+ if (!(AP._data.options.moduleType !== 'dynamicContentMacros')) {
10877
10903
  _context3.next = 2;
10878
10904
  break;
10879
10905
  }
@@ -11061,10 +11087,10 @@ var AP = (function () {
11061
11087
  }))();
11062
11088
  },
11063
11089
  initializeThemeListeners: function initializeThemeListeners() {
11064
- if (!combined.theming) {
11090
+ if (!AP.theming) {
11065
11091
  return;
11066
11092
  }
11067
- combined.register({
11093
+ AP.register({
11068
11094
  theme_initialized: Theming.onThemeInitialized,
11069
11095
  theme_changed: Theming.onThemeChanged
11070
11096
  });
@@ -11328,8 +11354,8 @@ var AP = (function () {
11328
11354
  }
11329
11355
  function sendMetrics() {
11330
11356
  var metrics = getMetrics();
11331
- if (combined._analytics && combined._analytics.trackIframePerformanceMetrics) {
11332
- combined._analytics.trackIframePerformanceMetrics(metrics);
11357
+ if (AP._analytics && AP._analytics.trackIframePerformanceMetrics) {
11358
+ AP._analytics.trackIframePerformanceMetrics(metrics);
11333
11359
  }
11334
11360
  }
11335
11361
  function setupWebVitals(timeout) {
@@ -11337,8 +11363,8 @@ var AP = (function () {
11337
11363
  var collectMetrics = function collectMetrics(source) {
11338
11364
  if (Object.keys(metrics).length > 0) {
11339
11365
  console.log("[web-vitals] Sending metrics triggered by: " + source, metrics);
11340
- if (combined._analytics && combined._analytics.trackWebVitals) {
11341
- combined._analytics.trackWebVitals(metrics);
11366
+ if (AP._analytics && AP._analytics.trackWebVitals) {
11367
+ AP._analytics.trackWebVitals(metrics);
11342
11368
  metrics = {};
11343
11369
  }
11344
11370
  }
@@ -11404,15 +11430,15 @@ var AP = (function () {
11404
11430
  setBooleanResolver(flagResolver);
11405
11431
  }
11406
11432
 
11407
- combined._hostModules._dollar = $$1;
11408
- combined._hostModules['inline-dialog'] = combined._hostModules.inlineDialog;
11433
+ AP._hostModules._dollar = $$1;
11434
+ AP._hostModules['inline-dialog'] = AP._hostModules.inlineDialog;
11409
11435
  if (consumerOptions.get('sizeToParent') === true) {
11410
- combined.env && combined.env.sizeToParent(consumerOptions.get('hideFooter') === true);
11436
+ AP.env && AP.env.sizeToParent(consumerOptions.get('hideFooter') === true);
11411
11437
  } else {
11412
- combined.env && combined.env.hideFooter(consumerOptions.get('hideFooter') === true);
11438
+ AP.env && AP.env.hideFooter(consumerOptions.get('hideFooter') === true);
11413
11439
  }
11414
11440
  if (consumerOptions.get('base') === true) {
11415
- combined.env && combined.env.getLocation(function (loc) {
11441
+ AP.env && AP.env.getLocation(function (loc) {
11416
11442
  $$1('head').append({
11417
11443
  tag: 'base',
11418
11444
  href: loc,
@@ -11421,18 +11447,18 @@ var AP = (function () {
11421
11447
  });
11422
11448
  }
11423
11449
  $$1.each(EventsInstance.methods, function (i, method) {
11424
- if (combined._hostModules && combined._hostModules.events) {
11425
- combined._hostModules.events[method] = combined.events[method] = EventsInstance[method].bind(EventsInstance);
11426
- combined._hostModules.events[method + 'Public'] = combined.events[method + 'Public'] = PublicEventsInstance[method].bind(PublicEventsInstance);
11450
+ if (AP._hostModules && AP._hostModules.events) {
11451
+ AP._hostModules.events[method] = AP.events[method] = EventsInstance[method].bind(EventsInstance);
11452
+ AP._hostModules.events[method + 'Public'] = AP.events[method + 'Public'] = PublicEventsInstance[method].bind(PublicEventsInstance);
11427
11453
  }
11428
11454
  });
11429
- combined.define = deprecate(function () {
11455
+ AP.define = deprecate(function () {
11430
11456
  return AMD.define.apply(AMD, arguments);
11431
11457
  }, 'AP.define()', null, '5.0');
11432
- combined.require = deprecate(function () {
11458
+ AP.require = deprecate(function () {
11433
11459
  return AMD.require.apply(AMD, arguments);
11434
11460
  }, 'AP.require()', null, '5.0');
11435
- var margin = combined._data.options.isDialog ? '10px 10px 0 10px' : '0';
11461
+ var margin = AP._data.options.isDialog ? '10px 10px 0 10px' : '0';
11436
11462
  if (consumerOptions.get('margin') !== false) {
11437
11463
  var setBodyMargin = function setBodyMargin() {
11438
11464
  if (document.body) {
@@ -11443,12 +11469,12 @@ var AP = (function () {
11443
11469
  window.addEventListener('DOMContentLoaded', setBodyMargin); // If it doesn't exist now (likely) we can set it later
11444
11470
  }
11445
11471
 
11446
- combined.Meta = {
11472
+ AP.Meta = {
11447
11473
  get: Meta.getMeta
11448
11474
  };
11449
- combined.meta = Meta.getMeta;
11450
- combined.localUrl = Meta.localUrl;
11451
- combined._hostModules._util = combined._util = {
11475
+ AP.meta = Meta.getMeta;
11476
+ AP.localUrl = Meta.localUrl;
11477
+ AP._hostModules._util = AP._util = {
11452
11478
  each: _util.each,
11453
11479
  log: _util.log,
11454
11480
  decodeQueryComponent: _util.decodeQueryComponent,
@@ -11460,8 +11486,8 @@ var AP = (function () {
11460
11486
  isFunction: _util.isFunction,
11461
11487
  handleError: _util.handleError
11462
11488
  };
11463
- if (combined.defineModule) {
11464
- combined.defineModule('env', {
11489
+ if (AP.defineModule) {
11490
+ AP.defineModule('env', {
11465
11491
  resize: function resize(w, h, callback) {
11466
11492
  var iframe = document.getElementById(callback._context.extension_id);
11467
11493
  iframe.style.width = w + (typeof w === 'number' ? 'px' : '');
@@ -11469,8 +11495,8 @@ var AP = (function () {
11469
11495
  }
11470
11496
  });
11471
11497
  }
11472
- if (combined._data && combined._data.origin) {
11473
- combined.registerAny(function (data, callback) {
11498
+ if (AP._data && AP._data.origin) {
11499
+ AP.registerAny(function (data, callback) {
11474
11500
  // dialog.close event doesn't have event data
11475
11501
  if (data && data.event && data.sender) {
11476
11502
  PublicEventsInstance._anyListener(data, callback);
@@ -11491,11 +11517,11 @@ var AP = (function () {
11491
11517
  // Reads platform feature flags from the parent and sets them as global variables.
11492
11518
  setBooleanFeatureFlagResolver(function (flagName) {
11493
11519
  var _AP$_data$options$pla;
11494
- return ((_AP$_data$options$pla = combined._data.options.platformFeatureFlags) == null ? void 0 : _AP$_data$options$pla[flagName]) || false;
11520
+ return ((_AP$_data$options$pla = AP._data.options.platformFeatureFlags) == null ? void 0 : _AP$_data$options$pla[flagName]) || false;
11495
11521
  });
11496
11522
 
11497
11523
  // gets the global options from the parent iframe (if present) so they can propagate to future sub-iframes.
11498
- ExtensionConfigurationOptionsStore$1.set(combined._data.options.globalOptions);
11524
+ ExtensionConfigurationOptionsStore$1.set(AP._data.options.globalOptions);
11499
11525
  if (document.readyState === 'complete') {
11500
11526
  if (typeof window.requestIdleCallback === 'function') {
11501
11527
  window.requestIdleCallback(analytics.sendMetrics, {
@@ -13630,6 +13656,6 @@ var AP = (function () {
13630
13656
  loadAndAppendCustomThemeCss: loadAndAppendCustomThemeCss
13631
13657
  });
13632
13658
 
13633
- return combined;
13659
+ return AP;
13634
13660
 
13635
13661
  })();