locize 3.0.5 → 3.1.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 +8 -0
- package/README.md +67 -31
- package/dist/cjs/api/handleConfirmInitialized.js +1 -0
- package/dist/cjs/api/handleRequestPopupChanges.js +8 -7
- package/dist/cjs/index.d.ts +30 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/locizePlugin.js +103 -77
- package/dist/cjs/observer.js +28 -1
- package/dist/cjs/process.js +7 -5
- package/dist/cjs/ui/elements/popup.js +3 -1
- package/dist/cjs/utils.js +11 -0
- package/dist/esm/api/handleConfirmInitialized.js +1 -0
- package/dist/esm/api/handleRequestPopupChanges.js +2 -1
- package/dist/esm/index.d.ts +30 -0
- package/dist/esm/index.js +3 -2
- package/dist/esm/locizePlugin.js +103 -78
- package/dist/esm/observer.js +28 -1
- package/dist/esm/process.js +8 -6
- package/dist/esm/ui/elements/popup.js +3 -2
- package/dist/esm/utils.js +11 -1
- package/dist/umd/locize.js +539 -472
- package/dist/umd/locize.min.js +1 -1
- package/index.d.ts +30 -0
- package/locize.js +539 -472
- package/locize.min.js +1 -1
- package/package.json +1 -1
- package/src/api/handleConfirmInitialized.js +1 -0
- package/src/api/handleRequestPopupChanges.js +2 -1
- package/src/index.js +3 -1
- package/src/locizePlugin.js +123 -85
- package/src/observer.js +48 -1
- package/src/process.js +10 -8
- package/src/ui/elements/popup.js +3 -1
- package/src/ui/utils.js +5 -5
- package/src/utils.js +12 -0
package/dist/umd/locize.js
CHANGED
|
@@ -493,15 +493,354 @@
|
|
|
493
493
|
function handler$6(payload) {
|
|
494
494
|
api.initialized = true;
|
|
495
495
|
clearInterval(api.initInterval);
|
|
496
|
+
delete api.initInterval;
|
|
496
497
|
api.sendCurrentParsedContent();
|
|
497
498
|
api.sendCurrentTargetLanguage();
|
|
498
499
|
}
|
|
499
500
|
api.addHandler('confirmInitialized', handler$6);
|
|
500
501
|
|
|
502
|
+
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
503
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
504
|
+
var data$1 = {};
|
|
505
|
+
function clean$1() {
|
|
506
|
+
Object.values(data$1).forEach(function (item) {
|
|
507
|
+
if (!document.body.contains(item.node)) {
|
|
508
|
+
resetHighlight(item.id, item.node);
|
|
509
|
+
delete data$1[item.id];
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
function save$1(id, type, node) {
|
|
514
|
+
if (!id || !type || !node) return;
|
|
515
|
+
if (!data$1[id]) {
|
|
516
|
+
data$1[id] = {
|
|
517
|
+
id: id,
|
|
518
|
+
node: node
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
data$1[id].keys = _objectSpread$6(_objectSpread$6({}, data$1[id].keys), {}, _defineProperty({}, "".concat(type), 'uninstrumented'));
|
|
522
|
+
}
|
|
523
|
+
function get$1(id) {
|
|
524
|
+
return data$1[id];
|
|
525
|
+
}
|
|
526
|
+
var uninstrumentedStore = {
|
|
527
|
+
save: save$1,
|
|
528
|
+
clean: clean$1,
|
|
529
|
+
get: get$1,
|
|
530
|
+
data: data$1
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
function isInViewport(el) {
|
|
534
|
+
var rect = el.getBoundingClientRect();
|
|
535
|
+
var windowHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
536
|
+
var windowWidth = window.innerWidth || document.documentElement.clientWidth;
|
|
537
|
+
var vertInView = rect.top <= windowHeight && rect.top + rect.height >= 0;
|
|
538
|
+
var horInView = rect.left <= windowWidth && rect.left + rect.width >= 0;
|
|
539
|
+
return vertInView && horInView;
|
|
540
|
+
}
|
|
541
|
+
function mouseDistanceFromElement(mouseEvent, element) {
|
|
542
|
+
var $n = element,
|
|
543
|
+
mX = mouseEvent.pageX,
|
|
544
|
+
mY = mouseEvent.pageY,
|
|
545
|
+
from = {
|
|
546
|
+
x: mX,
|
|
547
|
+
y: mY
|
|
548
|
+
},
|
|
549
|
+
off = $n.getBoundingClientRect(),
|
|
550
|
+
ny1 = off.top + document.documentElement.scrollTop,
|
|
551
|
+
ny2 = ny1 + $n.offsetHeight,
|
|
552
|
+
nx1 = off.left + document.documentElement.scrollLeft,
|
|
553
|
+
nx2 = nx1 + $n.offsetWidth,
|
|
554
|
+
maxX1 = Math.max(mX, nx1),
|
|
555
|
+
minX2 = Math.min(mX, nx2),
|
|
556
|
+
maxY1 = Math.max(mY, ny1),
|
|
557
|
+
minY2 = Math.min(mY, ny2),
|
|
558
|
+
intersectX = minX2 >= maxX1,
|
|
559
|
+
intersectY = minY2 >= maxY1,
|
|
560
|
+
to = {
|
|
561
|
+
x: intersectX ? mX : nx2 < mX ? nx2 : nx1,
|
|
562
|
+
y: intersectY ? mY : ny2 < mY ? ny2 : ny1
|
|
563
|
+
},
|
|
564
|
+
distX = to.x - from.x,
|
|
565
|
+
distY = to.y - from.y,
|
|
566
|
+
hypot = Math.pow(Math.pow(distX, 2) + Math.pow(distY, 2), 1 / 2);
|
|
567
|
+
return Math.floor(hypot);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
function debounce(func, wait, immediate) {
|
|
571
|
+
var timeout;
|
|
572
|
+
return function () {
|
|
573
|
+
var context = this;
|
|
574
|
+
var args = arguments;
|
|
575
|
+
var later = function later() {
|
|
576
|
+
timeout = null;
|
|
577
|
+
if (!immediate) func.apply(context, args);
|
|
578
|
+
};
|
|
579
|
+
var callNow = immediate && !timeout;
|
|
580
|
+
clearTimeout(timeout);
|
|
581
|
+
timeout = setTimeout(later, wait);
|
|
582
|
+
if (callNow) func.apply(context, args);
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
function isWindow(obj) {
|
|
586
|
+
return obj != null && obj === obj.window;
|
|
587
|
+
}
|
|
588
|
+
function getWindow$1(elem) {
|
|
589
|
+
return isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;
|
|
590
|
+
}
|
|
591
|
+
function offset$1(elem) {
|
|
592
|
+
var box = {
|
|
593
|
+
top: 0,
|
|
594
|
+
left: 0,
|
|
595
|
+
right: 0,
|
|
596
|
+
bottom: 0
|
|
597
|
+
};
|
|
598
|
+
var doc = elem && elem.ownerDocument;
|
|
599
|
+
var docElem = doc && doc.documentElement;
|
|
600
|
+
if (!docElem) return box;
|
|
601
|
+
if (_typeof(elem.getBoundingClientRect) !== ("undefined" )) {
|
|
602
|
+
box = elem.getBoundingClientRect();
|
|
603
|
+
}
|
|
604
|
+
var win = getWindow$1(doc);
|
|
605
|
+
var top = box.top + win.pageYOffset - docElem.clientTop;
|
|
606
|
+
var left = box.left + win.pageXOffset - docElem.clientLeft;
|
|
607
|
+
return {
|
|
608
|
+
top: top,
|
|
609
|
+
left: left,
|
|
610
|
+
right: left + (box.right - box.left),
|
|
611
|
+
bottom: top + (box.bottom - box.top)
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
function getClickedElement(e) {
|
|
615
|
+
if (e.srcElement && e.srcElement.nodeType === 1 && (e.srcElement.nodeName === 'BUTTON' || e.srcElement.nodeName === 'INPUT')) {
|
|
616
|
+
if (e.srcElement.getAttribute && e.srcElement.getAttribute('ignorelocizeeditor') === '') {
|
|
617
|
+
return null;
|
|
618
|
+
}
|
|
619
|
+
return e.srcElement;
|
|
620
|
+
}
|
|
621
|
+
var el;
|
|
622
|
+
if (e.originalEvent && e.originalEvent.explicitOriginalTarget) {
|
|
623
|
+
el = e.originalEvent.explicitOriginalTarget;
|
|
624
|
+
} else {
|
|
625
|
+
var parent = e.srcElement;
|
|
626
|
+
if (parent.getAttribute && parent.getAttribute('ignorelocizeeditor') === '') return null;
|
|
627
|
+
var left = e.pageX;
|
|
628
|
+
var top = e.pageY;
|
|
629
|
+
var topStartsAt = 0;
|
|
630
|
+
var topBreaksAt;
|
|
631
|
+
for (var i = 0; i < parent.childNodes.length; i++) {
|
|
632
|
+
var n = parent.childNodes[i];
|
|
633
|
+
var nOffset = offset$1(n);
|
|
634
|
+
if (n.nodeType === 1 && nOffset.bottom < top) topStartsAt = i + 1;
|
|
635
|
+
if (!topBreaksAt && nOffset.top + (n.clientHeight || 0) > top) topBreaksAt = i;
|
|
636
|
+
}
|
|
637
|
+
if (topStartsAt + 1 > parent.childNodes.length) topStartsAt = parent.childNodes.length - 1;
|
|
638
|
+
if (!topBreaksAt) topBreaksAt = parent.childNodes.length;
|
|
639
|
+
for (var y = topStartsAt; y < topBreaksAt; y++) {
|
|
640
|
+
var _n = parent.childNodes[y];
|
|
641
|
+
var _nOffset = offset$1(_n);
|
|
642
|
+
if (_nOffset.left > left) {
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
645
|
+
if (_n && _n.nodeType !== 8) el = _n;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
return el;
|
|
649
|
+
}
|
|
650
|
+
function getElementText(el) {
|
|
651
|
+
var str = el.textContent || el.text && el.text.innerText || el.placeholder;
|
|
652
|
+
if (typeof str !== 'string') return;
|
|
653
|
+
return str.replace(/\n +/g, '').trim();
|
|
654
|
+
}
|
|
655
|
+
function getAttribute(el, name) {
|
|
656
|
+
return el && el.getAttribute && el.getAttribute(name);
|
|
657
|
+
}
|
|
658
|
+
function getElementI18nKey(el) {
|
|
659
|
+
var key = getAttribute(el, 'data-i18n');
|
|
660
|
+
if (key) return key;
|
|
661
|
+
if (el.nodeType === window.Node.TEXT_NODE && el.parentElement) {
|
|
662
|
+
return getElementI18nKey(el.parentElement);
|
|
663
|
+
}
|
|
664
|
+
return undefined;
|
|
665
|
+
}
|
|
666
|
+
function getElementNamespace(el) {
|
|
667
|
+
var found;
|
|
668
|
+
var find = function find(ele) {
|
|
669
|
+
var opts = getAttribute(ele, 'i18next-options');
|
|
670
|
+
if (!opts) opts = getAttribute(ele, 'data-i18next-options');
|
|
671
|
+
if (!opts) opts = getAttribute(ele, 'i18n-options');
|
|
672
|
+
if (!opts) opts = getAttribute(ele, 'data-i18n-options');
|
|
673
|
+
if (opts) {
|
|
674
|
+
var jsonData = {};
|
|
675
|
+
try {
|
|
676
|
+
jsonData = JSON.parse(opts);
|
|
677
|
+
} catch (e) {}
|
|
678
|
+
if (jsonData.ns) found = jsonData.ns;
|
|
679
|
+
}
|
|
680
|
+
if (!found) found = getAttribute(ele, 'i18next-ns');
|
|
681
|
+
if (!found) found = getAttribute(ele, 'data-i18next-ns');
|
|
682
|
+
if (!found) found = getAttribute(ele, 'i18n-ns');
|
|
683
|
+
if (!found) found = getAttribute(ele, 'data-i18n-ns');
|
|
684
|
+
if (!found && ele.parentElement) find(ele.parentElement);
|
|
685
|
+
};
|
|
686
|
+
find(el);
|
|
687
|
+
return found;
|
|
688
|
+
}
|
|
689
|
+
function getQsParameterByName(name, url) {
|
|
690
|
+
if (typeof window === 'undefined') return null;
|
|
691
|
+
if (!url) url = window.location.href.toLowerCase();
|
|
692
|
+
name = name.replace(/[\[\]]/g, '\\$&');
|
|
693
|
+
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');
|
|
694
|
+
var results = regex.exec(url);
|
|
695
|
+
if (!results) return null;
|
|
696
|
+
if (!results[2]) return '';
|
|
697
|
+
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
var debouncedUpdateDistance = debounce(function (e, observer) {
|
|
701
|
+
Object.values(store.data).forEach(function (item) {
|
|
702
|
+
if (!isInViewport(item.node)) return;
|
|
703
|
+
var distance = mouseDistanceFromElement(e, item.node);
|
|
704
|
+
if (distance < 5) {
|
|
705
|
+
highlight(item, item.node, item.keys);
|
|
706
|
+
} else if (distance > 5) {
|
|
707
|
+
var boxDistance = item.ribbonBox ? mouseDistanceFromElement(e, item.ribbonBox) : 1000;
|
|
708
|
+
if (boxDistance > 10) resetHighlight(item, item.node, item.keys);
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
Object.values(uninstrumentedStore.data).forEach(function (item) {
|
|
712
|
+
if (!isInViewport(item.node)) return;
|
|
713
|
+
var distance = mouseDistanceFromElement(e, item.node);
|
|
714
|
+
if (distance < 10) {
|
|
715
|
+
highlightUninstrumented(item, item.node, item.keys);
|
|
716
|
+
} else if (distance > 10) {
|
|
717
|
+
resetHighlight(item, item.node, item.keys);
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
}, 50);
|
|
721
|
+
var currentFC;
|
|
722
|
+
function startMouseTracking(observer) {
|
|
723
|
+
currentFC = function handle(e) {
|
|
724
|
+
debouncedUpdateDistance(e, observer);
|
|
725
|
+
};
|
|
726
|
+
document.addEventListener('mousemove', currentFC);
|
|
727
|
+
}
|
|
728
|
+
function stopMouseTracking() {
|
|
729
|
+
document.removeEventListener('mousemove', currentFC);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
var iconEdit = '<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>';
|
|
733
|
+
var i18nextIcon = "\n<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\">\n <g stroke=\"none\" class=\"B\">\n <path d=\"M 142 31.5 v 57.2 l 64.3 165.1 s 19.6 40.3 -36.5 50.1 h -128 s -52.3 -5.5 -39.8 -46.9 L 69.5 88.7 V 31.5 z\" fill=\"#009688\"/>\n <path d=\"M 143.3 24.8 H 66.2 c -6.2 0 -11.3 -5.6 -11.3 -12.4 S 60 0 66.2 0 h 77.1 c 6.3 0 11.3 5.6 11.3 12.4 s -5.1 12.4 -11.3 12.4 z\" class=\"C\" fill=\"#004d40\"/>\n <path d=\"M 123 124.9 c 8.3 0 15 8.1 15 18.1 c 0 10 -6.8 18.1 -15 18.1 c -8.3 0 -15 -8.1 -15 -18.1 c 0 -10 6.7 -18.1 15 -18.1 z m -58.8 31.7 c 0 -8.5 5.6 -15.3 12.7 -15.3 s 12.7 6.8 12.7 15.3 s -5.6 15.3 -12.7 15.3 s -12.7 -6.8 -12.7 -15.3 z\" fill=\"white\"/>\n <path d=\"M 147.7 84.9 V 57.7 s 34.5 -7.6 51.7 32.5 c 0 0 -26.9 19.6 -51.7 -5.3 z m -84.5 0 V 57.7 s -34.5 -7.6 -51.7 32.5 c 0 0 26.8 19.6 51.7 -5.3 z\" class=\"C\" fill=\"#004d40\"/>\n <path d=\"M 168.4 197.5 c -56.1 -17.4 -103.3 -8.1 -126.3 -1 l -23.2 56 c -10.5 33.4 33.2 37.8 33.2 37.8 h 106.9 c 46.9 -7.9 30.5 -40.4 30.5 -40.4 z\" fill=\"white\"/>\n <path d=\"M 87.6 218.3 c 0 6 -8.1 10.9 -18.1 10.9 s -18.1 -4.9 -18.1 -10.9 c 0 -6.1 8.1 -10.9 18.1 -10.9 s 18.1 4.9 18.1 10.9 z m 64.4 0 c 0 6 -8.1 10.9 -18.1 10.9 c -10 0 -18.1 -4.9 -18.1 -10.9 c 0 -6.1 8.1 -10.9 18.1 -10.9 c 10 0 18.1 4.9 18.1 10.9 z\" class=\"C\" fill=\"#004d40\"/>\n </g>\n</svg>\n";
|
|
734
|
+
var locizeIcon = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 194.667 196\" height=\"196\" width=\"194.667\" xml:space=\"preserve\">\n <defs>\n <clipPath id=\"a\" clipPathUnits=\"userSpaceOnUse\">\n <path d=\"M5.5 74.048C5.5 36.98 35.551 6.93 72.619 6.93c37.069 0 67.119 30.05 67.119 67.118 0 37.07-30.05 67.12-67.119 67.12-37.068 0-67.119-30.05-67.119-67.12\"/>\n </clipPath>\n <clipPath id=\"b\" clipPathUnits=\"userSpaceOnUse\">\n <path d=\"M0 147h146V0H0Z\"/>\n </clipPath>\n <clipPath id=\"c\" clipPathUnits=\"userSpaceOnUse\">\n <path d=\"M88.756 55.055h50.982l4.512 88.195-64 1.25z\"/>\n </clipPath>\n </defs>\n <g clip-path=\"url(#a)\" transform=\"matrix(1.33333 0 0 -1.33333 0 196)\">\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-.766-5.554 1.148-8.427 0-11.107-1.149-2.681-2.49-7.469-1.341-10.724 1.149-3.255 2.872-10.34 4.404-10.533 1.532-.19-1.148 7.66.383 5.171 1.533-2.49 1.533-6.193 4.214-8.746 2.68-2.553 6.319-2.17 9.192-4.658 2.872-2.49 5.744-6.129 8.425-5.746 0 0-.192-1.914-1.532-5.17-1.34-3.255-1.532-7.084.192-9.383 1.723-2.298 3.446-5.746 4.979-7.469 1.532-1.723 2.681-10.915 2.297-15.51-.382-4.596 1.724-14.937 6.511-17.236 4.787-2.298 0 1.15-.957 4.022-.958 2.872.739 9.575 3.052 10.533 2.309.958 4.416 4.787 6.139 7.469 1.724 2.68 6.128 3.83 7.469 7.084 1.341 3.255.766 7.085 1.532 8.809.766 1.724 2.873 5.554-1.724 7.852-4.595 2.298-6.51 1.148-6.702 3.255-.192 2.107-1.341 4.404-4.595 5.361-3.256.959-6.129 2.816-9.768 3.227-3.638.412-4.404-2.461-6.319-.928-1.914 1.531-3.446 3.064-4.213 4.978-.765 1.915-3.064.766-2.871 1.915.19 1.15 3.254 4.404-.193 3.255-3.446-1.148-6.51-.765-6.319 2.298.193 3.064 4.405 4.214 6.129 4.597 1.722.383 3.063-1.723 5.17-3.065 2.106-1.34.191 1.915 1.34 4.214 1.149 2.298 5.554 2.106 6.128 5.361.575 3.255-.191 5.937 3.256 6.32 3.446.383 7.084-.191 7.468 1.533.382 1.722-4.022-.576-4.213 1.531-.192 2.106 3.829 4.978 4.978 2.872 1.149-2.106 4.022-2.298 4.405-1.531.383.765 0 2.105-1.341 5.361-1.34 3.256-2.681 2.298-3.829 5.936-1.149 3.639-3.064-.191-4.979 1.724s-4.213 5.937-4.597 2.489c-.382-3.446-.382-5.361-2.105-8.042-1.724-2.682-2.489-.575-4.022 1.149-1.532 1.723-4.979 3.447-3.83 4.978C23.362 4.979 24.511 9 26.234 7.85c1.724-1.149 4.405-1.149 4.022.767-.383 1.914 0 2.681.766 3.638.766.958 3.447 2.682 3.447-.766 0-3.447-.384-4.405 2.298-4.788 2.681-.383 5.744-.574 5.554 1.149-.193 1.724.766 1.341 0 4.214-.767 2.873-3.065 3.063-5.554 4.405-2.489 1.34-3.83 3.446-5.936 2.68s-2.299-1.531-2.49-3.638c-.192-2.107-1.341-2.873-2.107-1.915-.765.957.192 4.022-2.68 2.106-2.873-1.914-4.021-5.171-5.553-2.872-1.533 2.297 2.297 6.319-1.724 4.595-4.022-1.723-6.895-3.637-4.788-4.404 2.107-.766 4.214-2.107 2.107-2.873-2.107-.765-6.32.575-7.852-.957C4.212 7.66 0 0 0 0\" transform=\"translate(13.926 109.38)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-.766-5.554 1.148-8.427 0-11.107-1.149-2.681-2.49-7.469-1.341-10.724 1.149-3.255 2.872-10.34 4.404-10.533 1.532-.19-1.148 7.66.383 5.171 1.533-2.49 1.533-6.193 4.214-8.746 2.68-2.553 6.319-2.17 9.192-4.658 2.872-2.49 5.744-6.129 8.425-5.746 0 0-.192-1.914-1.532-5.17-1.34-3.255-1.532-7.084.192-9.383 1.723-2.298 3.446-5.746 4.979-7.469 1.532-1.723 2.681-10.915 2.297-15.51-.382-4.596 1.724-14.937 6.511-17.236 4.787-2.298 0 1.15-.957 4.022-.958 2.872.739 9.575 3.052 10.533 2.309.958 4.416 4.787 6.139 7.469 1.724 2.68 6.128 3.83 7.469 7.084 1.341 3.255.766 7.085 1.532 8.809.766 1.724 2.873 5.554-1.724 7.852-4.595 2.298-6.51 1.148-6.702 3.255-.192 2.107-1.341 4.404-4.595 5.361-3.256.959-6.129 2.816-9.768 3.227-3.638.412-4.404-2.461-6.319-.928-1.914 1.531-3.446 3.064-4.213 4.978-.765 1.915-3.064.766-2.871 1.915.19 1.15 3.254 4.404-.193 3.255-3.446-1.148-6.51-.765-6.319 2.298.193 3.064 4.405 4.214 6.129 4.597 1.722.383 3.063-1.723 5.17-3.065 2.106-1.34.191 1.915 1.34 4.214 1.149 2.298 5.554 2.106 6.128 5.361.575 3.255-.191 5.937 3.256 6.32 3.446.383 7.084-.191 7.468 1.533.382 1.722-4.022-.576-4.213 1.531-.192 2.106 3.829 4.978 4.978 2.872 1.149-2.106 4.022-2.298 4.405-1.531.383.765 0 2.105-1.341 5.361-1.34 3.256-2.681 2.298-3.829 5.936-1.149 3.639-3.064-.191-4.979 1.724s-4.213 5.937-4.597 2.489c-.382-3.446-.382-5.361-2.105-8.042-1.724-2.682-2.489-.575-4.022 1.149-1.532 1.723-4.979 3.447-3.83 4.978C23.362 4.979 24.511 9 26.234 7.85c1.724-1.149 4.405-1.149 4.022.767-.383 1.914 0 2.681.766 3.638.766.958 3.447 2.682 3.447-.766 0-3.447-.384-4.405 2.298-4.788 2.681-.383 5.744-.574 5.554 1.149-.193 1.724.766 1.341 0 4.214-.767 2.873-3.065 3.063-5.554 4.405-2.489 1.34-3.83 3.446-5.936 2.68s-2.299-1.531-2.49-3.638c-.192-2.107-1.341-2.873-2.107-1.915-.765.957.192 4.022-2.68 2.106-2.873-1.914-4.021-5.171-5.553-2.872-1.533 2.297 2.297 6.319-1.724 4.595-4.022-1.723-6.895-3.637-4.788-4.404 2.107-.766 4.214-2.107 2.107-2.873-2.107-.765-6.32.575-7.852-.957C4.212 7.66 0 0 0 0Z\" transform=\"translate(13.926 109.38)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-.01-2.141.575-3.829 2.49-1.915C4.405 0 5.553 2.298 6.895 1.341c1.34-.958 3.638-.703 4.594-.639.959.064 1.15 2.937 3.831 2.554s1.724.574 4.596 2.107c2.873 1.532 9.001 4.212 2.681 3.446-6.32-.766-6.703.958-11.108-1.914-4.403-2.873-5.36-2.873-6.509-3.639-1.149-.766-2.49 2.298-4.022 0C-.575.958.011 2.182 0 0\" transform=\"translate(36.522 130.061)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-.01-2.141.575-3.829 2.49-1.915C4.405 0 5.553 2.298 6.895 1.341c1.34-.958 3.638-.703 4.594-.639.959.064 1.15 2.937 3.831 2.554s1.724.574 4.596 2.107c2.873 1.532 9.001 4.212 2.681 3.446-6.32-.766-6.703.958-11.108-1.914-4.403-2.873-5.36-2.873-6.509-3.639-1.149-.766-2.49 2.298-4.022 0C-.575.958.011 2.182 0 0Z\" transform=\"translate(36.522 130.061)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-2.263-1.956-5.744-4.788-3.064-4.788 2.681 0 3.983 1.404 5.439-.447 1.456-1.85.88-4.723.88-6.063 0-1.341-.766-4.406 1.15-8.235 1.915-3.829 2.106-6.319 4.022-3.829 1.914 2.488 6.51 7.276 8.808 7.658 2.298.384 4.597 1.342 5.746 3.257 1.148 1.915 0 3.773 1.914 5.141 1.914 1.369 1.531 3.093 2.107 5.199C27.575 0 32.747 0 30.448 1.148c-2.297 1.15-6.51 1.916-11.49 1.341C13.979 1.915 4.213 3.638 0 0\" transform=\"translate(59.502 135.998)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-2.263-1.956-5.744-4.788-3.064-4.788 2.681 0 3.983 1.404 5.439-.447 1.456-1.85.88-4.723.88-6.063 0-1.341-.766-4.406 1.15-8.235 1.915-3.829 2.106-6.319 4.022-3.829 1.914 2.488 6.51 7.276 8.808 7.658 2.298.384 4.597 1.342 5.746 3.257 1.148 1.915 0 3.773 1.914 5.141 1.914 1.369 1.531 3.093 2.107 5.199C27.575 0 32.747 0 30.448 1.148c-2.297 1.15-6.51 1.916-11.49 1.341C13.979 1.915 4.213 3.638 0 0Z\" transform=\"translate(59.502 135.998)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-1.218-1.986-.575-2.107.766-2.49 1.34-.383-.575-2.68.957-2.872 1.532-.193 4.979-1.15 5.936 0 .959 1.148-1.531.7-3.255 1.977C2.682-2.107.865 1.41 0 0\" transform=\"translate(38.438 76.826)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-1.218-1.986-.575-2.107.766-2.49 1.34-.383-.575-2.68.957-2.872 1.532-.193 4.979-1.15 5.936 0 .959 1.148-1.531.7-3.255 1.977C2.682-2.107.865 1.41 0 0Z\" transform=\"translate(38.438 76.826)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-2.063-1.033-1.148-2.682-3.064-3.831-1.915-1.148-1.149-1.531-1.723-4.213-.575-2.68.191-4.212 1.532-2.106S2.298 1.148 0 0\" transform=\"translate(131.121 45.612)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-2.063-1.033-1.148-2.682-3.064-3.831-1.915-1.148-1.149-1.531-1.723-4.213-.575-2.68.191-4.212 1.532-2.106S2.298 1.148 0 0Z\" transform=\"translate(131.121 45.612)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-.575-.575-1.532 2.681-2.106 4.213-.575 1.532-.561 4.195 1.056 5.675C.964 11.734 0 7.469 0 5.17 0 2.873.574.575 0 0m-6.704 5.936c-1.341.766-3.828 0-6.892-.957-3.065-.958-.613 2.131.766 4.213 1.233 1.861.574-.574 3.256-.766 2.68-.192 4.213-3.256 2.87-2.49m-4.402-6.511c-.192-1.531.574-4.021-3.639-3.064-4.213.958-4.213 3.256-5.936 1.533-1.723-1.724-3.83-3.255-6.32-.575C-29.49 0-29.107.766-30.447.958c-.955.135-4.138.846-6.792.074.206.123.426.285.663.5 1.915 1.723 1.532 2.298 3.638 4.213 2.108 1.916 3.639 3.638 5.171 1.916 1.532-1.725 4.788-2.108 3.639-4.023-1.149-1.914-.383-3.063.958-1.914 1.339 1.149 3.255 1.914 1.915 3.446-1.342 1.532-2.682 5.554-.766 2.873 1.915-2.681 2.489-4.022 3.637-5.553C-17.234.958-16.085 0-15.702.958c.383.957-.192 3.063.383 3.446.574.383 0-3.255 1.723-3.446 1.723-.192 2.681 0 2.49-1.533M9.192-8.81c-.574 3.257-4.787 32.747-4.787 32.747s-11.299 7.277-13.213 5.746c-1.916-1.533-5.171-1.302-4.788.21s2.872 1.128-1.341 4.002c-4.212 2.873-4.978 5.362-8.233 1.724-3.257-3.639-4.022-6.703-5.937-7.661-1.915-.957-3.447-4.021-1.34-4.787 2.106-.765 2.298 0 4.02-1.531 1.725-1.533 4.023-1.149 4.406-.193.383.959.766 4.022.957 5.171.192 1.149 2.138 4.979 1.93 1.915-.207-3.064 2.665-3.064.75-5.17-1.914-2.106-.765-3.831-4.595-4.214-3.831-.382-4.022 1.915-6.128.766-2.107-1.148-1.915-1.915-2.681-3.063-.766-1.149-4.788-3.447-4.788-3.447s-3.255 1.149-1.724-.958c1.533-2.106 2.873-4.595 1.533-4.786-1.341-.192-4.98 1.914-4.98-.384s-.573-4.787.959-5.362c1.081-.405 1.783-1.284 2.775-1.161-.769-.332-1.468-.813-2.009-1.52-1.491-1.947-.575-5.362-3.639-6.511-3.063-1.15-3.063-2.489-3.639-4.979-.573-2.489 0-8.808.766-9.383.765-.574 2.107-5.362 5.363-4.978 3.256.383 6.702.53 7.851-.023 1.149-.551 3.063 1.171 3.638-3.233.575-4.404 1.915-4.979 2.681-7.277.766-2.297-.383-7.086 0-9.958s3.064-7.852 3.064-10.341c0-2.489 2.873-3.638 4.405-2.681 1.532.958 4.787 2.873 6.127 5.937 1.342 3.063 1.342 4.595 3.447 8.617 2.106 4.021 1.533 6.894 2.489 9.958.958 3.064 3.262 5.171 6.419 8.617 3.156 3.446 2.588 5.362 0 5.171-2.588-.191-4.314 2.297-5.654 5.361-1.338 3.065-2.87 10.724-1.721 8.235 1.149-2.491 3.446-9.384 5.744-10.533 2.298-1.149 6.512 1.953 7.469 3.083.957 1.131.574 4.385-1.916 5.726C.383-8.617 1.915-7.469 4.405-9c2.489-1.532 5.362-3.064 4.787.19\" transform=\"translate(132.845 86.592)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-.575-.575-1.532 2.681-2.106 4.213-.575 1.532-.561 4.195 1.056 5.675C.964 11.734 0 7.469 0 5.17 0 2.873.574.575 0 0Zm-6.704 5.936c-1.341.766-3.828 0-6.892-.957-3.065-.958-.613 2.131.766 4.213 1.233 1.861.574-.574 3.256-.766 2.68-.192 4.213-3.256 2.87-2.49zm-4.402-6.511c-.192-1.531.574-4.021-3.639-3.064-4.213.958-4.213 3.256-5.936 1.533-1.723-1.724-3.83-3.255-6.32-.575C-29.49 0-29.107.766-30.447.958c-.955.135-4.138.846-6.792.074.206.123.426.285.663.5 1.915 1.723 1.532 2.298 3.638 4.213 2.108 1.916 3.639 3.638 5.171 1.916 1.532-1.725 4.788-2.108 3.639-4.023-1.149-1.914-.383-3.063.958-1.914 1.339 1.149 3.255 1.914 1.915 3.446-1.342 1.532-2.682 5.554-.766 2.873 1.915-2.681 2.489-4.022 3.637-5.553C-17.234.958-16.085 0-15.702.958c.383.957-.192 3.063.383 3.446.574.383 0-3.255 1.723-3.446 1.723-.192 2.681 0 2.49-1.533zM9.192-8.81c-.574 3.257-4.787 32.747-4.787 32.747s-11.299 7.277-13.213 5.746c-1.916-1.533-5.171-1.302-4.788.21s2.872 1.128-1.341 4.002c-4.212 2.873-4.978 5.362-8.233 1.724-3.257-3.639-4.022-6.703-5.937-7.661-1.915-.957-3.447-4.021-1.34-4.787 2.106-.765 2.298 0 4.02-1.531 1.725-1.533 4.023-1.149 4.406-.193.383.959.766 4.022.957 5.171.192 1.149 2.138 4.979 1.93 1.915-.207-3.064 2.665-3.064.75-5.17-1.914-2.106-.765-3.831-4.595-4.214-3.831-.382-4.022 1.915-6.128.766-2.107-1.148-1.915-1.915-2.681-3.063-.766-1.149-4.788-3.447-4.788-3.447s-3.255 1.149-1.724-.958c1.533-2.106 2.873-4.595 1.533-4.786-1.341-.192-4.98 1.914-4.98-.384s-.573-4.787.959-5.362c1.081-.405 1.783-1.284 2.775-1.161-.769-.332-1.468-.813-2.009-1.52-1.491-1.947-.575-5.362-3.639-6.511-3.063-1.15-3.063-2.489-3.639-4.979-.573-2.489 0-8.808.766-9.383.765-.574 2.107-5.362 5.363-4.978 3.256.383 6.702.53 7.851-.023 1.149-.551 3.063 1.171 3.638-3.233.575-4.404 1.915-4.979 2.681-7.277.766-2.297-.383-7.086 0-9.958s3.064-7.852 3.064-10.341c0-2.489 2.873-3.638 4.405-2.681 1.532.958 4.787 2.873 6.127 5.937 1.342 3.063 1.342 4.595 3.447 8.617 2.106 4.021 1.533 6.894 2.489 9.958.958 3.064 3.262 5.171 6.419 8.617 3.156 3.446 2.588 5.362 0 5.171-2.588-.191-4.314 2.297-5.654 5.361-1.338 3.065-2.87 10.724-1.721 8.235 1.149-2.491 3.446-9.384 5.744-10.533 2.298-1.149 6.512 1.953 7.469 3.083.957 1.131.574 4.385-1.916 5.726C.383-8.617 1.915-7.469 4.405-9c2.489-1.532 5.362-3.064 4.787.19z\" transform=\"translate(132.845 86.592)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-1.173-.353-2.106-2.681-1.532-3.831.576-1.148-.574.576-2.106-.382-1.533-.957-3.808-3.639-1.713-3.829 2.096-.193 1.713 1.531 3.628.765 1.915-.765 4.021-.575 4.021 1.34C2.298-4.021 1.915.574 0 0\" transform=\"translate(95.886 109.955)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-1.173-.353-2.106-2.681-1.532-3.831.576-1.148-.574.576-2.106-.382-1.533-.957-3.808-3.639-1.713-3.829 2.096-.193 1.713 1.531 3.628.765 1.915-.765 4.021-.575 4.021 1.34C2.298-4.021 1.915.574 0 0Z\" transform=\"translate(95.886 109.955)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-1.154-.165-1.533-3.064.957-3.447 2.49-.383 6.947.575 5.293 2.107C4.596.191 2.682.383 0 0\" transform=\"translate(83.44 118.763)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-1.154-.165-1.533-3.064.957-3.447 2.49-.383 6.947.575 5.293 2.107C4.596.191 2.682.383 0 0Z\" transform=\"translate(83.44 118.763)\"/>\n </g>\n <g clip-path=\"url(#b)\" transform=\"matrix(1.33333 0 0 -1.33333 0 196)\">\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c0-37.068-30.05-67.119-67.119-67.119S-134.238-37.068-134.238 0c0 37.069 30.05 67.119 67.119 67.119S0 37.069 0 0Z\" transform=\"translate(139.738 74.049)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c0-36.731-29.777-66.509-66.509-66.509S-133.019-36.731-133.019 0c0 36.733 29.778 66.51 66.51 66.51C-29.777 66.51 0 36.733 0 0Z\" transform=\"translate(139.438 73.186)\"/>\n </g>\n <g clip-path=\"url(#c)\" transform=\"matrix(1.33333 0 0 -1.33333 0 196)\">\n <path style=\"fill:#fff;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-1.542-1.541-3.386-2.311-5.533-2.311-2.148 0-3.991.77-5.532 2.311s-2.313 3.387-2.313 5.533c0 2.147.772 3.963 2.313 5.45 1.541 1.486 3.384 2.23 5.532 2.23 2.147 0 3.991-.744 5.533-2.23 1.54-1.487 2.312-3.303 2.312-5.45C2.312 3.387 1.54 1.541 0 0m12.551 23.039c-4.954 4.9-10.954 7.35-18.001 7.35-7.047 0-13.047-2.45-18.002-7.35-4.955-4.898-7.432-10.817-7.432-17.754 0-4.183 2.119-11.176 6.359-20.974 4.238-9.799 8.477-18.717 12.715-26.754 4.241-8.037 6.36-11.946 6.36-11.727.66 1.211 1.568 2.863 2.724 4.955 1.157 2.092 3.194 6.029 6.112 11.809 2.917 5.781 5.477 11.094 7.678 15.935a203.312 203.312 0 0 1 6.111 15.032c1.873 5.173 2.807 9.082 2.807 11.724 0 6.937-2.477 12.856-7.431 17.754\" transform=\"translate(119.64 109.307)\"/>\n <path style=\"fill:#fff;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-1.542-1.541-3.386-2.311-5.533-2.311-2.148 0-3.991.77-5.532 2.311s-2.313 3.387-2.313 5.533c0 2.147.772 3.963 2.313 5.45 1.541 1.486 3.384 2.23 5.532 2.23 2.147 0 3.991-.744 5.533-2.23 1.54-1.487 2.312-3.303 2.312-5.45C2.312 3.387 1.54 1.541 0 0m12.551 23.039c-4.954 4.9-10.954 7.35-18.001 7.35-7.047 0-13.047-2.45-18.002-7.35-4.955-4.898-7.432-10.817-7.432-17.754 0-4.183 2.119-11.176 6.359-20.974 4.238-9.799 8.477-18.717 12.715-26.754 4.241-8.037 6.36-11.946 6.36-11.727.66 1.211 1.568 2.863 2.724 4.955 1.157 2.092 3.194 6.029 6.112 11.809 2.917 5.781 5.477 11.094 7.678 15.935a203.312 203.312 0 0 1 6.111 15.032c1.873 5.173 2.807 9.082 2.807 11.724 0 6.937-2.477 12.856-7.431 17.754\" transform=\"translate(119.64 109.307)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-1.542-1.541-3.386-2.311-5.533-2.311-2.148 0-3.991.77-5.532 2.311s-2.313 3.387-2.313 5.533c0 2.147.772 3.963 2.313 5.45 1.541 1.486 3.384 2.23 5.532 2.23 2.147 0 3.991-.744 5.533-2.23 1.54-1.487 2.312-3.303 2.312-5.45C2.312 3.387 1.54 1.541 0 0Zm12.551 23.039c-4.954 4.9-10.954 7.35-18.001 7.35-7.047 0-13.047-2.45-18.002-7.35-4.955-4.898-7.432-10.817-7.432-17.754 0-4.183 2.119-11.176 6.359-20.974 4.238-9.799 8.477-18.717 12.715-26.754 4.241-8.037 6.36-11.946 6.36-11.727.66 1.211 1.568 2.863 2.724 4.955 1.157 2.092 3.194 6.029 6.112 11.809 2.917 5.781 5.477 11.094 7.678 15.935a203.312 203.312 0 0 1 6.111 15.032c1.873 5.173 2.807 9.082 2.807 11.724 0 6.937-2.477 12.856-7.431 17.754z\" transform=\"translate(119.64 109.307)\"/>\n </g>\n</svg>\n";
|
|
735
|
+
var minimizeIcon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M6 19h12v2H6v-2z"/></svg>';
|
|
736
|
+
var editIconUrl = URL.createObjectURL(new Blob([iconEdit], {
|
|
737
|
+
type: 'image/svg+xml'
|
|
738
|
+
}));
|
|
739
|
+
var i18nextIconUrl = URL.createObjectURL(new Blob([i18nextIcon], {
|
|
740
|
+
type: 'image/svg+xml'
|
|
741
|
+
}));
|
|
742
|
+
var minimizeIconUrl = URL.createObjectURL(new Blob([minimizeIcon], {
|
|
743
|
+
type: 'image/svg+xml'
|
|
744
|
+
}));
|
|
745
|
+
var locizeIconUrl = URL.createObjectURL(new Blob([locizeIcon], {
|
|
746
|
+
type: 'image/svg+xml'
|
|
747
|
+
}));
|
|
748
|
+
function EditIcon() {
|
|
749
|
+
var image = document.createElement('img');
|
|
750
|
+
image.setAttribute('data-i18next-editor-element', 'true');
|
|
751
|
+
image.src = editIconUrl;
|
|
752
|
+
image.style.width = '15px';
|
|
753
|
+
return image;
|
|
754
|
+
}
|
|
755
|
+
function RibbonLogo() {
|
|
756
|
+
var circleSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '18px';
|
|
757
|
+
var logoSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '15px';
|
|
758
|
+
var ribbon = document.createElement('div');
|
|
759
|
+
ribbon.setAttribute('data-i18next-editor-element', 'true');
|
|
760
|
+
ribbon.style = "display: inline-flex; align-items: center; justify-content: center; width: ".concat(circleSize, "; height: ").concat(circleSize, "; box-shadow: inset 0 0 5px ").concat(colors.highlight, "; border: 2px solid ").concat(colors.highlight, "; border-radius: 50%");
|
|
761
|
+
var image = document.createElement('img');
|
|
762
|
+
image.src = i18nextIconUrl;
|
|
763
|
+
image.style.width = logoSize;
|
|
764
|
+
ribbon.appendChild(image);
|
|
765
|
+
return ribbon;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
if (sheet) {
|
|
769
|
+
sheet.insertRule("@keyframes i18next-editor-animate-top { \n from {\n top: calc(100vh + 600px); \n left: calc(100vw + 300px);\n opacity: 0;\n }\n to {\n top: var(--i18next-editor-popup-position-top);\n left: var(--i18next-editor-popup-position-left);\n opacity: 1;\n }\n }");
|
|
770
|
+
sheet.insertRule("@keyframes i18next-editor-animate-bottom { \n from {\n top: var(--i18next-editor-popup-position-top);\n left: var(--i18next-editor-popup-position-left);\n opacity: 1;\n }\n to {\n top: calc(100vh + 600px); \n left: calc(100vw + 300px);\n opacity: 0;\n }\n }");
|
|
771
|
+
sheet.insertRule(".i18next-editor-popup * { \n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */\n }");
|
|
772
|
+
sheet.insertRule(".i18next-editor-popup .resizer-right {\n width: 15px;\n height: 100%;\n background: transparent;\n position: absolute;\n right: -15px;\n bottom: 0;\n cursor: e-resize;\n }");
|
|
773
|
+
sheet.insertRule(".i18next-editor-popup .resizer-both {\n width: 15px;\n height: 15px;\n background: transparent;\n z-index: 10;\n position: absolute;\n right: -15px;\n bottom: -15px;\n cursor: se-resize;\n }");
|
|
774
|
+
sheet.insertRule(".i18next-editor-popup .resizer-bottom {\n width: 100%;\n height: 15px;\n background: transparent;\n position: absolute;\n right: 0;\n bottom: -15px;\n cursor: s-resize;\n }");
|
|
775
|
+
}
|
|
776
|
+
function Ribbon(popupEle, onMaximize) {
|
|
777
|
+
var ribbon = document.createElement('div');
|
|
778
|
+
ribbon.setAttribute('data-i18next-editor-element', 'true');
|
|
779
|
+
ribbon.style = "\n cursor: pointer;\n position: fixed;\n bottom: 25px;\n right: 25px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n height: 50px;\n background-color: rgba(249, 249, 249, 0.2);\n backdrop-filter: blur(3px);\n box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);\n border-radius: 50%\n ";
|
|
780
|
+
ribbon.onclick = function () {
|
|
781
|
+
onMaximize();
|
|
782
|
+
};
|
|
783
|
+
var image = document.createElement('img');
|
|
784
|
+
image.src = locizeIconUrl;
|
|
785
|
+
image.style.width = '45px';
|
|
786
|
+
ribbon.appendChild(image);
|
|
787
|
+
return ribbon;
|
|
788
|
+
}
|
|
789
|
+
function Minimize(popupEle, onMinimize) {
|
|
790
|
+
var image = document.createElement('img');
|
|
791
|
+
image.setAttribute('data-i18next-editor-element', 'true');
|
|
792
|
+
image.src = minimizeIconUrl;
|
|
793
|
+
image.style.width = '24px';
|
|
794
|
+
image.style.cursor = 'pointer';
|
|
795
|
+
image.onclick = function () {
|
|
796
|
+
popupEle.style.setProperty('--i18next-editor-popup-position-top', popupEle.style.top);
|
|
797
|
+
popupEle.style.setProperty('--i18next-editor-popup-position-left', popupEle.style.left);
|
|
798
|
+
popupEle.style.animation = 'i18next-editor-animate-bottom 2s forwards';
|
|
799
|
+
onMinimize();
|
|
800
|
+
};
|
|
801
|
+
return image;
|
|
802
|
+
}
|
|
803
|
+
var popupId = 'i18next-editor-popup';
|
|
804
|
+
function Popup(url, cb) {
|
|
805
|
+
var popup = document.createElement('div');
|
|
806
|
+
popup.setAttribute('id', popupId);
|
|
807
|
+
popup.classList.add('i18next-editor-popup');
|
|
808
|
+
popup.style = "\n z-index: 9;\n background-color: transparent;\n border: 1px solid rgba(200, 200, 200, 0.9);\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n --i18next-editor-popup-height: 200px;\n height: var(--i18next-editor-popup-height);\n min-height: 150px;\n min-width: 300px;\n --i18next-editor-popup-width: 400px;\n width: var(--i18next-editor-popup-width);\n max-height: 600px;\n max-width: 800px;\n\n position: fixed;\n --i18next-editor-popup-position-top: calc(100vh - var(--i18next-editor-popup-height) - 10px);\n top: calc(100vh - var(--i18next-editor-popup-height) - 10px);\n --i18next-editor-popup-position-left: calc(100vw - var(--i18next-editor-popup-width) - 10px);\n left: calc(100vw - var(--i18next-editor-popup-width) - 10px);\n\n overflow: visible;\n ";
|
|
809
|
+
popup.setAttribute('data-i18next-editor-element', 'true');
|
|
810
|
+
var header = document.createElement('div');
|
|
811
|
+
header.classList.add('i18next-editor-popup-header');
|
|
812
|
+
header.style = "\n padding: 2px 10px;\n cursor: move;\n z-index: 10;\n backdrop-filter: blur(3px);\n background-color: rgba(200, 200, 200, 0.5);\n background: linear-gradient(0deg, rgba(200, 200, 200, 0.6), rgba(200, 200, 200, 0.5));\n color: #fff;\n text-align: right;\n ";
|
|
813
|
+
popup.appendChild(header);
|
|
814
|
+
header.appendChild(Minimize(popup, function () {
|
|
815
|
+
var ribbon = Ribbon(popup, function () {
|
|
816
|
+
popup.style.animation = 'i18next-editor-animate-top 1s';
|
|
817
|
+
startMouseTracking();
|
|
818
|
+
setTimeout(function () {
|
|
819
|
+
document.body.removeChild(ribbon);
|
|
820
|
+
}, 1000);
|
|
821
|
+
});
|
|
822
|
+
document.body.appendChild(ribbon);
|
|
823
|
+
stopMouseTracking();
|
|
824
|
+
}));
|
|
825
|
+
var iframe = document.createElement('iframe');
|
|
826
|
+
iframe.setAttribute('id', 'i18next-editor-iframe');
|
|
827
|
+
iframe.setAttribute('data-i18next-editor-element', 'true');
|
|
828
|
+
iframe.style = "\n z-index: 100;\n width: 100%;\n height: calc(100% - 28px);\n border: none;\n background: #fff;\n ";
|
|
829
|
+
iframe.setAttribute('src', url);
|
|
830
|
+
iframe.addEventListener('load', cb);
|
|
831
|
+
popup.appendChild(iframe);
|
|
832
|
+
var overlay = document.createElement('div');
|
|
833
|
+
overlay.setAttribute('id', 'i18next-editor-popup-overlay');
|
|
834
|
+
overlay.setAttribute('data-i18next-editor-element', 'true');
|
|
835
|
+
overlay.style = "\n display: none;\n position: absolute;\n top: 32px;\n z-index: 101;\n width: 100%;\n height: calc(100% - 32px);\n background-color: rgba(200, 200, 200, 0.5);\n background: linear-gradient(0deg, rgba(240, 240, 240, 0.6), rgba(255, 255, 255, 0.5));\n backdrop-filter: blur(2px);\n";
|
|
836
|
+
popup.appendChild(overlay);
|
|
837
|
+
return popup;
|
|
838
|
+
}
|
|
839
|
+
|
|
501
840
|
function handler$5(payload) {
|
|
502
841
|
var containerStyle = payload.containerStyle;
|
|
503
842
|
if (containerStyle) {
|
|
504
|
-
var popup = document.getElementById(
|
|
843
|
+
var popup = document.getElementById(popupId);
|
|
505
844
|
if (containerStyle.height) {
|
|
506
845
|
var diff = "calc(".concat(containerStyle.height, " - ").concat(popup.style.height, ")");
|
|
507
846
|
popup.style.setProperty('top', "calc(".concat(popup.style.top, " - ").concat(diff, ")"));
|
|
@@ -546,14 +885,14 @@
|
|
|
546
885
|
}
|
|
547
886
|
|
|
548
887
|
var _excluded = ["lng", "ns"];
|
|
549
|
-
function ownKeys$
|
|
550
|
-
function _objectSpread$
|
|
888
|
+
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
889
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
551
890
|
function handler$4(payload) {
|
|
552
891
|
var lng = payload.lng,
|
|
553
892
|
ns = payload.ns,
|
|
554
893
|
rest = _objectWithoutProperties(payload, _excluded);
|
|
555
894
|
api.i18n.getResourceBundle(lng, ns, function (resources) {
|
|
556
|
-
api.confirmResourceBundle(_objectSpread$
|
|
895
|
+
api.confirmResourceBundle(_objectSpread$5({
|
|
557
896
|
resources: resources,
|
|
558
897
|
lng: lng,
|
|
559
898
|
ns: ns
|
|
@@ -602,42 +941,6 @@
|
|
|
602
941
|
}
|
|
603
942
|
api.addHandler('turnOff', handler);
|
|
604
943
|
|
|
605
|
-
var iconEdit = '<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>';
|
|
606
|
-
var i18nextIcon = "\n<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\">\n <g stroke=\"none\" class=\"B\">\n <path d=\"M 142 31.5 v 57.2 l 64.3 165.1 s 19.6 40.3 -36.5 50.1 h -128 s -52.3 -5.5 -39.8 -46.9 L 69.5 88.7 V 31.5 z\" fill=\"#009688\"/>\n <path d=\"M 143.3 24.8 H 66.2 c -6.2 0 -11.3 -5.6 -11.3 -12.4 S 60 0 66.2 0 h 77.1 c 6.3 0 11.3 5.6 11.3 12.4 s -5.1 12.4 -11.3 12.4 z\" class=\"C\" fill=\"#004d40\"/>\n <path d=\"M 123 124.9 c 8.3 0 15 8.1 15 18.1 c 0 10 -6.8 18.1 -15 18.1 c -8.3 0 -15 -8.1 -15 -18.1 c 0 -10 6.7 -18.1 15 -18.1 z m -58.8 31.7 c 0 -8.5 5.6 -15.3 12.7 -15.3 s 12.7 6.8 12.7 15.3 s -5.6 15.3 -12.7 15.3 s -12.7 -6.8 -12.7 -15.3 z\" fill=\"white\"/>\n <path d=\"M 147.7 84.9 V 57.7 s 34.5 -7.6 51.7 32.5 c 0 0 -26.9 19.6 -51.7 -5.3 z m -84.5 0 V 57.7 s -34.5 -7.6 -51.7 32.5 c 0 0 26.8 19.6 51.7 -5.3 z\" class=\"C\" fill=\"#004d40\"/>\n <path d=\"M 168.4 197.5 c -56.1 -17.4 -103.3 -8.1 -126.3 -1 l -23.2 56 c -10.5 33.4 33.2 37.8 33.2 37.8 h 106.9 c 46.9 -7.9 30.5 -40.4 30.5 -40.4 z\" fill=\"white\"/>\n <path d=\"M 87.6 218.3 c 0 6 -8.1 10.9 -18.1 10.9 s -18.1 -4.9 -18.1 -10.9 c 0 -6.1 8.1 -10.9 18.1 -10.9 s 18.1 4.9 18.1 10.9 z m 64.4 0 c 0 6 -8.1 10.9 -18.1 10.9 c -10 0 -18.1 -4.9 -18.1 -10.9 c 0 -6.1 8.1 -10.9 18.1 -10.9 c 10 0 18.1 4.9 18.1 10.9 z\" class=\"C\" fill=\"#004d40\"/>\n </g>\n</svg>\n";
|
|
607
|
-
var locizeIcon = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 194.667 196\" height=\"196\" width=\"194.667\" xml:space=\"preserve\">\n <defs>\n <clipPath id=\"a\" clipPathUnits=\"userSpaceOnUse\">\n <path d=\"M5.5 74.048C5.5 36.98 35.551 6.93 72.619 6.93c37.069 0 67.119 30.05 67.119 67.118 0 37.07-30.05 67.12-67.119 67.12-37.068 0-67.119-30.05-67.119-67.12\"/>\n </clipPath>\n <clipPath id=\"b\" clipPathUnits=\"userSpaceOnUse\">\n <path d=\"M0 147h146V0H0Z\"/>\n </clipPath>\n <clipPath id=\"c\" clipPathUnits=\"userSpaceOnUse\">\n <path d=\"M88.756 55.055h50.982l4.512 88.195-64 1.25z\"/>\n </clipPath>\n </defs>\n <g clip-path=\"url(#a)\" transform=\"matrix(1.33333 0 0 -1.33333 0 196)\">\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-.766-5.554 1.148-8.427 0-11.107-1.149-2.681-2.49-7.469-1.341-10.724 1.149-3.255 2.872-10.34 4.404-10.533 1.532-.19-1.148 7.66.383 5.171 1.533-2.49 1.533-6.193 4.214-8.746 2.68-2.553 6.319-2.17 9.192-4.658 2.872-2.49 5.744-6.129 8.425-5.746 0 0-.192-1.914-1.532-5.17-1.34-3.255-1.532-7.084.192-9.383 1.723-2.298 3.446-5.746 4.979-7.469 1.532-1.723 2.681-10.915 2.297-15.51-.382-4.596 1.724-14.937 6.511-17.236 4.787-2.298 0 1.15-.957 4.022-.958 2.872.739 9.575 3.052 10.533 2.309.958 4.416 4.787 6.139 7.469 1.724 2.68 6.128 3.83 7.469 7.084 1.341 3.255.766 7.085 1.532 8.809.766 1.724 2.873 5.554-1.724 7.852-4.595 2.298-6.51 1.148-6.702 3.255-.192 2.107-1.341 4.404-4.595 5.361-3.256.959-6.129 2.816-9.768 3.227-3.638.412-4.404-2.461-6.319-.928-1.914 1.531-3.446 3.064-4.213 4.978-.765 1.915-3.064.766-2.871 1.915.19 1.15 3.254 4.404-.193 3.255-3.446-1.148-6.51-.765-6.319 2.298.193 3.064 4.405 4.214 6.129 4.597 1.722.383 3.063-1.723 5.17-3.065 2.106-1.34.191 1.915 1.34 4.214 1.149 2.298 5.554 2.106 6.128 5.361.575 3.255-.191 5.937 3.256 6.32 3.446.383 7.084-.191 7.468 1.533.382 1.722-4.022-.576-4.213 1.531-.192 2.106 3.829 4.978 4.978 2.872 1.149-2.106 4.022-2.298 4.405-1.531.383.765 0 2.105-1.341 5.361-1.34 3.256-2.681 2.298-3.829 5.936-1.149 3.639-3.064-.191-4.979 1.724s-4.213 5.937-4.597 2.489c-.382-3.446-.382-5.361-2.105-8.042-1.724-2.682-2.489-.575-4.022 1.149-1.532 1.723-4.979 3.447-3.83 4.978C23.362 4.979 24.511 9 26.234 7.85c1.724-1.149 4.405-1.149 4.022.767-.383 1.914 0 2.681.766 3.638.766.958 3.447 2.682 3.447-.766 0-3.447-.384-4.405 2.298-4.788 2.681-.383 5.744-.574 5.554 1.149-.193 1.724.766 1.341 0 4.214-.767 2.873-3.065 3.063-5.554 4.405-2.489 1.34-3.83 3.446-5.936 2.68s-2.299-1.531-2.49-3.638c-.192-2.107-1.341-2.873-2.107-1.915-.765.957.192 4.022-2.68 2.106-2.873-1.914-4.021-5.171-5.553-2.872-1.533 2.297 2.297 6.319-1.724 4.595-4.022-1.723-6.895-3.637-4.788-4.404 2.107-.766 4.214-2.107 2.107-2.873-2.107-.765-6.32.575-7.852-.957C4.212 7.66 0 0 0 0\" transform=\"translate(13.926 109.38)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-.766-5.554 1.148-8.427 0-11.107-1.149-2.681-2.49-7.469-1.341-10.724 1.149-3.255 2.872-10.34 4.404-10.533 1.532-.19-1.148 7.66.383 5.171 1.533-2.49 1.533-6.193 4.214-8.746 2.68-2.553 6.319-2.17 9.192-4.658 2.872-2.49 5.744-6.129 8.425-5.746 0 0-.192-1.914-1.532-5.17-1.34-3.255-1.532-7.084.192-9.383 1.723-2.298 3.446-5.746 4.979-7.469 1.532-1.723 2.681-10.915 2.297-15.51-.382-4.596 1.724-14.937 6.511-17.236 4.787-2.298 0 1.15-.957 4.022-.958 2.872.739 9.575 3.052 10.533 2.309.958 4.416 4.787 6.139 7.469 1.724 2.68 6.128 3.83 7.469 7.084 1.341 3.255.766 7.085 1.532 8.809.766 1.724 2.873 5.554-1.724 7.852-4.595 2.298-6.51 1.148-6.702 3.255-.192 2.107-1.341 4.404-4.595 5.361-3.256.959-6.129 2.816-9.768 3.227-3.638.412-4.404-2.461-6.319-.928-1.914 1.531-3.446 3.064-4.213 4.978-.765 1.915-3.064.766-2.871 1.915.19 1.15 3.254 4.404-.193 3.255-3.446-1.148-6.51-.765-6.319 2.298.193 3.064 4.405 4.214 6.129 4.597 1.722.383 3.063-1.723 5.17-3.065 2.106-1.34.191 1.915 1.34 4.214 1.149 2.298 5.554 2.106 6.128 5.361.575 3.255-.191 5.937 3.256 6.32 3.446.383 7.084-.191 7.468 1.533.382 1.722-4.022-.576-4.213 1.531-.192 2.106 3.829 4.978 4.978 2.872 1.149-2.106 4.022-2.298 4.405-1.531.383.765 0 2.105-1.341 5.361-1.34 3.256-2.681 2.298-3.829 5.936-1.149 3.639-3.064-.191-4.979 1.724s-4.213 5.937-4.597 2.489c-.382-3.446-.382-5.361-2.105-8.042-1.724-2.682-2.489-.575-4.022 1.149-1.532 1.723-4.979 3.447-3.83 4.978C23.362 4.979 24.511 9 26.234 7.85c1.724-1.149 4.405-1.149 4.022.767-.383 1.914 0 2.681.766 3.638.766.958 3.447 2.682 3.447-.766 0-3.447-.384-4.405 2.298-4.788 2.681-.383 5.744-.574 5.554 1.149-.193 1.724.766 1.341 0 4.214-.767 2.873-3.065 3.063-5.554 4.405-2.489 1.34-3.83 3.446-5.936 2.68s-2.299-1.531-2.49-3.638c-.192-2.107-1.341-2.873-2.107-1.915-.765.957.192 4.022-2.68 2.106-2.873-1.914-4.021-5.171-5.553-2.872-1.533 2.297 2.297 6.319-1.724 4.595-4.022-1.723-6.895-3.637-4.788-4.404 2.107-.766 4.214-2.107 2.107-2.873-2.107-.765-6.32.575-7.852-.957C4.212 7.66 0 0 0 0Z\" transform=\"translate(13.926 109.38)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-.01-2.141.575-3.829 2.49-1.915C4.405 0 5.553 2.298 6.895 1.341c1.34-.958 3.638-.703 4.594-.639.959.064 1.15 2.937 3.831 2.554s1.724.574 4.596 2.107c2.873 1.532 9.001 4.212 2.681 3.446-6.32-.766-6.703.958-11.108-1.914-4.403-2.873-5.36-2.873-6.509-3.639-1.149-.766-2.49 2.298-4.022 0C-.575.958.011 2.182 0 0\" transform=\"translate(36.522 130.061)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-.01-2.141.575-3.829 2.49-1.915C4.405 0 5.553 2.298 6.895 1.341c1.34-.958 3.638-.703 4.594-.639.959.064 1.15 2.937 3.831 2.554s1.724.574 4.596 2.107c2.873 1.532 9.001 4.212 2.681 3.446-6.32-.766-6.703.958-11.108-1.914-4.403-2.873-5.36-2.873-6.509-3.639-1.149-.766-2.49 2.298-4.022 0C-.575.958.011 2.182 0 0Z\" transform=\"translate(36.522 130.061)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-2.263-1.956-5.744-4.788-3.064-4.788 2.681 0 3.983 1.404 5.439-.447 1.456-1.85.88-4.723.88-6.063 0-1.341-.766-4.406 1.15-8.235 1.915-3.829 2.106-6.319 4.022-3.829 1.914 2.488 6.51 7.276 8.808 7.658 2.298.384 4.597 1.342 5.746 3.257 1.148 1.915 0 3.773 1.914 5.141 1.914 1.369 1.531 3.093 2.107 5.199C27.575 0 32.747 0 30.448 1.148c-2.297 1.15-6.51 1.916-11.49 1.341C13.979 1.915 4.213 3.638 0 0\" transform=\"translate(59.502 135.998)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-2.263-1.956-5.744-4.788-3.064-4.788 2.681 0 3.983 1.404 5.439-.447 1.456-1.85.88-4.723.88-6.063 0-1.341-.766-4.406 1.15-8.235 1.915-3.829 2.106-6.319 4.022-3.829 1.914 2.488 6.51 7.276 8.808 7.658 2.298.384 4.597 1.342 5.746 3.257 1.148 1.915 0 3.773 1.914 5.141 1.914 1.369 1.531 3.093 2.107 5.199C27.575 0 32.747 0 30.448 1.148c-2.297 1.15-6.51 1.916-11.49 1.341C13.979 1.915 4.213 3.638 0 0Z\" transform=\"translate(59.502 135.998)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-1.218-1.986-.575-2.107.766-2.49 1.34-.383-.575-2.68.957-2.872 1.532-.193 4.979-1.15 5.936 0 .959 1.148-1.531.7-3.255 1.977C2.682-2.107.865 1.41 0 0\" transform=\"translate(38.438 76.826)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-1.218-1.986-.575-2.107.766-2.49 1.34-.383-.575-2.68.957-2.872 1.532-.193 4.979-1.15 5.936 0 .959 1.148-1.531.7-3.255 1.977C2.682-2.107.865 1.41 0 0Z\" transform=\"translate(38.438 76.826)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-2.063-1.033-1.148-2.682-3.064-3.831-1.915-1.148-1.149-1.531-1.723-4.213-.575-2.68.191-4.212 1.532-2.106S2.298 1.148 0 0\" transform=\"translate(131.121 45.612)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-2.063-1.033-1.148-2.682-3.064-3.831-1.915-1.148-1.149-1.531-1.723-4.213-.575-2.68.191-4.212 1.532-2.106S2.298 1.148 0 0Z\" transform=\"translate(131.121 45.612)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-.575-.575-1.532 2.681-2.106 4.213-.575 1.532-.561 4.195 1.056 5.675C.964 11.734 0 7.469 0 5.17 0 2.873.574.575 0 0m-6.704 5.936c-1.341.766-3.828 0-6.892-.957-3.065-.958-.613 2.131.766 4.213 1.233 1.861.574-.574 3.256-.766 2.68-.192 4.213-3.256 2.87-2.49m-4.402-6.511c-.192-1.531.574-4.021-3.639-3.064-4.213.958-4.213 3.256-5.936 1.533-1.723-1.724-3.83-3.255-6.32-.575C-29.49 0-29.107.766-30.447.958c-.955.135-4.138.846-6.792.074.206.123.426.285.663.5 1.915 1.723 1.532 2.298 3.638 4.213 2.108 1.916 3.639 3.638 5.171 1.916 1.532-1.725 4.788-2.108 3.639-4.023-1.149-1.914-.383-3.063.958-1.914 1.339 1.149 3.255 1.914 1.915 3.446-1.342 1.532-2.682 5.554-.766 2.873 1.915-2.681 2.489-4.022 3.637-5.553C-17.234.958-16.085 0-15.702.958c.383.957-.192 3.063.383 3.446.574.383 0-3.255 1.723-3.446 1.723-.192 2.681 0 2.49-1.533M9.192-8.81c-.574 3.257-4.787 32.747-4.787 32.747s-11.299 7.277-13.213 5.746c-1.916-1.533-5.171-1.302-4.788.21s2.872 1.128-1.341 4.002c-4.212 2.873-4.978 5.362-8.233 1.724-3.257-3.639-4.022-6.703-5.937-7.661-1.915-.957-3.447-4.021-1.34-4.787 2.106-.765 2.298 0 4.02-1.531 1.725-1.533 4.023-1.149 4.406-.193.383.959.766 4.022.957 5.171.192 1.149 2.138 4.979 1.93 1.915-.207-3.064 2.665-3.064.75-5.17-1.914-2.106-.765-3.831-4.595-4.214-3.831-.382-4.022 1.915-6.128.766-2.107-1.148-1.915-1.915-2.681-3.063-.766-1.149-4.788-3.447-4.788-3.447s-3.255 1.149-1.724-.958c1.533-2.106 2.873-4.595 1.533-4.786-1.341-.192-4.98 1.914-4.98-.384s-.573-4.787.959-5.362c1.081-.405 1.783-1.284 2.775-1.161-.769-.332-1.468-.813-2.009-1.52-1.491-1.947-.575-5.362-3.639-6.511-3.063-1.15-3.063-2.489-3.639-4.979-.573-2.489 0-8.808.766-9.383.765-.574 2.107-5.362 5.363-4.978 3.256.383 6.702.53 7.851-.023 1.149-.551 3.063 1.171 3.638-3.233.575-4.404 1.915-4.979 2.681-7.277.766-2.297-.383-7.086 0-9.958s3.064-7.852 3.064-10.341c0-2.489 2.873-3.638 4.405-2.681 1.532.958 4.787 2.873 6.127 5.937 1.342 3.063 1.342 4.595 3.447 8.617 2.106 4.021 1.533 6.894 2.489 9.958.958 3.064 3.262 5.171 6.419 8.617 3.156 3.446 2.588 5.362 0 5.171-2.588-.191-4.314 2.297-5.654 5.361-1.338 3.065-2.87 10.724-1.721 8.235 1.149-2.491 3.446-9.384 5.744-10.533 2.298-1.149 6.512 1.953 7.469 3.083.957 1.131.574 4.385-1.916 5.726C.383-8.617 1.915-7.469 4.405-9c2.489-1.532 5.362-3.064 4.787.19\" transform=\"translate(132.845 86.592)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-.575-.575-1.532 2.681-2.106 4.213-.575 1.532-.561 4.195 1.056 5.675C.964 11.734 0 7.469 0 5.17 0 2.873.574.575 0 0Zm-6.704 5.936c-1.341.766-3.828 0-6.892-.957-3.065-.958-.613 2.131.766 4.213 1.233 1.861.574-.574 3.256-.766 2.68-.192 4.213-3.256 2.87-2.49zm-4.402-6.511c-.192-1.531.574-4.021-3.639-3.064-4.213.958-4.213 3.256-5.936 1.533-1.723-1.724-3.83-3.255-6.32-.575C-29.49 0-29.107.766-30.447.958c-.955.135-4.138.846-6.792.074.206.123.426.285.663.5 1.915 1.723 1.532 2.298 3.638 4.213 2.108 1.916 3.639 3.638 5.171 1.916 1.532-1.725 4.788-2.108 3.639-4.023-1.149-1.914-.383-3.063.958-1.914 1.339 1.149 3.255 1.914 1.915 3.446-1.342 1.532-2.682 5.554-.766 2.873 1.915-2.681 2.489-4.022 3.637-5.553C-17.234.958-16.085 0-15.702.958c.383.957-.192 3.063.383 3.446.574.383 0-3.255 1.723-3.446 1.723-.192 2.681 0 2.49-1.533zM9.192-8.81c-.574 3.257-4.787 32.747-4.787 32.747s-11.299 7.277-13.213 5.746c-1.916-1.533-5.171-1.302-4.788.21s2.872 1.128-1.341 4.002c-4.212 2.873-4.978 5.362-8.233 1.724-3.257-3.639-4.022-6.703-5.937-7.661-1.915-.957-3.447-4.021-1.34-4.787 2.106-.765 2.298 0 4.02-1.531 1.725-1.533 4.023-1.149 4.406-.193.383.959.766 4.022.957 5.171.192 1.149 2.138 4.979 1.93 1.915-.207-3.064 2.665-3.064.75-5.17-1.914-2.106-.765-3.831-4.595-4.214-3.831-.382-4.022 1.915-6.128.766-2.107-1.148-1.915-1.915-2.681-3.063-.766-1.149-4.788-3.447-4.788-3.447s-3.255 1.149-1.724-.958c1.533-2.106 2.873-4.595 1.533-4.786-1.341-.192-4.98 1.914-4.98-.384s-.573-4.787.959-5.362c1.081-.405 1.783-1.284 2.775-1.161-.769-.332-1.468-.813-2.009-1.52-1.491-1.947-.575-5.362-3.639-6.511-3.063-1.15-3.063-2.489-3.639-4.979-.573-2.489 0-8.808.766-9.383.765-.574 2.107-5.362 5.363-4.978 3.256.383 6.702.53 7.851-.023 1.149-.551 3.063 1.171 3.638-3.233.575-4.404 1.915-4.979 2.681-7.277.766-2.297-.383-7.086 0-9.958s3.064-7.852 3.064-10.341c0-2.489 2.873-3.638 4.405-2.681 1.532.958 4.787 2.873 6.127 5.937 1.342 3.063 1.342 4.595 3.447 8.617 2.106 4.021 1.533 6.894 2.489 9.958.958 3.064 3.262 5.171 6.419 8.617 3.156 3.446 2.588 5.362 0 5.171-2.588-.191-4.314 2.297-5.654 5.361-1.338 3.065-2.87 10.724-1.721 8.235 1.149-2.491 3.446-9.384 5.744-10.533 2.298-1.149 6.512 1.953 7.469 3.083.957 1.131.574 4.385-1.916 5.726C.383-8.617 1.915-7.469 4.405-9c2.489-1.532 5.362-3.064 4.787.19z\" transform=\"translate(132.845 86.592)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-1.173-.353-2.106-2.681-1.532-3.831.576-1.148-.574.576-2.106-.382-1.533-.957-3.808-3.639-1.713-3.829 2.096-.193 1.713 1.531 3.628.765 1.915-.765 4.021-.575 4.021 1.34C2.298-4.021 1.915.574 0 0\" transform=\"translate(95.886 109.955)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-1.173-.353-2.106-2.681-1.532-3.831.576-1.148-.574.576-2.106-.382-1.533-.957-3.808-3.639-1.713-3.829 2.096-.193 1.713 1.531 3.628.765 1.915-.765 4.021-.575 4.021 1.34C2.298-4.021 1.915.574 0 0Z\" transform=\"translate(95.886 109.955)\"/>\n <path style=\"fill:#2196f3;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-1.154-.165-1.533-3.064.957-3.447 2.49-.383 6.947.575 5.293 2.107C4.596.191 2.682.383 0 0\" transform=\"translate(83.44 118.763)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-1.154-.165-1.533-3.064.957-3.447 2.49-.383 6.947.575 5.293 2.107C4.596.191 2.682.383 0 0Z\" transform=\"translate(83.44 118.763)\"/>\n </g>\n <g clip-path=\"url(#b)\" transform=\"matrix(1.33333 0 0 -1.33333 0 196)\">\n <path style=\"fill:none;stroke:#2196f3;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c0-37.068-30.05-67.119-67.119-67.119S-134.238-37.068-134.238 0c0 37.069 30.05 67.119 67.119 67.119S0 37.069 0 0Z\" transform=\"translate(139.738 74.049)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c0-36.731-29.777-66.509-66.509-66.509S-133.019-36.731-133.019 0c0 36.733 29.778 66.51 66.51 66.51C-29.777 66.51 0 36.733 0 0Z\" transform=\"translate(139.438 73.186)\"/>\n </g>\n <g clip-path=\"url(#c)\" transform=\"matrix(1.33333 0 0 -1.33333 0 196)\">\n <path style=\"fill:#fff;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-1.542-1.541-3.386-2.311-5.533-2.311-2.148 0-3.991.77-5.532 2.311s-2.313 3.387-2.313 5.533c0 2.147.772 3.963 2.313 5.45 1.541 1.486 3.384 2.23 5.532 2.23 2.147 0 3.991-.744 5.533-2.23 1.54-1.487 2.312-3.303 2.312-5.45C2.312 3.387 1.54 1.541 0 0m12.551 23.039c-4.954 4.9-10.954 7.35-18.001 7.35-7.047 0-13.047-2.45-18.002-7.35-4.955-4.898-7.432-10.817-7.432-17.754 0-4.183 2.119-11.176 6.359-20.974 4.238-9.799 8.477-18.717 12.715-26.754 4.241-8.037 6.36-11.946 6.36-11.727.66 1.211 1.568 2.863 2.724 4.955 1.157 2.092 3.194 6.029 6.112 11.809 2.917 5.781 5.477 11.094 7.678 15.935a203.312 203.312 0 0 1 6.111 15.032c1.873 5.173 2.807 9.082 2.807 11.724 0 6.937-2.477 12.856-7.431 17.754\" transform=\"translate(119.64 109.307)\"/>\n <path style=\"fill:#fff;fill-opacity:1;fill-rule:nonzero;stroke:none\" d=\"M0 0c-1.542-1.541-3.386-2.311-5.533-2.311-2.148 0-3.991.77-5.532 2.311s-2.313 3.387-2.313 5.533c0 2.147.772 3.963 2.313 5.45 1.541 1.486 3.384 2.23 5.532 2.23 2.147 0 3.991-.744 5.533-2.23 1.54-1.487 2.312-3.303 2.312-5.45C2.312 3.387 1.54 1.541 0 0m12.551 23.039c-4.954 4.9-10.954 7.35-18.001 7.35-7.047 0-13.047-2.45-18.002-7.35-4.955-4.898-7.432-10.817-7.432-17.754 0-4.183 2.119-11.176 6.359-20.974 4.238-9.799 8.477-18.717 12.715-26.754 4.241-8.037 6.36-11.946 6.36-11.727.66 1.211 1.568 2.863 2.724 4.955 1.157 2.092 3.194 6.029 6.112 11.809 2.917 5.781 5.477 11.094 7.678 15.935a203.312 203.312 0 0 1 6.111 15.032c1.873 5.173 2.807 9.082 2.807 11.724 0 6.937-2.477 12.856-7.431 17.754\" transform=\"translate(119.64 109.307)\"/>\n <path style=\"fill:none;stroke:#2196f3;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" d=\"M0 0c-1.542-1.541-3.386-2.311-5.533-2.311-2.148 0-3.991.77-5.532 2.311s-2.313 3.387-2.313 5.533c0 2.147.772 3.963 2.313 5.45 1.541 1.486 3.384 2.23 5.532 2.23 2.147 0 3.991-.744 5.533-2.23 1.54-1.487 2.312-3.303 2.312-5.45C2.312 3.387 1.54 1.541 0 0Zm12.551 23.039c-4.954 4.9-10.954 7.35-18.001 7.35-7.047 0-13.047-2.45-18.002-7.35-4.955-4.898-7.432-10.817-7.432-17.754 0-4.183 2.119-11.176 6.359-20.974 4.238-9.799 8.477-18.717 12.715-26.754 4.241-8.037 6.36-11.946 6.36-11.727.66 1.211 1.568 2.863 2.724 4.955 1.157 2.092 3.194 6.029 6.112 11.809 2.917 5.781 5.477 11.094 7.678 15.935a203.312 203.312 0 0 1 6.111 15.032c1.873 5.173 2.807 9.082 2.807 11.724 0 6.937-2.477 12.856-7.431 17.754z\" transform=\"translate(119.64 109.307)\"/>\n </g>\n</svg>\n";
|
|
608
|
-
var minimizeIcon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M6 19h12v2H6v-2z"/></svg>';
|
|
609
|
-
var editIconUrl = URL.createObjectURL(new Blob([iconEdit], {
|
|
610
|
-
type: 'image/svg+xml'
|
|
611
|
-
}));
|
|
612
|
-
var i18nextIconUrl = URL.createObjectURL(new Blob([i18nextIcon], {
|
|
613
|
-
type: 'image/svg+xml'
|
|
614
|
-
}));
|
|
615
|
-
var minimizeIconUrl = URL.createObjectURL(new Blob([minimizeIcon], {
|
|
616
|
-
type: 'image/svg+xml'
|
|
617
|
-
}));
|
|
618
|
-
var locizeIconUrl = URL.createObjectURL(new Blob([locizeIcon], {
|
|
619
|
-
type: 'image/svg+xml'
|
|
620
|
-
}));
|
|
621
|
-
function EditIcon() {
|
|
622
|
-
var image = document.createElement('img');
|
|
623
|
-
image.setAttribute('data-i18next-editor-element', 'true');
|
|
624
|
-
image.src = editIconUrl;
|
|
625
|
-
image.style.width = '15px';
|
|
626
|
-
return image;
|
|
627
|
-
}
|
|
628
|
-
function RibbonLogo() {
|
|
629
|
-
var circleSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '18px';
|
|
630
|
-
var logoSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '15px';
|
|
631
|
-
var ribbon = document.createElement('div');
|
|
632
|
-
ribbon.setAttribute('data-i18next-editor-element', 'true');
|
|
633
|
-
ribbon.style = "display: inline-flex; align-items: center; justify-content: center; width: ".concat(circleSize, "; height: ").concat(circleSize, "; box-shadow: inset 0 0 5px ").concat(colors.highlight, "; border: 2px solid ").concat(colors.highlight, "; border-radius: 50%");
|
|
634
|
-
var image = document.createElement('img');
|
|
635
|
-
image.src = i18nextIconUrl;
|
|
636
|
-
image.style.width = logoSize;
|
|
637
|
-
ribbon.appendChild(image);
|
|
638
|
-
return ribbon;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
944
|
if (sheet) {
|
|
642
945
|
sheet.insertRule('.i18next-editor-button:hover { background-color: rgba(38, 166, 154, 1) !important; }');
|
|
643
946
|
}
|
|
@@ -1261,7 +1564,7 @@
|
|
|
1261
1564
|
* object may be passed.
|
|
1262
1565
|
* @see https://floating-ui.com/docs/offset
|
|
1263
1566
|
*/
|
|
1264
|
-
const offset
|
|
1567
|
+
const offset = function (options) {
|
|
1265
1568
|
if (options === void 0) {
|
|
1266
1569
|
options = 0;
|
|
1267
1570
|
}
|
|
@@ -1366,7 +1669,7 @@
|
|
|
1366
1669
|
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
1367
1670
|
return '#document';
|
|
1368
1671
|
}
|
|
1369
|
-
function getWindow
|
|
1672
|
+
function getWindow(node) {
|
|
1370
1673
|
var _node$ownerDocument;
|
|
1371
1674
|
return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
1372
1675
|
}
|
|
@@ -1375,20 +1678,20 @@
|
|
|
1375
1678
|
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
1376
1679
|
}
|
|
1377
1680
|
function isNode(value) {
|
|
1378
|
-
return value instanceof Node || value instanceof getWindow
|
|
1681
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
1379
1682
|
}
|
|
1380
1683
|
function isElement(value) {
|
|
1381
|
-
return value instanceof Element || value instanceof getWindow
|
|
1684
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
1382
1685
|
}
|
|
1383
1686
|
function isHTMLElement(value) {
|
|
1384
|
-
return value instanceof HTMLElement || value instanceof getWindow
|
|
1687
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
1385
1688
|
}
|
|
1386
1689
|
function isShadowRoot(value) {
|
|
1387
1690
|
// Browsers without `ShadowRoot` support.
|
|
1388
1691
|
if (typeof ShadowRoot === 'undefined') {
|
|
1389
1692
|
return false;
|
|
1390
1693
|
}
|
|
1391
|
-
return value instanceof ShadowRoot || value instanceof getWindow
|
|
1694
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
1392
1695
|
}
|
|
1393
1696
|
function isOverflowElement(element) {
|
|
1394
1697
|
const {
|
|
@@ -1428,7 +1731,7 @@
|
|
|
1428
1731
|
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
1429
1732
|
}
|
|
1430
1733
|
function getComputedStyle(element) {
|
|
1431
|
-
return getWindow
|
|
1734
|
+
return getWindow(element).getComputedStyle(element);
|
|
1432
1735
|
}
|
|
1433
1736
|
function getNodeScroll(element) {
|
|
1434
1737
|
if (isElement(element)) {
|
|
@@ -1477,7 +1780,7 @@
|
|
|
1477
1780
|
}
|
|
1478
1781
|
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1479
1782
|
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
1480
|
-
const win = getWindow
|
|
1783
|
+
const win = getWindow(scrollableAncestor);
|
|
1481
1784
|
if (isBody) {
|
|
1482
1785
|
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
|
|
1483
1786
|
}
|
|
@@ -1539,7 +1842,7 @@
|
|
|
1539
1842
|
|
|
1540
1843
|
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
1541
1844
|
function getVisualOffsets(element) {
|
|
1542
|
-
const win = getWindow
|
|
1845
|
+
const win = getWindow(element);
|
|
1543
1846
|
if (!isWebKit() || !win.visualViewport) {
|
|
1544
1847
|
return noOffsets;
|
|
1545
1848
|
}
|
|
@@ -1552,7 +1855,7 @@
|
|
|
1552
1855
|
if (isFixed === void 0) {
|
|
1553
1856
|
isFixed = false;
|
|
1554
1857
|
}
|
|
1555
|
-
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow
|
|
1858
|
+
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
1556
1859
|
return false;
|
|
1557
1860
|
}
|
|
1558
1861
|
return isFixed;
|
|
@@ -1583,8 +1886,8 @@
|
|
|
1583
1886
|
let width = clientRect.width / scale.x;
|
|
1584
1887
|
let height = clientRect.height / scale.y;
|
|
1585
1888
|
if (domElement) {
|
|
1586
|
-
const win = getWindow
|
|
1587
|
-
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow
|
|
1889
|
+
const win = getWindow(domElement);
|
|
1890
|
+
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1588
1891
|
let currentIFrame = win.frameElement;
|
|
1589
1892
|
while (currentIFrame && offsetParent && offsetWin !== win) {
|
|
1590
1893
|
const iframeScale = getScale(currentIFrame);
|
|
@@ -1598,7 +1901,7 @@
|
|
|
1598
1901
|
height *= iframeScale.y;
|
|
1599
1902
|
x += left;
|
|
1600
1903
|
y += top;
|
|
1601
|
-
currentIFrame = getWindow
|
|
1904
|
+
currentIFrame = getWindow(currentIFrame).frameElement;
|
|
1602
1905
|
}
|
|
1603
1906
|
}
|
|
1604
1907
|
return rectToClientRect({
|
|
@@ -1677,7 +1980,7 @@
|
|
|
1677
1980
|
}
|
|
1678
1981
|
|
|
1679
1982
|
function getViewportRect(element, strategy) {
|
|
1680
|
-
const win = getWindow
|
|
1983
|
+
const win = getWindow(element);
|
|
1681
1984
|
const html = getDocumentElement(element);
|
|
1682
1985
|
const visualViewport = win.visualViewport;
|
|
1683
1986
|
let width = html.clientWidth;
|
|
@@ -1853,7 +2156,7 @@
|
|
|
1853
2156
|
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1854
2157
|
// such as table ancestors and cross browser bugs.
|
|
1855
2158
|
function getOffsetParent(element, polyfill) {
|
|
1856
|
-
const window = getWindow
|
|
2159
|
+
const window = getWindow(element);
|
|
1857
2160
|
if (!isHTMLElement(element)) {
|
|
1858
2161
|
return window;
|
|
1859
2162
|
}
|
|
@@ -1973,7 +2276,7 @@
|
|
|
1973
2276
|
placement: 'right',
|
|
1974
2277
|
middleware: [flip({
|
|
1975
2278
|
fallbackPlacements: ['left', 'bottom']
|
|
1976
|
-
}), shift(), offset
|
|
2279
|
+
}), shift(), offset(function (_ref) {
|
|
1977
2280
|
var placement = _ref.placement,
|
|
1978
2281
|
rects = _ref.rects;
|
|
1979
2282
|
if (placement === 'bottom') return rects.r;
|
|
@@ -2076,43 +2379,6 @@
|
|
|
2076
2379
|
delete selected[id];
|
|
2077
2380
|
}
|
|
2078
2381
|
|
|
2079
|
-
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2080
|
-
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2081
|
-
var data$1 = {};
|
|
2082
|
-
function clean$1() {
|
|
2083
|
-
Object.values(data$1).forEach(function (item) {
|
|
2084
|
-
if (!document.body.contains(item.node)) {
|
|
2085
|
-
resetHighlight(item.id, item.node);
|
|
2086
|
-
delete data$1[item.id];
|
|
2087
|
-
}
|
|
2088
|
-
});
|
|
2089
|
-
}
|
|
2090
|
-
function save$1(id, subliminal, type, meta, node, children) {
|
|
2091
|
-
if (!id || !type || !meta || !node) return;
|
|
2092
|
-
if (!data$1[id]) {
|
|
2093
|
-
data$1[id] = {
|
|
2094
|
-
id: id,
|
|
2095
|
-
node: node,
|
|
2096
|
-
subliminal: subliminal
|
|
2097
|
-
};
|
|
2098
|
-
}
|
|
2099
|
-
data$1[id].keys = _objectSpread$5(_objectSpread$5({}, data$1[id].keys), {}, _defineProperty({}, "".concat(type), meta));
|
|
2100
|
-
if (children) {
|
|
2101
|
-
data$1[id].children = _objectSpread$5(_objectSpread$5({}, data$1[id].children), {}, _defineProperty({}, "".concat(type, "-").concat(children.map(function (c) {
|
|
2102
|
-
return c.childIndex;
|
|
2103
|
-
}).join(',')), children));
|
|
2104
|
-
}
|
|
2105
|
-
}
|
|
2106
|
-
function get$1(id) {
|
|
2107
|
-
return data$1[id];
|
|
2108
|
-
}
|
|
2109
|
-
var store = {
|
|
2110
|
-
save: save$1,
|
|
2111
|
-
clean: clean$1,
|
|
2112
|
-
get: get$1,
|
|
2113
|
-
data: data$1
|
|
2114
|
-
};
|
|
2115
|
-
|
|
2116
2382
|
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2117
2383
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2118
2384
|
var data = {};
|
|
@@ -2124,20 +2390,26 @@
|
|
|
2124
2390
|
}
|
|
2125
2391
|
});
|
|
2126
2392
|
}
|
|
2127
|
-
function save(id, type, node) {
|
|
2128
|
-
if (!id || !type || !node) return;
|
|
2393
|
+
function save(id, subliminal, type, meta, node, children) {
|
|
2394
|
+
if (!id || !type || !meta || !node) return;
|
|
2129
2395
|
if (!data[id]) {
|
|
2130
2396
|
data[id] = {
|
|
2131
2397
|
id: id,
|
|
2132
|
-
node: node
|
|
2398
|
+
node: node,
|
|
2399
|
+
subliminal: subliminal
|
|
2133
2400
|
};
|
|
2134
2401
|
}
|
|
2135
|
-
data[id].keys = _objectSpread$4(_objectSpread$4({}, data[id].keys), {}, _defineProperty({}, "".concat(type),
|
|
2402
|
+
data[id].keys = _objectSpread$4(_objectSpread$4({}, data[id].keys), {}, _defineProperty({}, "".concat(type), meta));
|
|
2403
|
+
if (children) {
|
|
2404
|
+
data[id].children = _objectSpread$4(_objectSpread$4({}, data[id].children), {}, _defineProperty({}, "".concat(type, "-").concat(children.map(function (c) {
|
|
2405
|
+
return c.childIndex;
|
|
2406
|
+
}).join(',')), children));
|
|
2407
|
+
}
|
|
2136
2408
|
}
|
|
2137
2409
|
function get(id) {
|
|
2138
2410
|
return data[id];
|
|
2139
2411
|
}
|
|
2140
|
-
var
|
|
2412
|
+
var store = {
|
|
2141
2413
|
save: save,
|
|
2142
2414
|
clean: clean,
|
|
2143
2415
|
get: get,
|
|
@@ -2244,162 +2516,53 @@
|
|
|
2244
2516
|
child: child,
|
|
2245
2517
|
text: txt
|
|
2246
2518
|
});
|
|
2247
|
-
} else if (merge.length && hasHiddenMeta) {
|
|
2248
|
-
merge.push({
|
|
2249
|
-
childIndex: i,
|
|
2250
|
-
child: child,
|
|
2251
|
-
text: txt
|
|
2252
|
-
});
|
|
2253
|
-
var _meta = unwrap(merge.reduce(function (mem, item) {
|
|
2254
|
-
return mem + item.text;
|
|
2255
|
-
}, ''));
|
|
2256
|
-
store.save(node.uniqueID, _meta.invisibleMeta, 'html', extractMeta(node.uniqueID, 'html', _meta, merge), node, merge);
|
|
2257
|
-
merge = [];
|
|
2258
|
-
} else if (txt) {
|
|
2259
|
-
uninstrumentedStore.save(node.uniqueID, 'text', node);
|
|
2260
|
-
}
|
|
2261
|
-
});
|
|
2262
|
-
}
|
|
2263
|
-
if (!node.getAttribute) return;
|
|
2264
|
-
validAttributes.forEach(function (attr) {
|
|
2265
|
-
var txt = node.getAttribute(attr);
|
|
2266
|
-
if (containsHiddenMeta(txt)) {
|
|
2267
|
-
var meta = unwrap(txt);
|
|
2268
|
-
store.save(node.uniqueID, meta.invisibleMeta, "attr:".concat(attr), extractMeta(node.uniqueID, "attr:".concat(attr), meta), node);
|
|
2269
|
-
} else if (txt) {
|
|
2270
|
-
uninstrumentedStore.save(node.uniqueID, "attr:".concat(attr), node);
|
|
2271
|
-
}
|
|
2272
|
-
});
|
|
2273
|
-
}
|
|
2274
|
-
function parseTree(node) {
|
|
2275
|
-
currentSourceLng = undefined;
|
|
2276
|
-
walk(node, handleNode);
|
|
2277
|
-
store.clean();
|
|
2278
|
-
ignoreMergedEleUniqueIds = [];
|
|
2279
|
-
return store.data;
|
|
2280
|
-
}
|
|
2281
|
-
|
|
2282
|
-
function debounce(func, wait, immediate) {
|
|
2283
|
-
var timeout;
|
|
2284
|
-
return function () {
|
|
2285
|
-
var context = this;
|
|
2286
|
-
var args = arguments;
|
|
2287
|
-
var later = function later() {
|
|
2288
|
-
timeout = null;
|
|
2289
|
-
if (!immediate) func.apply(context, args);
|
|
2290
|
-
};
|
|
2291
|
-
var callNow = immediate && !timeout;
|
|
2292
|
-
clearTimeout(timeout);
|
|
2293
|
-
timeout = setTimeout(later, wait);
|
|
2294
|
-
if (callNow) func.apply(context, args);
|
|
2295
|
-
};
|
|
2296
|
-
}
|
|
2297
|
-
function isWindow(obj) {
|
|
2298
|
-
return obj != null && obj === obj.window;
|
|
2299
|
-
}
|
|
2300
|
-
function getWindow(elem) {
|
|
2301
|
-
return isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;
|
|
2302
|
-
}
|
|
2303
|
-
function offset(elem) {
|
|
2304
|
-
var box = {
|
|
2305
|
-
top: 0,
|
|
2306
|
-
left: 0,
|
|
2307
|
-
right: 0,
|
|
2308
|
-
bottom: 0
|
|
2309
|
-
};
|
|
2310
|
-
var doc = elem && elem.ownerDocument;
|
|
2311
|
-
var docElem = doc && doc.documentElement;
|
|
2312
|
-
if (!docElem) return box;
|
|
2313
|
-
if (_typeof(elem.getBoundingClientRect) !== ("undefined" )) {
|
|
2314
|
-
box = elem.getBoundingClientRect();
|
|
2315
|
-
}
|
|
2316
|
-
var win = getWindow(doc);
|
|
2317
|
-
var top = box.top + win.pageYOffset - docElem.clientTop;
|
|
2318
|
-
var left = box.left + win.pageXOffset - docElem.clientLeft;
|
|
2319
|
-
return {
|
|
2320
|
-
top: top,
|
|
2321
|
-
left: left,
|
|
2322
|
-
right: left + (box.right - box.left),
|
|
2323
|
-
bottom: top + (box.bottom - box.top)
|
|
2324
|
-
};
|
|
2325
|
-
}
|
|
2326
|
-
function getClickedElement(e) {
|
|
2327
|
-
if (e.srcElement && e.srcElement.nodeType === 1 && (e.srcElement.nodeName === 'BUTTON' || e.srcElement.nodeName === 'INPUT')) {
|
|
2328
|
-
if (e.srcElement.getAttribute && e.srcElement.getAttribute('ignorelocizeeditor') === '') {
|
|
2329
|
-
return null;
|
|
2330
|
-
}
|
|
2331
|
-
return e.srcElement;
|
|
2332
|
-
}
|
|
2333
|
-
var el;
|
|
2334
|
-
if (e.originalEvent && e.originalEvent.explicitOriginalTarget) {
|
|
2335
|
-
el = e.originalEvent.explicitOriginalTarget;
|
|
2336
|
-
} else {
|
|
2337
|
-
var parent = e.srcElement;
|
|
2338
|
-
if (parent.getAttribute && parent.getAttribute('ignorelocizeeditor') === '') return null;
|
|
2339
|
-
var left = e.pageX;
|
|
2340
|
-
var top = e.pageY;
|
|
2341
|
-
var topStartsAt = 0;
|
|
2342
|
-
var topBreaksAt;
|
|
2343
|
-
for (var i = 0; i < parent.childNodes.length; i++) {
|
|
2344
|
-
var n = parent.childNodes[i];
|
|
2345
|
-
var nOffset = offset(n);
|
|
2346
|
-
if (n.nodeType === 1 && nOffset.bottom < top) topStartsAt = i + 1;
|
|
2347
|
-
if (!topBreaksAt && nOffset.top + (n.clientHeight || 0) > top) topBreaksAt = i;
|
|
2348
|
-
}
|
|
2349
|
-
if (topStartsAt + 1 > parent.childNodes.length) topStartsAt = parent.childNodes.length - 1;
|
|
2350
|
-
if (!topBreaksAt) topBreaksAt = parent.childNodes.length;
|
|
2351
|
-
for (var y = topStartsAt; y < topBreaksAt; y++) {
|
|
2352
|
-
var _n = parent.childNodes[y];
|
|
2353
|
-
var _nOffset = offset(_n);
|
|
2354
|
-
if (_nOffset.left > left) {
|
|
2355
|
-
break;
|
|
2356
|
-
}
|
|
2357
|
-
if (_n && _n.nodeType !== 8) el = _n;
|
|
2358
|
-
}
|
|
2359
|
-
}
|
|
2360
|
-
return el;
|
|
2361
|
-
}
|
|
2362
|
-
function getElementText(el) {
|
|
2363
|
-
var str = el.textContent || el.text && el.text.innerText || el.placeholder;
|
|
2364
|
-
if (typeof str !== 'string') return;
|
|
2365
|
-
return str.replace(/\n +/g, '').trim();
|
|
2366
|
-
}
|
|
2367
|
-
function getAttribute(el, name) {
|
|
2368
|
-
return el && el.getAttribute && el.getAttribute(name);
|
|
2369
|
-
}
|
|
2370
|
-
function getElementI18nKey(el) {
|
|
2371
|
-
var key = getAttribute(el, 'data-i18n');
|
|
2372
|
-
if (key) return key;
|
|
2373
|
-
if (el.nodeType === window.Node.TEXT_NODE && el.parentElement) {
|
|
2374
|
-
return getElementI18nKey(el.parentElement);
|
|
2519
|
+
} else if (merge.length && hasHiddenMeta) {
|
|
2520
|
+
merge.push({
|
|
2521
|
+
childIndex: i,
|
|
2522
|
+
child: child,
|
|
2523
|
+
text: txt
|
|
2524
|
+
});
|
|
2525
|
+
var _meta = unwrap(merge.reduce(function (mem, item) {
|
|
2526
|
+
return mem + item.text;
|
|
2527
|
+
}, ''));
|
|
2528
|
+
store.save(node.uniqueID, _meta.invisibleMeta, 'html', extractMeta(node.uniqueID, 'html', _meta, merge), node, merge);
|
|
2529
|
+
merge = [];
|
|
2530
|
+
} else if (txt) {
|
|
2531
|
+
uninstrumentedStore.save(node.uniqueID, 'text', node);
|
|
2532
|
+
}
|
|
2533
|
+
});
|
|
2375
2534
|
}
|
|
2376
|
-
return
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
if (
|
|
2383
|
-
|
|
2384
|
-
if (!opts) opts = getAttribute(ele, 'data-i18n-options');
|
|
2385
|
-
if (opts) {
|
|
2386
|
-
var jsonData = {};
|
|
2387
|
-
try {
|
|
2388
|
-
jsonData = JSON.parse(opts);
|
|
2389
|
-
} catch (e) {}
|
|
2390
|
-
if (jsonData.ns) found = jsonData.ns;
|
|
2535
|
+
if (!node.getAttribute) return;
|
|
2536
|
+
validAttributes.forEach(function (attr) {
|
|
2537
|
+
var txt = node.getAttribute(attr);
|
|
2538
|
+
if (containsHiddenMeta(txt)) {
|
|
2539
|
+
var meta = unwrap(txt);
|
|
2540
|
+
store.save(node.uniqueID, meta.invisibleMeta, "attr:".concat(attr), extractMeta(node.uniqueID, "attr:".concat(attr), meta), node);
|
|
2541
|
+
} else if (txt) {
|
|
2542
|
+
uninstrumentedStore.save(node.uniqueID, "attr:".concat(attr), node);
|
|
2391
2543
|
}
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
return
|
|
2544
|
+
});
|
|
2545
|
+
}
|
|
2546
|
+
function parseTree(node) {
|
|
2547
|
+
currentSourceLng = undefined;
|
|
2548
|
+
walk(node, handleNode);
|
|
2549
|
+
store.clean();
|
|
2550
|
+
ignoreMergedEleUniqueIds = [];
|
|
2551
|
+
return store.data;
|
|
2400
2552
|
}
|
|
2401
2553
|
|
|
2554
|
+
var mutationTriggeringElements = {};
|
|
2402
2555
|
function ignoreMutation(ele) {
|
|
2556
|
+
if (ele.uniqueID) {
|
|
2557
|
+
var info = mutationTriggeringElements[ele.uniqueID];
|
|
2558
|
+
if (info && info.triggered > 10 && info.lastTriggerDate + 500 < Date.now()) {
|
|
2559
|
+
if (!info.warned && console) {
|
|
2560
|
+
console.warn('locize ::: ignoring element change - an element is rerendering too often in short interval', '\n', 'consider adding the "data-locize-editor-ignore:" attribute to the element:', ele);
|
|
2561
|
+
info.warned = true;
|
|
2562
|
+
}
|
|
2563
|
+
return true;
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2403
2566
|
var ret = ele.dataset && (ele.dataset.i18nextEditorElement === 'true' || ele.dataset.locizeEditorIgnore === 'true');
|
|
2404
2567
|
if (!ret && ele.parentElement) return ignoreMutation(ele.parentElement);
|
|
2405
2568
|
return ret;
|
|
@@ -2428,6 +2591,12 @@
|
|
|
2428
2591
|
if (mutation.type === 'attributes' && !validAttributes.includes(mutation.attributeName)) {
|
|
2429
2592
|
return;
|
|
2430
2593
|
}
|
|
2594
|
+
Object.keys(mutationTriggeringElements).forEach(function (k) {
|
|
2595
|
+
var info = mutationTriggeringElements[k];
|
|
2596
|
+
if (info.lastTriggerDate + 60000 < Date.now()) {
|
|
2597
|
+
delete mutationTriggeringElements[k];
|
|
2598
|
+
}
|
|
2599
|
+
});
|
|
2431
2600
|
if (mutation.type === 'childList') {
|
|
2432
2601
|
var notOurs = 0;
|
|
2433
2602
|
if (!ignoreMutation(mutation.target)) {
|
|
@@ -2443,8 +2612,18 @@
|
|
|
2443
2612
|
if (notOurs === 0) return;
|
|
2444
2613
|
}
|
|
2445
2614
|
triggerMutation = true;
|
|
2615
|
+
if (mutation.target && mutation.target.uniqueID) {
|
|
2616
|
+
var info = mutationTriggeringElements[mutation.target.uniqueID] || {
|
|
2617
|
+
triggered: 0
|
|
2618
|
+
};
|
|
2619
|
+
info.triggered = info.triggered + 1;
|
|
2620
|
+
info.lastTriggerDate = Date.now();
|
|
2621
|
+
mutationTriggeringElements[mutation.target.uniqueID] = info;
|
|
2622
|
+
}
|
|
2446
2623
|
var includedAlready = targetEles.reduce(function (mem, element) {
|
|
2447
|
-
if (mem || element.contains(mutation.target) || !mutation.target.parentElement)
|
|
2624
|
+
if (mem || element.contains(mutation.target) || !mutation.target.parentElement) {
|
|
2625
|
+
return true;
|
|
2626
|
+
}
|
|
2448
2627
|
return false;
|
|
2449
2628
|
}, false);
|
|
2450
2629
|
if (!includedAlready) {
|
|
@@ -2472,75 +2651,6 @@
|
|
|
2472
2651
|
};
|
|
2473
2652
|
}
|
|
2474
2653
|
|
|
2475
|
-
function isInViewport(el) {
|
|
2476
|
-
var rect = el.getBoundingClientRect();
|
|
2477
|
-
var windowHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
2478
|
-
var windowWidth = window.innerWidth || document.documentElement.clientWidth;
|
|
2479
|
-
var vertInView = rect.top <= windowHeight && rect.top + rect.height >= 0;
|
|
2480
|
-
var horInView = rect.left <= windowWidth && rect.left + rect.width >= 0;
|
|
2481
|
-
return vertInView && horInView;
|
|
2482
|
-
}
|
|
2483
|
-
function mouseDistanceFromElement(mouseEvent, element) {
|
|
2484
|
-
var $n = element,
|
|
2485
|
-
mX = mouseEvent.pageX,
|
|
2486
|
-
mY = mouseEvent.pageY,
|
|
2487
|
-
from = {
|
|
2488
|
-
x: mX,
|
|
2489
|
-
y: mY
|
|
2490
|
-
},
|
|
2491
|
-
off = $n.getBoundingClientRect(),
|
|
2492
|
-
ny1 = off.top + document.documentElement.scrollTop,
|
|
2493
|
-
ny2 = ny1 + $n.offsetHeight,
|
|
2494
|
-
nx1 = off.left + document.documentElement.scrollLeft,
|
|
2495
|
-
nx2 = nx1 + $n.offsetWidth,
|
|
2496
|
-
maxX1 = Math.max(mX, nx1),
|
|
2497
|
-
minX2 = Math.min(mX, nx2),
|
|
2498
|
-
maxY1 = Math.max(mY, ny1),
|
|
2499
|
-
minY2 = Math.min(mY, ny2),
|
|
2500
|
-
intersectX = minX2 >= maxX1,
|
|
2501
|
-
intersectY = minY2 >= maxY1,
|
|
2502
|
-
to = {
|
|
2503
|
-
x: intersectX ? mX : nx2 < mX ? nx2 : nx1,
|
|
2504
|
-
y: intersectY ? mY : ny2 < mY ? ny2 : ny1
|
|
2505
|
-
},
|
|
2506
|
-
distX = to.x - from.x,
|
|
2507
|
-
distY = to.y - from.y,
|
|
2508
|
-
hypot = Math.pow(Math.pow(distX, 2) + Math.pow(distY, 2), 1 / 2);
|
|
2509
|
-
return Math.floor(hypot);
|
|
2510
|
-
}
|
|
2511
|
-
|
|
2512
|
-
var debouncedUpdateDistance = debounce(function (e, observer) {
|
|
2513
|
-
Object.values(store.data).forEach(function (item) {
|
|
2514
|
-
if (!isInViewport(item.node)) return;
|
|
2515
|
-
var distance = mouseDistanceFromElement(e, item.node);
|
|
2516
|
-
if (distance < 5) {
|
|
2517
|
-
highlight(item, item.node, item.keys);
|
|
2518
|
-
} else if (distance > 5) {
|
|
2519
|
-
var boxDistance = item.ribbonBox ? mouseDistanceFromElement(e, item.ribbonBox) : 1000;
|
|
2520
|
-
if (boxDistance > 10) resetHighlight(item, item.node, item.keys);
|
|
2521
|
-
}
|
|
2522
|
-
});
|
|
2523
|
-
Object.values(uninstrumentedStore.data).forEach(function (item) {
|
|
2524
|
-
if (!isInViewport(item.node)) return;
|
|
2525
|
-
var distance = mouseDistanceFromElement(e, item.node);
|
|
2526
|
-
if (distance < 10) {
|
|
2527
|
-
highlightUninstrumented(item, item.node, item.keys);
|
|
2528
|
-
} else if (distance > 10) {
|
|
2529
|
-
resetHighlight(item, item.node, item.keys);
|
|
2530
|
-
}
|
|
2531
|
-
});
|
|
2532
|
-
}, 50);
|
|
2533
|
-
var currentFC;
|
|
2534
|
-
function startMouseTracking(observer) {
|
|
2535
|
-
currentFC = function handle(e) {
|
|
2536
|
-
debouncedUpdateDistance(e, observer);
|
|
2537
|
-
};
|
|
2538
|
-
document.addEventListener('mousemove', currentFC);
|
|
2539
|
-
}
|
|
2540
|
-
function stopMouseTracking() {
|
|
2541
|
-
document.removeEventListener('mousemove', currentFC);
|
|
2542
|
-
}
|
|
2543
|
-
|
|
2544
2654
|
function initDragElement() {
|
|
2545
2655
|
var pos1 = 0;
|
|
2546
2656
|
var pos2 = 0;
|
|
@@ -2646,77 +2756,6 @@
|
|
|
2646
2756
|
}
|
|
2647
2757
|
}
|
|
2648
2758
|
|
|
2649
|
-
if (sheet) {
|
|
2650
|
-
sheet.insertRule("@keyframes i18next-editor-animate-top { \n from {\n top: calc(100vh + 600px); \n left: calc(100vw + 300px);\n opacity: 0;\n }\n to {\n top: var(--i18next-editor-popup-position-top);\n left: var(--i18next-editor-popup-position-left);\n opacity: 1;\n }\n }");
|
|
2651
|
-
sheet.insertRule("@keyframes i18next-editor-animate-bottom { \n from {\n top: var(--i18next-editor-popup-position-top);\n left: var(--i18next-editor-popup-position-left);\n opacity: 1;\n }\n to {\n top: calc(100vh + 600px); \n left: calc(100vw + 300px);\n opacity: 0;\n }\n }");
|
|
2652
|
-
sheet.insertRule(".i18next-editor-popup * { \n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */\n }");
|
|
2653
|
-
sheet.insertRule(".i18next-editor-popup .resizer-right {\n width: 15px;\n height: 100%;\n background: transparent;\n position: absolute;\n right: -15px;\n bottom: 0;\n cursor: e-resize;\n }");
|
|
2654
|
-
sheet.insertRule(".i18next-editor-popup .resizer-both {\n width: 15px;\n height: 15px;\n background: transparent;\n z-index: 10;\n position: absolute;\n right: -15px;\n bottom: -15px;\n cursor: se-resize;\n }");
|
|
2655
|
-
sheet.insertRule(".i18next-editor-popup .resizer-bottom {\n width: 100%;\n height: 15px;\n background: transparent;\n position: absolute;\n right: 0;\n bottom: -15px;\n cursor: s-resize;\n }");
|
|
2656
|
-
}
|
|
2657
|
-
function Ribbon(popupEle, onMaximize) {
|
|
2658
|
-
var ribbon = document.createElement('div');
|
|
2659
|
-
ribbon.setAttribute('data-i18next-editor-element', 'true');
|
|
2660
|
-
ribbon.style = "\n cursor: pointer;\n position: fixed;\n bottom: 25px;\n right: 25px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n height: 50px;\n background-color: rgba(249, 249, 249, 0.2);\n backdrop-filter: blur(3px);\n box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);\n border-radius: 50%\n ";
|
|
2661
|
-
ribbon.onclick = function () {
|
|
2662
|
-
onMaximize();
|
|
2663
|
-
};
|
|
2664
|
-
var image = document.createElement('img');
|
|
2665
|
-
image.src = locizeIconUrl;
|
|
2666
|
-
image.style.width = '45px';
|
|
2667
|
-
ribbon.appendChild(image);
|
|
2668
|
-
return ribbon;
|
|
2669
|
-
}
|
|
2670
|
-
function Minimize(popupEle, onMinimize) {
|
|
2671
|
-
var image = document.createElement('img');
|
|
2672
|
-
image.setAttribute('data-i18next-editor-element', 'true');
|
|
2673
|
-
image.src = minimizeIconUrl;
|
|
2674
|
-
image.style.width = '24px';
|
|
2675
|
-
image.style.cursor = 'pointer';
|
|
2676
|
-
image.onclick = function () {
|
|
2677
|
-
popupEle.style.setProperty('--i18next-editor-popup-position-top', popupEle.style.top);
|
|
2678
|
-
popupEle.style.setProperty('--i18next-editor-popup-position-left', popupEle.style.left);
|
|
2679
|
-
popupEle.style.animation = 'i18next-editor-animate-bottom 2s forwards';
|
|
2680
|
-
onMinimize();
|
|
2681
|
-
};
|
|
2682
|
-
return image;
|
|
2683
|
-
}
|
|
2684
|
-
function Popup(url, cb) {
|
|
2685
|
-
var popup = document.createElement('div');
|
|
2686
|
-
popup.setAttribute('id', 'i18next-editor-popup');
|
|
2687
|
-
popup.classList.add('i18next-editor-popup');
|
|
2688
|
-
popup.style = "\n z-index: 9;\n background-color: transparent;\n border: 1px solid rgba(200, 200, 200, 0.9);\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n --i18next-editor-popup-height: 200px;\n height: var(--i18next-editor-popup-height);\n min-height: 150px;\n min-width: 300px;\n --i18next-editor-popup-width: 400px;\n width: var(--i18next-editor-popup-width);\n max-height: 600px;\n max-width: 800px;\n\n position: fixed;\n --i18next-editor-popup-position-top: calc(100vh - var(--i18next-editor-popup-height) - 10px);\n top: calc(100vh - var(--i18next-editor-popup-height) - 10px);\n --i18next-editor-popup-position-left: calc(100vw - var(--i18next-editor-popup-width) - 10px);\n left: calc(100vw - var(--i18next-editor-popup-width) - 10px);\n\n overflow: visible;\n ";
|
|
2689
|
-
popup.setAttribute('data-i18next-editor-element', 'true');
|
|
2690
|
-
var header = document.createElement('div');
|
|
2691
|
-
header.classList.add('i18next-editor-popup-header');
|
|
2692
|
-
header.style = "\n padding: 2px 10px;\n cursor: move;\n z-index: 10;\n backdrop-filter: blur(3px);\n background-color: rgba(200, 200, 200, 0.5);\n background: linear-gradient(0deg, rgba(200, 200, 200, 0.6), rgba(200, 200, 200, 0.5));\n color: #fff;\n text-align: right;\n ";
|
|
2693
|
-
popup.appendChild(header);
|
|
2694
|
-
header.appendChild(Minimize(popup, function () {
|
|
2695
|
-
var ribbon = Ribbon(popup, function () {
|
|
2696
|
-
popup.style.animation = 'i18next-editor-animate-top 1s';
|
|
2697
|
-
startMouseTracking();
|
|
2698
|
-
setTimeout(function () {
|
|
2699
|
-
document.body.removeChild(ribbon);
|
|
2700
|
-
}, 1000);
|
|
2701
|
-
});
|
|
2702
|
-
document.body.appendChild(ribbon);
|
|
2703
|
-
stopMouseTracking();
|
|
2704
|
-
}));
|
|
2705
|
-
var iframe = document.createElement('iframe');
|
|
2706
|
-
iframe.setAttribute('id', 'i18next-editor-iframe');
|
|
2707
|
-
iframe.setAttribute('data-i18next-editor-element', 'true');
|
|
2708
|
-
iframe.style = "\n z-index: 100;\n width: 100%;\n height: calc(100% - 28px);\n border: none;\n background: #fff;\n ";
|
|
2709
|
-
iframe.setAttribute('src', url);
|
|
2710
|
-
iframe.addEventListener('load', cb);
|
|
2711
|
-
popup.appendChild(iframe);
|
|
2712
|
-
var overlay = document.createElement('div');
|
|
2713
|
-
overlay.setAttribute('id', 'i18next-editor-popup-overlay');
|
|
2714
|
-
overlay.setAttribute('data-i18next-editor-element', 'true');
|
|
2715
|
-
overlay.style = "\n display: none;\n position: absolute;\n top: 32px;\n z-index: 101;\n width: 100%;\n height: calc(100% - 32px);\n background-color: rgba(200, 200, 200, 0.5);\n background: linear-gradient(0deg, rgba(240, 240, 240, 0.6), rgba(255, 255, 255, 0.5));\n backdrop-filter: blur(2px);\n";
|
|
2716
|
-
popup.appendChild(overlay);
|
|
2717
|
-
return popup;
|
|
2718
|
-
}
|
|
2719
|
-
|
|
2720
2759
|
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2721
2760
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2722
2761
|
function start() {
|
|
@@ -2746,11 +2785,13 @@
|
|
|
2746
2785
|
});
|
|
2747
2786
|
observer.start();
|
|
2748
2787
|
startMouseTracking(observer);
|
|
2749
|
-
document.
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2788
|
+
if (!document.getElementById(popupId)) {
|
|
2789
|
+
document.body.append(Popup(getIframeUrl(), function () {
|
|
2790
|
+
api.requestInitialize(config);
|
|
2791
|
+
}));
|
|
2792
|
+
initDragElement();
|
|
2793
|
+
initResizeElement();
|
|
2794
|
+
}
|
|
2754
2795
|
}
|
|
2755
2796
|
if (document.body) return continueToStart();
|
|
2756
2797
|
window.addEventListener('load', function () {
|
|
@@ -2862,89 +2903,94 @@
|
|
|
2862
2903
|
try {
|
|
2863
2904
|
isInIframe = self !== top;
|
|
2864
2905
|
} catch (e) {}
|
|
2906
|
+
function configurePostProcessor(i18next, options) {
|
|
2907
|
+
i18next.use(SubliminalPostProcessor);
|
|
2908
|
+
if (typeof options.postProcess === 'string') {
|
|
2909
|
+
options.postProcess = [options.postProcess, 'subliminal'];
|
|
2910
|
+
} else if (Array.isArray(options.postProcess)) {
|
|
2911
|
+
options.postProcess.push('subliminal');
|
|
2912
|
+
} else {
|
|
2913
|
+
options.postProcess = 'subliminal';
|
|
2914
|
+
}
|
|
2915
|
+
options.postProcessPassResolved = true;
|
|
2916
|
+
}
|
|
2917
|
+
function getImplementation(i18n) {
|
|
2918
|
+
var impl = {
|
|
2919
|
+
getResource: function getResource(lng, ns, key) {
|
|
2920
|
+
return i18n.getResource(lng, ns, key);
|
|
2921
|
+
},
|
|
2922
|
+
setResource: function setResource(lng, ns, key, value) {
|
|
2923
|
+
return i18n.addResource(lng, ns, key, value, {
|
|
2924
|
+
silent: true
|
|
2925
|
+
});
|
|
2926
|
+
},
|
|
2927
|
+
getResourceBundle: function getResourceBundle(lng, ns, cb) {
|
|
2928
|
+
i18n.loadNamespaces(ns, function () {
|
|
2929
|
+
cb(i18n.getResourceBundle(lng, ns));
|
|
2930
|
+
});
|
|
2931
|
+
},
|
|
2932
|
+
getLng: function getLng() {
|
|
2933
|
+
return i18n.languages[0];
|
|
2934
|
+
},
|
|
2935
|
+
getSourceLng: function getSourceLng() {
|
|
2936
|
+
var fallback = i18n.options.fallbackLng;
|
|
2937
|
+
if (typeof fallback === 'string') return fallback;
|
|
2938
|
+
if (Array.isArray(fallback)) return fallback[fallback.length - 1];
|
|
2939
|
+
if (fallback && fallback["default"]) {
|
|
2940
|
+
if (typeof fallback["default"] === 'string') return fallback;
|
|
2941
|
+
if (Array.isArray(fallback["default"])) return fallback["default"][fallback["default"].length - 1];
|
|
2942
|
+
}
|
|
2943
|
+
if (typeof fallback === 'function') {
|
|
2944
|
+
var res = fallback(i18n.resolvedLanguage);
|
|
2945
|
+
if (typeof res === 'string') return res;
|
|
2946
|
+
if (Array.isArray(res)) return res[res.length - 1];
|
|
2947
|
+
}
|
|
2948
|
+
return 'dev';
|
|
2949
|
+
},
|
|
2950
|
+
getLocizeDetails: function getLocizeDetails() {
|
|
2951
|
+
var backendName;
|
|
2952
|
+
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) {
|
|
2953
|
+
backendName = 'I18NextLocizeBackend';
|
|
2954
|
+
} else {
|
|
2955
|
+
backendName = i18n.services.backendConnector.backend ? i18n.services.backendConnector.backend.constructor.name : 'options.resources';
|
|
2956
|
+
}
|
|
2957
|
+
var opts = {
|
|
2958
|
+
backendName: backendName,
|
|
2959
|
+
sourceLng: impl.getSourceLng(),
|
|
2960
|
+
i18nFormat: i18n.options.compatibilityJSON === 'v3' ? 'i18next_v3' : 'i18next_v4',
|
|
2961
|
+
i18nFramework: 'i18next',
|
|
2962
|
+
isLocizify: i18n.options.isLocizify,
|
|
2963
|
+
defaultNS: i18n.options.defaultNS
|
|
2964
|
+
};
|
|
2965
|
+
if (!i18n.options.backend && !i18n.options.editor) return opts;
|
|
2966
|
+
var pickFrom = i18n.options.backend || i18n.options.editor;
|
|
2967
|
+
return _objectSpread(_objectSpread({}, opts), {}, {
|
|
2968
|
+
projectId: pickFrom.projectId,
|
|
2969
|
+
version: pickFrom.version
|
|
2970
|
+
});
|
|
2971
|
+
},
|
|
2972
|
+
bindLanguageChange: function bindLanguageChange(cb) {
|
|
2973
|
+
i18n.on('languageChanged', cb);
|
|
2974
|
+
},
|
|
2975
|
+
bindMissingKeyHandler: function bindMissingKeyHandler(cb) {
|
|
2976
|
+
i18n.options.missingKeyHandler = function (lng, ns, k, val, isUpdate, opts) {
|
|
2977
|
+
if (!isUpdate) cb(lng, ns, k, val);
|
|
2978
|
+
};
|
|
2979
|
+
},
|
|
2980
|
+
triggerRerender: function triggerRerender() {
|
|
2981
|
+
i18n.emit('editorSaved');
|
|
2982
|
+
}
|
|
2983
|
+
};
|
|
2984
|
+
return impl;
|
|
2985
|
+
}
|
|
2865
2986
|
var i18next;
|
|
2866
2987
|
var locizePlugin = {
|
|
2867
2988
|
type: '3rdParty',
|
|
2868
2989
|
init: function init(i18n) {
|
|
2869
2990
|
var options = i18n.options;
|
|
2870
2991
|
i18next = i18n;
|
|
2871
|
-
if (!isInIframe)
|
|
2872
|
-
|
|
2873
|
-
if (typeof options.postProcess === 'string') {
|
|
2874
|
-
options.postProcess = [options.postProcess, 'subliminal'];
|
|
2875
|
-
} else if (Array.isArray(options.postProcess)) {
|
|
2876
|
-
options.postProcess.push('subliminal');
|
|
2877
|
-
} else {
|
|
2878
|
-
options.postProcess = 'subliminal';
|
|
2879
|
-
}
|
|
2880
|
-
options.postProcessPassResolved = true;
|
|
2881
|
-
}
|
|
2882
|
-
var impl = {
|
|
2883
|
-
getResource: function getResource(lng, ns, key) {
|
|
2884
|
-
return i18n.getResource(lng, ns, key);
|
|
2885
|
-
},
|
|
2886
|
-
setResource: function setResource(lng, ns, key, value) {
|
|
2887
|
-
return i18n.addResource(lng, ns, key, value, {
|
|
2888
|
-
silent: true
|
|
2889
|
-
});
|
|
2890
|
-
},
|
|
2891
|
-
getResourceBundle: function getResourceBundle(lng, ns, cb) {
|
|
2892
|
-
i18n.loadNamespaces(ns, function () {
|
|
2893
|
-
cb(i18n.getResourceBundle(lng, ns));
|
|
2894
|
-
});
|
|
2895
|
-
},
|
|
2896
|
-
getLng: function getLng() {
|
|
2897
|
-
return i18n.languages[0];
|
|
2898
|
-
},
|
|
2899
|
-
getSourceLng: function getSourceLng() {
|
|
2900
|
-
var fallback = i18n.options.fallbackLng;
|
|
2901
|
-
if (typeof fallback === 'string') return fallback;
|
|
2902
|
-
if (Array.isArray(fallback)) return fallback[fallback.length - 1];
|
|
2903
|
-
if (fallback && fallback["default"]) {
|
|
2904
|
-
if (typeof fallback["default"] === 'string') return fallback;
|
|
2905
|
-
if (Array.isArray(fallback["default"])) return fallback["default"][fallback["default"].length - 1];
|
|
2906
|
-
}
|
|
2907
|
-
if (typeof fallback === 'function') {
|
|
2908
|
-
var res = fallback(i18n.resolvedLanguage);
|
|
2909
|
-
if (typeof res === 'string') return res;
|
|
2910
|
-
if (Array.isArray(res)) return res[res.length - 1];
|
|
2911
|
-
}
|
|
2912
|
-
return 'dev';
|
|
2913
|
-
},
|
|
2914
|
-
getLocizeDetails: function getLocizeDetails() {
|
|
2915
|
-
var backendName;
|
|
2916
|
-
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) {
|
|
2917
|
-
backendName = 'I18NextLocizeBackend';
|
|
2918
|
-
} else {
|
|
2919
|
-
backendName = i18n.services.backendConnector.backend ? i18n.services.backendConnector.backend.constructor.name : 'options.resources';
|
|
2920
|
-
}
|
|
2921
|
-
var opts = {
|
|
2922
|
-
backendName: backendName,
|
|
2923
|
-
sourceLng: impl.getSourceLng(),
|
|
2924
|
-
i18nFormat: i18n.options.compatibilityJSON === 'v3' ? 'i18next_v3' : 'i18next_v4',
|
|
2925
|
-
i18nFramework: 'i18next',
|
|
2926
|
-
isLocizify: i18n.options.isLocizify,
|
|
2927
|
-
defaultNS: i18n.options.defaultNS
|
|
2928
|
-
};
|
|
2929
|
-
if (!i18n.options.backend && !i18n.options.editor) return opts;
|
|
2930
|
-
var pickFrom = i18n.options.backend || i18n.options.editor;
|
|
2931
|
-
return _objectSpread(_objectSpread({}, opts), {}, {
|
|
2932
|
-
projectId: pickFrom.projectId,
|
|
2933
|
-
version: pickFrom.version
|
|
2934
|
-
});
|
|
2935
|
-
},
|
|
2936
|
-
bindLanguageChange: function bindLanguageChange(cb) {
|
|
2937
|
-
i18n.on('languageChanged', cb);
|
|
2938
|
-
},
|
|
2939
|
-
bindMissingKeyHandler: function bindMissingKeyHandler(cb) {
|
|
2940
|
-
i18n.options.missingKeyHandler = function (lng, ns, k, val, isUpdate, opts) {
|
|
2941
|
-
if (!isUpdate) cb(lng, ns, k, val);
|
|
2942
|
-
};
|
|
2943
|
-
},
|
|
2944
|
-
triggerRerender: function triggerRerender() {
|
|
2945
|
-
i18n.emit('editorSaved');
|
|
2946
|
-
}
|
|
2947
|
-
};
|
|
2992
|
+
if (!isInIframe) configurePostProcessor(i18next, options);
|
|
2993
|
+
var impl = getImplementation(i18n);
|
|
2948
2994
|
if (!isInIframe) {
|
|
2949
2995
|
start(impl);
|
|
2950
2996
|
} else {
|
|
@@ -2952,6 +2998,25 @@
|
|
|
2952
2998
|
}
|
|
2953
2999
|
}
|
|
2954
3000
|
};
|
|
3001
|
+
var locizeEditorPlugin = function locizeEditorPlugin() {
|
|
3002
|
+
var opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3003
|
+
opt.qsProp = opt.qsProp || 'incontext';
|
|
3004
|
+
return {
|
|
3005
|
+
type: '3rdParty',
|
|
3006
|
+
init: function init(i18n) {
|
|
3007
|
+
var options = i18n.options;
|
|
3008
|
+
i18next = i18n;
|
|
3009
|
+
var showInContext = getQsParameterByName(opt.qsProp) === 'true';
|
|
3010
|
+
if (!isInIframe && showInContext) configurePostProcessor(i18next, options);
|
|
3011
|
+
var impl = getImplementation(i18n);
|
|
3012
|
+
if (!isInIframe && showInContext) {
|
|
3013
|
+
start(impl);
|
|
3014
|
+
} else {
|
|
3015
|
+
startLegacy(impl);
|
|
3016
|
+
}
|
|
3017
|
+
}
|
|
3018
|
+
};
|
|
3019
|
+
};
|
|
2955
3020
|
|
|
2956
3021
|
function startStandalone() {
|
|
2957
3022
|
startLegacy({
|
|
@@ -2977,6 +3042,7 @@
|
|
|
2977
3042
|
PostProcessor: SubliminalPostProcessor,
|
|
2978
3043
|
addLocizeSavedHandler: addLocizeSavedHandler,
|
|
2979
3044
|
locizePlugin: locizePlugin,
|
|
3045
|
+
locizeEditorPlugin: locizeEditorPlugin,
|
|
2980
3046
|
turnOn: turnOn,
|
|
2981
3047
|
turnOff: turnOff,
|
|
2982
3048
|
setEditorLng: setEditorLng,
|
|
@@ -2987,6 +3053,7 @@
|
|
|
2987
3053
|
exports.addLocizeSavedHandler = addLocizeSavedHandler;
|
|
2988
3054
|
exports.containsHiddenMeta = containsHiddenMeta;
|
|
2989
3055
|
exports["default"] = index;
|
|
3056
|
+
exports.locizeEditorPlugin = locizeEditorPlugin;
|
|
2990
3057
|
exports.locizePlugin = locizePlugin;
|
|
2991
3058
|
exports.setEditorLng = setEditorLng;
|
|
2992
3059
|
exports.startStandalone = startStandalone;
|