@opentabs-dev/opentabs-plugin-priceline 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.
- package/dist/adapter.iife.js +20 -30
- package/dist/adapter.iife.js.map +3 -3
- package/dist/tools.json +1 -1
- package/package.json +3 -3
package/dist/adapter.iife.js
CHANGED
|
@@ -349,18 +349,18 @@
|
|
|
349
349
|
|
|
350
350
|
// node_modules/@opentabs-dev/plugin-sdk/dist/storage.js
|
|
351
351
|
var getLocalStorage = (key) => {
|
|
352
|
+
try {
|
|
353
|
+
return localStorage.getItem(key);
|
|
354
|
+
} catch {
|
|
355
|
+
}
|
|
352
356
|
let storage;
|
|
353
357
|
try {
|
|
354
|
-
storage =
|
|
358
|
+
storage = localStorage;
|
|
355
359
|
} catch {
|
|
356
360
|
return null;
|
|
357
361
|
}
|
|
358
|
-
if (storage) {
|
|
359
|
-
|
|
360
|
-
return storage.getItem(key);
|
|
361
|
-
} catch {
|
|
362
|
-
return null;
|
|
363
|
-
}
|
|
362
|
+
if (storage !== void 0) {
|
|
363
|
+
return null;
|
|
364
364
|
}
|
|
365
365
|
try {
|
|
366
366
|
const iframe = document.createElement("iframe");
|
|
@@ -15000,21 +15000,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15000
15000
|
};
|
|
15001
15001
|
var src_default = new PricelinePlugin();
|
|
15002
15002
|
|
|
15003
|
-
// dist/
|
|
15003
|
+
// dist/_adapter_entry_1666c222-15ce-4d06-a52e-63d7baed901f.ts
|
|
15004
15004
|
if (!globalThis.__openTabs) {
|
|
15005
15005
|
globalThis.__openTabs = {};
|
|
15006
15006
|
} else {
|
|
15007
15007
|
const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
|
|
15008
15008
|
if (desc && !desc.writable) {
|
|
15009
|
-
const
|
|
15009
|
+
const ot2 = globalThis.__openTabs;
|
|
15010
15010
|
const newAdaptersObj = {};
|
|
15011
|
-
if (
|
|
15012
|
-
for (const key of Object.keys(
|
|
15013
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
15011
|
+
if (ot2.adapters) {
|
|
15012
|
+
for (const key of Object.keys(ot2.adapters)) {
|
|
15013
|
+
const d = Object.getOwnPropertyDescriptor(ot2.adapters, key);
|
|
15014
15014
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
15015
15015
|
}
|
|
15016
15016
|
}
|
|
15017
|
-
globalThis.__openTabs = Object.assign({},
|
|
15017
|
+
globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdaptersObj });
|
|
15018
15018
|
}
|
|
15019
15019
|
}
|
|
15020
15020
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -15052,16 +15052,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15052
15052
|
}
|
|
15053
15053
|
};
|
|
15054
15054
|
var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
|
|
15055
|
-
var ot2 = globalThis.__openTabs;
|
|
15056
|
-
ot2._notifyReadinessChanged = () => {
|
|
15057
|
-
try {
|
|
15058
|
-
const nonce = globalThis.__openTabs?._readinessNonce;
|
|
15059
|
-
if (nonce) {
|
|
15060
|
-
window.postMessage({ type: "opentabs:readiness-changed", plugin: "priceline", nonce }, "*");
|
|
15061
|
-
}
|
|
15062
|
-
} catch {
|
|
15063
|
-
}
|
|
15064
|
-
};
|
|
15065
15055
|
var existing = adapters["priceline"];
|
|
15066
15056
|
if (existing) {
|
|
15067
15057
|
if (typeof existing.teardown === "function") {
|
|
@@ -15073,7 +15063,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15073
15063
|
}
|
|
15074
15064
|
}
|
|
15075
15065
|
if (!Reflect.deleteProperty(adapters, "priceline")) {
|
|
15076
|
-
const
|
|
15066
|
+
const ot2 = globalThis.__openTabs;
|
|
15077
15067
|
const newAdapters = {};
|
|
15078
15068
|
for (const key of Object.keys(adapters)) {
|
|
15079
15069
|
if (key !== "priceline") {
|
|
@@ -15081,7 +15071,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15081
15071
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
15082
15072
|
}
|
|
15083
15073
|
}
|
|
15084
|
-
globalThis.__openTabs = Object.assign({},
|
|
15074
|
+
globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
|
|
15085
15075
|
}
|
|
15086
15076
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
15087
15077
|
for (const tool of src_default.tools) {
|
|
@@ -15142,12 +15132,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15142
15132
|
}
|
|
15143
15133
|
}
|
|
15144
15134
|
};
|
|
15145
|
-
const
|
|
15146
|
-
if (!
|
|
15135
|
+
const ot2 = globalThis.__openTabs;
|
|
15136
|
+
if (!ot2._navigationInterceptor) {
|
|
15147
15137
|
const origPushState = history.pushState.bind(history);
|
|
15148
15138
|
const origReplaceState = history.replaceState.bind(history);
|
|
15149
15139
|
const callbacks = /* @__PURE__ */ new Map();
|
|
15150
|
-
|
|
15140
|
+
ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
15151
15141
|
history.pushState = function(...args) {
|
|
15152
15142
|
origPushState(...args);
|
|
15153
15143
|
for (const cb of callbacks.values()) {
|
|
@@ -15161,7 +15151,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15161
15151
|
}
|
|
15162
15152
|
};
|
|
15163
15153
|
}
|
|
15164
|
-
const interceptor =
|
|
15154
|
+
const interceptor = ot2._navigationInterceptor;
|
|
15165
15155
|
interceptor.callbacks.set("priceline", checkUrl);
|
|
15166
15156
|
window.addEventListener("popstate", checkUrl);
|
|
15167
15157
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -15216,5 +15206,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15216
15206
|
};
|
|
15217
15207
|
delete src_default.onDeactivate;
|
|
15218
15208
|
}
|
|
15219
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["priceline"]){var a=o.adapters["priceline"];a.__adapterHash="
|
|
15209
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["priceline"]){var a=o.adapters["priceline"];a.__adapterHash="bc7c3b9db6499db65c31dc87ba2a5c1e2adcde6ee3291cb356ee05bb95cd6f79";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,"priceline",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15220
15210
|
//# sourceMappingURL=adapter.iife.js.map
|