@pendo/agent 2.336.0 → 2.337.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.
@@ -4029,8 +4029,8 @@ let SERVER = '';
4029
4029
  let ASSET_HOST = '';
4030
4030
  let ASSET_PATH = '';
4031
4031
  let DESIGNER_SERVER = '';
4032
- let VERSION = '2.336.0_';
4033
- let PACKAGE_VERSION = '2.336.0';
4032
+ let VERSION = '2.337.0_';
4033
+ let PACKAGE_VERSION = '2.337.0';
4034
4034
  let LOADER = 'xhr';
4035
4035
  /* eslint-enable web-sdk-eslint-rules/no-gulp-env-references */
4036
4036
  /**
@@ -9766,6 +9766,7 @@ var pendoDotUrl = {
9766
9766
  electronResourcesPath
9767
9767
  };
9768
9768
 
9769
+ const FONT_HOST = 'https://cdn.pendo.io';
9769
9770
  function getDataHost() {
9770
9771
  var localDataHost = ConfigReader.getLocalConfig('dataHost');
9771
9772
  if (localDataHost) {
@@ -9807,6 +9808,12 @@ function getAssetUrl(filename) {
9807
9808
  const file = isLocalAgent(assetHost) ? filename.replace('.min.js', '.js') : filename;
9808
9809
  return `${assetHost}/${ASSET_PATH ? ASSET_PATH + '/' : ''}${file}`;
9809
9810
  }
9811
+ function getFontBaseUrl() {
9812
+ if (ConfigReader.get('assetHost')) {
9813
+ return getAssetUrl('fonts');
9814
+ }
9815
+ return `${FONT_HOST}/fonts`;
9816
+ }
9810
9817
 
9811
9818
  function treatAsAdoptPartner() {
9812
9819
  // allowPartnerAnalyticsForwarding is set on the snippet in Adopt UI to block based on the environment of the app.
@@ -28640,6 +28647,7 @@ const PluginAPI = {
28640
28647
  getAssetHost,
28641
28648
  getAssetUrl,
28642
28649
  getDataHost,
28650
+ getFontBaseUrl,
28643
28651
  SERVER,
28644
28652
  DESIGNER_SERVER
28645
28653
  },
@@ -28664,7 +28672,10 @@ const PluginAPI = {
28664
28672
  testPageRule,
28665
28673
  addInlineStyles: _.partial(addInlineStyles, ConfigReader),
28666
28674
  getNow,
28667
- escapeRegExp
28675
+ escapeRegExp,
28676
+ getZoneSafeMethod(method, target) {
28677
+ return getZoneSafeMethod$1(_, method, target);
28678
+ }
28668
28679
  },
28669
28680
  constants: {
28670
28681
  URL_MAX_LENGTH,
@@ -30963,6 +30974,54 @@ var validateEnvironment = function (skipLogging) {
30963
30974
  ConfigReader.validate(console);
30964
30975
  };
30965
30976
 
30977
+ const SUPPORTED_INTEGRATIONS = ['intercom'];
30978
+ // Comparison logic is a standalone bundle fetched on demand, not base-agent code.
30979
+ function runCheck(pendoVisitorId, isAnonymous) {
30980
+ return window.__pendoCheckIntercomIdMatch(pendoVisitorId, isAnonymous);
30981
+ }
30982
+ /**
30983
+ * Compares the current Pendo visitor ID against the current user ID for the given
30984
+ * integration and logs the result to the console.
30985
+ *
30986
+ * @access public
30987
+ * @category Validation
30988
+ * @param {string} integration name of the integration to check against (currently only
30989
+ * `'intercom'` is supported)
30990
+ * @returns {Promise<boolean|undefined>} `true` if the IDs match, `false` if they don't, or
30991
+ * `undefined` if the match couldn't be confirmed
30992
+ * @example
30993
+ * pendo.checkIntegrationIdMatch('intercom')
30994
+ */
30995
+ function checkIntegrationIdMatch(integration) {
30996
+ if (!_.contains(SUPPORTED_INTEGRATIONS, integration)) {
30997
+ /* eslint-disable no-console */
30998
+ if (typeof console !== 'undefined' && console.log) {
30999
+ console.log('Unsupported integration "' + integration + '". Supported integrations: ' + SUPPORTED_INTEGRATIONS.join(', ') + '.');
31000
+ }
31001
+ /* eslint-enable no-console */
31002
+ return q.resolve(undefined);
31003
+ }
31004
+ const pendoVisitorId = get_visitor_id();
31005
+ const isAnonymous = isAnonymousVisitor(pendoVisitorId);
31006
+ if (typeof window.__pendoCheckIntercomIdMatch === 'function') {
31007
+ return q.resolve(runCheck(pendoVisitorId, isAnonymous));
31008
+ }
31009
+ const deferred = q.defer();
31010
+ loadResource(getAssetUrl('check-intercom-id-match.min.js'), function (err) {
31011
+ /* eslint-disable no-console */
31012
+ if (err) {
31013
+ if (typeof console !== 'undefined' && console.error) {
31014
+ console.error('Failed to load the Intercom ID check. Please try again.');
31015
+ }
31016
+ deferred.resolve(undefined);
31017
+ return;
31018
+ }
31019
+ /* eslint-enable no-console */
31020
+ deferred.resolve(runCheck(pendoVisitorId, isAnonymous));
31021
+ }, true);
31022
+ return deferred.promise;
31023
+ }
31024
+
30966
31025
  var BuildingBlocks = {
30967
31026
  BuildingBlockGuides,
30968
31027
  BuildingBlockResourceCenter,
@@ -31634,6 +31693,7 @@ function exportPublicApi(pendo) {
31634
31693
  pendo.get_account_id = get_account_id;
31635
31694
  pendo.set_account_id = function (accountId) { identify(get_visitor_id(), accountId); };
31636
31695
  pendo.getSerializedMetadata = getSerializedMetadata;
31696
+ pendo.checkIntegrationIdMatch = checkIntegrationIdMatch;
31637
31697
  pendo.compress = compress;
31638
31698
  pendo.squeezeAndCompress = compress;
31639
31699
  pendo.randomElement = randomElement;
@@ -42829,6 +42889,48 @@ setTimeout = (function(global) {
42829
42889
 
42830
42890
  var setTimeout$1 = setTimeout;
42831
42891
 
42892
+ // NOT A TRUE POLYFILL
42893
+ // This really only replaces the location portion of the URL API.
42894
+ //
42895
+ // NOTE: This, for now, at least is identified as an instanceof HTMLAnchorElement
42896
+
42897
+ function URLPolyfillFactory(doc) {
42898
+ return function URL(str) {
42899
+ var a = doc.createElement('a');
42900
+ a.href = str;
42901
+
42902
+ if (a.protocol === ':') {
42903
+ throw new Error('Uncaught TypeError: Failed to construct \'URL\': Invalid URL');
42904
+ }
42905
+
42906
+ if (a.href !== str && a.href !== encodeURI(str)) {
42907
+ throw new Error('Uncaught TypeError: Failed to construct \'URL\': Invalid URL');
42908
+ }
42909
+
42910
+ if (!a.toString) {
42911
+ a.toString = function() { return a.href; };
42912
+ }
42913
+
42914
+ if (a.origin == null) {
42915
+ a.origin = a.protocol + '//' + a.hostname;
42916
+ if (a.port !== '80' && a.port !== '443') {
42917
+ a.origin += ':' + a.port;
42918
+ }
42919
+ }
42920
+
42921
+ return a;
42922
+ };
42923
+ }
42924
+
42925
+ var URL$1 = (function(global, factory) {
42926
+ var nativeURL = global.URL;
42927
+ if (typeof nativeURL !== 'function' || !/native/.test(nativeURL)) {
42928
+ return factory(document);
42929
+ }
42930
+
42931
+ return nativeURL;
42932
+ })(window, URLPolyfillFactory);
42933
+
42832
42934
  /*
42833
42935
  * @license MIT - https://github.com/taylorhakes/promise-polyfill
42834
42936
  */
@@ -43709,15 +43811,57 @@ const startListening = (
43709
43811
  _stopListening = () => window.removeEventListener('message', postMessageListener);
43710
43812
  };
43711
43813
 
43814
+ const SIZED_CLASS = 'pendo-voc-portal-sized';
43815
+ const STEP_CONTAINER_SELECTOR = '._pendo-step-container-size';
43816
+ const PORTAL_RC_SELECTOR = `#pendo-resource-center-container.${SIZED_CLASS}`;
43817
+ const PORTAL_STEP_SELECTOR = `#pendo-resource-center-container ${STEP_CONTAINER_SELECTOR}.${SIZED_CLASS}`;
43818
+ const PORTAL_IFRAME_SELECTOR = 'iframe[src*="portal"][src*="mode=rc"]';
43819
+ const HOME_LIST_SELECTOR = '._pendo-resource-center-home-list';
43820
+ const CONTAINER_ID = 'pendo-resource-center-container';
43821
+ const STYLE_ID$1 = 'pendo-voc-portal-styles';
43822
+ const LOADER_ID = 'pendo-voc-portal-loader';
43823
+ const LOADER_STYLE_ID = 'pendo-voc-portal-loader-styles';
43824
+ const LOADER_Z_INDEX = 2147483646;
43825
+ const LOADER_TIMEOUT_MS = 10000;
43826
+ const LOADER_CSS = `#${LOADER_ID} {
43827
+ position: absolute;
43828
+ inset: 0;
43829
+ display: flex;
43830
+ align-items: center;
43831
+ justify-content: center;
43832
+ background: #fff;
43833
+ z-index: ${LOADER_Z_INDEX};
43834
+ }
43835
+ #${LOADER_ID}::after {
43836
+ content: "";
43837
+ width: 60px;
43838
+ height: 60px;
43839
+ border: 5px solid rgba(0, 0, 0, 0.12);
43840
+ border-top-color: #000;
43841
+ border-radius: 50%;
43842
+ animation: pendo-voc-portal-spin 1s linear infinite;
43843
+ }
43844
+ @keyframes pendo-voc-portal-spin { to { transform: rotate(360deg); } }`;
43845
+ const VALID_UNITS = ['px', '%', 'vh', 'vw'];
43846
+ const DEFAULT_PORTAL_WIDTH = '90vw !important';
43847
+ const DEFAULT_PORTAL_HEIGHT = '85vh !important';
43712
43848
  function VocPortal() {
43713
43849
  let pendoGlobal;
43714
43850
  let pluginAPI;
43851
+ let portalObserver;
43852
+ let containerObserver;
43853
+ let observedContainer;
43854
+ let ObserverCtor;
43855
+ let lastPresetCss;
43856
+ let loaderTimeout;
43857
+ let sizedElements = [];
43715
43858
  return {
43716
43859
  name: 'VocPortal',
43717
43860
  initialize,
43718
43861
  routeHandlerLookup,
43719
43862
  queryMessageHandler,
43720
43863
  resizeMessageHandler,
43864
+ presizePortalContainer,
43721
43865
  teardown
43722
43866
  };
43723
43867
  function initialize(pendo, PluginAPI) {
@@ -43726,6 +43870,232 @@ function VocPortal() {
43726
43870
  const { frameId } = PluginAPI.EventTracer.addTracerIds({});
43727
43871
  this.removeResizeEvent = pendoGlobal.attachEvent(window, 'resize', resizePortalIframe);
43728
43872
  startListening('VocPortal', frameId, routeHandlerLookup, () => '*');
43873
+ try {
43874
+ observePortalContainer();
43875
+ }
43876
+ catch (err) {
43877
+ pluginAPI.log.error('VocPortal presizing setup failed', err);
43878
+ }
43879
+ }
43880
+ function buildContainerSizeCss(width, height) {
43881
+ return `${PORTAL_RC_SELECTOR} {
43882
+ width: ${width};
43883
+ height: ${height};
43884
+ }
43885
+ ${PORTAL_STEP_SELECTOR} {
43886
+ width: ${width};
43887
+ height: ${height};
43888
+ }`;
43889
+ }
43890
+ function presizePortalContainer(width = DEFAULT_PORTAL_WIDTH, height = DEFAULT_PORTAL_HEIGHT) {
43891
+ const css = buildContainerSizeCss(width, height);
43892
+ if (css === lastPresetCss)
43893
+ return;
43894
+ lastPresetCss = css;
43895
+ const existing = document.getElementById(STYLE_ID$1);
43896
+ if (existing) {
43897
+ existing.textContent = css;
43898
+ }
43899
+ else {
43900
+ pluginAPI.util.addInlineStyles(STYLE_ID$1, css);
43901
+ }
43902
+ }
43903
+ function observePortalContainer() {
43904
+ ObserverCtor = getPortalMutationObserver();
43905
+ if (!ObserverCtor)
43906
+ return;
43907
+ presizeFromExistingIframe();
43908
+ ensureContainerObserver();
43909
+ portalObserver = new ObserverCtor(handleBodyMutations);
43910
+ portalObserver.observe(pendoGlobal.dom.getBody(), {
43911
+ childList: true,
43912
+ subtree: true
43913
+ });
43914
+ }
43915
+ function handleBodyMutations(mutations) {
43916
+ ensureContainerObserver();
43917
+ handleRcMutations(mutations);
43918
+ }
43919
+ function ensureContainerObserver() {
43920
+ if (!ObserverCtor)
43921
+ return;
43922
+ const container = document.getElementById(CONTAINER_ID) || null;
43923
+ if (container === observedContainer)
43924
+ return;
43925
+ if (containerObserver) {
43926
+ containerObserver.disconnect();
43927
+ containerObserver = undefined;
43928
+ }
43929
+ observedContainer = container;
43930
+ if (!container) {
43931
+ clearPresetSizing();
43932
+ return;
43933
+ }
43934
+ containerObserver = new ObserverCtor(handleRcMutations);
43935
+ containerObserver.observe(container, {
43936
+ childList: true,
43937
+ subtree: true,
43938
+ attributes: true,
43939
+ attributeFilter: ['src']
43940
+ });
43941
+ }
43942
+ function presizeFromExistingIframe() {
43943
+ const iframe = document.querySelector(PORTAL_IFRAME_SELECTOR);
43944
+ if (iframe)
43945
+ presizeFromIframe(iframe);
43946
+ }
43947
+ function getPortalMutationObserver() {
43948
+ const zoneSafe = pluginAPI.util && pluginAPI.util.getZoneSafeMethod;
43949
+ let MutationObserver = zoneSafe && zoneSafe('MutationObserver');
43950
+ if (typeof MutationObserver !== 'function') {
43951
+ MutationObserver = window.MutationObserver;
43952
+ }
43953
+ return typeof MutationObserver === 'function' ? MutationObserver : undefined;
43954
+ }
43955
+ function handleRcMutations(mutations) {
43956
+ const iframe = findPortalIframe(mutations);
43957
+ if (iframe) {
43958
+ presizeFromIframe(iframe);
43959
+ return;
43960
+ }
43961
+ if (findAddedHomeList(mutations))
43962
+ clearPresetSizing();
43963
+ }
43964
+ function clearPresetSizing() {
43965
+ lastPresetCss = undefined;
43966
+ unmarkSizedElements();
43967
+ const existing = document.getElementById(STYLE_ID$1);
43968
+ if (existing)
43969
+ existing.textContent = '';
43970
+ const container = document.getElementById(CONTAINER_ID);
43971
+ if (container)
43972
+ container.style.transform = '';
43973
+ hideLoadingOverlay();
43974
+ }
43975
+ function markSizedElements(container, iframe) {
43976
+ addSizedClass(container);
43977
+ addSizedClass(closestStepContainer(iframe));
43978
+ }
43979
+ function addSizedClass(el) {
43980
+ if (el && el.classList) {
43981
+ el.classList.add(SIZED_CLASS);
43982
+ if (sizedElements.indexOf(el) === -1)
43983
+ sizedElements.push(el);
43984
+ }
43985
+ }
43986
+ function unmarkSizedElements() {
43987
+ for (let i = 0; i < sizedElements.length; i++) {
43988
+ const el = sizedElements[i];
43989
+ if (el && el.classList)
43990
+ el.classList.remove(SIZED_CLASS);
43991
+ }
43992
+ sizedElements = [];
43993
+ }
43994
+ function closestStepContainer(node) {
43995
+ let el = node;
43996
+ while (el && el.nodeType === 1) {
43997
+ if (el.matches && el.matches(STEP_CONTAINER_SELECTOR))
43998
+ return el;
43999
+ el = el.parentNode;
44000
+ }
44001
+ return null;
44002
+ }
44003
+ function findAddedHomeList(mutations) {
44004
+ if (!mutations)
44005
+ return false;
44006
+ for (const mutation of mutations) {
44007
+ const addedNodes = mutation.addedNodes || [];
44008
+ for (const node of addedNodes) {
44009
+ if (!node || node.nodeType !== 1)
44010
+ continue;
44011
+ if (node.matches && node.matches(HOME_LIST_SELECTOR))
44012
+ return true;
44013
+ if (node.querySelector && node.querySelector(HOME_LIST_SELECTOR))
44014
+ return true;
44015
+ }
44016
+ }
44017
+ return false;
44018
+ }
44019
+ function presizeFromIframe(iframe) {
44020
+ const { width, height } = readPortalDimsFromSrc(iframe.getAttribute('src'));
44021
+ const container = document.getElementById(CONTAINER_ID);
44022
+ presizePortalContainer(width, height);
44023
+ markSizedElements(container, iframe);
44024
+ showLoadingOverlay(container, iframe);
44025
+ try {
44026
+ resizePortalIframe();
44027
+ clampContainerToViewport(container);
44028
+ }
44029
+ catch (err) {
44030
+ pluginAPI.log.error('VocPortal presize sizing failed', err);
44031
+ }
44032
+ }
44033
+ function showLoadingOverlay(container, iframe) {
44034
+ if (!container || document.getElementById(LOADER_ID))
44035
+ return;
44036
+ pluginAPI.util.addInlineStyles(LOADER_STYLE_ID, LOADER_CSS);
44037
+ const loader = document.createElement('div');
44038
+ loader.id = LOADER_ID;
44039
+ loader.setAttribute('role', 'status');
44040
+ loader.setAttribute('aria-label', 'Loading');
44041
+ const title = document.getElementById('pendo-resource-center-module-title-container');
44042
+ if (title && title.offsetHeight)
44043
+ loader.style.top = `${title.offsetHeight}px`;
44044
+ container.appendChild(loader);
44045
+ if (iframe && iframe.addEventListener) {
44046
+ iframe.addEventListener('load', hideLoadingOverlay, { once: true });
44047
+ }
44048
+ loaderTimeout = setTimeout$1(hideLoadingOverlay, LOADER_TIMEOUT_MS);
44049
+ }
44050
+ function hideLoadingOverlay() {
44051
+ if (loaderTimeout) {
44052
+ clearTimeout(loaderTimeout);
44053
+ loaderTimeout = undefined;
44054
+ }
44055
+ const loader = document.getElementById(LOADER_ID);
44056
+ if (loader && loader.remove)
44057
+ loader.remove();
44058
+ }
44059
+ function findPortalIframe(mutations) {
44060
+ if (!mutations)
44061
+ return null;
44062
+ for (const mutation of mutations) {
44063
+ const target = mutation.target;
44064
+ if (mutation.type === 'attributes' && target && target.matches &&
44065
+ target.matches(PORTAL_IFRAME_SELECTOR)) {
44066
+ return target;
44067
+ }
44068
+ const addedNodes = mutation.addedNodes || [];
44069
+ for (const node of addedNodes) {
44070
+ if (!node || node.nodeType !== 1)
44071
+ continue;
44072
+ if (node.matches && node.matches(PORTAL_IFRAME_SELECTOR))
44073
+ return node;
44074
+ const found = node.querySelector && node.querySelector(PORTAL_IFRAME_SELECTOR);
44075
+ if (found)
44076
+ return found;
44077
+ }
44078
+ }
44079
+ return null;
44080
+ }
44081
+ function readPortalDimsFromSrc(src) {
44082
+ try {
44083
+ const params = new URL$1(src, window.location.href).searchParams;
44084
+ const widthValue = parseInt(params.get('width'), 10);
44085
+ const heightValue = parseInt(params.get('height'), 10);
44086
+ const widthUnit = params.get('widthUnit') || 'vw';
44087
+ const heightUnit = params.get('heightUnit') || 'vh';
44088
+ const width = (widthValue > 0 && pendoGlobal._.contains(VALID_UNITS, widthUnit))
44089
+ ? `${widthValue}${widthUnit} !important`
44090
+ : DEFAULT_PORTAL_WIDTH;
44091
+ const height = (heightValue > 0 && pendoGlobal._.contains(VALID_UNITS, heightUnit))
44092
+ ? `${heightValue}${heightUnit} !important`
44093
+ : DEFAULT_PORTAL_HEIGHT;
44094
+ return { width, height };
44095
+ }
44096
+ catch (err) {
44097
+ return { width: DEFAULT_PORTAL_WIDTH, height: DEFAULT_PORTAL_HEIGHT };
44098
+ }
43729
44099
  }
43730
44100
  function routeHandlerLookup(path) {
43731
44101
  switch (path) {
@@ -43738,7 +44108,7 @@ function VocPortal() {
43738
44108
  }
43739
44109
  }
43740
44110
  function resizePortalIframe() {
43741
- const vocPortalRcContainer = document.getElementById('pendo-resource-center-container');
44111
+ const vocPortalRcContainer = document.getElementById(CONTAINER_ID);
43742
44112
  const vocPortalRcDOM = pendoGlobal.dom(vocPortalRcContainer);
43743
44113
  pluginAPI.sizeElements(vocPortalRcDOM);
43744
44114
  }
@@ -43764,21 +44134,14 @@ function VocPortal() {
43764
44134
  if (typeof widthValue !== 'number' || typeof heightValue !== 'number') {
43765
44135
  return;
43766
44136
  }
43767
- const validUnits = ['px', '%', 'vh', 'vw'];
43768
- if (!pendoGlobal._.contains(validUnits, widthUnit) || !pendoGlobal._.contains(validUnits, heightUnit)) {
44137
+ if (!pendoGlobal._.contains(VALID_UNITS, widthUnit) || !pendoGlobal._.contains(VALID_UNITS, heightUnit)) {
43769
44138
  return;
43770
44139
  }
43771
44140
  const width = `${widthValue}${widthUnit}${widthIsImportant ? ' !important' : ''}`;
43772
44141
  const height = `${heightValue}${heightUnit}${heightIsImportant ? ' !important' : ''}`;
43773
- const container = document.getElementById('pendo-resource-center-container');
43774
- pluginAPI.util.addInlineStyles('pendo-voc-portal-styles', `#pendo-resource-center-container:has(iframe[src*="portal"][src*="mode=rc"]) {
43775
- width: ${width};
43776
- height: ${height};
43777
- ._pendo-step-container-size {
43778
- width: ${width};
43779
- height: ${height};
43780
- }
43781
- }`, container);
44142
+ const container = document.getElementById(CONTAINER_ID);
44143
+ presizePortalContainer(width, height);
44144
+ hideLoadingOverlay();
43782
44145
  resizePortalIframe();
43783
44146
  clampContainerToViewport(container);
43784
44147
  }
@@ -43801,6 +44164,18 @@ function VocPortal() {
43801
44164
  function teardown() {
43802
44165
  if (this.removeResizeEvent)
43803
44166
  this.removeResizeEvent();
44167
+ if (portalObserver) {
44168
+ portalObserver.disconnect();
44169
+ portalObserver = undefined;
44170
+ }
44171
+ if (containerObserver) {
44172
+ containerObserver.disconnect();
44173
+ containerObserver = undefined;
44174
+ }
44175
+ observedContainer = undefined;
44176
+ lastPresetCss = undefined;
44177
+ unmarkSizedElements();
44178
+ hideLoadingOverlay();
43804
44179
  stopListening();
43805
44180
  }
43806
44181
  }
@@ -44556,48 +44931,6 @@ function Feedback() {
44556
44931
  }
44557
44932
  }
44558
44933
 
44559
- // NOT A TRUE POLYFILL
44560
- // This really only replaces the location portion of the URL API.
44561
- //
44562
- // NOTE: This, for now, at least is identified as an instanceof HTMLAnchorElement
44563
-
44564
- function URLPolyfillFactory(doc) {
44565
- return function URL(str) {
44566
- var a = doc.createElement('a');
44567
- a.href = str;
44568
-
44569
- if (a.protocol === ':') {
44570
- throw new Error('Uncaught TypeError: Failed to construct \'URL\': Invalid URL');
44571
- }
44572
-
44573
- if (a.href !== str && a.href !== encodeURI(str)) {
44574
- throw new Error('Uncaught TypeError: Failed to construct \'URL\': Invalid URL');
44575
- }
44576
-
44577
- if (!a.toString) {
44578
- a.toString = function() { return a.href; };
44579
- }
44580
-
44581
- if (a.origin == null) {
44582
- a.origin = a.protocol + '//' + a.hostname;
44583
- if (a.port !== '80' && a.port !== '443') {
44584
- a.origin += ':' + a.port;
44585
- }
44586
- }
44587
-
44588
- return a;
44589
- };
44590
- }
44591
-
44592
- var URL$1 = (function(global, factory) {
44593
- var nativeURL = global.URL;
44594
- if (typeof nativeURL !== 'function' || !/native/.test(nativeURL)) {
44595
- return factory(document);
44596
- }
44597
-
44598
- return nativeURL;
44599
- })(window, URLPolyfillFactory);
44600
-
44601
44934
  function record() { var __defProp = Object.defineProperty;
44602
44935
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
44603
44936
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);