@opentabs-dev/opentabs-plugin-posthog 0.0.74 → 0.0.75

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.
@@ -15394,21 +15394,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15394
15394
  };
15395
15395
  var src_default = new PostHogPlugin();
15396
15396
 
15397
- // dist/_adapter_entry_7aa9137b-ee88-4fae-96e3-80d8f573f51c.ts
15397
+ // dist/_adapter_entry_719e1959-e2dc-4352-b7c3-a0d6eddab4e8.ts
15398
15398
  if (!globalThis.__openTabs) {
15399
15399
  globalThis.__openTabs = {};
15400
15400
  } else {
15401
15401
  const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
15402
15402
  if (desc && !desc.writable) {
15403
- const ot3 = globalThis.__openTabs;
15403
+ const ot2 = globalThis.__openTabs;
15404
15404
  const newAdaptersObj = {};
15405
- if (ot3.adapters) {
15406
- for (const key of Object.keys(ot3.adapters)) {
15407
- const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
15405
+ if (ot2.adapters) {
15406
+ for (const key of Object.keys(ot2.adapters)) {
15407
+ const d = Object.getOwnPropertyDescriptor(ot2.adapters, key);
15408
15408
  if (d) Object.defineProperty(newAdaptersObj, key, d);
15409
15409
  }
15410
15410
  }
15411
- globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
15411
+ globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdaptersObj });
15412
15412
  }
15413
15413
  }
15414
15414
  if (!globalThis.__openTabs.adapters) {
@@ -15446,16 +15446,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15446
15446
  }
15447
15447
  };
15448
15448
  var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
15449
- var ot2 = globalThis.__openTabs;
15450
- ot2._notifyReadinessChanged = () => {
15451
- try {
15452
- const nonce = globalThis.__openTabs?._readinessNonce;
15453
- if (nonce) {
15454
- window.postMessage({ type: "opentabs:readiness-changed", plugin: "posthog", nonce }, "*");
15455
- }
15456
- } catch {
15457
- }
15458
- };
15459
15449
  var existing = adapters["posthog"];
15460
15450
  if (existing) {
15461
15451
  if (typeof existing.teardown === "function") {
@@ -15467,7 +15457,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15467
15457
  }
15468
15458
  }
15469
15459
  if (!Reflect.deleteProperty(adapters, "posthog")) {
15470
- const ot3 = globalThis.__openTabs;
15460
+ const ot2 = globalThis.__openTabs;
15471
15461
  const newAdapters = {};
15472
15462
  for (const key of Object.keys(adapters)) {
15473
15463
  if (key !== "posthog") {
@@ -15475,7 +15465,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15475
15465
  if (desc) Object.defineProperty(newAdapters, key, desc);
15476
15466
  }
15477
15467
  }
15478
- globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
15468
+ globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
15479
15469
  }
15480
15470
  var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
15481
15471
  for (const tool of src_default.tools) {
@@ -15536,12 +15526,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15536
15526
  }
15537
15527
  }
15538
15528
  };
15539
- const ot3 = globalThis.__openTabs;
15540
- if (!ot3._navigationInterceptor) {
15529
+ const ot2 = globalThis.__openTabs;
15530
+ if (!ot2._navigationInterceptor) {
15541
15531
  const origPushState = history.pushState.bind(history);
15542
15532
  const origReplaceState = history.replaceState.bind(history);
15543
15533
  const callbacks = /* @__PURE__ */ new Map();
15544
- ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
15534
+ ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
15545
15535
  history.pushState = function(...args) {
15546
15536
  origPushState(...args);
15547
15537
  for (const cb of callbacks.values()) {
@@ -15555,7 +15545,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15555
15545
  }
15556
15546
  };
15557
15547
  }
15558
- const interceptor = ot3._navigationInterceptor;
15548
+ const interceptor = ot2._navigationInterceptor;
15559
15549
  interceptor.callbacks.set("posthog", checkUrl);
15560
15550
  window.addEventListener("popstate", checkUrl);
15561
15551
  window.addEventListener("hashchange", checkUrl);
@@ -15610,5 +15600,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15610
15600
  };
15611
15601
  delete src_default.onDeactivate;
15612
15602
  }
15613
- })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["posthog"]){var a=o.adapters["posthog"];a.__adapterHash="0efc53d0323b8cdc155ccf7c2cd1e5dacdef415b32c616ceb2f857623ee5a618";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"posthog",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15603
+ })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["posthog"]){var a=o.adapters["posthog"];a.__adapterHash="883dd185f19a15438e7e0b8108b7eb6e4a9bf93a8b0d0b88c0aa09608a5ee083";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"posthog",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15614
15604
  //# sourceMappingURL=adapter.iife.js.map