locizify 10.0.0 → 10.0.1
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/CHANGELOG.md +4 -0
- package/locizify.js +44 -10
- package/locizify.min.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
### 10.0.1
|
|
2
|
+
|
|
3
|
+
- update locize dep
|
|
4
|
+
|
|
1
5
|
### 10.0.0
|
|
2
6
|
|
|
3
7
|
- BREAKING: bumped `i18next-locize-backend` to v10 and `i18nextify` to v5. Both dropped their `cross-fetch` dependency, so locizify no longer ships the `cross-fetch` / `node-fetch` fallback in its bundle. Native `fetch` is now required (Node ≥ 18, modern browsers, Deno, Bun — all of which ship it). For runtimes without native `fetch`, supply a ponyfill yourself before loading this script, or stay on v9.
|
package/locizify.js
CHANGED
|
@@ -7120,10 +7120,12 @@ var locizify = (function() {
|
|
|
7120
7120
|
if (!results[2]) return "";
|
|
7121
7121
|
return decodeURIComponent(results[2].replace(/\+/g, " "));
|
|
7122
7122
|
}
|
|
7123
|
-
var _isInIframe =
|
|
7124
|
-
try {
|
|
7123
|
+
var _isInIframe = false;
|
|
7124
|
+
if (typeof window !== "undefined") try {
|
|
7125
7125
|
_isInIframe = self !== top;
|
|
7126
|
-
} catch (e) {
|
|
7126
|
+
} catch (e) {
|
|
7127
|
+
_isInIframe = true;
|
|
7128
|
+
}
|
|
7127
7129
|
var isInIframe = _isInIframe;
|
|
7128
7130
|
//#endregion
|
|
7129
7131
|
//#region node_modules/locize/dist/esm/api/postMessage.js
|
|
@@ -7159,9 +7161,11 @@ var locizify = (function() {
|
|
|
7159
7161
|
var pendingMsgs = [];
|
|
7160
7162
|
var allowedActionsBeforeInit = ["locizeIsEnabled", "requestInitialize"];
|
|
7161
7163
|
function sendMessage(action, payload) {
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7164
|
+
var _document$getElementB;
|
|
7165
|
+
var currentSource = (_document$getElementB = document.getElementById("i18next-editor-iframe")) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.contentWindow;
|
|
7166
|
+
if (currentSource) {
|
|
7167
|
+
if (api.source && api.source !== currentSource) api.initialized = false;
|
|
7168
|
+
api.source = currentSource;
|
|
7165
7169
|
}
|
|
7166
7170
|
if (!api.origin) api.origin = getIframeUrl();
|
|
7167
7171
|
if (!api.source || !api.source.postMessage || !api.initialized && allowedActionsBeforeInit.indexOf(action) < 0) {
|
|
@@ -7212,6 +7216,7 @@ var locizify = (function() {
|
|
|
7212
7216
|
requestInitialize: function requestInitialize(payload) {
|
|
7213
7217
|
sendMessage("requestInitialize", payload);
|
|
7214
7218
|
if (api.initInterval) return;
|
|
7219
|
+
repeat = 5;
|
|
7215
7220
|
api.initInterval = setInterval(function() {
|
|
7216
7221
|
repeat = repeat - 1;
|
|
7217
7222
|
api.requestInitialize(payload);
|
|
@@ -9510,11 +9515,40 @@ var locizify = (function() {
|
|
|
9510
9515
|
observer.start();
|
|
9511
9516
|
startMouseTracking(observer);
|
|
9512
9517
|
if (!isInIframe && !document.getElementById("i18next-editor-popup")) {
|
|
9513
|
-
|
|
9518
|
+
var popupEl = Popup(getIframeUrl(), function() {
|
|
9519
|
+
var _document$getElementB;
|
|
9520
|
+
api.source = (_document$getElementB = document.getElementById("i18next-editor-iframe")) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.contentWindow;
|
|
9521
|
+
api.initialized = false;
|
|
9522
|
+
if (api.initInterval) {
|
|
9523
|
+
clearInterval(api.initInterval);
|
|
9524
|
+
delete api.initInterval;
|
|
9525
|
+
}
|
|
9514
9526
|
api.requestInitialize(config);
|
|
9515
|
-
})
|
|
9527
|
+
});
|
|
9528
|
+
document.documentElement.append(popupEl);
|
|
9516
9529
|
initDragElement();
|
|
9517
9530
|
initResizeElement();
|
|
9531
|
+
if (typeof MutationObserver === "function") {
|
|
9532
|
+
var MAX_REATTACHMENTS = 5;
|
|
9533
|
+
var WATCH_DURATION_MS = 1e4;
|
|
9534
|
+
var reattachments = 0;
|
|
9535
|
+
var watcher = new MutationObserver(function() {
|
|
9536
|
+
if (document.getElementById("i18next-editor-popup")) return;
|
|
9537
|
+
if (reattachments >= MAX_REATTACHMENTS) {
|
|
9538
|
+
watcher.disconnect();
|
|
9539
|
+
return;
|
|
9540
|
+
}
|
|
9541
|
+
reattachments++;
|
|
9542
|
+
document.documentElement.append(popupEl);
|
|
9543
|
+
});
|
|
9544
|
+
watcher.observe(document.documentElement, {
|
|
9545
|
+
childList: true,
|
|
9546
|
+
subtree: true
|
|
9547
|
+
});
|
|
9548
|
+
setTimeout(function() {
|
|
9549
|
+
return watcher.disconnect();
|
|
9550
|
+
}, WATCH_DURATION_MS);
|
|
9551
|
+
}
|
|
9518
9552
|
}
|
|
9519
9553
|
if (typeof window !== "undefined") {
|
|
9520
9554
|
var oldHref = window.document.location.href;
|
|
@@ -9535,7 +9569,7 @@ var locizify = (function() {
|
|
|
9535
9569
|
}
|
|
9536
9570
|
if (document.body) return continueToStart();
|
|
9537
9571
|
if (typeof window !== "undefined") window.addEventListener("load", function() {
|
|
9538
|
-
|
|
9572
|
+
continueToStart();
|
|
9539
9573
|
});
|
|
9540
9574
|
}
|
|
9541
9575
|
//#endregion
|
|
@@ -9597,7 +9631,7 @@ var locizify = (function() {
|
|
|
9597
9631
|
},
|
|
9598
9632
|
getLocizeDetails: function getLocizeDetails() {
|
|
9599
9633
|
var backendName;
|
|
9600
|
-
if (i18n.services.backendConnector.backend && i18n.services.backendConnector.backend.options && i18n.services.backendConnector.backend.options.loadPath && i18n.services.backendConnector.backend.options.loadPath.indexOf(".locize.") > 0) backendName = "
|
|
9634
|
+
if (i18n.services.backendConnector.backend && i18n.services.backendConnector.backend.options && i18n.services.backendConnector.backend.options.loadPath && i18n.services.backendConnector.backend.options.loadPath.indexOf(".locize.") > 0) backendName = "I18NextLocizeBackend";
|
|
9601
9635
|
else backendName = i18n.services.backendConnector.backend ? i18n.services.backendConnector.backend.constructor.name : "options.resources";
|
|
9602
9636
|
var opts = {
|
|
9603
9637
|
backendName,
|
package/locizify.min.js
CHANGED
|
@@ -27,7 +27,7 @@ var n=Dt(),r=Ot(),i=kt();t.exports=a;function a(e,t){if(t=t||null,e.nodeType==1)
|
|
|
27
27
|
`,n+=`};`,Function(`fn`,n)(e)}function c(e){return function(t,n,r){n.push(t);var i=e(t);return r.push(i),i}}function l(e){return e}function u(e){return new RegExp(e)}function d(e){return new Date(e.getTime())}function f(e){return s(e)}function p(e){return Object.create(Object.getPrototypeOf(e))}function m(e){return[]}function h(e){var t=e.length;return new e.constructor(t)}function g(e,t){return function(n,r,i){var a=this;return Object.getOwnPropertyNames(n).filter(function(e){return!t||t.indexOf(e)===-1}).reduce(function(e,t){var o=r.indexOf(n[t]);return o===-1?e[t]=a(n[t]):e[t]=i[o],e},e(n,r,i))}}return function(e){var t=[],n=[];function r(e){return a[Object.prototype.toString.call(e)].call(r,e,t,n)}return r(e)}})})),sn=o(((e,t)=>{var n=/["'&<>]/;t.exports=r;function r(e){var t=``+e,r=n.exec(t);if(!r)return t;var i,a=``,o=0,s=0;for(o=r.index;o<t.length;o++){switch(t.charCodeAt(o)){case 34:i=`"`;break;case 38:i=`&`;break;case 39:i=`'`;break;case 60:i=`<`;break;case 62:i=`>`;break;default:continue}s!==o&&(a+=t.substring(s,o)),s=o+1,a+=i}return s===o?a:a+t.substring(s,o)}})),cn=o(((e,t)=>{t.exports=r;var n=Object.prototype.hasOwnProperty;function r(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e}})),ln=o(((e,t)=>{t.exports=n;function n(e){if(!(this instanceof n))return new n(e);this.value=e}n.prototype.hook=function(e,t){e[t]!==this.value&&(e[t]=this.value)}})),un=o(((e,t)=>{t.exports=n;function n(e,t){if(!(this instanceof n))return new n(e,t);this.namespace=e,this.value=t}n.prototype.hook=function(e,t,n){n&&n.type===`AttributeHook`&&n.value===this.value&&n.namespace===this.namespace||e.setAttributeNS(this.namespace,t,this.value)},n.prototype.unhook=function(e,t,n){if(!(n&&n.type===`AttributeHook`&&n.namespace===this.namespace)){var r=t.indexOf(`:`),i=r>-1?t.substr(r+1):t;e.removeAttributeNS(this.namespace,i)}},n.prototype.type=`AttributeHook`})),dn=o(((e,t)=>{var n={tr:{regexp:/\u0130|\u0049|\u0049\u0307/g,map:{İ:`i`,I:`ı`,İ:`i`}},az:{regexp:/[\u0130]/g,map:{İ:`i`,I:`ı`,İ:`i`}},lt:{regexp:/[\u0049\u004A\u012E\u00CC\u00CD\u0128]/g,map:{I:`i̇`,J:`j̇`,Į:`į̇`,Ì:`i̇̀`,Í:`i̇́`,Ĩ:`i̇̃`}}};t.exports=function(e,t){var r=n[t];return e=e==null?``:String(e),r&&(e=e.replace(r.regexp,function(e){return r.map[e]})),e.toLowerCase()}})),fn=o(((e,t)=>{t.exports=/[^\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]+/g})),pn=o(((e,t)=>{t.exports=/([\u0061-\u007A\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0561-\u0587\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7FA\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A])([\u0041-\u005A\u00C0-\u00D6\u00D8-\u00DE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA\uFF21-\uFF3A\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])/g})),mn=o(((e,t)=>{t.exports=/([\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])([^\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])/g})),hn=o(((e,t)=>{var n=dn(),r=fn(),i=pn(),a=mn();t.exports=function(e,t,o){if(e==null)return``;o=o||` `;function s(e,t,n){return t===0||t===n.length-e.length?``:o}return e=String(e).replace(i,`$1 $2`).replace(a,`$1 $2`).replace(r,s),n(e,t)}})),gn=o(((e,t)=>{var n=hn();t.exports=function(e,t){return n(e,t,`-`)}})),_n=o(((e,t)=>{var n={BOOLEAN:1,OVERLOADED_BOOLEAN:2};t.exports={attributeTypes:n,properties:{accept:!0,acceptCharset:!0,accessKey:!0,action:!0,allowFullScreen:n.BOOLEAN,allowTransparency:!0,alt:!0,async:n.BOOLEAN,autocomplete:!0,autofocus:n.BOOLEAN,autoplay:n.BOOLEAN,cellPadding:!0,cellSpacing:!0,charset:!0,checked:n.BOOLEAN,classID:!0,className:!0,cols:!0,colSpan:!0,content:!0,contentEditable:!0,contextMenu:!0,controls:n.BOOLEAN,coords:!0,crossOrigin:!0,data:!0,dateTime:!0,defer:n.BOOLEAN,dir:!0,disabled:n.BOOLEAN,download:n.OVERLOADED_BOOLEAN,draggable:!0,enctype:!0,form:!0,formAction:!0,formEncType:!0,formMethod:!0,formNoValidate:n.BOOLEAN,formTarget:!0,frameBorder:!0,headers:!0,height:!0,hidden:n.BOOLEAN,href:!0,hreflang:!0,htmlFor:!0,httpEquiv:!0,icon:!0,id:!0,label:!0,lang:!0,list:!0,loop:n.BOOLEAN,manifest:!0,marginHeight:!0,marginWidth:!0,max:!0,maxLength:!0,media:!0,mediaGroup:!0,method:!0,min:!0,multiple:n.BOOLEAN,muted:n.BOOLEAN,name:!0,noValidate:n.BOOLEAN,open:!0,pattern:!0,placeholder:!0,poster:!0,preload:!0,radiogroup:!0,readOnly:n.BOOLEAN,rel:!0,required:n.BOOLEAN,role:!0,rows:!0,rowSpan:!0,sandbox:!0,scope:!0,scrolling:!0,seamless:n.BOOLEAN,selected:n.BOOLEAN,shape:!0,size:!0,sizes:!0,span:!0,spellcheck:!0,src:!0,srcdoc:!0,srcset:!0,start:!0,step:!0,style:!0,tabIndex:!0,target:!0,title:!0,type:!0,useMap:!0,value:!0,width:!0,wmode:!0,autocapitalize:!0,autocorrect:!0,itemProp:!0,itemScope:n.BOOLEAN,itemType:!0,property:!0},attributeNames:{acceptCharset:`accept-charset`,className:`class`,htmlFor:`for`,httpEquiv:`http-equiv`}}})),vn=o(((e,t)=>{var n=sn(),r=_n(),i=r.attributeTypes,a=r.properties,o=r.attributeNames,s=u(function(e){return n(e)+`="`});t.exports=c;function c(e,t,r){if(a.hasOwnProperty(e)){if(l(e,t))return``;e=(o[e]||e).toLowerCase();var c=a[e];return c===i.BOOLEAN||c===i.OVERLOADED_BOOLEAN&&t===!0?n(e):s(e)+n(t)+`"`}else if(r)return t==null?``:s(e)+n(t)+`"`;return null}function l(e,t){var n=a[e];return t==null||n===i.BOOLEAN&&!t||n===i.OVERLOADED_BOOLEAN&&t===!1}function u(e){var t={};return function(n){return t.hasOwnProperty(n)?t[n]:t[n]=e.call(this,n)}}})),yn=o(((e,t)=>{t.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}})),bn=o(((e,t)=>{var n=sn(),r=cn(),i=wt(),a=Nt(),o=Tt(),s=j(),c=ln(),l=un(),u=gn(),d=vn(),f=yn();t.exports=p;function p(e,t){return e?(o(e)&&(e=e.render()),s(e)&&e.render&&(e=e.render()),i(e)?m(e)+h(e)+g(e):a(e)?t&&(t.tagName.toLowerCase()===`script`||t.tagName.toLowerCase()===`style`)?String(e.text):n(String(e.text)):``):``}function m(e){var t=e.properties,n=`<`+e.tagName.toLowerCase();for(var i in t){var a=t[i];if(a!=null){if(i==`attributes`){for(var o in a=r({},a),a)n+=` `+d(o,a[o],!0);continue}if(i==`dataset`){for(var s in a=r({},a),a)n+=` `+d(`data-`+u(s),a[s],!0);continue}if(i==`style`){var f=``;for(var p in a=r({},a),a)f+=u(p)+`: `+a[p]+`; `;a=f.trim()}if(a instanceof c||a instanceof l){n+=` `+d(i,a.value,!0);continue}var m=d(i,a);m&&(n+=` `+m)}}return n+`>`}function h(e){var t=e.properties.innerHTML;if(t!=null)return t;var n=``;if(e.children&&e.children.length)for(var r=0,i=e.children.length;r<i;r++){var a=e.children[r];n+=p(a,e)}return n}function g(e){var t=e.tagName.toLowerCase();return f[t]?``:`</`+t+`>`}})),xn=o(((e,t)=>{t.exports={abbr:`abbr`,accept:`accept`,"accept-charset":`acceptCharset`,accesskey:`accessKey`,action:`action`,allowfullscreen:`allowFullScreen`,allowtransparency:`allowTransparency`,alt:`alt`,async:`async`,autocomplete:`autoComplete`,autofocus:`autoFocus`,autoplay:`autoPlay`,cellpadding:`cellPadding`,cellspacing:`cellSpacing`,challenge:`challenge`,charset:`charset`,checked:`checked`,cite:`cite`,class:`className`,cols:`cols`,colspan:`colSpan`,command:`command`,content:`content`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,controls:`controls`,coords:`coords`,crossorigin:`crossOrigin`,data:`data`,datetime:`dateTime`,default:`default`,defer:`defer`,dir:`dir`,disabled:`disabled`,download:`download`,draggable:`draggable`,dropzone:`dropzone`,enctype:`encType`,for:`htmlFor`,form:`form`,formaction:`formAction`,formenctype:`formEncType`,formmethod:`formMethod`,formnovalidate:`formNoValidate`,formtarget:`formTarget`,frameBorder:`frameBorder`,headers:`headers`,height:`height`,hidden:`hidden`,high:`high`,href:`href`,hreflang:`hrefLang`,"http-equiv":`httpEquiv`,icon:`icon`,id:`id`,inputmode:`inputMode`,ismap:`isMap`,itemid:`itemId`,itemprop:`itemProp`,itemref:`itemRef`,itemscope:`itemScope`,itemtype:`itemType`,kind:`kind`,label:`label`,lang:`lang`,list:`list`,loop:`loop`,manifest:`manifest`,max:`max`,maxlength:`maxLength`,media:`media`,mediagroup:`mediaGroup`,method:`method`,min:`min`,minlength:`minLength`,multiple:`multiple`,muted:`muted`,name:`name`,novalidate:`noValidate`,open:`open`,optimum:`optimum`,pattern:`pattern`,ping:`ping`,placeholder:`placeholder`,poster:`poster`,preload:`preload`,radiogroup:`radioGroup`,readonly:`readOnly`,rel:`rel`,required:`required`,role:`role`,rows:`rows`,rowspan:`rowSpan`,sandbox:`sandbox`,scope:`scope`,scoped:`scoped`,scrolling:`scrolling`,seamless:`seamless`,selected:`selected`,shape:`shape`,size:`size`,sizes:`sizes`,sortable:`sortable`,span:`span`,spellcheck:`spellCheck`,src:`src`,srcdoc:`srcDoc`,srcset:`srcSet`,start:`start`,step:`step`,style:`style`,tabindex:`tabIndex`,target:`target`,title:`title`,translate:`translate`,type:`type`,typemustmatch:`typeMustMatch`,usemap:`useMap`,value:`value`,width:`width`,wmode:`wmode`,wrap:`wrap`}})),Sn=o(((e,t)=>{var n=null,r=`http://www.w3.org/2001/xml-events`,i=`http://www.w3.org/1999/xlink`,a=`http://www.w3.org/XML/1998/namespace`;t.exports={about:n,"accent-height":n,accumulate:n,additive:n,"alignment-baseline":n,alphabetic:n,amplitude:n,"arabic-form":n,ascent:n,attributeName:n,attributeType:n,azimuth:n,bandwidth:n,baseFrequency:n,baseProfile:n,"baseline-shift":n,bbox:n,begin:n,bias:n,by:n,calcMode:n,"cap-height":n,class:n,clip:n,"clip-path":n,"clip-rule":n,clipPathUnits:n,color:n,"color-interpolation":n,"color-interpolation-filters":n,"color-profile":n,"color-rendering":n,content:n,contentScriptType:n,contentStyleType:n,cursor:n,cx:n,cy:n,d:n,datatype:n,defaultAction:n,descent:n,diffuseConstant:n,direction:n,display:n,divisor:n,"dominant-baseline":n,dur:n,dx:n,dy:n,edgeMode:n,editable:n,elevation:n,"enable-background":n,end:n,"ev:event":r,event:n,exponent:n,externalResourcesRequired:n,fill:n,"fill-opacity":n,"fill-rule":n,filter:n,filterRes:n,filterUnits:n,"flood-color":n,"flood-opacity":n,focusHighlight:n,focusable:n,"font-family":n,"font-size":n,"font-size-adjust":n,"font-stretch":n,"font-style":n,"font-variant":n,"font-weight":n,format:n,from:n,fx:n,fy:n,g1:n,g2:n,"glyph-name":n,"glyph-orientation-horizontal":n,"glyph-orientation-vertical":n,glyphRef:n,gradientTransform:n,gradientUnits:n,handler:n,hanging:n,height:n,"horiz-adv-x":n,"horiz-origin-x":n,"horiz-origin-y":n,id:n,ideographic:n,"image-rendering":n,in:n,in2:n,initialVisibility:n,intercept:n,k:n,k1:n,k2:n,k3:n,k4:n,kernelMatrix:n,kernelUnitLength:n,kerning:n,keyPoints:n,keySplines:n,keyTimes:n,lang:n,lengthAdjust:n,"letter-spacing":n,"lighting-color":n,limitingConeAngle:n,local:n,"marker-end":n,"marker-mid":n,"marker-start":n,markerHeight:n,markerUnits:n,markerWidth:n,mask:n,maskContentUnits:n,maskUnits:n,mathematical:n,max:n,media:n,mediaCharacterEncoding:n,mediaContentEncodings:n,mediaSize:n,mediaTime:n,method:n,min:n,mode:n,name:n,"nav-down":n,"nav-down-left":n,"nav-down-right":n,"nav-left":n,"nav-next":n,"nav-prev":n,"nav-right":n,"nav-up":n,"nav-up-left":n,"nav-up-right":n,numOctaves:n,observer:n,offset:n,opacity:n,operator:n,order:n,orient:n,orientation:n,origin:n,overflow:n,overlay:n,"overline-position":n,"overline-thickness":n,"panose-1":n,path:n,pathLength:n,patternContentUnits:n,patternTransform:n,patternUnits:n,phase:n,playbackOrder:n,"pointer-events":n,points:n,pointsAtX:n,pointsAtY:n,pointsAtZ:n,preserveAlpha:n,preserveAspectRatio:n,primitiveUnits:n,propagate:n,property:n,r:n,radius:n,refX:n,refY:n,rel:n,"rendering-intent":n,repeatCount:n,repeatDur:n,requiredExtensions:n,requiredFeatures:n,requiredFonts:n,requiredFormats:n,resource:n,restart:n,result:n,rev:n,role:n,rotate:n,rx:n,ry:n,scale:n,seed:n,"shape-rendering":n,slope:n,snapshotTime:n,spacing:n,specularConstant:n,specularExponent:n,spreadMethod:n,startOffset:n,stdDeviation:n,stemh:n,stemv:n,stitchTiles:n,"stop-color":n,"stop-opacity":n,"strikethrough-position":n,"strikethrough-thickness":n,string:n,stroke:n,"stroke-dasharray":n,"stroke-dashoffset":n,"stroke-linecap":n,"stroke-linejoin":n,"stroke-miterlimit":n,"stroke-opacity":n,"stroke-width":n,surfaceScale:n,syncBehavior:n,syncBehaviorDefault:n,syncMaster:n,syncTolerance:n,syncToleranceDefault:n,systemLanguage:n,tableValues:n,target:n,targetX:n,targetY:n,"text-anchor":n,"text-decoration":n,"text-rendering":n,textLength:n,timelineBegin:n,title:n,to:n,transform:n,transformBehavior:n,type:n,typeof:n,u1:n,u2:n,"underline-position":n,"underline-thickness":n,unicode:n,"unicode-bidi":n,"unicode-range":n,"units-per-em":n,"v-alphabetic":n,"v-hanging":n,"v-ideographic":n,"v-mathematical":n,values:n,version:n,"vert-adv-y":n,"vert-origin-x":n,"vert-origin-y":n,viewBox:n,viewTarget:n,visibility:n,width:n,widths:n,"word-spacing":n,"writing-mode":n,x:n,"x-height":n,x1:n,x2:n,xChannelSelector:n,"xlink:actuate":i,"xlink:arcrole":i,"xlink:href":i,"xlink:role":i,"xlink:show":i,"xlink:title":i,"xlink:type":i,"xml:base":a,"xml:id":a,"xml:lang":a,"xml:space":a,y:n,y1:n,y2:n,yChannelSelector:n,z:n,zoomAndPan:n}})),Cn=o(((e,t)=>{var n=Dt(),r=Ot(),i,a=xn(),o=Sn(),s=`http://www.w3.org/1999/xhtml`;t.exports=c;function c(e,t){if(!e)return l(document.createTextNode(``));if(typeof e==`string`){if(!(`DOMParser`in window))throw Error(`DOMParser is not available, so parsing string to DOM node is not possible.`);i=i||new DOMParser;var n=i.parseFromString(e,`text/html`);e=n.body.firstChild?n.getElementsByTagName(`body`)[0].firstChild:n.head.firstChild&&(n.head.firstChild.tagName!==`TITLE`||n.title)?n.head.firstChild:n.firstChild&&n.firstChild.tagName!==`HTML`?n.firstChild:document.createTextNode(``)}if(typeof e!=`object`||!e||!e.nodeType)throw Error(`invalid dom node`,e);return l(e,t)}function l(e,t){return e.nodeType===3?u(e):e.nodeType===1||e.nodeType===9?d(e,t):new r(``)}function u(e){return new r(e.nodeValue)}function d(e,t){var r=e.namespaceURI===s?null:e.namespaceURI,i=t&&e.getAttribute(t)?e.getAttribute(t):null;return new n(e.tagName,p(e),f(e,t),i,r)}function f(e,t){for(var n=[],r=0;r<e.childNodes.length;r++)n.push(l(e.childNodes[r],t));return n}function p(e){var t={};if(!e.hasAttributes())return t;var n;e.namespaceURI&&e.namespaceURI!==s&&(n=e.namespaceURI);for(var r,i=0;i<e.attributes.length;i++)r=e.attributes[i].name==`style`?g(e):n?h(e.attributes[i]):m(e.attributes[i]),r.ns?t[r.name]={namespace:r.ns,value:r.value}:r.isAttr?(t.attributes||(t.attributes={}),t.attributes[r.name]=r.value):t[r.name]=r.value;return t}function m(e){var t=a[e.name]?a[e.name]:e.name,n,r;return t.indexOf(`data-`)===0||t.indexOf(`aria-`)===0?(n=e.value,r=!0):n=e.value,{name:t,value:n,isAttr:r||!1}}function h(e){return{name:e.name,value:e.value,ns:o[e.name]||``}}function g(e){for(var t=e.style,n={},r=0;r<t.length;++r){var i=t.item(r);n[i]=String(t[i]),n[i].indexOf(`url`)>-1&&(n[i]=n[i].replace(/\"/g,``))}return{name:`style`,value:n}}})),wn=c(At(),1),Tn=c(Rt(),1),En=c(an(),1),Dn=c(on(),1),On=c(bn(),1),kn=c(Cn(),1),An=c(Dt(),1),jn=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]=this.observers[e]||[],this.observers[e].push(t)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(e=>e!==t)}}emit(e,...t){this.observers[e]&&[].concat(this.observers[e]).forEach(e=>{e(...t)}),this.observers[`*`]&&[].concat(this.observers[`*`]).forEach(n=>{n.apply(n,[e,...t])})}},Mn=class extends jn{constructor(e,t={}){super(),this.ele=e,this.options=t,this.observer=this.create(),this.internalChange=!0}create(){let e,t=()=>{e&&window.clearTimeout(e),e=setTimeout(()=>{this.internalChange&&(this.internalChange=!1)},200)},n=new MutationObserver(e=>{this.internalChange&&t(),this.internalChange||this.emit(`changed`,e)});return n.observe(this.ele,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),n}reset(){this.internalChange=!0}};let Nn=[],Pn=!1,Fn=!1;function In(){if(!Pn){Pn=!0;for(let e=0;e<Nn.length;e++)Nn[e].fn.call(window,Nn[e].ctx);Nn=[]}}function Ln(){document.readyState===`complete`&&In()}function Rn(e,t){if(Pn){setTimeout(function(){e(t)},1);return}else Nn.push({fn:e,ctx:t});document.readyState===`complete`||!document.attachEvent&&document.readyState===`interactive`?setTimeout(In,1):Fn||(document.addEventListener?(document.addEventListener(`DOMContentLoaded`,In,!1),window.addEventListener(`load`,In,!1)):(document.attachEvent(`onreadystatechange`,Ln),window.attachEvent(`onload`,In)),Fn=!0)}var zn=class{start(){this.started=new Date().getTime()}end(){return this.ended=new Date().getTime(),this.ended-this.started}};function Bn(e,t,n){let r;return function(){let i=this,a=arguments,o=function(){r=null,n||e.apply(i,a)},s=n&&!r;clearTimeout(r),r=setTimeout(o,t),s&&e.apply(i,a)}}function Vn(e,t){return e.properties&&e.properties.attributes&&e.properties.attributes[t]}function Hn(e,t,n){function r(e){return e&&e.indexOf(`###`)>-1?e.replace(/###/g,`.`):e}function i(){return!e||typeof e==`string`}let a=typeof t==`string`?t.split(`.`):[].concat(t);for(;a.length>1;){if(i())return{};let t=r(a.shift());!e[t]&&n&&(e[t]=new n),e=e[t]}return i()?{}:{obj:e,k:r(a.shift())}}function Un(e,t,n){let{obj:r,k:i}=Hn(e,t,Object);r[i]=n}function Wn(e,t){let{obj:n,k:r}=Hn(e,t);if(n)return n[r]}function Gn(){let e=location.pathname;if(e===`/`)return`root`;let t=e.split(`/`),n=`root`;return t.forEach(e=>{e&&(n+=`_${e}`)}),n}let Kn=[`SVG`,`RECT`,`PATH`],qn=e=>{if(e.namespace)e.ns.push(e.namespace),e.defaultNS=e.namespace;else if(e.namespaceFromPath){let t=Gn();e.ns.push(t),e.defaultNS=t}return e.ns.length||(e.ns=[`translation`]),e.ignoreTags&&(e.ignoreTags=e.ignoreTags.map(e=>Kn.indexOf(e)>-1?e.toLowerCase():e.toUpperCase())),e.ignoreCleanIndentFor&&(e.ignoreCleanIndentFor=e.ignoreCleanIndentFor.map(e=>e.toUpperCase())),e.inlineTags&&(e.inlineTags=e.inlineTags.map(e=>e.toUpperCase())),e.ignoreInlineOn&&(e.ignoreInlineOn=e.ignoreInlineOn.map(e=>e.toUpperCase())),e.mergeTags&&(e.mergeTags=e.mergeTags.map(e=>e.toUpperCase())),e.translateAttributes=e.translateAttributes.reduce((e,t)=>{let n={attr:t};if(t.indexOf(`#`)>-1){let[e,r]=t.split(`#`);if(n.attr=e,r.indexOf(`.`)>-1){let[e,t]=r.split(`.`);n.ele=e.toUpperCase(),n.cond=t.toLowerCase().split(`=`)}else r.indexOf(`=`)>-1?n.cond=r.toLowerCase().split(`=`):n.ele=r.toUpperCase()}return e.push(n),e},[]),e};function Jn(e,t={retranslate:!1}){return t&&t.retranslate?!0:!e.properties||!e.properties.attributes||e.properties.attributes.localized!==``}function Yn(e){let t=!e.properties||!e.properties.attributes||e.properties.attributes.translated!==``;return t&&e.tagName&&A.options.ignoreTags.indexOf(e.tagName)>-1&&(t=!1),t&&A.options.ignoreClasses&&e.properties&&e.properties.className&&e.properties.className.split(` `).forEach(e=>{t&&A.options.ignoreClasses.indexOf(e)>-1&&(t=!1)}),t&&A.options.ignoreIds&&A.options.ignoreIds.indexOf(e.properties&&e.properties.id)>-1&&(t=!1),t}function Xn(e,t={},n){let r=e.trim(),i=n||e.trim();return t.defaultValue||(t.defaultValue=e),r&&!A.options.ignoreWithoutKey||r&&A.options.ignoreWithoutKey&&n?A.t(i,t):e}let Zn=[`src`,`href`],Qn=/%7B%7B(.+?)%7D%7D/g,$n=/^\s*(javascript|data|vbscript|file)\s*:/i;function er(e){return typeof e==`string`&&$n.test(e)}function tr(e,t,n={},r,i,a){return t&&(A.options.translateAttributes.forEach(o=>{if(o.ele&&e.tagName!==o.ele)return;if(o.cond&&o.cond.length===2){let e=Wn(t,o.cond[0])||Wn(t.attributes,o.cond[0]);if(!e||e!==o.cond[1])return}let s=!1,c=Wn(t,o.attr);if(c||(c=Wn(t.attributes,o.attr),c&&(s=!0)),a.retranslate){let t=e.properties&&e.properties&&e.properties.attributes[`${o.attr}-i18next-orgval`];t||(t=c),c=t}c&&(i&&(e.properties.attributes[`${o.attr}-i18next-orgval`]=c),Un(s?t.attributes:t,o.attr,Xn(c,{...n},r?`${r}.${o.attr}`:``)))}),Zn.forEach(e=>{let i=Wn(t,e);if(i&&(i=i.replace(/\{\{/g,`%7B%7B`).replace(/\}\}/g,`%7D%7D`)),i&&i.indexOf(`%7B`)>-1){let a=[];i.split(Qn).reduce((t,i,a)=>{if(i.length===0)return t;if(!a||a%2==0)t.push(i);else{let o=Xn(i,{...n},r?`${r}.${e}`:``);o&&o.indexOf(`http`)===0&&t[a-1]&&t[a-1].indexOf(`http`)===0&&t.splice(a-1,1),er(o)?t.push(``):t.push(o)}return t},a),a.length&&Un(t,e,a.join(``))}}),t)}function nr(e,t){let n=Vn(t,`i18next-options`);if(n)try{n=JSON.parse(n)}catch{console.warn(`failed parsing options on node`,t)}return n&&n.inlineTags&&(n.inlineTags=n.inlineTags.map(e=>e.toUpperCase())),{...e||{},...n||{}}}function rr(e,t){return A.options.cleanIndent?e.replace(/\n +/g,t):e}function ir(e,t){if(!e.children||!e.children.length||A.options.ignoreInlineOn.indexOf(e.tagName)>-1)return!1;if(A.options.mergeTags.indexOf(e.tagName)>-1)return!0;let n=t.inlineTags||A.options.inlineTags,r=t.additionalInlineTags?n.concat(t.additionalInlineTags):n,i=!0,a=!1;return e.children.forEach(e=>{!e.text&&e.tagName&&r.indexOf(e.tagName.toUpperCase())<0&&(i=!1),e.tagName&&(a=!0)}),i&&a}function ar(e,t,n,r,i=0,a){let o=Yn(e),s=Jn(e,a),c=Jn(e);t=nr(t,e);let l=i===0?r:``;i>0&&r&&!A.options.ignoreWithoutKey&&(l=`${r}.${i}`);let u=Vn(e,A.options.keyAttr)||l,d=Vn(e,`merge`);if(d!==`false`&&(d===``||ir(e,t))){if(o&&s){let r=rr((0,On.default)(new An.default(`I18NEXTIFYDUMMY`,null,e.children)),``).replace(`<i18nextifydummy>`,``).replace(`</i18nextifydummy>`,``);if(a.retranslate){let t=e.properties&&e.properties.attributes&&e.properties.attributes[`i18next-orgval`];t||(t=n&&n.properties&&n.properties.attributes&&n.properties.attributes[`i18next-orgval-${i}`]),t||(t=r),r=t}let o=Xn(r,t,u);typeof A.options.sanitize==`function`&&(o=A.options.sanitize(o,{key:r,attribute:null})),e.children=(0,kn.default)((`<i18nextifydummy>${o}</i18nextifydummy>`||``).trim()).children,c&&e.properties&&e.properties.attributes?e.properties.attributes[`i18next-orgval`]=r:c&&n&&n.properties&&n.properties.attributes&&(n.properties.attributes[`i18next-orgval-${i}`]=r),e.properties&&e.properties.attributes&&(e.properties.attributes.localized=``)}return e}if(e.children&&e.children.forEach((n,r)=>{(o&&s&&n.text||!n.text&&Yn(n))&&ar(n,t,e,u,e.children.length>1?r+1:r,a)}),e.text&&!e.properties&&e.type===`Widget`)return e;if(o&&s){if(e.text){let r,o=e.text,s=e.text;if(a.retranslate){let t=e.properties&&e.properties.attributes&&e.properties.attributes[`i18next-orgval`];t||(t=n&&n.properties&&n.properties.attributes&&n.properties.attributes[`i18next-orgval-${i}`]),t||(t=e.text),o=t,s=t}let l=A.options.ignoreCleanIndentFor.indexOf(n.tagName)>-1;if(l||(o=rr(o,`
|
|
28
28
|
`),A.options.cleanWhitespace&&(r=/^\s*(.*[^\s])\s*$/g.exec(o))),!l&&r&&r.length>1&&A.options.cleanWhitespace){let n=Xn(r[1],t,u||``);e.text=o.replace(r[1],n)}else e.text=Xn(o,t,u||``);c&&e.properties&&e.properties.attributes?s&&(e.properties.attributes[`i18next-orgval`]=s):c&&n&&n.properties&&n.properties.attributes&&s&&(n.properties.attributes[`i18next-orgval-${i}`]=s)}e.properties&&(e.properties=tr(e,e.properties,t,u,c,a)),e.properties&&e.properties.attributes&&(e.properties.attributes.localized=``)}return e}function or(e,t){let n=new zn;n.start();let r=ar(e,null,null,null,null,{retranslate:t});return A.services.logger.log(`localization took: ${n.end()}ms`),r}function sr(e){let t=new zn;t.start();let n=(0,wn.default)(e);return A.services.logger.log(`virtualization took: ${t.end()}ms`),n}function cr(e,t){let n={};return n.render=function(n){let r=sr(e),i=(0,Tn.default)(r,or((0,Dn.default)(r),n));i[0]&&t.reset(),e=(0,En.default)(e,i)},n.debouncedRender=Bn(n.render,200),n}let lr={};function ur(){A.services.logger.log(`missing resources:
|
|
29
29
|
`+JSON.stringify(lr,null,2))}let dr=Bn(ur,2e3);function fr(e,t,n,r){typeof e==`string`&&(e=[e]),e||(e=[]),e.forEach(e=>{Un(lr,[e,t,n],r),dr()}),A.services.backendConnector&&A.services.backendConnector.saveMissing&&A.services.backendConnector.saveMissing(e,t,n,r)}function pr(){let e=document.getElementById(`i18nextify`),t=e&&(e.getAttribute(`supportedlngs`)||e.getAttribute(`supportedLngs`))||void 0;typeof t==`string`&&(t=t.split(`,`).map(e=>e.trim()));let n={autorun:!0,ele:document.body,keyAttr:`i18next-key`,ignoreWithoutKey:!1,ignoreTags:[`SCRIPT`],ignoreIds:[],ignoreClasses:[],translateAttributes:[`placeholder`,`title`,`alt`,`value#input.type=button`,`value#input.type=submit`],mergeTags:[],inlineTags:[],ignoreInlineOn:[],cleanIndent:!0,ignoreCleanIndentFor:[`PRE`,`CODE`],cleanWhitespace:!0,nsSeparator:`#||#`,keySeparator:`#|#`,debug:(()=>{try{return new URLSearchParams(window.location.search).get(`debug`)===`true`}catch{return!1}})(),saveMissing:(()=>{try{return new URLSearchParams(window.location.search).get(`saveMissing`)===`true`}catch{return!1}})(),namespace:e&&e.getAttribute(`namespace`)||!1,namespaceFromPath:e&&(e.getAttribute(`namespacefrompath`)||e.getAttribute(`namespaceFromPath`))||!1,missingKeyHandler:fr,ns:[],supportedLngs:t,load:e&&e.getAttribute(`load`)||void 0,fallbackLng:e&&(e.getAttribute(`fallbacklng`)||e.getAttribute(`fallbackLng`))||void 0,onInitialTranslate:()=>{}},r=e&&(e.getAttribute(`loadpath`)||e.getAttribute(`loadPath`))||void 0,i=e&&(e.getAttribute(`addpath`)||e.getAttribute(`addPath`))||void 0;return(r||i)&&(n.backend={},r&&(n.backend.loadPath=r),i&&(n.backend.addPath=i)),n}let mr=!1,hr=!1;Rn(()=>{mr=!0,hr||yr()}),A.use(Qe),A.use(St);let gr={};function _r(e){!e&&gr.namespaceFromPath&&(e=Gn()),gr.ns.push(e),gr.defaultNS=e,A.loadNamespaces(gr.ns,()=>{A.setDefaultNamespace(e)})}let vr=[];function yr(e={}){e={...pr(),...gr,...e},e=qn(e),e.ele||(delete e.ele,gr=e),hr=!0;let t;function n(n){for(let r=0;r<n.length;r++){let i=n[r];if(e.ignoreTags.indexOf(i.tagName)<0&&e.ignoreIds.indexOf(i.id)<0&&e.ignoreClasses.indexOf(i.className)<0&&!i.attributes.localized&&!i.attributes.translated){let e=cr(i,t);vr.push(e),e.render()}}}function r(t,n,i){let a=!0;setTimeout(()=>{for(let n=0;n<t.length;n++){let o=t[n];if(e.ignoreTags.indexOf(o.tagName)<0&&e.ignoreIds.indexOf(o.id)<0&&e.ignoreClasses.indexOf(o.className)<0&&!o.attributes.localized&&!o.attributes.translated){a&&r(t,100,i),a=!1;break}}a&&i()},n)}let i=1;mr||i++,e.autorun===!1&&i++;function a(){if(--i,!i){e.ele||(e.ele=document.body);let i=e.ele.children;t=new Mn(e.ele),n(i),t.on(`changed`,e=>{vr.forEach(e=>e.debouncedRender()),n(i)}),r(i,0,()=>{if(e.ele.style&&e.ele.style.display===`none`&&(e.ele.style.display=`block`),window.document.title){let e=window.document.getElementsByTagName(`title`).length>0&&window.document.getElementsByTagName(`title`)[0].getAttribute(A.options.keyAttr);window.document.title=A.t(e||window.document.title)}if(window.document.querySelector(`meta[name="description"]`)&&window.document.querySelector(`meta[name="description"]`).content){let e=window.document.querySelector(`meta[name="description"]`).getAttribute(A.options.keyAttr)||window.document.querySelector(`meta[name="description"]`).content;window.document.querySelector(`meta[name="description"]`).setAttribute(`content`,A.t(e))}e.onInitialTranslate()})}}if(A.on(`languageChanged`,e=>{window.document.documentElement.lang=e}),A.init(e,a),mr||Rn(a),e.autorun===!1)return{start:a}}function br(){vr.forEach(e=>{e.render(!0)})}var xr={init:yr,i18next:A,changeNamespace:_r,forceRerender:br};let Sr=[],Cr=Sr.forEach,wr=Sr.slice,Tr=[`__proto__`,`constructor`,`prototype`];function M(e){return Cr.call(wr.call(arguments,1),t=>{if(t)for(let n of Object.keys(t))Tr.indexOf(n)>-1||e[n]===void 0&&(e[n]=t[n])}),e}function Er(e){return!(typeof e!=`string`||e.length===0||e.length>128||Tr.indexOf(e)>-1||e.indexOf(`..`)>-1||e.indexOf(`/`)>-1||e.indexOf(`\\`)>-1||/[?#%\s@]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function Dr(e){return typeof e==`string`?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e}function Or(e,t,n){let r;return function(){let i=this,a=arguments,o=function(){r=null,n||e.apply(i,a)},s=n&&!r;clearTimeout(r),r=setTimeout(o,t),s&&e.apply(i,a)}}function kr(e,t,n){function r(e){return e&&e.indexOf(`###`)>-1?e.replace(/###/g,`.`):e}let i=typeof t==`string`?t.split(`.`):[].concat(t);for(;i.length>1;){if(!e)return{};let t=r(i.shift());!e[t]&&n&&(e[t]=new n),e=e[t]}return e?{obj:e,k:r(i.shift())}:{}}function Ar(e,t,n){let{obj:r,k:i}=kr(e,t,Object);r[i]=n}function jr(e,t,n,r){let{obj:i,k:a}=kr(e,t,Object);i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}function Mr(e,t){let{obj:n,k:r}=kr(e,t);if(n)return n[r]}let Nr=RegExp(`{{(.+?)}}`,`g`);function Pr(e){return e==null?``:``+e}function Fr(e,t){let n,r=!1;for(;n=Nr.exec(e);){let i=n[1].trim();if(Tr.indexOf(i)>-1){Nr.lastIndex=0;continue}let a=t[i];if(a==null){Nr.lastIndex=0;continue}let o=Pr(a).split(`+`),s=!0;for(let e of o)if(!Er(e)){s=!1;break}if(!s){r=!0;break}e=e.replace(n[0],o.join(`+`)),Nr.lastIndex=0}return Nr.lastIndex=0,r?null:e}function Ir(e,t){return t.reduce((t,n)=>{if(t)return t;if(!e||!e[n]||typeof e[n]!=`string`||!e[n].toLowerCase()===n.toLowerCase()){let t=`i18next-locize-backend :: got "${e[n]}" in options for ${n} which is invalid.`;return console.warn(t),t}return!1},!1)}function Lr(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}let Rr=typeof globalThis<`u`?globalThis:typeof global<`u`?global:typeof window<`u`?window:void 0,zr;typeof fetch==`function`?zr=fetch:Rr&&typeof Rr.fetch==`function`&&(zr=Rr.fetch);let Br=(typeof XMLHttpRequest==`function`||typeof XMLHttpRequest==`object`)&&Rr?Rr.XMLHttpRequest:void 0,Vr=typeof ActiveXObject==`function`&&Rr?Rr.ActiveXObject:void 0,Hr={},Ur=e=>{if(!e)return 0;let t=e.match(/max-age=([0-9]+)/);return t?parseInt(t[1],10):0},Wr=(e,t,n,r)=>{let i={};typeof window>`u`&&typeof global<`u`&&global.process!==void 0&&global.process.versions&&global.process.versions.node&&(i[`User-Agent`]=`i18next-locize-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),e.authorize&&e.apiKey&&(i.Authorization=e.apiKey),(n||e.setContentTypeJSON)&&(i[`Content-Type`]=`application/json`);let a=t=>{let n=t.headers&&t.headers.get(`x-cache`)===`Error from cloudfront`;if(e.cdnType===`standard`&&t.status===404&&(!t.headers||!t.headers.get(`x-cache`)))return n=!0,r(null,{status:200,data:`{}`,resourceNotExisting:n});if(!t.ok)return r(t.statusText||`Error`,{status:t.status,resourceNotExisting:n});let i=t.headers&&t.headers.get(`cache-control`);t.text().then(e=>{r(null,{status:t.status,data:e,resourceNotExisting:n,cacheControl:i})}).catch(r)};typeof fetch==`function`?fetch(t,{method:n?`POST`:`GET`,body:n?JSON.stringify(n):void 0,headers:i}).then(a).catch(r):zr(t,{method:n?`POST`:`GET`,body:n?JSON.stringify(n):void 0,headers:i}).then(a).catch(r)},Gr=(e,t,n,r)=>{try{let i=Br?new Br:new Vr(`MSXML2.XMLHTTP.3.0`);i.open(n?`POST`:`GET`,t,1),e.crossDomain||i.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),e.authorize&&e.apiKey&&i.setRequestHeader(`Authorization`,e.apiKey),(n||e.setContentTypeJSON)&&i.setRequestHeader(`Content-Type`,`application/json`),i.onreadystatechange=()=>{let t=i.getResponseHeader(`x-cache`)===`Error from cloudfront`;if(e.cdnType===`standard`&&i.status===404&&!i.getResponseHeader(`x-cache`))return t=!0,i.readyState>3&&r(null,{status:200,data:`{}`,resourceNotExisting:t});let n=i.getResponseHeader(`Cache-Control`);i.readyState>3&&r(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText,resourceNotExisting:t,cacheControl:n})},i.send(JSON.stringify(n))}catch(e){console&&console.log(e)}},Kr=(e,t,n,r)=>{typeof n==`function`&&(r=n,n=void 0),r=r||(()=>{});let i=typeof window>`u`&&e.useCacheLayer;if(i&&!n&&!e.noCache&&Hr[t]&&Hr[t].expires>Date.now())return r(null,Hr[t].data);let a=r;if(r=(e,r)=>{if(i&&!e&&r&&!n&&r.cacheControl){let e=Ur(r.cacheControl);e>0&&(Hr[t]={data:r,expires:Date.now()+e*1e3})}a(e,r)},!n&&e.noCache&&e.cdnType===`standard`&&(t+=(t.indexOf(`?`)>=0?`&`:`?`)+`cache=no`),zr)return Wr(e,t,n,r);if(Br||Vr)return Gr(e,t,n,r);r(Error(`No fetch and no xhr implementation found!`))},qr=e=>(e||(e=`standard`),{loadPath:`https://api${e===`standard`?`.lite`:``}.locize.app/{{projectId}}/{{version}}/{{lng}}/{{ns}}`,privatePath:`https://api${e===`standard`?`.lite`:``}.locize.app/private/{{projectId}}/{{version}}/{{lng}}/{{ns}}`,getLanguagesPath:`https://api${e===`standard`?`.lite`:``}.locize.app/languages/{{projectId}}`,addPath:`https://api${e===`standard`?`.lite`:``}.locize.app/missing/{{projectId}}/{{version}}/{{lng}}/{{ns}}`,updatePath:`https://api${e===`standard`?`.lite`:``}.locize.app/update/{{projectId}}/{{version}}/{{lng}}/{{ns}}`}),Jr=e=>(e||(e=`standard`),M({cdnType:e,noCache:!1,referenceLng:`en`,crossDomain:!0,setContentTypeJSON:!1,version:`latest`,private:!1,translatedPercentageThreshold:.9,failLoadingOnEmptyJSON:!1,allowedAddOrUpdateHosts:[`localhost`],onSaved:!1,reloadInterval:typeof window<`u`?!1:3600*1e3,checkForProjectTimeout:3*1e3,storageExpiration:3600*1e3,writeDebounce:5*1e3,useCacheLayer:typeof window>`u`},qr(e))),Yr;try{Yr=typeof window<`u`&&window.localStorage!==null;let e=`notExistingLocizeProject`;window.localStorage.setItem(e,`foo`),window.localStorage.removeItem(e)}catch{Yr=!1}function Xr(e){let t=()=>{},n=()=>{};return Yr?(t=e=>{window.localStorage.setItem(`notExistingLocizeProject_${e}`,Date.now())},n=t=>{let n=window.localStorage.getItem(`notExistingLocizeProject_${t}`);return n?Date.now()-n>e?(window.localStorage.removeItem(`notExistingLocizeProject_${t}`),!1):!0:!1}):typeof document<`u`&&(t=t=>{let n=new Date;n.setTime(n.getTime()+e);let r=`; expires=${n.toGMTString()}`,i=`notExistingLocizeProject_${t}`;try{document.cookie=`${i}=${Date.now()}${r};path=/`}catch{}},n=e=>{let t=`${`notExistingLocizeProject_${e}`}=`;try{let e=document.cookie.split(`;`);for(let n=0;n<e.length;n++){let r=e[n];for(;r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return!0}}catch{}return!1}),{setProjectNotExisting:t,isProjectNotExisting:n}}let Zr=(e,t,n)=>{let r={};return t.authorize&&t.apiKey&&(r.Authorization=t.apiKey),(n||t.setContentTypeJSON)&&(r[`Content-Type`]=`application/json`),{method:n?`POST`:`GET`,url:e,headers:r,body:n}},Qr=(e,t,n)=>{if(e.request.length===1){try{let r=e.request(t);r&&typeof r.then==`function`?r.then(e=>n(null,e)).catch(n):n(null,r)}catch(e){n(e)}return}e.request(t,n)};function $r(e){let t=e*.25,n=Math.max(0,e-t),r=e+t;return Math.floor(n+Math.random()*(r-n))}var ei=class{constructor(e,t={},n={},r){this.services=e,this.options=t,this.allOptions=n,this.type=`backend`,e&&e.projectId?this.init(null,e,n,t):this.init(e,t,n,r)}init(e,t={},n={},r){!t.referenceLng&&n.fallbackLng&&Array.isArray(n.fallbackLng)&&n.fallbackLng[0]!==`dev`&&(t.referenceLng=n.fallbackLng[0]),this.services=e;let i=M({},t),a=M(t,this.options||{}),o=Jr(a.cdnType);a.reloadInterval&&a.reloadInterval<300*1e3&&(console.warn(`Your configured reloadInterval option is to low.`),a.reloadInterval=o.reloadInterval),this.options=M(t,this.options||{},o),this.allOptions=n,this.somethingLoaded=!1,this.isProjectNotExisting=!1,this.storage=Xr(this.options.storageExpiration);let s=qr(this.options.cdnType);Object.keys(s).forEach(e=>{i[e]||(this.options[e]=s[e])}),n.debug&&i.noCache===void 0&&this.options.cdnType===`standard`&&(this.options.noCache=!0),this.options.noCache&&this.options.cdnType!==`standard`&&console.warn(`The 'noCache' option is not available for 'cdnType' '${this.options.cdnType}'!`);let c=typeof window<`u`&&window.location&&window.location.hostname;c?(this.isAddOrUpdateAllowed=typeof this.options.allowedAddOrUpdateHosts==`function`?this.options.allowedAddOrUpdateHosts(c):this.options.allowedAddOrUpdateHosts.indexOf(c)>-1,e&&e.logger&&(n.saveMissing||n.updateMissing)&&(this.isAddOrUpdateAllowed?c!==`localhost`&&e.logger.warn(`locize-backend: you are using the save or update missings feature from this host "${c}".\nMake sure you will not use it in production!\nhttps://www.locize.com/docs/going-to-production`):e.logger.warn(typeof this.options.allowedAddOrUpdateHosts==`function`?`locize-backend: will not save or update missings because allowedAddOrUpdateHosts returned false for the host "${c}".`:`locize-backend: will not save or update missings because the host "${c}" was not in the list of allowedAddOrUpdateHosts: ${this.options.allowedAddOrUpdateHosts.join(`, `)} (matches need to be exact).`))):this.isAddOrUpdateAllowed=!0,typeof r==`function`&&this.getOptions((e,n,i)=>{if(e)return r(e);this.options.referenceLng=t.referenceLng||n.referenceLng||this.options.referenceLng,r(null,n,i)}),this.queuedWrites={pending:{}},this.debouncedProcess=Or(this.process,this.options.writeDebounce),this.interval&&clearInterval(this.interval),this.options.reloadInterval&&this.options.projectId&&(this.interval=setInterval(()=>this.reload(),this.options.reloadInterval),typeof this.interval==`object`&&typeof this.interval.unref==`function`&&this.interval.unref())}reload(){let{backendConnector:e,languageUtils:t,logger:n}=this.services||{logger:console};if(!e)return;let r=e.language;if(r&&r.toLowerCase()===`cimode`)return;let i=[],a=e=>{t.toResolveHierarchy(e).forEach(e=>{i.indexOf(e)<0&&i.push(e)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(e=>a(e)),i.forEach(t=>{this.allOptions.ns.forEach(r=>{e.read(t,r,`read`,null,null,(i,a)=>{i&&n.warn(`loading namespace ${r} for language ${t} failed`,i),!i&&a&&n.log(`loaded namespace ${r} for language ${t}`,a),e.loaded(`${t}|${r}`,i,a)})})})}getLanguages(e){let t;e||(t=Lr(),e=(e,n)=>{if(e)return t.reject(e);t.resolve(n)});let n=Ir(this.options,[`projectId`]);if(n)return e(Error(n)),t;let r=Fr(this.options.getLanguagesPath,{projectId:this.options.projectId});return r==null?(e(Error(`i18next-locize-backend: unsafe projectId — refusing to build request URL for projectId=`+Dr(String(this.options.projectId)))),t):(!this.isProjectNotExisting&&this.storage.isProjectNotExisting(this.options.projectId)&&(this.isProjectNotExisting=!0),this.isProjectNotExisting?(e(Error(this.isProjectNotExistingErrorMessage||`Locize project ${this.options.projectId} does not exist!`)),t):(this.getLanguagesCalls=this.getLanguagesCalls||[],this.getLanguagesCalls.push(e),this.getLanguagesCalls.length>1||this.loadUrl({},r,(e,t,n)=>{if(!this.somethingLoaded&&n&&n.resourceNotExisting){this.isProjectNotExisting=!0;let e=`Locize project ${this.options.projectId} does not exist!`;this.isProjectNotExistingErrorMessage=e;let t=this.options.cdnType===`standard`?`pro`:`standard`,n=Fr(qr(t).getLanguagesPath,{projectId:this.options.projectId});if(n==null)return;this.loadUrl({},n,(n,r,i)=>{!n&&r&&(!i||!i.resourceNotExisting)?(e+=` It seems you're using the wrong cdnType. Your Locize project is configured to use "${t}" but here you've configured "${this.options.cdnType}".`,this.isProjectNotExistingErrorMessage=e):!this.somethingLoaded&&i&&i.resourceNotExisting&&(this.isProjectNotExisting=!0,this.storage.setProjectNotExisting(this.options.projectId));let a=Error(e),o=this.getLanguagesCalls;this.getLanguagesCalls=[],o.forEach(e=>e(a))});return}if(t){this.loadedLanguages=Object.keys(t);let e=this.loadedLanguages.reduce((e,n)=>(t[n].isReferenceLanguage&&(e=n),e),``);e&&this.options.referenceLng!==e&&(this.options.referenceLng=e)}this.somethingLoaded=!0;let r=this.getLanguagesCalls;this.getLanguagesCalls=[],r.forEach(n=>n(e,t))}),t))}getOptions(e){let t;return e||(t=Lr(),e=(e,n)=>{if(e)return t.reject(e);t.resolve(n)}),this.getLanguages((t,n)=>{if(t)return e(t);let r=Object.keys(n);if(!r.length)return e(Error(`was unable to load languages via API`));let i=r.reduce((e,t)=>{let r=n[t];return r.translated[this.options.version]&&r.translated[this.options.version]>=this.options.translatedPercentageThreshold&&e.push(t),e},[]),a=r.reduce((e,t)=>t.indexOf(`-`)>-1?!0:e,!1);e(null,{fallbackLng:this.options.referenceLng,referenceLng:this.options.referenceLng,supportedLngs:i.length===0&&this.options.referenceLng?[this.options.referenceLng]:i,load:a?`all`:`languageOnly`},n)}),t}checkIfProjectExists(e){let{logger:t}=this.services||{logger:console};if(this.somethingLoaded){e&&e(null);return}if(this.alreadyRequestedCheckIfProjectExists){setTimeout(()=>this.checkIfProjectExists(e),$r(this.options.checkForProjectTimeout));return}this.alreadyRequestedCheckIfProjectExists=!0,this.getLanguages(n=>{n&&n.message&&n.message.indexOf(`does not exist`)>0&&t&&t.error(n.message),e&&e(n)})}checkIfLanguagesLoaded(e){let{logger:t}=this.services||{logger:console};if(this.loadedLanguages){e&&e(null);return}this.getLanguages(n=>{n&&n.message&&n.message.indexOf(`does not exist`)>0&&t&&t.error(n.message),e&&e(n)})}read(e,t,n){let{logger:r}=this.services||{logger:console},i,a={};if(this.options.private){let r=Ir(this.options,[`projectId`,`version`,`apiKey`]);if(r)return n(Error(r),!1);i=Fr(this.options.privatePath,{lng:e,ns:t,projectId:this.options.projectId,version:this.options.version}),a={authorize:!0}}else{let r=Ir(this.options,[`projectId`,`version`]);if(r)return n(Error(r),!1);i=Fr(this.options.loadPath,{lng:e,ns:t,projectId:this.options.projectId,version:this.options.version})}if(i==null)return n(Error(`i18next-locize-backend: unsafe lng/ns/projectId/version — refusing to build request URL for lng=`+Dr(String(e))+` ns=`+Dr(String(t))),!1);if(!this.isProjectNotExisting&&this.storage.isProjectNotExisting(this.options.projectId)&&(this.isProjectNotExisting=!0),this.isProjectNotExisting){let e=Error(this.isProjectNotExistingErrorMessage||`Locize project ${this.options.projectId} does not exist!`);r&&r.error(e.message),n&&n(e);return}if(this.warnedLanguages&&this.warnedLanguages.indexOf(e)>-1){let t=Error(`Will not continue to load language "${e}" since it is not available in Locize project ${this.options.projectId}!`);r&&r.error(t.message),n&&n(t);return}this.loadUrl(a,i,(t,i,a)=>{let o=a&&a.resourceNotExisting;o||(this.hasResourcesForLng||(this.hasResourcesForLng={}),this.hasResourcesForLng[e]=!0),o&&(!this.hasResourcesForLng||!this.hasResourcesForLng[e])&&setTimeout(()=>{this.checkIfLanguagesLoaded(()=>{this.loadedLanguages&&(this.loadedLanguages.indexOf(e)>-1||this.warnedLanguages&&this.warnedLanguages.indexOf(e)>-1||(this.warnedLanguages||(this.warnedLanguages=[]),this.warnedLanguages.push(e),r&&r.error(`Language "${e}" is not available in Locize project ${this.options.projectId}!`)))})},$r(this.options.checkForProjectTimeout)),this.somethingLoaded||(o?setTimeout(()=>this.checkIfProjectExists(),$r(this.options.checkForProjectTimeout)):this.somethingLoaded=!0),n(t,i)})}loadUrl(e,t,n,r){e=M(e,this.options),typeof n==`function`&&(r=n,n=void 0),r=r||(()=>{});let i=(e,n)=>{let i=n&&n.resourceNotExisting;if(n&&(n.status===408||n.status===400)||n&&(n.status>=500&&n.status<600||!n.status))return r(`failed loading `+t,!0,{resourceNotExisting:i});if(n&&n.status>=400&&n.status<500)return r(`failed loading `+t,!1,{resourceNotExisting:i});if(!n&&e&&e.message){let n=e.message.toLowerCase();if([`failed`,`fetch`,`network`,`load`].find(e=>n.indexOf(e)>-1))return r(`failed loading `+t+`: `+e.message,!0,{resourceNotExisting:i})}if(e)return r(e,!1);let a,o;try{a=typeof n.data==`string`?JSON.parse(n.data):n.data}catch{o=`failed parsing `+t+` to json`}if(o)return r(o,!1);if(this.options.failLoadingOnEmptyJSON&&!Object.keys(a).length)return r(`loaded result empty for `+t,!1,{resourceNotExisting:i});r(null,a,{resourceNotExisting:i})};if(!this.options.request||t.indexOf(`/languages/${e.projectId}`)>0)return Kr(e,t,n,i);let a=Zr(t,e,n);Qr(this.options,a,i)}create(e,t,n,r,i,a){typeof i!=`function`&&(i=()=>{}),this.checkIfProjectExists(o=>{if(o)return i(o);let s=Ir(this.options,[`projectId`,`version`,`apiKey`,`referenceLng`]);if(s)return i(Error(s));if(!this.isAddOrUpdateAllowed)return i(`host is not allowed to create key.`);typeof e==`string`&&(e=[e]),e.filter(e=>e===this.options.referenceLng).length<1&&this.services&&this.services.logger&&this.services.logger.warn(`locize-backend: will not save missings because the reference language "${this.options.referenceLng}" was not in the list of to save languages: ${e.join(`, `)} (open your site in the reference language to save missings).`),e.forEach(e=>{e===this.options.referenceLng&&this.queue.call(this,this.options.referenceLng,t,n,r,i,a)})})}update(e,t,n,r,i,a){typeof i!=`function`&&(i=()=>{}),this.checkIfProjectExists(o=>{if(o)return i(o);let s=Ir(this.options,[`projectId`,`version`,`apiKey`,`referenceLng`]);if(s)return i(Error(s));if(!this.isAddOrUpdateAllowed)return i(`host is not allowed to update key.`);a||(a={}),typeof e==`string`&&(e=[e]),a.isUpdate=!0,e.forEach(e=>{e===this.options.referenceLng&&this.queue.call(this,this.options.referenceLng,t,n,r,i,a)})})}writePage(e,t,n,r){let i=Fr(this.options.addPath,{lng:e,ns:t,projectId:this.options.projectId,version:this.options.version}),a=Fr(this.options.updatePath,{lng:e,ns:t,projectId:this.options.projectId,version:this.options.version});if(i==null||a==null){typeof r==`function`&&r(Error(`i18next-locize-backend: unsafe lng/ns/projectId/version — refusing to persist missing keys for lng=`+Dr(String(e))+` ns=`+Dr(String(t))));return}let o=!1,s=!1,c={},l={};n.forEach(e=>{let t=e.options&&e.options.tDescription?{value:e.fallbackValue||``,context:{text:e.options.tDescription}}:e.fallbackValue||``;e.options&&e.options.isUpdate?(s||(s=!0),l[e.key]=t):(o||(o=!0),c[e.key]=t)});let u=0;o&&u++,s&&u++;let d=e=>{u--,u||r(e)};if(u||d(),o)if(!this.options.request)Kr(M({authorize:!0},this.options),i,c,d);else{let e=Zr(i,M({authorize:!0},this.options),c);Qr(this.options,e,d)}if(s)if(!this.options.request)Kr(M({authorize:!0},this.options),a,l,d);else{let e=Zr(a,M({authorize:!0},this.options),l);Qr(this.options,e,d)}}write(e,t){if(Mr(this.queuedWrites,[`locks`,e,t]))return;let n=Mr(this.queuedWrites,[e,t]);Ar(this.queuedWrites,[e,t],[]);let r=1e3,i=n.filter(e=>e.callback).map(e=>e.callback);if(n.length){Ar(this.queuedWrites,[`locks`,e,t],!0);let a=()=>{Ar(this.queuedWrites,[`locks`,e,t],!1),i.forEach(e=>e()),this.options.onSaved&&this.options.onSaved(e,t),this.debouncedProcess(e,t)},o=n.length/r,s=0,c=n.splice(0,r);for(this.writePage(e,t,c,()=>{s++,s>=o&&a()});c.length===r;)c=n.splice(0,r),c.length&&this.writePage(e,t,c,()=>{s++,s>=o&&a()})}}process(){Object.keys(this.queuedWrites).forEach(e=>{e!==`locks`&&Object.keys(this.queuedWrites[e]).forEach(t=>{this.queuedWrites[e][t].length&&this.write(e,t)})})}queue(e,t,n,r,i,a){jr(this.queuedWrites,[e,t],{key:n,fallbackValue:r||``,callback:i,options:a}),this.debouncedProcess()}};ei.type=`backend`;function ti(e){"@babel/helpers - typeof";return ti=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ti(e)}function ni(e,t){if(ti(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ti(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ri(e){var t=ni(e,`string`);return ti(t)==`symbol`?t:t+``}function N(e,t,n){return(t=ri(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ii=typeof window<`u`?[``,``]:[``,``],ai=RegExp(`([${ii.join(``)}]{9})+`,`gu`),oi=9,si=`subliminal:start`,ci=function(e){return Array.from(new TextEncoder().encode(e))},li=function(e){return new TextDecoder().decode(new Uint8Array(e))},ui=function(e){var t=8-e.length;return`0`.repeat(t)+e},di=function(e){var t=ci(e).map(Number).map(function(e){return ui(e.toString(2))+`0`}).join(``);return Array.from(t).map(function(e){return ii[Number(e)]}).join(``)},fi=di(si),pi=function(e){var t=Array.from(e).map(function(e){return ii.indexOf(e)}).map(String).join(``).match(/(.{9})/g);return li(Uint8Array.from(t?.map(function(e){return parseInt(e.slice(0,8),2)})||[]))},mi=function(e){var t=e.match(ai)?.filter(function(e){return e.length>oi-1});if(!(!t||t.length===0))return pi(t[t.length-1])},hi=function(e){return e.replace(ai,``)},gi=function(e){if(Object.keys(e).length===0)return e;var t={k:e.key,n:e.ns,l:e.lng,s:e.source};return JSON.stringify(t)},_i=function(e){if(!(!e||typeof e!=`string`||e.indexOf(`{`)!==0))try{var t=JSON.parse(e||`{}`);return{key:t.k,ns:t.n,lng:t.l,source:t.s}}catch{return}};function vi(e){var t=di(gi(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}));return typeof e==`string`&&e?fi+e+t:e}function yi(e){var t=_i(mi(e));return{text:hi(e),invisibleMeta:t}}function bi(e){return!e||e.length<27||!ai.test(e)?!1:pi(e.substring(e.length-9))===`}`}function xi(e){return e.startsWith(fi)}function Si(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ci(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Si(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Si(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var wi=`subliminal`,Ti={name:wi,type:`postProcessor`,options:{},setOptions:function(e){this.options=Ci(Ci({},e),this.options)},process:function(e,t,n,r){var i=this.options=Ci(Ci({},n),this.options),a,o,s,c;if(n.i18nResolved)a=n.i18nResolved.exactUsedKey,o=n.i18nResolved.usedNS,s=n.i18nResolved.usedLng,c=n.i18nResolved.res===void 0?a===e?`key`:`default`:`translation`;else{var l,u,d=i.keySeparator??(r==null||(l=r.options)==null?void 0:l.keySeparator)??`.`,f=r.extractFromKey(t.join(d),n),p=f.key,m=f.namespaces;a=p,o=m?.[0]??i.ns??(r==null||(u=r.options)==null?void 0:u.defaultNS),s=n.lng||this.language,c=a===e?`key`:`translation`}return vi(e,{key:a,ns:o,lng:s,source:c})},overloadTranslationOptionHandler:function(){return{postProcess:wi,postProcessPassResolved:!0}}},Ei=[`placeholder`,`title`,`alt`],Di=[`SCRIPT`],Oi={highlight:`#1976d2`,warning:`#e67a00`,gray:`#ccc`},ki=function(){var e;typeof process<`u`&&(e=process),!e&&typeof window<`u`&&(e=window.process);var t=(e||{}).env?.locizeIncontext||`production`;return t===`development`?`http://localhost:3003/`:t===`staging`?`https://incontext-dev.locize.app`:`https://incontext.locize.app`},P=function(){if(!(typeof document>`u`)){var e=document.createElement(`style`);return document.head.appendChild(e),e.sheet}}();function Ai(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ji(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ai(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ai(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var F={};function Mi(){Object.values(F).forEach(function(e){document.body.contains(e.node)||(J(e.id,e.node),delete F[e.id])})}function Ni(e,t,n,r){!e||!t||!n||(F[e]||(F[e]={id:e,node:n}),F[e].keys=ji(ji({},F[e].keys),{},N({},`${t}`,{value:r,eleUniqueID:e,textType:t})))}function Pi(e,t){J(e,t),delete F[e]}function Fi(e,t,n){var r=Ii(e);r&&(delete r.keys[`${t}`],Object.keys(r.keys).length||Pi(e,n))}function Ii(e){return F[e]}var I={save:Ni,remove:Pi,removeKey:Fi,clean:Mi,get:Ii,data:F};function Li(e){if(Array.isArray(e))return e}function Ri(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function zi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Bi(e,t){if(e){if(typeof e==`string`)return zi(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zi(e,t):void 0}}function Vi(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
30
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hi(e,t){return Li(e)||Ri(e,t)||Bi(e,t)||Vi()}function Ui(e,t,n){var r;return function(){var i=this,a=arguments,o=function(){r=null,n||e.apply(i,a)},s=n&&!r;clearTimeout(r),r=setTimeout(o,t),s&&e.apply(i,a)}}function L(e,t){return e&&e.getAttribute&&e.getAttribute(t)}function Wi(e){var t=L(e,`data-i18n`);if(t)return t;if(e.nodeType===window.Node.TEXT_NODE&&e.parentElement)return Wi(e.parentElement)}function Gi(e){var t=`text`;if(e.indexOf(`[`)===0){var n=e.split(`]`);e=n[1],t=n[0].substr(1,n[0].length-1)}return[e.indexOf(`;`)===e.length-1?e.substr(0,e.length-2):e,t]}function Ki(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=Wi(e),r=qi(e),i={};if(n&&n.indexOf(`;`)>=0){for(var a=n.split(`;`),o=0,s=a.length;o<s;o++)if(a[o]!=``){var c=Hi(Gi(a[o]),2),l=c[0],u=c[1];i[u]=l}}else if(n){var d=Hi(Gi(n),2),f=d[0],p=d[1];i[p]=f}return Object.keys(i).length<1?null:Object.keys(i).reduce(function(e,n){var a=i[n],o=r,s=a;if(t&&a.indexOf(`:`)>-1){var c=a.split(`:`);s=c[1],o=c[0]}return e[n]={key:s,ns:o},e},{})}function qi(e){var t,n=function(e){var r=L(e,`i18next-options`);if(r||(r=L(e,`data-i18next-options`)),r||(r=L(e,`i18n-options`)),r||(r=L(e,`data-i18n-options`)),r){var i={};try{i=JSON.parse(r)}catch{}i.ns&&(t=i.ns)}t||(t=L(e,`i18next-ns`)),t||(t=L(e,`data-i18next-ns`)),t||(t=L(e,`i18n-ns`)),t||(t=L(e,`data-i18n-ns`)),!t&&e.parentElement&&n(e.parentElement)};return n(e),t}function Ji(e,t){if(typeof window>`u`)return null;t||(t=window.location.href.toLowerCase()),e=e.replace(/[\[\]]/g,`\\$&`);var n=RegExp(`[?&]`+e+`(=([^&#]*)|&|#|$)`).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g,` `)):``:null}var Yi
|
|
30
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hi(e,t){return Li(e)||Ri(e,t)||Bi(e,t)||Vi()}function Ui(e,t,n){var r;return function(){var i=this,a=arguments,o=function(){r=null,n||e.apply(i,a)},s=n&&!r;clearTimeout(r),r=setTimeout(o,t),s&&e.apply(i,a)}}function L(e,t){return e&&e.getAttribute&&e.getAttribute(t)}function Wi(e){var t=L(e,`data-i18n`);if(t)return t;if(e.nodeType===window.Node.TEXT_NODE&&e.parentElement)return Wi(e.parentElement)}function Gi(e){var t=`text`;if(e.indexOf(`[`)===0){var n=e.split(`]`);e=n[1],t=n[0].substr(1,n[0].length-1)}return[e.indexOf(`;`)===e.length-1?e.substr(0,e.length-2):e,t]}function Ki(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=Wi(e),r=qi(e),i={};if(n&&n.indexOf(`;`)>=0){for(var a=n.split(`;`),o=0,s=a.length;o<s;o++)if(a[o]!=``){var c=Hi(Gi(a[o]),2),l=c[0],u=c[1];i[u]=l}}else if(n){var d=Hi(Gi(n),2),f=d[0],p=d[1];i[p]=f}return Object.keys(i).length<1?null:Object.keys(i).reduce(function(e,n){var a=i[n],o=r,s=a;if(t&&a.indexOf(`:`)>-1){var c=a.split(`:`);s=c[1],o=c[0]}return e[n]={key:s,ns:o},e},{})}function qi(e){var t,n=function(e){var r=L(e,`i18next-options`);if(r||(r=L(e,`data-i18next-options`)),r||(r=L(e,`i18n-options`)),r||(r=L(e,`data-i18n-options`)),r){var i={};try{i=JSON.parse(r)}catch{}i.ns&&(t=i.ns)}t||(t=L(e,`i18next-ns`)),t||(t=L(e,`data-i18next-ns`)),t||(t=L(e,`i18n-ns`)),t||(t=L(e,`data-i18n-ns`)),!t&&e.parentElement&&n(e.parentElement)};return n(e),t}function Ji(e,t){if(typeof window>`u`)return null;t||(t=window.location.href.toLowerCase()),e=e.replace(/[\[\]]/g,`\\$&`);var n=RegExp(`[?&]`+e+`(=([^&#]*)|&|#|$)`).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g,` `)):``:null}var Yi=!1;if(typeof window<`u`)try{Yi=self!==top}catch{Yi=!0}var Xi=Yi;function Zi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zi(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var $i={committed:`commitKeys`};function ea(e){return $i[e]?$i[e]:e}function ta(e){z.sendCurrentTargetLanguage(e)}var na=[],ra=[`locizeIsEnabled`,`requestInitialize`];function R(e,t){var n=document.getElementById(`i18next-editor-iframe`)?.contentWindow;if(n&&(z.source&&z.source!==n&&(z.initialized=!1),z.source=n),z.origin||(z.origin=ki()),!z.source||!z.source.postMessage||!z.initialized&&ra.indexOf(e)<0){na.push({action:e,payload:t});return}z.legacy?z.source.postMessage(Qi({message:e},t),z.origin):z.source.postMessage({sender:`i18next-editor`,senderAPIVersion:`v2`,action:e,message:e,payload:t},z.origin);var r=na;na=[],r.forEach(function(e){var t=e.action,n=e.payload;R(t,n)})}var ia=function(){R(`sendCurrentParsedContent`,{content:Object.values(X.data).map(function(e){return{id:e.id,keys:e.keys}}),uninstrumented:Object.values(I.data).map(function(e){return{id:e.id,keys:e.keys}})})},aa={},oa=5,z={init:function(e,t){z.i18n=e,z.clickHandler=t},requestInitialize:function(e){R(`requestInitialize`,e),!z.initInterval&&(oa=5,z.initInterval=setInterval(function(){--oa,z.requestInitialize(e),oa<0&&z.initInterval&&(clearInterval(z.initInterval),delete z.initInterval)},2e3))},selectKey:function(e){R(`selectKey`,e)},confirmResourceBundle:function(e){R(`confirmResourceBundle`,e)},sendCurrentParsedContent:Ui(ia,500),sendCurrentTargetLanguage:function(e){R(`sendCurrentTargetLanguage`,{targetLng:e||z.i18n&&z.i18n.getLng&&z.i18n.getLng()})},sendHrefchanged:function(e){R(`hrefChanged`,{href:e})},addHandler:function(e,t){aa[e]||(aa[e]=[]),aa[e].push(t)},sendLocizeIsEnabled:function(e){R(`locizeIsEnabled`,Qi(Qi({},e),{},{enabled:!0}))},onAddedKey:function(e,t,n,r){R(`added`,{lng:e,ns:t,key:n,value:r})}},sa=function(){try{return new URL(ki()).origin}catch{return null}};typeof window<`u`&&window.addEventListener(`message`,function(e){var t=sa();if(!(!t||e.origin!==t)){var n=e.data,r=n.sender,i=n.action,a=n.message,o=n.payload;if(a){var s=ea(a);aa[s]&&aa[s].forEach(function(t){t(o,e)})}else r===`i18next-editor-frame`&&aa[i]&&aa[i].forEach(function(t){t(o,e)})}});var ca=/^(on\w+|style)$/i,la=/^(href|src|action|formaction|xlink:href)$/i,ua=/^\s*(javascript|data|vbscript|file)\s*:/i;function da(e,t){return!(typeof e!=`string`||ca.test(e)||la.test(e)&&typeof t==`string`&&ua.test(t))}function fa(e){if(typeof e!=`string`||typeof DOMParser>`u`)return e;try{var t=new DOMParser().parseFromString(`<body>${e}</body>`,`text/html`);return[`SCRIPT`,`IFRAME`,`OBJECT`,`EMBED`,`LINK`,`META`,`BASE`,`STYLE`].forEach(function(e){t.body.querySelectorAll(e.toLowerCase()).forEach(function(e){return e.remove()})}),t.body.querySelectorAll(`*`).forEach(function(e){Array.from(e.attributes).forEach(function(t){var n=t.name,r=t.value;if(/^on/i.test(n)){e.removeAttribute(n);return}la.test(n)&&ua.test(r)&&e.removeAttribute(n)})}),t.body.innerHTML}catch{return e}}function pa(e,t){var n=X.get(e.eleUniqueID);if(!(!n||!n.keys[e.textType])){var r=n.subliminal?vi(t,n.subliminal):t;if(e.textType===`text`)n.node.textContent=r;else if(e.textType.indexOf(`attr:`)===0){var i=e.textType.replace(`attr:`,``);if(!da(i,r))return;n.node.setAttribute(i,r)}else if(e.textType===`html`){var a=`${e.textType}-${e.children}`;if(!n.originalChildNodes){var o=[];n.node.childNodes.forEach(function(e){o.push(e)}),n.originalChildNodes=o}var s=fa(r);if(n.children[a].length===n.node.childNodes.length)n.node.innerHTML=s;else{var c=n.children[a],l=c[0].child,u=document.createElement(`div`);u.innerHTML=s;var d=[];u.childNodes.forEach(function(e){d.push(e)}),d.forEach(function(e){try{n.node.insertBefore(e,l)}catch{n.node.appendChild(e)}}),c.forEach(function(e){n.node.contains(e.child)&&n.node.removeChild(e.child)})}}}}function ma(e){var t=e.meta,n=e.value;t&&n!==void 0&&pa(t,n)}z.addHandler(`editKey`,ma);function ha(e){var t=e.meta,n=e.value,r=e.lng;if(t&&n!==void 0){pa(t,n);var i=r||z.i18n.getLng();z.i18n.setResource(i,t.ns,t.key,n),z.i18n.triggerRerender()}}z.addHandler(`commitKey`,ha);function ga(e){if(Array.isArray(e))return zi(e)}function _a(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function va(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
31
31
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ya(e){return ga(e)||_a(e)||Bi(e)||va()}function ba(e){e.updated.forEach(function(e){var t=e.lng,n=e.ns,r=e.key,i=e.data,a=e.metas,o=e.meta;o&&i.value&&pa(o,i.value),a&&Object.values(a).forEach(function(e){pa(e,i.value)}),z.i18n.setResource(t,n,r,i.value),a&&Object.values(a).forEach(function(e){var t=X.get(e.eleUniqueID);Rs(t,t.node,t.keys)})}),Object.values(X.data).forEach(function(e){if(e.originalChildNodes){var t;(t=e.node).replaceChildren.apply(t,ya(e.originalChildNodes))}}),z.i18n.triggerRerender(),z.locizeSavedHandler&&z.locizeSavedHandler(e),window.locizeSavedHandler&&window.locizeSavedHandler(e)}z.addHandler(`commitKeys`,ba);function xa(e){z.initialized=!0,clearInterval(z.initInterval),delete z.initInterval,z.sendCurrentParsedContent(),z.sendCurrentTargetLanguage()}z.addHandler(`confirmInitialized`,xa);function Sa(e){var t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth,i=t.top<=n&&t.top+t.height>=0,a=t.left<=r&&t.left+t.width>=0;return i&&a}function Ca(e,t){var n=t,r=e.pageX,i=e.pageY,a={x:r,y:i},o=n.getBoundingClientRect(),s=o.top+document.documentElement.scrollTop,c=s+n.offsetHeight,l=o.left+document.documentElement.scrollLeft,u=l+n.offsetWidth,d={x:Math.min(r,u)>=Math.max(r,l)?r:u<r?u:l,y:Math.min(i,c)>=Math.max(i,s)?i:c<i?c:s},f=d.x-a.x,p=d.y-a.y,m=(f**2+p**2)**(1/2);return Math.floor(m)}function wa(e){var t=e;if(e.childNodes.length===1){var n=e.childNodes[0];if(n&&n.nodeName===`#text`){var r=document.createRange();r.selectNode(n);var i=r.getBoundingClientRect();t={getBoundingClientRect:function(){return i}}}}return t}function Ta(e){var t=e.getBoundingClientRect();if(!t.width||!t.height)return!0;var n=t.left+t.width/2,r=t.top+t.height/2,i=document.elementFromPoint(n,r);return i?i.dataset&&i.dataset.i18nextEditorElement===`true`?!1:!e.contains(i)&&!i.contains(e):!0}var Ea=Ui(function(e,t){Object.values(X.data).forEach(function(t){if(Sa(t.node)){if(Ta(t.node)){J(t,t.node,t.keys);return}var n=Ca(e,t.node);n<5?Fs(t,t.node,t.keys):n>5&&(t.ribbonBox?Ca(e,t.ribbonBox):1e3)>10&&J(t,t.node,t.keys)}}),Object.values(I.data).forEach(function(t){if(Sa(t.node)){if(Ta(t.node)){J(t,t.node,t.keys);return}var n=Ca(e,t.node);n<10?Is(t,t.node,t.keys):n>10&&J(t,t.node,t.keys)}})},50),Da;function Oa(e){Da=function(t){Ea(t,e)},document.addEventListener(`mousemove`,Da)}function ka(){document.removeEventListener(`mousemove`,Da)}var Aa=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#FFFFFF"><g></g><g><g><g><path d="M3,21l3.75,0L17.81,9.94l-3.75-3.75L3,17.25L3,21z M5,18.08l9.06-9.06l0.92,0.92L5.92,19L5,19L5,18.08z"/></g><g><path d="M18.37,3.29c-0.39-0.39-1.02-0.39-1.41,0l-1.83,1.83l3.75,3.75l1.83-1.83c0.39-0.39,0.39-1.02,0-1.41L18.37,3.29z"/></g></g></g></svg>`,ja=`
|
|
32
32
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 210 304" stroke="#000" stroke-linecap="round" stroke-linejoin="round" fill="#fff" fill-rule="evenodd">
|
|
33
33
|
<g stroke="none" class="B">
|
|
@@ -207,4 +207,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
207
207
|
border-color: transparent ${Oi.highlight} transparent
|
|
208
208
|
transparent;
|
|
209
209
|
`,t.appendChild(n);var r=document.createElement(`div`);return r.style=`display: flex; flex-direction: column; align-items: flex-start; margin-left: 2px; margin-top: 1px`,Object.keys(e).forEach(function(t){var n=e[t],i=to(t.replace(`attr:`,``),`${n.ns}:${n.key}`,function(e){e&&(e.stopPropagation(),e.preventDefault()),z.selectKey(n)});i.style.marginBottom=`2px`,r.appendChild(i)}),t.appendChild(r),{box:t,arrow:n}}function ro(e,t,n){var r=e.getBoundingClientRect(),i=document.createElement(`div`);return i.classList.add(`i18next-editor-highlight`),i.style=`position: absolute; z-index: 99999; pointer-events: none; top: ${r.top-2+window.scrollY}px; left: ${r.left-2+window.scrollX}px; height: ${r.height+4}px; width: ${r.width+4}px; border: ${t===`none`?`none`:`1px solid ${t}`}; border-radius: 15px; ${n?`box-shadow: inset 1px 1px 5px rgba(255, 255, 255, 0.1), inset -1px -1px 5px rgba(61, 67, 69, 0.3), 0 0 20px 0 ${n};`:``}`,i.setAttribute(`data-i18next-editor-element`,`true`),i}let io=Math.min,ao=Math.max,oo=Math.round,B=e=>({x:e,y:e}),so={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function co(e,t,n){return ao(e,io(t,n))}function lo(e,t){return typeof e==`function`?e(t):e}function uo(e){return e.split(`-`)[0]}function fo(e){return e.split(`-`)[1]}function po(e){return e===`x`?`y`:`x`}function mo(e){return e===`y`?`height`:`width`}function V(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ho(e){return po(V(e))}function go(e,t,n){n===void 0&&(n=!1);let r=fo(e),i=ho(e),a=mo(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=To(o)),[o,To(o)]}function _o(e){let t=To(e);return[vo(e),t,vo(t)]}function vo(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}let yo=[`left`,`right`],bo=[`right`,`left`],xo=[`top`,`bottom`],So=[`bottom`,`top`];function Co(e,t,n){switch(e){case`top`:case`bottom`:return n?t?bo:yo:t?yo:bo;case`left`:case`right`:return t?xo:So;default:return[]}}function wo(e,t,n,r){let i=fo(e),a=Co(uo(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(vo)))),a}function To(e){let t=uo(e);return so[t]+e.slice(t.length)}function Eo(e){return{top:0,right:0,bottom:0,left:0,...e}}function Do(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Eo(e)}function Oo(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ko(e,t,n){let{reference:r,floating:i}=e,a=V(t),o=ho(t),s=mo(o),c=uo(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(fo(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Ao(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=lo(t,e),p=Do(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Oo(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Oo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}let jo=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Ao},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ko(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<50&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ko(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Mo=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=lo(e,t)||{};if(l==null)return{};let d=Do(u),f={x:n,y:r},p=ho(i),m=mo(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=io(d[_],T),D=io(d[v],T),ee=E,te=C-h[m]-D,O=C/2-h[m]/2+w,ne=co(ee,O,te),k=!c.arrow&&fo(i)!=null&&O!==ne&&a.reference[m]/2-(O<ee?E:D)-h[m]/2<0,re=k?O<ee?O-ee:O-te:0;return{[p]:f[p]+re,data:{[p]:ne,centerOffset:O-ne-re,...k&&{alignmentOffset:re}},reset:k}}}),No=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=lo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=uo(r),_=V(o),v=uo(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[To(o)]:_o(o)),x=p!==`none`;!d&&x&&b.push(...wo(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=go(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==V(t))||T.every(e=>V(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=V(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}},Po=new Set([`left`,`top`]);async function Fo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=uo(n),s=fo(n),c=V(n)===`y`,l=Po.has(o)?-1:1,u=a&&c?-1:1,d=lo(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}let Io=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Fo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Lo=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=lo(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=V(uo(i)),p=po(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=co(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=co(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}};function Ro(){return typeof window<`u`}function zo(e){return Bo(e)?(e.nodeName||``).toLowerCase():`#document`}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function U(e){return((Bo(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Bo(e){return Ro()?e instanceof Node||e instanceof H(e).Node:!1}function W(e){return Ro()?e instanceof Element||e instanceof H(e).Element:!1}function G(e){return Ro()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function Vo(e){return!Ro()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function Ho(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=K(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Uo(e){return/^(table|td|th)$/.test(zo(e))}function Wo(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}let Go=/transform|translate|scale|rotate|perspective|filter/,Ko=/paint|layout|strict|content/,qo=e=>!!e&&e!==`none`,Jo;function Yo(e){let t=W(e)?K(e):e;return qo(t.transform)||qo(t.translate)||qo(t.scale)||qo(t.rotate)||qo(t.perspective)||!Zo()&&(qo(t.backdropFilter)||qo(t.filter))||Go.test(t.willChange||``)||Ko.test(t.contain||``)}function Xo(e){let t=q(e);for(;G(t)&&!Qo(t);){if(Yo(t))return t;if(Wo(t))return null;t=q(t)}return null}function Zo(){return Jo??(Jo=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`)),Jo}function Qo(e){return/^(html|body|#document)$/.test(zo(e))}function K(e){return H(e).getComputedStyle(e)}function $o(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if(zo(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Vo(e)&&e.host||U(e);return Vo(t)?t.host:t}function es(e){let t=q(e);return Qo(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&Ho(t)?t:es(t)}function ts(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=es(e),i=r===e.ownerDocument?.body,a=H(r);if(i){let e=ns(a);return t.concat(a,a.visualViewport||[],Ho(r)?r:[],e&&n?ts(e):[])}else return t.concat(r,ts(r,[],n))}function ns(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rs(e){let t=K(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=G(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=oo(n)!==a||oo(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function is(e){return W(e)?e:e.contextElement}function as(e){let t=is(e);if(!G(t))return B(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=rs(t),o=(a?oo(n.width):n.width)/r,s=(a?oo(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}let os=B(0);function ss(e){let t=H(e);return!Zo()||!t.visualViewport?os:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cs(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==H(e)?!1:t}function ls(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=is(e),o=B(1);t&&(r?W(r)&&(o=as(r)):o=as(e));let s=cs(a,n,r)?ss(a):B(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=H(a),t=r&&W(r)?H(r):r,n=e,i=ns(n);for(;i&&r&&t!==n;){let e=as(i),t=i.getBoundingClientRect(),r=K(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=H(i),i=ns(n)}}return Oo({width:u,height:d,x:c,y:l})}function us(e,t){let n=$o(e).scrollLeft;return t?t.left+n:ls(U(e)).left+n}function ds(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-us(e,n),y:n.top+t.scrollTop}}function fs(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=U(r),s=t?Wo(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=B(1),u=B(0),d=G(r);if((d||!d&&!a)&&((zo(r)!==`body`||Ho(o))&&(c=$o(r)),d)){let e=ls(r);l=as(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ds(o,c):B(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ps(e){return Array.from(e.getClientRects())}function ms(e){let t=U(e),n=$o(e),r=e.ownerDocument.body,i=ao(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ao(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+us(e),s=-n.scrollTop;return K(r).direction===`rtl`&&(o+=ao(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function hs(e,t){let n=H(e),r=U(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Zo();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=us(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else l<=25&&(a+=l);return{width:a,height:o,x:s,y:c}}function gs(e,t){let n=ls(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=G(e)?as(e):B(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function _s(e,t,n){let r;if(t===`viewport`)r=hs(e,n);else if(t===`document`)r=ms(U(e));else if(W(t))r=gs(t,n);else{let n=ss(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Oo(r)}function vs(e,t){let n=q(e);return n===t||!W(n)||Qo(n)?!1:K(n).position===`fixed`||vs(n,t)}function ys(e,t){let n=t.get(e);if(n)return n;let r=ts(e,[],!1).filter(e=>W(e)&&zo(e)!==`body`),i=null,a=K(e).position===`fixed`,o=a?q(e):e;for(;W(o)&&!Qo(o);){let t=K(o),n=Yo(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Ho(o)&&!n&&vs(e,o))?r=r.filter(e=>e!==o):i=t,o=q(o)}return t.set(e,r),r}function bs(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Wo(t)?[]:ys(t,this._c):[].concat(n),r],o=_s(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=_s(t,a[e],i);s=ao(n.top,s),c=io(n.right,c),l=io(n.bottom,l),u=ao(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function xs(e){let{width:t,height:n}=rs(e);return{width:t,height:n}}function Ss(e,t,n){let r=G(t),i=U(t),a=n===`fixed`,o=ls(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=B(0);function l(){c.x=us(i)}if(r||!r&&!a)if((zo(t)!==`body`||Ho(i))&&(s=$o(t)),r){let e=ls(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?ds(i,s):B(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Cs(e){return K(e).position===`static`}function ws(e,t){if(!G(e)||K(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return U(e)===n&&(n=n.ownerDocument.body),n}function Ts(e,t){let n=H(e);if(Wo(e))return n;if(!G(e)){let t=q(e);for(;t&&!Qo(t);){if(W(t)&&!Cs(t))return t;t=q(t)}return n}let r=ws(e,t);for(;r&&Uo(r)&&Cs(r);)r=ws(r,t);return r&&Qo(r)&&Cs(r)&&!Yo(r)?n:r||Xo(e)||n}let Es=async function(e){let t=this.getOffsetParent||Ts,n=this.getDimensions,r=await n(e.floating);return{reference:Ss(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ds(e){return K(e).direction===`rtl`}let Os={convertOffsetParentRelativeRectToViewportRelativeRect:fs,getDocumentElement:U,getClippingRect:bs,getOffsetParent:Ts,getElementRects:Es,getClientRects:ps,getDimensions:xs,getScale:as,isElement:W,isRTL:Ds},ks=Io,As=Lo,js=No,Ms=Mo,Ns=(e,t,n)=>{let r=new Map,i={platform:Os,...n},a={...i.platform,_c:r};return jo(e,t,{...i,platform:a})};var Ps={};function Fs(e,t,n){var r=wa(t);if(!e.highlightBox){var i=ro(r,`none`,`rgba(0,0,0,0.1)`);document.body.appendChild(i),e.highlightBox=i}if(!e.ribbonBox){var a=no(n),o=a.box,s=a.arrow;document.body.appendChild(o),Ns(r,o,{placement:`right`,middleware:[js({fallbackPlacements:[`left`,`bottom`]}),As(),ks(function(e){var t=e.placement,n=e.rects;return t===`bottom`?-n.reference.height/2-n.floating.height/2:35}),Ms({element:s})]}).then(function(e){var t=e.x,n=e.y,r=e.middlewareData,i=e.placement;Object.assign(o.style,{left:`${t}px`,top:`${n}px`,display:`inline-flex`});var a=i.split(`-`)[0],c={top:`bottom`,right:`left`,bottom:`top`,left:`right`}[a];if(r.arrow){var l=r.arrow,u=l.x,d=l.y;Object.assign(s.style,N(N({left:u==null?``:`${u}px`,top:d==null?``:`${d}px`,right:``,bottom:``},c,`${a===`bottom`?-18:-25}px`),`transform`,a===`bottom`?`rotate(90deg)`:a===`left`?`rotate(180deg)`:``))}}),e.ribbonBox=o}}function Is(e,t,n){if(!Ps[e.id]){var r=wa(t);if(!e.highlightBox){var i=ro(r,Oi.warning);document.body.appendChild(i),e.highlightBox=i}}}function Ls(e,t,n){var r=e.id,i=wa(t);if(!e.highlightBox){var a=ro(i,`none`,Oi.gray);document.body.appendChild(a),e.highlightBox=a}Ps[r]=!0}function Rs(e,t,n){Ps[e.id]&&(J(e,t,n,!1),Ls(e,t))}function J(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=e.id;r&&Ps[i]||(e.highlightBox&&(document.body.removeChild(e.highlightBox),delete e.highlightBox),e.ribbonBox&&(document.body.removeChild(e.ribbonBox),delete e.ribbonBox),delete Ps[i])}function zs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zs(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Y={};function Vs(){Object.values(Y).forEach(function(e){document.body.contains(e.node)||(J(e.id,e.node),delete Y[e.id])})}function Hs(e,t,n,r,i,a){!e||!n||!r||!i||(Y[e]||(Y[e]={id:e,node:i,subliminal:t}),t&&(Y[e].subliminal=t),Y[e].keys=Bs(Bs({},Y[e].keys),{},N({},`${n}`,r)),a&&(Y[e].children=Bs(Bs({},Y[e].children),{},N({},`${n}-${a.map(function(e){return e.childIndex}).join(`,`)}`,a))))}function Us(e){return Y[e]}var X={save:Hs,clean:Vs,get:Us,data:Y};(function(){if(!(typeof Document>`u`)){var e=1;Document.prototype.hasOwnProperty(`uniqueID`)||(console.info(`"document.uniqueID" not implemented; creating shim`),Object.defineProperty(Document.prototype,`uniqueID`,{get:function(){return e++},enumerable:!1,configurable:!1}),Object.defineProperty(Element.prototype,`uniqueID`,{get:function(){return Object.defineProperty(this,`uniqueID`,{value:document.uniqueID,writable:!1,enumerable:!1,configurable:!1}),this.uniqueID},enumerable:!1,configurable:!0}))}})();function Ws(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ws(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ws(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Z,Q,Ks=[];function qs(e){Q=e}function Js(e,t){if(!(e.dataset&&e.dataset.i18nextEditorElement===`true`)){t(e);var n=X.get(e.uniqueID),r=I.get(e.uniqueID);if(n||r){var i=e.parentElement?.uniqueID;I.remove(i,e.parentElement)}for(var a=e.childNodes,o=0;o<a.length;o++)Js(a[o],t)}}function Ys(e,t,n,r){var i=n.invisibleMeta,a=n.text;if(!(!i||!i.key||!i.ns))return Z||(Z=Q.getSourceLng()),Gs(Gs({eleUniqueID:e,textType:t,children:r&&r.map?r.map(function(e){return e.childIndex}).join(`,`):null,qualifiedKey:`${i.ns}:${i.key}`},i),{},{extractedText:a,i18nTargetLng:Q?.getLng(),i18nSourceLng:Z,i18nRawText:N(N({},`${i.lng}`,i.source===`translation`&&Q?Q?.getResource(i.lng,i.ns,i.key):null),`${Z}`,i.source===`translation`&&Q?Q?.getResource(Z,i.ns,i.key):null)})}function Xs(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,o=r[t];if(o){Z||(Z=Q.getSourceLng());var s=Q.getLng();return{eleUniqueID:e,textType:t,children:a&&a.map?a.map(function(e){return e.childIndex}).join(`,`):null,qualifiedKey:o.key&&(o.ns||(n=Q)!=null&&n.getDefaultNS())?`${o.ns||Q?.getDefaultNS()}:${o.key}`:null,key:o.key,ns:o.ns||Q?.getDefaultNS(),extractedText:i,i18nTargetLng:s,i18nSourceLng:Z,i18nRawText:N(N({},`${s}`,Q&&o.ns&&o.key&&Q?.getResource(s,o.ns,o.key)||i),`${Z}`,Q&&o.ns&&o.key?Q?.getResource(Z,o.ns,o.key):null)}}}function Zs(e){return/^\s*$/.test(e)}function Qs(e,t,n,r,i,a,o){var s=X.get(e),c=s&&s.keys[`${n}`]||{},l=r[`${n}`]||{};!l.key&&c.key&&(l.key=c.key),!l.ns&&c.ns&&(l.ns=c.ns),r[`${n}`]=l;var u=Xs(e,n,r,o,a);u.qualifiedKey?(X.save(e,null,n,u,i,a),I.removeKey(e,n,i)):I.save(e,n,i,o)}function $s(e){if(!(Di.indexOf(e.nodeName)>-1)){var t=Ki(e),n=!1;if(e.childNodes&&!Ks.includes(e.uniqueID)){var r=[];e.childNodes.forEach(function(t,i){if(r.length&&t.nodeName!==`#text`&&(Ks.push(t.uniqueID),r.push({childIndex:i,child:t})),t.nodeName===`#text`){var a=t.textContent;if(!Zs(a)){var o=a.trim(),s=bi(o),c=xi(o);if(s&&(n=!0),c&&s){var l=yi(o);I.remove(e.uniqueID,e),X.save(e.uniqueID,l.invisibleMeta,`text`,Ys(e.uniqueID,`text`,l),e)}else if(c)r.push({childIndex:i,child:t,text:a});else if(r.length&&!s)r.push({childIndex:i,child:t,text:a});else if(r.length&&s){r.push({childIndex:i,child:t,text:a});var u=yi(r.reduce(function(e,t){return e+t.text},``));I.removeKey(e.uniqueID,`html`,e,a),X.save(e.uniqueID,u.invisibleMeta,`html`,Ys(e.uniqueID,`html`,u,r),e,r),r=[]}}}}),n||e.childNodes.forEach(function(n,i){r.length&&n.nodeName!==`#text`&&Ks.push(n.uniqueID);var a=n.textContent;t&&t.html&&i<e.childNodes.length-1?r.push({childIndex:i,child:n,text:a}):t&&t.html&&i===e.childNodes.length-1?(r.push({childIndex:i,child:n,text:a}),Qs(e.uniqueID,null,`html`,t,e,r,e.innerHTML),r=[]):a&&(t&&t.text?Qs(e.uniqueID,null,`text`,t,e,void 0,a):n.nodeName===`#text`&&!Zs(a)&&I.save(e.uniqueID,`text`,e,a))})}e.getAttribute&&Ei.forEach(function(n){var r=e.getAttribute(n);if(bi(r)){var i=yi(r);I.removeKey(e.uniqueID,n,e),X.save(e.uniqueID,i.invisibleMeta,n,Ys(e.uniqueID,`${n}`,i),e)}else r&&(t&&t[n]?Qs(e.uniqueID,null,n,t,e,void 0,r):I.save(e.uniqueID,n,e,r))})}}function ec(e){return Z=void 0,Js(e,$s),X.clean(),Ks=[],X.data}var tc={};function nc(e){if(e.uniqueID){var t=tc[e.uniqueID];if(t&&t.triggered>10&&t.lastTriggerDate+500<Date.now())return!t.warned&&console&&(console.warn(`locize ::: ignoring element change - an element is rerendering too often in short interval`,`
|
|
210
|
-
`,`consider adding the "data-locize-editor-ignore:" attribute to the element:`,e),t.warned=!0),!0}var n=e.dataset&&(e.dataset.i18nextEditorElement===`true`||e.dataset.locizeEditorIgnore===`true`);return!n&&e.parentElement?nc(e.parentElement):n}function rc(e,t){var n,r,i=function(){r&&clearTimeout(r),r=setTimeout(function(){n&&(n=!1)},200)},a=[],o=Ui(function(){t(a),a=[]},100),s=new MutationObserver(function(e){if(n){i();return}var t=!1;e.forEach(function(e){if(!(e.type===`attributes`&&!Ei.includes(e.attributeName))){var n=e.target.nodeType===3?e.target.parentElement:e.target;if(n){if(Object.keys(tc).forEach(function(e){tc[e].lastTriggerDate+6e4<Date.now()&&delete tc[e]}),e.type===`childList`){var r=0;if(nc(n)||(e.addedNodes.forEach(function(e){nc(e)||(r+=1)},0),e.removedNodes.forEach(function(e){nc(e)||(r+=1)},0)),r===0)return}if(t=!0,n.uniqueID){var i=tc[n.uniqueID]||{triggered:0};i.triggered+=1,i.lastTriggerDate=Date.now(),tc[n.uniqueID]=i}a.reduce(function(e,t){return!!(e||t.contains(n)||!n.parentElement)},!1)||(a=a.filter(function(e){return!n.contains(e)}),a.push(n))}}}),t&&o()});return{start:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{attributes:!0,childList:!0,characterData:!0,subtree:!0};t([e]),s.observe(e,n)},skipNext:function(){n=!0}}}var ic=40;function ac(e){var t=Math.max(0,window.innerHeight-ic);return Math.max(0,Math.min(e,t))}function oc(e,t){var n=t.offsetWidth||0,r=Math.min(0,ic-n),i=Math.max(0,window.innerWidth-ic);return Math.max(r,Math.min(e,i))}function sc(){for(var e=0,t=0,n=0,r=0,i=document.getElementsByClassName(`i18next-editor-popup`),a=null,o=null,s=1e5,c=0;c<i.length;c++){var l=i[c],u=m(l);l.onmousedown=function(){this.style.zIndex=``+ ++s},u&&(u.parentPopup=l,u.onmousedown=d)}function d(e){o||(o=document.getElementById(`i18next-editor-popup-overlay`)),o&&(o.style.display=`block`),ka(),a=this.parentPopup,a.style.zIndex=``+ ++s,e=e||window.event,n=e.clientX,r=e.clientY,document.onmouseup=p,document.onmousemove=f}function f(i){a&&(i=i||window.event,e=n-i.clientX,t=r-i.clientY,n=i.clientX,r=i.clientY,a.style.top=ac(a.offsetTop-t)+`px`,a.style.left=oc(a.offsetLeft-e,a)+`px`)}function p(){Oa(),o&&(o.style.display=`none`);var e=document.getElementById(`i18next-editor-popup`);window.localStorage.setItem(`locize_popup_pos`,JSON.stringify({top:parseInt(document.defaultView.getComputedStyle(e).top,10),left:parseInt(document.defaultView.getComputedStyle(e).left,10)})),document.onmouseup=null,document.onmousemove=null}function m(e){var t=e.getElementsByClassName(`i18next-editor-popup-header`);return t.length===1?t[0]:null}}function cc(){for(var e=document.getElementsByClassName(`i18next-editor-popup`),t=null,n=null,r,i,a,o,s=0;s<e.length;s++){var c=e[s],l=document.createElement(`div`);l.className=`resizer-right`,c.appendChild(l),l.addEventListener(`mousedown`,f,!1),l.parentPopup=c;var u=document.createElement(`div`);u.className=`resizer-bottom`,c.appendChild(u),u.addEventListener(`mousedown`,f,!1),u.parentPopup=c;var d=document.createElement(`div`);d.className=`resizer-both`,c.appendChild(d),d.addEventListener(`mousedown`,f,!1),d.parentPopup=c}function f(e){ka(),n||(n=document.getElementById(`i18next-editor-popup-overlay`)),n&&(n.style.display=`block`),t=this.parentPopup,r=e.clientX,i=e.clientY,a=parseInt(document.defaultView.getComputedStyle(t).width,10),o=parseInt(document.defaultView.getComputedStyle(t).height,10),document.documentElement.addEventListener(`mousemove`,p,!1),document.documentElement.addEventListener(`mouseup`,m,!1)}function p(e){t.style.width=a+e.clientX-r+`px`,t.style.height=o+e.clientY-i+`px`}function m(){Oa(),n&&(n.style.display=`none`);var e=document.getElementById(`i18next-editor-popup`);window.localStorage.setItem(`locize_popup_size`,JSON.stringify({width:parseInt(document.defaultView.getComputedStyle(e).width,10),height:parseInt(document.defaultView.getComputedStyle(e).height,10)})),document.documentElement.removeEventListener(`mousemove`,p,!1),document.documentElement.removeEventListener(`mouseup`,m,!1)}}function lc(){return{getResource:function(e,t,n){return{}},setResource:function(e,t,n,r){},getResourceBundle:function(e,t,n){n({})},getDefaultNS:function(){},getLng:function(){},getSourceLng:function(){},getLocizeDetails:function(){return{}},bindLanguageChange:function(e){},bindMissingKeyHandler:function(e){},triggerRerender:function(){}}}function uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uc(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var fc=lc();function pc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fc,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{show:!1,qsProp:`incontext`};if(typeof document>`u`)return;var n=t.show||Ji(t.qsProp||`incontext`)===`true`,r=document.getElementById(`locize`),i={};[`projectId`,`version`].forEach(function(e){if(r){var t=r.getAttribute(e.toLowerCase())||r.getAttribute(`data-`+e.toLowerCase());t===`true`&&(t=!0),t===`false`&&(t=!1),t!=null&&(i[e]=t)}}),i=dc(dc(dc({},e.getLocizeDetails()),i),t),z.config=i,z.init(e),qs(e),e?.bindLanguageChange(function(t){z.sendCurrentTargetLanguage(e.getLng())});function a(){if(!(!Xi&&!n)){var e=rc(document.body,function(e){e.forEach(function(e){ec(e)}),z.sendCurrentParsedContent()});if(e.start(),Oa(e),!Xi&&!document.getElementById(`i18next-editor-popup`)&&(document.body.append(Va(ki(),function(){z.requestInitialize(i)})),sc(),cc()),typeof window<`u`){var t=window.document.location.href;z.sendHrefchanged(t);var r=window.document.querySelector(`body`);new window.MutationObserver(function(e){e.forEach(function(e){t!==window.document.location.href&&(t=window.document.location.href,z.sendHrefchanged(t))})}).observe(r,{childList:!0,subtree:!0})}}}if(document.body)return a();typeof window<`u`&&window.addEventListener(`load`,function(){return a()})}function mc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mc(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gc(e){var t={getResource:function(t,n,r){return e.getResource&&e.getResource(t,n,r)},setResource:function(t,n,r,i){return e.addResource(t,n,r,i,{silent:!0})},getResourceBundle:function(t,n,r){e.loadNamespaces(n,function(){r(e.getResourceBundle(t,n))})},getDefaultNS:function(){return e.options.defaultNS},getLng:function(){return e.resolvedLanguage||e.languages&&e.languages[0]||e.options.lng},getSourceLng:function(){var t=e.options.fallbackLng;if(typeof t==`string`)return t;if(Array.isArray(t))return t[t.length-1];if(t&&t.default){if(typeof t.default==`string`)return t;if(Array.isArray(t.default))return t.default[t.default.length-1]}if(typeof t==`function`){var n=t(e.resolvedLanguage);if(typeof n==`string`)return n;if(Array.isArray(n))return n[n.length-1]}return`dev`},getLocizeDetails:function(){var n={backendName:e.services.backendConnector.backend&&e.services.backendConnector.backend.options&&e.services.backendConnector.backend.options.loadPath&&e.services.backendConnector.backend.options.loadPath.indexOf(`.locize.`)>0?`I18nextLocizeBackend`:e.services.backendConnector.backend?e.services.backendConnector.backend.constructor.name:`options.resources`,sourceLng:t.getSourceLng(),i18nFormat:e.options.compatibilityJSON===`v3`?`i18next_v3`:`i18next_v4`,i18nFramework:`i18next`,isLocizify:e.options.isLocizify,defaultNS:e.options.defaultNS,targetLngs:ya(new Set([].concat(e.options.preload,e.options.supportedLngs,[t.getLng()]))).filter(function(e){return e!==`cimode`&&e!==!1&&e!==`false`&&e!==void 0&&e!==t.getSourceLng()}),ns:ya(new Set([].concat(e.options.ns,e.options.fallbackNS,e.options.defaultNS))).filter(function(e){return e!==!1&&e!==`false`})};if(!e.options.backend&&!e.options.editor)return n;var r=e.options.editor||e.options.backend;return hc(hc({},n),{},{projectId:r.projectId,version:r.version})},bindLanguageChange:function(t){e.on(`languageChanged`,t)},bindMissingKeyHandler:function(t){e.options.missingKeyHandler=function(e,n,r,i,a,o){a||t(e,n,r,i)}},triggerRerender:function(){e.emit(`editorSaved`)}};return t}function _c(e,t){e.use(Ti),typeof t.postProcess==`string`?t.postProcess=[t.postProcess,`subliminal`]:Array.isArray(t.postProcess)?t.postProcess.push(`subliminal`):t.postProcess=`subliminal`,t.postProcessPassResolved=!0}var vc,yc=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.qsProp=e.qsProp||`incontext`,{type:`3rdParty`,init:function(t){var n=t.options;vc=t;var r=gc(t),i=e.show||Ji(e.qsProp)===`true`;(Xi||i)&&_c(vc,n),pc(r,e)}}}(),bc=[`implementation`];function xc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.implementation,n=Ka(e,bc);pc(t,Object.keys(n).length>0?n:void 0)}typeof window<`u`&&(window.locizeStartStandalone=xc);let{i18next:$}=xr,Sc={saveMissingTo:`all`},Cc={reloadOnSave:!0,bindSavedMissing:!0};$.use(ei).use(yc),$.on(`editorSaved`,()=>{xr.forceRerender()});function wc(e,t){if(typeof window>`u`)return null;t||(t=window.location.href.toLowerCase()),e=e.replace(/[\[\]]/g,`\\$&`);let n=RegExp(`[?&]`+e+`(=([^&#]*)|&|#|$)`).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g,` `)):``:null}function Tc(){if(typeof window>`u`||!window.location)return!1;let e=window.location.hostname;return e?e===`localhost`||e===`127.0.0.1`||e===`::1`||e===`0.0.0.0`||e.endsWith(`.localhost`)||e.endsWith(`.local`):!1}let Ec=!1;function Dc(e){Tc()||Ec||(Ec=!0,typeof console<`u`&&typeof console.warn==`function`&&console.warn(`locizify: reading credential "`+e+`" from URL query string on a non-local host. An attacker-crafted link can replace your locize credentials, redirecting saveMissing writes to an attacker-chosen project. Prefer configuring credentials via the <script id="locizify" apikey="..." projectid="..."> attributes instead.`))}let Oc=$.init;return $.init=(e={},t)=>{e={...Cc,...e,isLocizify:!0};let n=document.getElementById(`locizify`);if(n){let t={},r={};[`fallbackLng`,`saveMissing`,`debug`,`autorun`,`ele`,`cleanIndent`,`cleanWhitespace`,`namespace`,`namespaceFromPath`,`load`].forEach(e=>{let r=n.getAttribute(e.toLowerCase())||n.getAttribute(`data-`+e.toLowerCase());r===`true`&&(r=!0),r===`false`&&(r=!1),r!=null&&(t[e]=r)}),[`ignoreTags`,`ignoreIds`,`ignoreClasses`,`translateAttributes`,`mergeTags`,`inlineTags`,`ignoreInlineOn`,`ignoreCleanIndentFor`,`ns`].forEach(e=>{let r=n.getAttribute(e.toLowerCase())||n.getAttribute(`data-`+e.toLowerCase());r!=null&&(t[e]=r.split(`,`).map(e=>e.trim()))}),[`projectId`,`apiKey`,`referenceLng`,`version`,`allowedAddOrUpdateHost`,`autoPilot`,`cdnType`,`noCache`].forEach(e=>{let t=n.getAttribute(e.toLowerCase())||n.getAttribute(`data-`+e.toLowerCase());if(t===`true`&&(t=!0),t===`false`&&(t=!1),e.toLowerCase()===`autopilot`&&t===``&&(t=!0),t!=null&&(r[e]=t),!t){let n=e.toLowerCase();t=wc(n),t===`true`&&(t=!0),t===`false`&&(t=!1),n===`autopilot`&&t===``&&(t=!0),t!=null&&(r[e]=t,(n===`apikey`||n===`projectid`)&&Dc(n))}}),r.allowedAddOrUpdateHost&&(r.allowedAddOrUpdateHosts=[r.allowedAddOrUpdateHost],delete r.allowedAddOrUpdateHost),e={...Cc,...e,...t},e.backend={...e.backend,...r}}function r(e,n){t(e,n)}if(!e.backend.apiKey&&wc(`apikey`)&&(e.backend.apiKey=wc(`apikey`),Dc(`apikey`)),!e.backend.autoPilot||e.backend.autoPilot===`false`)return Oc.call($,{...e,...Sc},r);new ei(e.backend).getOptions((t,n)=>{t&&typeof console==`object`&&typeof console.error==`function`&&console.error(t),Oc.call($,{...n,...e,...Sc},r)})},xr.getLanguages=function(e){if($.services.backendConnector)$.services.backendConnector.backend.getLanguages(e);else{function t(){$.off(`initialized`,t),$.services.backendConnector.backend.getLanguages(e)}$.on(`initialized`,t)}},xr.getOptions=function(e){if($.services.backendConnector)$.services.backendConnector.backend.getOptions(e);else{function t(){$.off(`initialized`,t),$.services.backendConnector.backend.getOptions(e)}$.on(`initialized`,t)}},xr.editor={setEditorLng:ta},xr})();
|
|
210
|
+
`,`consider adding the "data-locize-editor-ignore:" attribute to the element:`,e),t.warned=!0),!0}var n=e.dataset&&(e.dataset.i18nextEditorElement===`true`||e.dataset.locizeEditorIgnore===`true`);return!n&&e.parentElement?nc(e.parentElement):n}function rc(e,t){var n,r,i=function(){r&&clearTimeout(r),r=setTimeout(function(){n&&(n=!1)},200)},a=[],o=Ui(function(){t(a),a=[]},100),s=new MutationObserver(function(e){if(n){i();return}var t=!1;e.forEach(function(e){if(!(e.type===`attributes`&&!Ei.includes(e.attributeName))){var n=e.target.nodeType===3?e.target.parentElement:e.target;if(n){if(Object.keys(tc).forEach(function(e){tc[e].lastTriggerDate+6e4<Date.now()&&delete tc[e]}),e.type===`childList`){var r=0;if(nc(n)||(e.addedNodes.forEach(function(e){nc(e)||(r+=1)},0),e.removedNodes.forEach(function(e){nc(e)||(r+=1)},0)),r===0)return}if(t=!0,n.uniqueID){var i=tc[n.uniqueID]||{triggered:0};i.triggered+=1,i.lastTriggerDate=Date.now(),tc[n.uniqueID]=i}a.reduce(function(e,t){return!!(e||t.contains(n)||!n.parentElement)},!1)||(a=a.filter(function(e){return!n.contains(e)}),a.push(n))}}}),t&&o()});return{start:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{attributes:!0,childList:!0,characterData:!0,subtree:!0};t([e]),s.observe(e,n)},skipNext:function(){n=!0}}}var ic=40;function ac(e){var t=Math.max(0,window.innerHeight-ic);return Math.max(0,Math.min(e,t))}function oc(e,t){var n=t.offsetWidth||0,r=Math.min(0,ic-n),i=Math.max(0,window.innerWidth-ic);return Math.max(r,Math.min(e,i))}function sc(){for(var e=0,t=0,n=0,r=0,i=document.getElementsByClassName(`i18next-editor-popup`),a=null,o=null,s=1e5,c=0;c<i.length;c++){var l=i[c],u=m(l);l.onmousedown=function(){this.style.zIndex=``+ ++s},u&&(u.parentPopup=l,u.onmousedown=d)}function d(e){o||(o=document.getElementById(`i18next-editor-popup-overlay`)),o&&(o.style.display=`block`),ka(),a=this.parentPopup,a.style.zIndex=``+ ++s,e=e||window.event,n=e.clientX,r=e.clientY,document.onmouseup=p,document.onmousemove=f}function f(i){a&&(i=i||window.event,e=n-i.clientX,t=r-i.clientY,n=i.clientX,r=i.clientY,a.style.top=ac(a.offsetTop-t)+`px`,a.style.left=oc(a.offsetLeft-e,a)+`px`)}function p(){Oa(),o&&(o.style.display=`none`);var e=document.getElementById(`i18next-editor-popup`);window.localStorage.setItem(`locize_popup_pos`,JSON.stringify({top:parseInt(document.defaultView.getComputedStyle(e).top,10),left:parseInt(document.defaultView.getComputedStyle(e).left,10)})),document.onmouseup=null,document.onmousemove=null}function m(e){var t=e.getElementsByClassName(`i18next-editor-popup-header`);return t.length===1?t[0]:null}}function cc(){for(var e=document.getElementsByClassName(`i18next-editor-popup`),t=null,n=null,r,i,a,o,s=0;s<e.length;s++){var c=e[s],l=document.createElement(`div`);l.className=`resizer-right`,c.appendChild(l),l.addEventListener(`mousedown`,f,!1),l.parentPopup=c;var u=document.createElement(`div`);u.className=`resizer-bottom`,c.appendChild(u),u.addEventListener(`mousedown`,f,!1),u.parentPopup=c;var d=document.createElement(`div`);d.className=`resizer-both`,c.appendChild(d),d.addEventListener(`mousedown`,f,!1),d.parentPopup=c}function f(e){ka(),n||(n=document.getElementById(`i18next-editor-popup-overlay`)),n&&(n.style.display=`block`),t=this.parentPopup,r=e.clientX,i=e.clientY,a=parseInt(document.defaultView.getComputedStyle(t).width,10),o=parseInt(document.defaultView.getComputedStyle(t).height,10),document.documentElement.addEventListener(`mousemove`,p,!1),document.documentElement.addEventListener(`mouseup`,m,!1)}function p(e){t.style.width=a+e.clientX-r+`px`,t.style.height=o+e.clientY-i+`px`}function m(){Oa(),n&&(n.style.display=`none`);var e=document.getElementById(`i18next-editor-popup`);window.localStorage.setItem(`locize_popup_size`,JSON.stringify({width:parseInt(document.defaultView.getComputedStyle(e).width,10),height:parseInt(document.defaultView.getComputedStyle(e).height,10)})),document.documentElement.removeEventListener(`mousemove`,p,!1),document.documentElement.removeEventListener(`mouseup`,m,!1)}}function lc(){return{getResource:function(e,t,n){return{}},setResource:function(e,t,n,r){},getResourceBundle:function(e,t,n){n({})},getDefaultNS:function(){},getLng:function(){},getSourceLng:function(){},getLocizeDetails:function(){return{}},bindLanguageChange:function(e){},bindMissingKeyHandler:function(e){},triggerRerender:function(){}}}function uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uc(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var fc=lc();function pc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fc,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{show:!1,qsProp:`incontext`};if(typeof document>`u`)return;var n=t.show||Ji(t.qsProp||`incontext`)===`true`,r=document.getElementById(`locize`),i={};[`projectId`,`version`].forEach(function(e){if(r){var t=r.getAttribute(e.toLowerCase())||r.getAttribute(`data-`+e.toLowerCase());t===`true`&&(t=!0),t===`false`&&(t=!1),t!=null&&(i[e]=t)}}),i=dc(dc(dc({},e.getLocizeDetails()),i),t),z.config=i,z.init(e),qs(e),e?.bindLanguageChange(function(t){z.sendCurrentTargetLanguage(e.getLng())});function a(){if(!(!Xi&&!n)){var e=rc(document.body,function(e){e.forEach(function(e){ec(e)}),z.sendCurrentParsedContent()});if(e.start(),Oa(e),!Xi&&!document.getElementById(`i18next-editor-popup`)){var t=Va(ki(),function(){z.source=document.getElementById(`i18next-editor-iframe`)?.contentWindow,z.initialized=!1,z.initInterval&&(clearInterval(z.initInterval),delete z.initInterval),z.requestInitialize(i)});if(document.documentElement.append(t),sc(),cc(),typeof MutationObserver==`function`){var r=5,a=1e4,o=0,s=new MutationObserver(function(){if(!document.getElementById(`i18next-editor-popup`)){if(o>=r){s.disconnect();return}o++,document.documentElement.append(t)}});s.observe(document.documentElement,{childList:!0,subtree:!0}),setTimeout(function(){return s.disconnect()},a)}}if(typeof window<`u`){var c=window.document.location.href;z.sendHrefchanged(c);var l=window.document.querySelector(`body`);new window.MutationObserver(function(e){e.forEach(function(e){c!==window.document.location.href&&(c=window.document.location.href,z.sendHrefchanged(c))})}).observe(l,{childList:!0,subtree:!0})}}}if(document.body)return a();typeof window<`u`&&window.addEventListener(`load`,function(){a()})}function mc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mc(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gc(e){var t={getResource:function(t,n,r){return e.getResource&&e.getResource(t,n,r)},setResource:function(t,n,r,i){return e.addResource(t,n,r,i,{silent:!0})},getResourceBundle:function(t,n,r){e.loadNamespaces(n,function(){r(e.getResourceBundle(t,n))})},getDefaultNS:function(){return e.options.defaultNS},getLng:function(){return e.resolvedLanguage||e.languages&&e.languages[0]||e.options.lng},getSourceLng:function(){var t=e.options.fallbackLng;if(typeof t==`string`)return t;if(Array.isArray(t))return t[t.length-1];if(t&&t.default){if(typeof t.default==`string`)return t;if(Array.isArray(t.default))return t.default[t.default.length-1]}if(typeof t==`function`){var n=t(e.resolvedLanguage);if(typeof n==`string`)return n;if(Array.isArray(n))return n[n.length-1]}return`dev`},getLocizeDetails:function(){var n={backendName:e.services.backendConnector.backend&&e.services.backendConnector.backend.options&&e.services.backendConnector.backend.options.loadPath&&e.services.backendConnector.backend.options.loadPath.indexOf(`.locize.`)>0?`I18NextLocizeBackend`:e.services.backendConnector.backend?e.services.backendConnector.backend.constructor.name:`options.resources`,sourceLng:t.getSourceLng(),i18nFormat:e.options.compatibilityJSON===`v3`?`i18next_v3`:`i18next_v4`,i18nFramework:`i18next`,isLocizify:e.options.isLocizify,defaultNS:e.options.defaultNS,targetLngs:ya(new Set([].concat(e.options.preload,e.options.supportedLngs,[t.getLng()]))).filter(function(e){return e!==`cimode`&&e!==!1&&e!==`false`&&e!==void 0&&e!==t.getSourceLng()}),ns:ya(new Set([].concat(e.options.ns,e.options.fallbackNS,e.options.defaultNS))).filter(function(e){return e!==!1&&e!==`false`})};if(!e.options.backend&&!e.options.editor)return n;var r=e.options.editor||e.options.backend;return hc(hc({},n),{},{projectId:r.projectId,version:r.version})},bindLanguageChange:function(t){e.on(`languageChanged`,t)},bindMissingKeyHandler:function(t){e.options.missingKeyHandler=function(e,n,r,i,a,o){a||t(e,n,r,i)}},triggerRerender:function(){e.emit(`editorSaved`)}};return t}function _c(e,t){e.use(Ti),typeof t.postProcess==`string`?t.postProcess=[t.postProcess,`subliminal`]:Array.isArray(t.postProcess)?t.postProcess.push(`subliminal`):t.postProcess=`subliminal`,t.postProcessPassResolved=!0}var vc,yc=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.qsProp=e.qsProp||`incontext`,{type:`3rdParty`,init:function(t){var n=t.options;vc=t;var r=gc(t),i=e.show||Ji(e.qsProp)===`true`;(Xi||i)&&_c(vc,n),pc(r,e)}}}(),bc=[`implementation`];function xc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.implementation,n=Ka(e,bc);pc(t,Object.keys(n).length>0?n:void 0)}typeof window<`u`&&(window.locizeStartStandalone=xc);let{i18next:$}=xr,Sc={saveMissingTo:`all`},Cc={reloadOnSave:!0,bindSavedMissing:!0};$.use(ei).use(yc),$.on(`editorSaved`,()=>{xr.forceRerender()});function wc(e,t){if(typeof window>`u`)return null;t||(t=window.location.href.toLowerCase()),e=e.replace(/[\[\]]/g,`\\$&`);let n=RegExp(`[?&]`+e+`(=([^&#]*)|&|#|$)`).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g,` `)):``:null}function Tc(){if(typeof window>`u`||!window.location)return!1;let e=window.location.hostname;return e?e===`localhost`||e===`127.0.0.1`||e===`::1`||e===`0.0.0.0`||e.endsWith(`.localhost`)||e.endsWith(`.local`):!1}let Ec=!1;function Dc(e){Tc()||Ec||(Ec=!0,typeof console<`u`&&typeof console.warn==`function`&&console.warn(`locizify: reading credential "`+e+`" from URL query string on a non-local host. An attacker-crafted link can replace your locize credentials, redirecting saveMissing writes to an attacker-chosen project. Prefer configuring credentials via the <script id="locizify" apikey="..." projectid="..."> attributes instead.`))}let Oc=$.init;return $.init=(e={},t)=>{e={...Cc,...e,isLocizify:!0};let n=document.getElementById(`locizify`);if(n){let t={},r={};[`fallbackLng`,`saveMissing`,`debug`,`autorun`,`ele`,`cleanIndent`,`cleanWhitespace`,`namespace`,`namespaceFromPath`,`load`].forEach(e=>{let r=n.getAttribute(e.toLowerCase())||n.getAttribute(`data-`+e.toLowerCase());r===`true`&&(r=!0),r===`false`&&(r=!1),r!=null&&(t[e]=r)}),[`ignoreTags`,`ignoreIds`,`ignoreClasses`,`translateAttributes`,`mergeTags`,`inlineTags`,`ignoreInlineOn`,`ignoreCleanIndentFor`,`ns`].forEach(e=>{let r=n.getAttribute(e.toLowerCase())||n.getAttribute(`data-`+e.toLowerCase());r!=null&&(t[e]=r.split(`,`).map(e=>e.trim()))}),[`projectId`,`apiKey`,`referenceLng`,`version`,`allowedAddOrUpdateHost`,`autoPilot`,`cdnType`,`noCache`].forEach(e=>{let t=n.getAttribute(e.toLowerCase())||n.getAttribute(`data-`+e.toLowerCase());if(t===`true`&&(t=!0),t===`false`&&(t=!1),e.toLowerCase()===`autopilot`&&t===``&&(t=!0),t!=null&&(r[e]=t),!t){let n=e.toLowerCase();t=wc(n),t===`true`&&(t=!0),t===`false`&&(t=!1),n===`autopilot`&&t===``&&(t=!0),t!=null&&(r[e]=t,(n===`apikey`||n===`projectid`)&&Dc(n))}}),r.allowedAddOrUpdateHost&&(r.allowedAddOrUpdateHosts=[r.allowedAddOrUpdateHost],delete r.allowedAddOrUpdateHost),e={...Cc,...e,...t},e.backend={...e.backend,...r}}function r(e,n){t(e,n)}if(!e.backend.apiKey&&wc(`apikey`)&&(e.backend.apiKey=wc(`apikey`),Dc(`apikey`)),!e.backend.autoPilot||e.backend.autoPilot===`false`)return Oc.call($,{...e,...Sc},r);new ei(e.backend).getOptions((t,n)=>{t&&typeof console==`object`&&typeof console.error==`function`&&console.error(t),Oc.call($,{...n,...e,...Sc},r)})},xr.getLanguages=function(e){if($.services.backendConnector)$.services.backendConnector.backend.getLanguages(e);else{function t(){$.off(`initialized`,t),$.services.backendConnector.backend.getLanguages(e)}$.on(`initialized`,t)}},xr.getOptions=function(e){if($.services.backendConnector)$.services.backendConnector.backend.getOptions(e);else{function t(){$.off(`initialized`,t),$.services.backendConnector.backend.getOptions(e)}$.on(`initialized`,t)}},xr.editor={setEditorLng:ta},xr})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "locizify",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "main script for using locize service in frontend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"i18next-locize-backend": "10.0.0",
|
|
39
39
|
"i18nextify": "5.0.0",
|
|
40
|
-
"locize": "4.0.
|
|
40
|
+
"locize": "4.0.24"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"eslint": "9.39.2",
|