@ohif/mode-longitudinal 3.10.0 → 3.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ohif-mode-longitudinal.js +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(require("@ohif/extension-cornerstone-dicom-sr"),require("@cornerstonejs/core"),require("@ohif/core")):"function"==typeof define&&define.amd?define(["@ohif/extension-cornerstone-dicom-sr","@cornerstonejs/core","@ohif/core"],o):"object"==typeof exports?exports["ohif-mode-longitudinal"]=o(require("@ohif/extension-cornerstone-dicom-sr"),require("@cornerstonejs/core"),require("@ohif/core")):e["ohif-mode-longitudinal"]=o(e["@ohif/extension-cornerstone-dicom-sr"],e["@cornerstonejs/core"],e["@ohif/core"])}(globalThis,((e,o,t)=>(()=>{"use strict";var n={557:e=>{e.exports=o},2:e=>{e.exports=t},838:o=>{o.exports=e}},i={};function r(e){var o=i[e];if(void 0!==o)return o.exports;var t=i[e]={exports:{}};return n[e](t,t.exports,r),t.exports}r.d=(e,o)=>{for(var t in o)r.o(o,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o);var a={};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(e){var o=function(e,o){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,o||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(e)}(e,"string");return"symbol"==s(o)?o:o+""}function u(e,o,t){return(o=l(o))in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function c(e){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?Object(arguments[o]):{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach((function(o){u(e,o,t[o])}))}return e}function p(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function d(e,o){for(var t=0;t<o.length;t++){var n=o[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function f(e,o,t){return o&&d(e.prototype,o),t&&d(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,o){if(o&&("object"==s(o)||"function"==typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(e,o){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,o){return e.__proto__=o,e},v(e,o)}function y(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),o&&v(e,o)}function b(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,n=Array(o);t<o;t++)n[t]=e[t];return n}function w(e,o){if(e){if("string"==typeof e)return b(e,o);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?b(e,o):void 0}}function x(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,o){return function(e){if(Array.isArray(e))return e}(e)||function(e,o){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,i,r,a,s=[],l=!0,u=!1;try{if(r=(t=t.call(e)).next,0===o){if(Object(t)!==t)return;l=!1}else for(;!(l=(n=r.call(t)).done)&&(s.push(n.value),s.length!==o);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,o)||w(e,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.d(a,{default:()=>Ne});var k={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,o){var t;console&&console[e]&&(t=console)[e].apply(t,x(o))}},T=new(function(){function e(o){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(this,e),this.init(o,t)}return f(e,[{key:"init",value:function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=o.prefix||"i18next:",this.logger=e||k,this.options=o,this.debug=o.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return this.forward(o,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return this.forward(o,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return this.forward(o,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return this.forward(o,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,o,t,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(t).concat(this.prefix," ").concat(e[0])),this.logger[o](e))}},{key:"create",value:function(o){return new e(this.logger,c({},{prefix:"".concat(this.prefix,":").concat(o,":")},this.options))}}]),e}()),R=function(){function e(){p(this,e),this.observers={}}return f(e,[{key:"on",value:function(e,o){var t=this;return e.split(" ").forEach((function(e){t.observers[e]=t.observers[e]||[],t.observers[e].push(o)})),this}},{key:"off",value:function(e,o){this.observers[e]&&(o?this.observers[e]=this.observers[e].filter((function(e){return e!==o})):delete this.observers[e])}},{key:"emit",value:function(e){for(var o=arguments.length,t=new Array(o>1?o-1:0),n=1;n<o;n++)t[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,t)}));this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(o){o.apply(o,[e].concat(t))}))}}]),e}();function N(){var e,o,t=new Promise((function(t,n){e=t,o=n}));return t.resolve=e,t.reject=o,t}function O(e){return null==e?"":""+e}function C(e,o,t){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var r="string"!=typeof o?[].concat(o):o.split(".");r.length>1;){if(i())return{};var a=n(r.shift());!e[a]&&t&&(e[a]=new t),e=e[a]}return i()?{}:{obj:e,k:n(r.shift())}}function L(e,o,t){var n=C(e,o,Object);n.obj[n.k]=t}function P(e,o){var t=C(e,o),n=t.obj,i=t.k;if(n)return n[i]}function E(e,o,t){var n=P(e,t);return void 0!==n?n:P(o,t)}function M(e,o,t){for(var n in o)n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof o[n]||o[n]instanceof String?t&&(e[n]=o[n]):M(e[n],o[n],t):e[n]=o[n];return e}function B(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var A={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function j(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return A[e]})):e}var I=function(e){function o(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return p(this,o),t=h(this,m(o).call(this)),R.call(g(t)),t.data=e||{},t.options=n,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t}return y(o,e),f(o,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var o=this.options.ns.indexOf(e);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(e,o,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,r=[e,o];return t&&"string"!=typeof t&&(r=r.concat(t)),t&&"string"==typeof t&&(r=r.concat(i?t.split(i):t)),e.indexOf(".")>-1&&(r=e.split(".")),P(this.data,r)}},{key:"addResource",value:function(e,o,t,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},r=this.options.keySeparator;void 0===r&&(r=".");var a=[e,o];t&&(a=a.concat(r?t.split(r):t)),e.indexOf(".")>-1&&(n=o,o=(a=e.split("."))[1]),this.addNamespaces(o),L(this.data,a,n),i.silent||this.emit("added",e,o,t,n)}},{key:"addResources",value:function(e,o,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in t)"string"!=typeof t[i]&&"[object Array]"!==Object.prototype.toString.apply(t[i])||this.addResource(e,o,i,t[i],{silent:!0});n.silent||this.emit("added",e,o,t)}},{key:"addResourceBundle",value:function(e,o,t,n,i){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,o];e.indexOf(".")>-1&&(n=t,t=o,o=(a=e.split("."))[1]),this.addNamespaces(o);var s=P(this.data,a)||{};n?M(s,t,i):s=c({},s,t),L(this.data,a,s),r.silent||this.emit("added",e,o,t)}},{key:"removeResourceBundle",value:function(e,o){this.hasResourceBundle(e,o)&&delete this.data[e][o],this.removeNamespaces(o),this.emit("removed",e,o)}},{key:"hasResourceBundle",value:function(e,o){return void 0!==this.getResource(e,o)}},{key:"getResourceBundle",value:function(e,o){return o||(o=this.options.defaultNS),"v1"===this.options.compatibilityAPI?c({},{},this.getResource(e,o)):this.getResource(e,o)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),o}(R),V={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,o,t,n,i){var r=this;return e.forEach((function(e){r.processors[e]&&(o=r.processors[e].process(o,t,n,i))})),o}},D=function(e){function o(e){var t,n,i,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p(this,o),t=h(this,m(o).call(this)),R.call(g(t)),n=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i=e,r=g(t),n.forEach((function(e){i[e]&&(r[e]=i[e])})),t.options=a,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=T.create("translator"),t}return y(o,e),f(o,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},t=this.resolve(e,o);return t&&void 0!==t.res}},{key:"extractFromKey",value:function(e,o){var t=o.nsSeparator||this.options.nsSeparator;void 0===t&&(t=":");var n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,i=o.ns||this.options.defaultNS;if(t&&e.indexOf(t)>-1){var r=e.split(t);(t!==n||t===n&&this.options.ns.indexOf(r[0])>-1)&&(i=r.shift()),e=r.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,o){var t=this;if("object"!==s(o)&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,i=this.extractFromKey(e[e.length-1],o),r=i.key,a=i.namespaces,l=a[a.length-1],u=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(p){var d=o.nsSeparator||this.options.nsSeparator;return l+d+r}return r}var f=this.resolve(e,o),g=f&&f.res,h=f&&f.usedKey||r,m=f&&f.exactUsedKey||r,v=Object.prototype.toString.apply(g),y=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&g&&("string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(v)<0&&("string"!=typeof y||"[object Array]"!==v)){if(!o.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,g,o):"key '".concat(r," (").concat(this.language,")' returned an object instead of string.");if(n){var w="[object Array]"===v,x=w?[]:{},S=w?m:h;for(var k in g)if(Object.prototype.hasOwnProperty.call(g,k)){var T="".concat(S).concat(n).concat(k);x[k]=this.translate(T,c({},o,{joinArrays:!1,ns:a})),x[k]===T&&(x[k]=g[k])}g=x}}else if(b&&"string"==typeof y&&"[object Array]"===v)(g=g.join(y))&&(g=this.extendTranslation(g,e,o));else{var R=!1,N=!1;if(!this.isValidLookup(g)&&void 0!==o.defaultValue){if(R=!0,void 0!==o.count){var O=this.pluralResolver.getSuffix(u,o.count);g=o["defaultValue".concat(O)]}g||(g=o.defaultValue)}this.isValidLookup(g)||(N=!0,g=r);var C=o.defaultValue&&o.defaultValue!==g&&this.options.updateMissing;if(N||R||C){this.logger.log(C?"updateKey":"missingKey",u,l,r,C?o.defaultValue:g);var L=[],P=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&P&&P[0])for(var E=0;E<P.length;E++)L.push(P[E]);else"all"===this.options.saveMissingTo?L=this.languageUtils.toResolveHierarchy(o.lng||this.language):L.push(o.lng||this.language);var M=function(e,n){t.options.missingKeyHandler?t.options.missingKeyHandler(e,l,n,C?o.defaultValue:g,C,o):t.backendConnector&&t.backendConnector.saveMissing&&t.backendConnector.saveMissing(e,l,n,C?o.defaultValue:g,C,o),t.emit("missingKey",e,l,n,g)};if(this.options.saveMissing){var B=void 0!==o.count&&"string"!=typeof o.count;this.options.saveMissingPlurals&&B?L.forEach((function(e){t.pluralResolver.getPluralFormsOfKey(e,r).forEach((function(o){return M([e],o)}))})):M(L,r)}}g=this.extendTranslation(g,e,o,f),N&&g===r&&this.options.appendNamespaceToMissingKey&&(g="".concat(l,":").concat(r)),N&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(g))}return g}},{key:"extendTranslation",value:function(e,o,t,n){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,t,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!t.skipInterpolation){t.interpolation&&this.interpolator.init(c({},t,{interpolation:c({},this.options.interpolation,t.interpolation)}));var r=t.replace&&"string"!=typeof t.replace?t.replace:t;this.options.interpolation.defaultVariables&&(r=c({},this.options.interpolation.defaultVariables,r)),e=this.interpolator.interpolate(e,r,t.lng||this.language,t),!1!==t.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),t)),t.interpolation&&this.interpolator.reset()}var a=t.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==t.applyPostProcessor&&(e=V.handle(s,e,o,this.options&&this.options.postProcessPassResolved?c({i18nResolved:n},t):t,this)),e}},{key:"resolve",value:function(e){var o,t,n,i,r,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(o)){var l=a.extractFromKey(e,s),u=l.key;t=u;var c=l.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var p=void 0!==s.count&&"string"!=typeof s.count,d=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,f=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach((function(e){a.isValidLookup(o)||(r=e,a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(r)&&a.logger.warn('key "'.concat(t,'" for namespace "').concat(r,"\" won't get resolved as namespace was not yet loaded"),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"),f.forEach((function(t){if(!a.isValidLookup(o)){i=t;var r,l,c=u,f=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(f,u,t,e,s);else p&&(r=a.pluralResolver.getSuffix(t,s.count)),p&&d&&f.push(c+r),d&&f.push(c+="".concat(a.options.contextSeparator).concat(s.context)),p&&f.push(c+=r);for(;l=f.pop();)a.isValidLookup(o)||(n=l,o=a.getResource(t,e,l,s))}})))}))}})),{res:o,usedKey:t,exactUsedKey:n,usedLng:i,usedNS:r}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,o,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,o,t,n):this.resourceStore.getResource(e,o,t,n)}}]),o}(R);function F(e){return e.charAt(0).toUpperCase()+e.slice(1)}var H=function(){function e(o){p(this,e),this.options=o,this.whitelist=this.options.whitelist||!1,this.logger=T.create("languageUtils")}return f(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var o=e.split("-");return 2===o.length?null:(o.pop(),this.formatLanguageCode(o.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var o=e.split("-");return this.formatLanguageCode(o[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var o=["hans","hant","latn","cyrl","cans","mong","arab"],t=e.split("-");return this.options.lowerCaseLng?t=t.map((function(e){return e.toLowerCase()})):2===t.length?(t[0]=t[0].toLowerCase(),t[1]=t[1].toUpperCase(),o.indexOf(t[1].toLowerCase())>-1&&(t[1]=F(t[1].toLowerCase()))):3===t.length&&(t[0]=t[0].toLowerCase(),2===t[1].length&&(t[1]=t[1].toUpperCase()),"sgn"!==t[0]&&2===t[2].length&&(t[2]=t[2].toUpperCase()),o.indexOf(t[1].toLowerCase())>-1&&(t[1]=F(t[1].toLowerCase())),o.indexOf(t[2].toLowerCase())>-1&&(t[2]=F(t[2].toLowerCase()))),t.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,o){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!o)return e.default||[];var t=e[o];return t||(t=e[this.getScriptPartFromCode(o)]),t||(t=e[this.formatLanguageCode(o)]),t||(t=e.default),t||[]}},{key:"toResolveHierarchy",value:function(e,o){var t=this,n=this.getFallbackCodes(o||this.options.fallbackLng||[],e),i=[],r=function(e){e&&(t.isWhitelisted(e)?i.push(e):t.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):"string"==typeof e&&r(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&r(t.formatLanguageCode(e))})),i}}]),e}(),U=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],W={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};var z=function(){function e(o){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(this,e),this.languageUtils=o,this.options=n,this.logger=T.create("pluralResolver"),this.rules=(t={},U.forEach((function(e){e.lngs.forEach((function(o){t[o]={numbers:e.nr,plurals:W[e.fc]}}))})),t)}return f(e,[{key:"addRule",value:function(e,o){this.rules[e]=o}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var o=this.getRule(e);return o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,o){var t=this,n=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var r=t.getSuffix(e,i);n.push("".concat(o).concat(r))})),n):n}},{key:"getSuffix",value:function(e,o){var t=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(o):n.plurals(Math.abs(o)),r=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===r?r="plural":1===r&&(r=""));var a=function(){return t.options.prepend&&r.toString()?t.options.prepend+r.toString():r.toString()};return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?"_plural_".concat(r.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),K=function(){function e(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),this.logger=T.create("interpolator"),this.options=o,this.format=o.interpolation&&o.interpolation.format||function(e){return e},this.init(o)}return f(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var o=e.interpolation;this.escape=void 0!==o.escape?o.escape:j,this.escapeValue=void 0===o.escapeValue||o.escapeValue,this.useRawValueToEscape=void 0!==o.useRawValueToEscape&&o.useRawValueToEscape,this.prefix=o.prefix?B(o.prefix):o.prefixEscaped||"{{",this.suffix=o.suffix?B(o.suffix):o.suffixEscaped||"}}",this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||",",this.unescapePrefix=o.unescapeSuffix?"":o.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":o.unescapeSuffix||"",this.nestingPrefix=o.nestingPrefix?B(o.nestingPrefix):o.nestingPrefixEscaped||B("$t("),this.nestingSuffix=o.nestingSuffix?B(o.nestingSuffix):o.nestingSuffixEscaped||B(")"),this.maxReplaces=o.maxReplaces?o.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var o="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(o,"g");var t="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(t,"g")}},{key:"interpolate",value:function(e,o,t,n){var i,r,a,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0)return E(o,l,e);var n=e.split(s.formatSeparator),i=n.shift().trim(),r=n.join(s.formatSeparator).trim();return s.format(E(o,l,i),r,t)};this.resetRegExp();var p=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(a=0;i=this.regexpUnescape.exec(e);){if(void 0===(r=c(i[1].trim())))if("function"==typeof p){var d=p(e,i,n);r="string"==typeof d?d:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),r="";else"string"==typeof r||this.useRawValueToEscape||(r=O(r));if(e=e.replace(i[0],u(r)),this.regexpUnescape.lastIndex=0,++a>=this.maxReplaces)break}for(a=0;i=this.regexp.exec(e);){if(void 0===(r=c(i[1].trim())))if("function"==typeof p){var f=p(e,i,n);r="string"==typeof f?f:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),r="";else"string"==typeof r||this.useRawValueToEscape||(r=O(r));if(r=this.escapeValue?u(this.escape(r)):u(r),e=e.replace(i[0],r),this.regexp.lastIndex=0,++a>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,o){var t,n,i=c({},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});function r(e,o){if(e.indexOf(",")<0)return e;var t=e.split(",");e=t.shift();var n=t.join(",");n=(n=this.interpolate(n,i)).replace(/'/g,'"');try{i=JSON.parse(n),o&&(i=c({},o,i))}catch(o){this.logger.error("failed parsing options string in nesting for key ".concat(e),o)}return delete i.defaultValue,e}for(i.applyPostProcessor=!1,delete i.defaultValue;t=this.nestingRegexp.exec(e);){if((n=o(r.call(this,t[1].trim(),i),i))&&t[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=O(n)),n||(this.logger.warn("missed to resolve ".concat(t[1]," for nesting ").concat(e)),n=""),e=e.replace(t[0],n),this.regexp.lastIndex=0}return e}}]),e}();var G=function(e){function o(e,t,n){var i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p(this,o),i=h(this,m(o).call(this)),R.call(g(i)),i.backend=e,i.store=t,i.services=n,i.languageUtils=n.languageUtils,i.options=r,i.logger=T.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,r.backend,r),i}return y(o,e),f(o,[{key:"queueLoad",value:function(e,o,t,n){var i=this,r=[],a=[],s=[],l=[];return e.forEach((function(e){var n=!0;o.forEach((function(o){var s="".concat(e,"|").concat(o);!t.reload&&i.store.hasResourceBundle(e,o)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?a.indexOf(s)<0&&a.push(s):(i.state[s]=1,n=!1,a.indexOf(s)<0&&a.push(s),r.indexOf(s)<0&&r.push(s),l.indexOf(o)<0&&l.push(o)))})),n||s.push(e)})),(r.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:n}),{toLoad:r,pending:a,toLoadLanguages:s,toLoadNamespaces:l}}},{key:"loaded",value:function(e,o,t){var n=S(e.split("|"),2),i=n[0],r=n[1];o&&this.emit("failedLoading",i,r,o),t&&this.store.addResourceBundle(i,r,t),this.state[e]=o?-1:2;var a={};this.queue.forEach((function(t){var n,s,l,u,c,p;n=t.loaded,s=r,u=C(n,[i],Object),c=u.obj,p=u.k,c[p]=c[p]||[],l&&(c[p]=c[p].concat(s)),l||c[p].push(s),function(e,o){for(var t=e.indexOf(o);-1!==t;)e.splice(t,1),t=e.indexOf(o)}(t.pending,e),o&&t.errors.push(o),0!==t.pending.length||t.done||(Object.keys(t.loaded).forEach((function(e){a[e]||(a[e]=[]),t.loaded[e].length&&t.loaded[e].forEach((function(o){a[e].indexOf(o)<0&&a[e].push(o)}))})),t.done=!0,t.errors.length?t.callback(t.errors):t.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,o,t){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[t](e,o,(function(s,l){s&&l&&i<5?setTimeout((function(){n.read.call(n,e,o,t,i+1,2*r,a)}),r):a(s,l)})):a(null,{})}},{key:"prepareLoading",value:function(e,o){var t=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof o&&(o=[o]);var r=this.queueLoad(e,o,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach((function(e){t.loadOne(e)}))}},{key:"load",value:function(e,o,t){this.prepareLoading(e,o,{},t)}},{key:"reload",value:function(e,o,t){this.prepareLoading(e,o,{reload:!0},t)}},{key:"loadOne",value:function(e){var o=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=S(e.split("|"),2),i=n[0],r=n[1];this.read(i,r,"read",null,null,(function(n,a){n&&o.logger.warn("".concat(t,"loading namespace ").concat(r," for language ").concat(i," failed"),n),!n&&a&&o.logger.log("".concat(t,"loaded namespace ").concat(r," for language ").concat(i),a),o.loaded(e,n,a)}))}},{key:"saveMissing",value:function(e,o,t,n,i){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)?this.logger.warn('did not save key "'.concat(t,'" for namespace "').concat(o,'" as the namespace was not yet loaded'),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):(this.backend&&this.backend.create&&this.backend.create(e,o,t,n,null,c({},r,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],o,t,n))}}]),o}(R);function _(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function q(){}const $=new(function(e){function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(p(this,o),e=h(this,m(o).call(this)),R.call(g(e)),e.options=_(t),e.services={},e.logger=T,e.modules={external:[]},n&&!e.isInitialized&&!t.isClone){if(!e.options.initImmediate)return e.init(t,n),h(e,g(e));setTimeout((function(){e.init(t,n)}),0)}return e}return y(o,e),f(o,[{key:"init",value:function(){var e=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof o&&(t=o,o={}),this.options=c({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var o={};if("object"===s(e[1])&&(o=e[1]),"string"==typeof e[1]&&(o.defaultValue=e[1]),"string"==typeof e[2]&&(o.tDescription=e[2]),"object"===s(e[2])||"object"===s(e[3])){var t=e[3]||e[2];Object.keys(t).forEach((function(e){o[e]=t[e]}))}return o},interpolation:{escapeValue:!0,format:function(e,o,t){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}},this.options,_(o)),this.format=this.options.interpolation.format,t||(t=q),!this.options.isClone){this.modules.logger?T.init(n(this.modules.logger),this.options):T.init(null,this.options);var i=new H(this.options);this.store=new I(this.options.resources,this.options);var r=this.services;r.logger=T,r.resourceStore=this.store,r.languageUtils=i,r.pluralResolver=new z(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),r.interpolator=new K(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new G(n(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(function(o){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];e.emit.apply(e,[o].concat(n))})),this.modules.languageDetector&&(r.languageDetector=n(this.modules.languageDetector),r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=n(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new D(this.services,this.options),this.translator.on("*",(function(o){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];e.emit.apply(e,[o].concat(n))})),this.modules.external.forEach((function(o){o.init&&o.init(e)}))}["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(o){e[o]=function(){var t;return(t=e.store)[o].apply(t,arguments)}}));var a=N(),l=function(){e.changeLanguage(e.options.lng,(function(o,n){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),a.resolve(n),t(o,n)}))};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),a}},{key:"loadResources",value:function(){var e=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return o();var t=[],n=function(o){o&&e.services.languageUtils.toResolveHierarchy(o).forEach((function(e){t.indexOf(e)<0&&t.push(e)}))};if(this.language)n(this.language);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return n(e)}));this.options.preload&&this.options.preload.forEach((function(e){return n(e)})),this.services.backendConnector.load(t,this.options.ns,o)}else o(null)}},{key:"reloadResources",value:function(e,o,t){var n=N();return e||(e=this.languages),o||(o=this.options.ns),t||(t=q),this.services.backendConnector.reload(e,o,(function(e){n.resolve(),t(e)})),n}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&V.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,o){var t=this,n=N();this.emit("languageChanging",e);var i=function(e){e&&(t.language=e,t.languages=t.services.languageUtils.toResolveHierarchy(e),t.translator.language||t.translator.changeLanguage(e),t.services.languageDetector&&t.services.languageDetector.cacheUserLanguage(e)),t.loadResources((function(i){!function(e,i){t.translator.changeLanguage(i),i&&(t.emit("languageChanged",i),t.logger.log("languageChanged",i)),n.resolve((function(){return t.t.apply(t,arguments)})),o&&o(e,(function(){return t.t.apply(t,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,o){var t=this,n=function e(o,n){var i;if("object"!==s(n)){for(var r=arguments.length,a=new Array(r>2?r-2:0),l=2;l<r;l++)a[l-2]=arguments[l];i=t.options.overloadTranslationOptionHandler([o,n].concat(a))}else i=c({},n);return i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,t.t(o,i)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=o,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var o=this;if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var t=this.languages[0],n=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===t.toLowerCase())return!0;var r=function(e,t){var n=o.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===n||2===n};return!!this.hasResourceBundle(t,e)||(!this.services.backendConnector.backend||!(!r(t,e)||n&&!r(i,e)))}},{key:"loadNamespaces",value:function(e,o){var t=this,n=N();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){t.options.ns.indexOf(e)<0&&t.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),o&&o(e)})),n):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(e,o){var t=N();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){t.resolve(),o&&o(e)})),t):(o&&o(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){return new o(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q,i=c({},this.options,t,{isClone:!0}),r=new o(i);return["store","services","language"].forEach((function(o){r[o]=e[o]})),r.translator=new D(r.services,r.options),r.translator.on("*",(function(e){for(var o=arguments.length,t=new Array(o>1?o-1:0),n=1;n<o;n++)t[n-1]=arguments[n];r.emit.apply(r,[e].concat(t))})),r.init(i,n),r.translator.options=r.options,r}}]),o}(R)),Z=JSON.parse('{"UU":"@ohif/mode-longitudinal"}').UU;var J=r(838);const Y={"viewport-0":"rgb(200, 0, 0)","viewport-1":"rgb(200, 200, 0)","viewport-2":"rgb(0, 200, 0)"},Q={axial:"rgb(200, 0, 0)",sagittal:"rgb(200, 200, 0)",coronal:"rgb(0, 200, 0)"};const X=function(e,o,t){!function(e,o,t,n){const i=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:r,Enums:a}=i.exports,s={active:[{toolName:r.WindowLevel,bindings:[{mouseButton:a.MouseBindings.Primary}]},{toolName:r.Pan,bindings:[{mouseButton:a.MouseBindings.Auxiliary}]},{toolName:r.Zoom,bindings:[{mouseButton:a.MouseBindings.Secondary}]},{toolName:r.StackScroll,bindings:[{mouseButton:a.MouseBindings.Wheel}]}],passive:[{toolName:r.Length},{toolName:r.ArrowAnnotate,configuration:{getTextCallback:(e,o)=>{t.runCommand("arrowTextCallback",{callback:e,eventDetails:o})},changeTextCallback:(e,o,n)=>{t.runCommand("arrowTextCallback",{callback:n,data:e,eventDetails:o})}}},{toolName:r.SegmentBidirectional},{toolName:r.Bidirectional},{toolName:r.DragProbe},{toolName:r.Probe},{toolName:r.EllipticalROI},{toolName:r.CircleROI},{toolName:r.RectangleROI},{toolName:r.StackScroll},{toolName:r.Angle},{toolName:r.CobbAngle},{toolName:r.Magnify},{toolName:r.CalibrationLine},{toolName:r.PlanarFreehandContourSegmentation,configuration:{displayOnePointAsCrosshairs:!0}},{toolName:r.UltrasoundDirectional},{toolName:r.PlanarFreehandROI},{toolName:r.SplineROI},{toolName:r.LivewireContour},{toolName:r.WindowLevelRegion}],enabled:[{toolName:r.ImageOverlayViewer},{toolName:r.ReferenceLines},{toolName:J.toolNames.SRSCOORD3DPoint}],disabled:[{toolName:r.AdvancedMagnify}]};o.createToolGroupAndAddTools(n,s)}(e,o,t,"default"),function(e,o){const t=e.getModuleEntry("@ohif/extension-cornerstone-dicom-sr.utilityModule.tools");if(!t)return;const n=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:i}=t.exports,{toolNames:r,Enums:a}=n.exports,s={active:[{toolName:r.WindowLevel,bindings:[{mouseButton:a.MouseBindings.Primary}]},{toolName:r.Pan,bindings:[{mouseButton:a.MouseBindings.Auxiliary}]},{toolName:r.Zoom,bindings:[{mouseButton:a.MouseBindings.Secondary}]},{toolName:r.StackScroll,bindings:[{mouseButton:a.MouseBindings.Wheel}]}],passive:[{toolName:i.SRLength},{toolName:i.SRArrowAnnotate},{toolName:i.SRBidirectional},{toolName:i.SREllipticalROI},{toolName:i.SRCircleROI},{toolName:i.SRPlanarFreehandROI},{toolName:i.SRRectangleROI},{toolName:r.WindowLevelRegion}],enabled:[{toolName:i.DICOMSRDisplay}]};o.createToolGroupAndAddTools("SRToolGroup",s)}(e,o),function(e,o,t){const n=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),i=e._servicesManager,{cornerstoneViewportService:r}=i.services,{toolNames:a,Enums:s}=n.exports,l={active:[{toolName:a.WindowLevel,bindings:[{mouseButton:s.MouseBindings.Primary}]},{toolName:a.Pan,bindings:[{mouseButton:s.MouseBindings.Auxiliary}]},{toolName:a.Zoom,bindings:[{mouseButton:s.MouseBindings.Secondary}]},{toolName:a.StackScroll,bindings:[{mouseButton:s.MouseBindings.Wheel}]}],passive:[{toolName:a.Length},{toolName:a.ArrowAnnotate,configuration:{getTextCallback:(e,o)=>{t.runCommand("arrowTextCallback",{callback:e,eventDetails:o})},changeTextCallback:(e,o,n)=>{t.runCommand("arrowTextCallback",{callback:n,data:e,eventDetails:o})}}},{toolName:a.Bidirectional},{toolName:a.DragProbe},{toolName:a.Probe},{toolName:a.EllipticalROI},{toolName:a.CircleROI},{toolName:a.RectangleROI},{toolName:a.StackScroll},{toolName:a.Angle},{toolName:a.CobbAngle},{toolName:a.PlanarFreehandROI},{toolName:a.SplineROI},{toolName:a.LivewireContour},{toolName:a.WindowLevelRegion},{toolName:a.PlanarFreehandContourSegmentation,configuration:{displayOnePointAsCrosshairs:!0}}],disabled:[{toolName:a.Crosshairs,configuration:{viewportIndicators:!0,viewportIndicatorsConfig:{circleRadius:5,xOffset:.95,yOffset:.05},disableOnPassive:!0,autoPan:{enabled:!1,panSize:10},getReferenceLineColor:e=>{const o=r.getViewportInfo(e),t=o?.viewportOptions;return t?Y[t.id]||Q[t.orientation]||"#0c0":(console.warn("missing viewport?",e),"#0c0")}}},{toolName:a.AdvancedMagnify},{toolName:a.ReferenceLines}]};o.createToolGroupAndAddTools("mpr",l)}(e,o,t),function(e,o){const t=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:n,Enums:i}=t.exports,r={active:[{toolName:n.TrackballRotateTool,bindings:[{mouseButton:i.MouseBindings.Primary}]},{toolName:n.Zoom,bindings:[{mouseButton:i.MouseBindings.Secondary}]},{toolName:n.Pan,bindings:[{mouseButton:i.MouseBindings.Auxiliary}]}]};o.createToolGroupAndAddTools("volume3d",r)}(e,o)};var ee=r(557),oe=r(2);const te=e=>[{commandName:"setViewportForToolConfiguration",commandOptions:{toolName:e}}],ne={commandName:"setToolActiveToolbar",commandOptions:{toolGroupIds:["default","mpr","SRToolGroup","volume3d"]}},ie=[{id:"MeasurementTools",uiType:"ohif.toolButtonList",props:{buttonSection:"measurementSection",groupId:"MeasurementTools"}},{id:"MoreTools",uiType:"ohif.toolButtonList",props:{buttonSection:"moreToolsSection",groupId:"MoreTools"}},{id:"Reset",uiType:"ohif.toolButton",props:{icon:"tool-reset",label:"Reset View",tooltip:"Reset View",commands:"resetViewport",evaluate:"evaluate.action"}},{id:"rotate-right",uiType:"ohif.toolButton",props:{icon:"tool-rotate-right",label:"Rotate Right",tooltip:"Rotate +90",commands:"rotateViewportCW",evaluate:["evaluate.action",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"flipHorizontal",uiType:"ohif.toolButton",props:{icon:"tool-flip-horizontal",label:"Flip Horizontal",tooltip:"Flip Horizontally",commands:"flipViewportHorizontal",evaluate:["evaluate.viewportProperties.toggle",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video","volume3d"]}]}},{id:"ImageSliceSync",uiType:"ohif.toolButton",props:{icon:"link",label:"Image Slice Sync",tooltip:"Enable position synchronization on stack viewports",commands:{commandName:"toggleSynchronizer",commandOptions:{type:"imageSlice"}},listeners:{[ee.EVENTS.VIEWPORT_NEW_IMAGE_SET]:{commandName:"toggleImageSliceSync",commandOptions:{toggledState:!0}}},evaluate:["evaluate.cornerstone.synchronizer",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video","volume3d"]}]}},{id:"ReferenceLines",uiType:"ohif.toolButton",props:{icon:"tool-referenceLines",label:"Reference Lines",tooltip:"Show Reference Lines",commands:"toggleEnabledDisabledToolbar",listeners:{[oe.ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]:te("ReferenceLinesTool"),[oe.ViewportGridService.EVENTS.VIEWPORTS_READY]:te("ReferenceLinesTool")},evaluate:["evaluate.cornerstoneTool.toggle",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"ImageOverlayViewer",uiType:"ohif.toolButton",props:{icon:"toggle-dicom-overlay",label:"Image Overlay",tooltip:"Toggle Image Overlay",commands:"toggleEnabledDisabledToolbar",evaluate:["evaluate.cornerstoneTool.toggle",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"StackScroll",uiType:"ohif.toolButton",props:{icon:"tool-stack-scroll",label:"Stack Scroll",tooltip:"Stack Scroll",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"invert",uiType:"ohif.toolButton",props:{icon:"tool-invert",label:"Invert",tooltip:"Invert Colors",commands:"invertViewport",evaluate:["evaluate.viewportProperties.toggle",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"Probe",uiType:"ohif.toolButton",props:{icon:"tool-probe",label:"Probe",tooltip:"Probe",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"Cine",uiType:"ohif.toolButton",props:{icon:"tool-cine",label:"Cine",tooltip:"Cine",commands:"toggleCine",evaluate:["evaluate.cine",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["volume3d"]}]}},{id:"Angle",uiType:"ohif.toolButton",props:{icon:"tool-angle",label:"Angle",tooltip:"Angle",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"CobbAngle",uiType:"ohif.toolButton",props:{icon:"icon-tool-cobb-angle",label:"Cobb Angle",tooltip:"Cobb Angle",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"Magnify",uiType:"ohif.toolButton",props:{icon:"tool-magnify",label:"Zoom-in",tooltip:"Zoom-in",commands:ne,evaluate:["evaluate.cornerstoneTool",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"CalibrationLine",uiType:"ohif.toolButton",props:{icon:"tool-calibration",label:"Calibration",tooltip:"Calibration Line",commands:ne,evaluate:["evaluate.cornerstoneTool",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"TagBrowser",uiType:"ohif.toolButton",props:{icon:"dicom-tag-browser",label:"Dicom Tag Browser",tooltip:"Dicom Tag Browser",commands:"openDICOMTagViewer"}},{id:"AdvancedMagnify",uiType:"ohif.toolButton",props:{icon:"icon-tool-loupe",label:"Magnify Probe",tooltip:"Magnify Probe",commands:"toggleActiveDisabledToolbar",evaluate:["evaluate.cornerstoneTool.toggle.ifStrictlyDisabled",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"UltrasoundDirectionalTool",uiType:"ohif.toolButton",props:{icon:"icon-tool-ultrasound-bidirectional",label:"Ultrasound Directional",tooltip:"Ultrasound Directional",commands:ne,evaluate:["evaluate.cornerstoneTool",{name:"evaluate.modality.supported",supportedModalities:["US"]}]}},{id:"WindowLevelRegion",uiType:"ohif.toolButton",props:{icon:"icon-tool-window-region",label:"Window Level Region",tooltip:"Window Level Region",commands:ne,evaluate:["evaluate.cornerstoneTool",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"Length",uiType:"ohif.toolButton",props:{icon:"tool-length",label:"Length",tooltip:"Length Tool",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"Bidirectional",uiType:"ohif.toolButton",props:{icon:"tool-bidirectional",label:"Bidirectional",tooltip:"Bidirectional Tool",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"ArrowAnnotate",uiType:"ohif.toolButton",props:{icon:"tool-annotate",label:"Annotation",tooltip:"Arrow Annotate",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"EllipticalROI",uiType:"ohif.toolButton",props:{icon:"tool-ellipse",label:"Ellipse",tooltip:"Ellipse ROI",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"RectangleROI",uiType:"ohif.toolButton",props:{icon:"tool-rectangle",label:"Rectangle",tooltip:"Rectangle ROI",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"CircleROI",uiType:"ohif.toolButton",props:{icon:"tool-circle",label:"Circle",tooltip:"Circle Tool",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"PlanarFreehandROI",uiType:"ohif.toolButton",props:{icon:"icon-tool-freehand-roi",label:"Freehand ROI",tooltip:"Freehand ROI",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"SplineROI",uiType:"ohif.toolButton",props:{icon:"icon-tool-spline-roi",label:"Spline ROI",tooltip:"Spline ROI",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"LivewireContour",uiType:"ohif.toolButton",props:{icon:"icon-tool-livewire",label:"Livewire tool",tooltip:"Livewire tool",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"WindowLevel",uiType:"ohif.toolButton",props:{icon:"tool-window-level",label:"Window Level",commands:ne,evaluate:["evaluate.cornerstoneTool",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["wholeSlide"]}]}},{id:"Pan",uiType:"ohif.toolButton",props:{type:"tool",icon:"tool-move",label:"Pan",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"Zoom",uiType:"ohif.toolButton",props:{type:"tool",icon:"tool-zoom",label:"Zoom",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"TrackballRotate",uiType:"ohif.toolButton",props:{type:"tool",icon:"tool-3d-rotate",label:"3D Rotate",commands:ne,evaluate:{name:"evaluate.cornerstoneTool",disabledText:"Select a 3D viewport to enable this tool"}}},{id:"Capture",uiType:"ohif.toolButton",props:{icon:"tool-capture",label:"Capture",commands:"showDownloadViewportModal",evaluate:["evaluate.action",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video","wholeSlide"]}]}},{id:"Layout",uiType:"ohif.layoutSelector",props:{rows:3,columns:4,evaluate:"evaluate.action"}},{id:"Crosshairs",uiType:"ohif.toolButton",props:{type:"tool",icon:"tool-crosshair",label:"Crosshairs",commands:{commandName:"setToolActiveToolbar",commandOptions:{toolGroupIds:["mpr"]}},evaluate:{name:"evaluate.cornerstoneTool",disabledText:"Select an MPR viewport to enable this tool"}}}],re=["ECG","SEG","RTSTRUCT","RTPLAN","PR"],ae="@ohif/extension-default.layoutTemplateModule.viewerLayout",se="@ohif/extension-default.sopClassHandlerModule.stack",le="@ohif/extension-cornerstone.sopClassHandlerModule.DicomMicroscopySopClassHandler",ue="@ohif/extension-cornerstone.panelModule.panelSegmentation",ce="@ohif/extension-measurement-tracking.panelModule.trackedMeasurements",pe="@ohif/extension-measurement-tracking.panelModule.seriesList",de="@ohif/extension-measurement-tracking.viewportModule.cornerstone-tracked",fe="@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr",ge="@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr-3d",he="@ohif/extension-cornerstone-dicom-sr.viewportModule.dicom-sr",me="@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video",ve="@ohif/extension-dicom-pdf.sopClassHandlerModule.dicom-pdf",ye="@ohif/extension-dicom-pdf.viewportModule.dicom-pdf",be="@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg",we="@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg",xe="@ohif/extension-cornerstone-dicom-pmap.sopClassHandlerModule.dicom-pmap",Se="@ohif/extension-cornerstone-dicom-pmap.viewportModule.dicom-pmap",ke="@ohif/extension-cornerstone-dicom-rt.viewportModule.dicom-rt",Te="@ohif/extension-cornerstone-dicom-rt.sopClassHandlerModule.dicom-rt",Re={"@ohif/extension-default":"^3.0.0","@ohif/extension-cornerstone":"^3.0.0","@ohif/extension-measurement-tracking":"^3.0.0","@ohif/extension-cornerstone-dicom-sr":"^3.0.0","@ohif/extension-cornerstone-dicom-seg":"^3.0.0","@ohif/extension-cornerstone-dicom-pmap":"^3.0.0","@ohif/extension-cornerstone-dicom-rt":"^3.0.0","@ohif/extension-dicom-pdf":"^3.0.1","@ohif/extension-dicom-video":"^3.0.1"};const Ne={id:Z,modeFactory:function({modeConfiguration:e}){let o=[];return{id:Z,routeName:"viewer",displayName:$.t("Modes:Basic Viewer"),onModeEnter:function({servicesManager:e,extensionManager:o,commandsManager:t}){const{measurementService:n,toolbarService:i,toolGroupService:r,customizationService:a}=e.services;n.clearMeasurements(),X(o,r,t),i.addButtons(ie),i.createButtonSection("primary",["MeasurementTools","Zoom","Pan","TrackballRotate","WindowLevel","Capture","Layout","Crosshairs","MoreTools"]),i.createButtonSection("measurementSection",["Length","Bidirectional","ArrowAnnotate","EllipticalROI","RectangleROI","CircleROI","PlanarFreehandROI","SplineROI","LivewireContour"]),i.createButtonSection("moreToolsSection",["Reset","rotate-right","flipHorizontal","ImageSliceSync","ReferenceLines","ImageOverlayViewer","StackScroll","invert","Probe","Cine","Angle","CobbAngle","Magnify","CalibrationLine","TagBrowser","AdvancedMagnify","UltrasoundDirectionalTool","WindowLevelRegion"]),a.setCustomizations({"panelSegmentation.disableEditing":{$set:!0}})},onModeExit:({servicesManager:e})=>{const{toolGroupService:t,syncGroupService:n,segmentationService:i,cornerstoneViewportService:r,uiDialogService:a,uiModalService:s}=e.services;o.forEach((e=>e.unsubscribe())),o=[],a.hideAll(),s.hide(),t.destroy(),n.destroy(),i.destroy(),r.destroy()},validationTags:{study:[],series:[]},isValidMode:function({modalities:e}){return{valid:!!e.split("\\").filter((e=>-1===re.indexOf(e))).length,description:"The mode does not support studies that ONLY include the following modalities: SM, ECG, SEG, RTSTRUCT"}},routes:[{path:"longitudinal",layoutTemplate:()=>({id:ae,props:{leftPanels:[pe],leftPanelResizable:!0,rightPanels:[ue,ce],rightPanelClosed:!0,rightPanelResizable:!0,viewports:[{namespace:de,displaySetsToDisplay:[se,me,ge,le]},{namespace:he,displaySetsToDisplay:[fe]},{namespace:ye,displaySetsToDisplay:[ve]},{namespace:we,displaySetsToDisplay:[be]},{namespace:Se,displaySetsToDisplay:[xe]},{namespace:ke,displaySetsToDisplay:[Te]}]}})}],extensions:Re,hangingProtocol:"default",sopClassHandlers:[me,be,xe,se,le,ve,ge,fe,Te],...e}},extensionDependencies:Re};return a=a.default})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@ohif/extension-cornerstone-dicom-sr"),require("@cornerstonejs/core"),require("@ohif/core")):"function"==typeof define&&define.amd?define(["@ohif/extension-cornerstone-dicom-sr","@cornerstonejs/core","@ohif/core"],t):"object"==typeof exports?exports["ohif-mode-longitudinal"]=t(require("@ohif/extension-cornerstone-dicom-sr"),require("@cornerstonejs/core"),require("@ohif/core")):e["ohif-mode-longitudinal"]=t(e["@ohif/extension-cornerstone-dicom-sr"],e["@cornerstonejs/core"],e["@ohif/core"])}(globalThis,((e,t,o)=>(()=>{"use strict";var n={557:e=>{e.exports=t},2:e=>{e.exports=o},838:t=>{t.exports=e}},i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={exports:{}};return n[e](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a={};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}function u(e,t,o){return(t=l(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function c(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(o).filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),n.forEach((function(t){u(e,t,o[t])}))}return e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function f(e,t,o){return t&&d(e.prototype,t),o&&d(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function w(e,t){if(e){if("string"==typeof e)return b(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?b(e,t):void 0}}function x(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,i,r,a,s=[],l=!0,u=!1;try{if(r=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;l=!1}else for(;!(l=(n=r.call(o)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.d(a,{default:()=>Ne});var k={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var o;console&&console[e]&&(o=console)[e].apply(o,x(t))}},T=new(function(){function e(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(this,e),this.init(t,o)}return f(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||k,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,o,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(o).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,c({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),R=function(){function e(){p(this,e),this.observers={}}return f(e,[{key:"on",value:function(e,t){var o=this;return e.split(" ").forEach((function(e){o.observers[e]=o.observers[e]||[],o.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,o)}));this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(o))}))}}]),e}();function N(){var e,t,o=new Promise((function(o,n){e=o,t=n}));return o.resolve=e,o.reject=t,o}function O(e){return null==e?"":""+e}function C(e,t,o){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var r="string"!=typeof t?[].concat(t):t.split(".");r.length>1;){if(i())return{};var a=n(r.shift());!e[a]&&o&&(e[a]=new o),e=e[a]}return i()?{}:{obj:e,k:n(r.shift())}}function L(e,t,o){var n=C(e,t,Object);n.obj[n.k]=o}function P(e,t){var o=C(e,t),n=o.obj,i=o.k;if(n)return n[i]}function E(e,t,o){var n=P(e,o);return void 0!==n?n:P(t,o)}function M(e,t,o){for(var n in t)n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?o&&(e[n]=t[n]):M(e[n],t[n],o):e[n]=t[n];return e}function B(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var A={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function j(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return A[e]})):e}var I=function(e){function t(e){var o,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return p(this,t),o=h(this,m(t).call(this)),R.call(g(o)),o.data=e||{},o.options=n,void 0===o.options.keySeparator&&(o.options.keySeparator="."),o}return y(t,e),f(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,o){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,r=[e,t];return o&&"string"!=typeof o&&(r=r.concat(o)),o&&"string"==typeof o&&(r=r.concat(i?o.split(i):o)),e.indexOf(".")>-1&&(r=e.split(".")),P(this.data,r)}},{key:"addResource",value:function(e,t,o,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},r=this.options.keySeparator;void 0===r&&(r=".");var a=[e,t];o&&(a=a.concat(r?o.split(r):o)),e.indexOf(".")>-1&&(n=t,t=(a=e.split("."))[1]),this.addNamespaces(t),L(this.data,a,n),i.silent||this.emit("added",e,t,o,n)}},{key:"addResources",value:function(e,t,o){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in o)"string"!=typeof o[i]&&"[object Array]"!==Object.prototype.toString.apply(o[i])||this.addResource(e,t,i,o[i],{silent:!0});n.silent||this.emit("added",e,t,o)}},{key:"addResourceBundle",value:function(e,t,o,n,i){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=o,o=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=P(this.data,a)||{};n?M(s,o,i):s=c({},s,o),L(this.data,a,s),r.silent||this.emit("added",e,t,o)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?c({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(R),V={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,o,n,i){var r=this;return e.forEach((function(e){r.processors[e]&&(t=r.processors[e].process(t,o,n,i))})),t}},D=function(e){function t(e){var o,n,i,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p(this,t),o=h(this,m(t).call(this)),R.call(g(o)),n=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i=e,r=g(o),n.forEach((function(e){i[e]&&(r[e]=i[e])})),o.options=a,void 0===o.options.keySeparator&&(o.options.keySeparator="."),o.logger=T.create("translator"),o}return y(t,e),f(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},o=this.resolve(e,t);return o&&void 0!==o.res}},{key:"extractFromKey",value:function(e,t){var o=t.nsSeparator||this.options.nsSeparator;void 0===o&&(o=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(o&&e.indexOf(o)>-1){var r=e.split(o);(o!==n||o===n&&this.options.ns.indexOf(r[0])>-1)&&(i=r.shift()),e=r.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var o=this;if("object"!==s(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=this.extractFromKey(e[e.length-1],t),r=i.key,a=i.namespaces,l=a[a.length-1],u=t.lng||this.language,p=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(p){var d=t.nsSeparator||this.options.nsSeparator;return l+d+r}return r}var f=this.resolve(e,t),g=f&&f.res,h=f&&f.usedKey||r,m=f&&f.exactUsedKey||r,v=Object.prototype.toString.apply(g),y=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&g&&("string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(v)<0&&("string"!=typeof y||"[object Array]"!==v)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,g,t):"key '".concat(r," (").concat(this.language,")' returned an object instead of string.");if(n){var w="[object Array]"===v,x=w?[]:{},S=w?m:h;for(var k in g)if(Object.prototype.hasOwnProperty.call(g,k)){var T="".concat(S).concat(n).concat(k);x[k]=this.translate(T,c({},t,{joinArrays:!1,ns:a})),x[k]===T&&(x[k]=g[k])}g=x}}else if(b&&"string"==typeof y&&"[object Array]"===v)(g=g.join(y))&&(g=this.extendTranslation(g,e,t));else{var R=!1,N=!1;if(!this.isValidLookup(g)&&void 0!==t.defaultValue){if(R=!0,void 0!==t.count){var O=this.pluralResolver.getSuffix(u,t.count);g=t["defaultValue".concat(O)]}g||(g=t.defaultValue)}this.isValidLookup(g)||(N=!0,g=r);var C=t.defaultValue&&t.defaultValue!==g&&this.options.updateMissing;if(N||R||C){this.logger.log(C?"updateKey":"missingKey",u,l,r,C?t.defaultValue:g);var L=[],P=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&P&&P[0])for(var E=0;E<P.length;E++)L.push(P[E]);else"all"===this.options.saveMissingTo?L=this.languageUtils.toResolveHierarchy(t.lng||this.language):L.push(t.lng||this.language);var M=function(e,n){o.options.missingKeyHandler?o.options.missingKeyHandler(e,l,n,C?t.defaultValue:g,C,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,l,n,C?t.defaultValue:g,C,t),o.emit("missingKey",e,l,n,g)};if(this.options.saveMissing){var B=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&B?L.forEach((function(e){o.pluralResolver.getPluralFormsOfKey(e,r).forEach((function(t){return M([e],t)}))})):M(L,r)}}g=this.extendTranslation(g,e,t,f),N&&g===r&&this.options.appendNamespaceToMissingKey&&(g="".concat(l,":").concat(r)),N&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(g))}return g}},{key:"extendTranslation",value:function(e,t,o,n){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,o,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init(c({},o,{interpolation:c({},this.options.interpolation,o.interpolation)}));var r=o.replace&&"string"!=typeof o.replace?o.replace:o;this.options.interpolation.defaultVariables&&(r=c({},this.options.interpolation.defaultVariables,r)),e=this.interpolator.interpolate(e,r,o.lng||this.language,o),!1!==o.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),o)),o.interpolation&&this.interpolator.reset()}var a=o.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==o.applyPostProcessor&&(e=V.handle(s,e,t,this.options&&this.options.postProcessPassResolved?c({i18nResolved:n},o):o,this)),e}},{key:"resolve",value:function(e){var t,o,n,i,r,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var l=a.extractFromKey(e,s),u=l.key;o=u;var c=l.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var p=void 0!==s.count&&"string"!=typeof s.count,d=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,f=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach((function(e){a.isValidLookup(t)||(r=e,a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(r)&&a.logger.warn('key "'.concat(o,'" for namespace "').concat(r,"\" won't get resolved as namespace was not yet loaded"),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"),f.forEach((function(o){if(!a.isValidLookup(t)){i=o;var r,l,c=u,f=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(f,u,o,e,s);else p&&(r=a.pluralResolver.getSuffix(o,s.count)),p&&d&&f.push(c+r),d&&f.push(c+="".concat(a.options.contextSeparator).concat(s.context)),p&&f.push(c+=r);for(;l=f.pop();)a.isValidLookup(t)||(n=l,t=a.getResource(o,e,l,s))}})))}))}})),{res:t,usedKey:o,exactUsedKey:n,usedLng:i,usedNS:r}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,o){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,o,n):this.resourceStore.getResource(e,t,o,n)}}]),t}(R);function F(e){return e.charAt(0).toUpperCase()+e.slice(1)}var H=function(){function e(t){p(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=T.create("languageUtils")}return f(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],o=e.split("-");return this.options.lowerCaseLng?o=o.map((function(e){return e.toLowerCase()})):2===o.length?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),t.indexOf(o[1].toLowerCase())>-1&&(o[1]=F(o[1].toLowerCase()))):3===o.length&&(o[0]=o[0].toLowerCase(),2===o[1].length&&(o[1]=o[1].toUpperCase()),"sgn"!==o[0]&&2===o[2].length&&(o[2]=o[2].toUpperCase()),t.indexOf(o[1].toLowerCase())>-1&&(o[1]=F(o[1].toLowerCase())),t.indexOf(o[2].toLowerCase())>-1&&(o[2]=F(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var o=e[t];return o||(o=e[this.getScriptPartFromCode(t)]),o||(o=e[this.formatLanguageCode(t)]),o||(o=e.default),o||[]}},{key:"toResolveHierarchy",value:function(e,t){var o=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],r=function(e){e&&(o.isWhitelisted(e)?i.push(e):o.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):"string"==typeof e&&r(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&r(o.formatLanguageCode(e))})),i}}]),e}(),U=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],W={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};var z=function(){function e(t){var o,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(this,e),this.languageUtils=t,this.options=n,this.logger=T.create("pluralResolver"),this.rules=(o={},U.forEach((function(e){e.lngs.forEach((function(t){o[t]={numbers:e.nr,plurals:W[e.fc]}}))})),o)}return f(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var o=this,n=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var r=o.getSuffix(e,i);n.push("".concat(t).concat(r))})),n):n}},{key:"getSuffix",value:function(e,t){var o=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),r=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===r?r="plural":1===r&&(r=""));var a=function(){return o.options.prepend&&r.toString()?o.options.prepend+r.toString():r.toString()};return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?"_plural_".concat(r.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),K=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),this.logger=T.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return f(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:j,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?B(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?B(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?B(t.nestingPrefix):t.nestingPrefixEscaped||B("$t("),this.nestingSuffix=t.nestingSuffix?B(t.nestingSuffix):t.nestingSuffixEscaped||B(")"),this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(e,t,o,n){var i,r,a,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0)return E(t,l,e);var n=e.split(s.formatSeparator),i=n.shift().trim(),r=n.join(s.formatSeparator).trim();return s.format(E(t,l,i),r,o)};this.resetRegExp();var p=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(a=0;i=this.regexpUnescape.exec(e);){if(void 0===(r=c(i[1].trim())))if("function"==typeof p){var d=p(e,i,n);r="string"==typeof d?d:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),r="";else"string"==typeof r||this.useRawValueToEscape||(r=O(r));if(e=e.replace(i[0],u(r)),this.regexpUnescape.lastIndex=0,++a>=this.maxReplaces)break}for(a=0;i=this.regexp.exec(e);){if(void 0===(r=c(i[1].trim())))if("function"==typeof p){var f=p(e,i,n);r="string"==typeof f?f:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),r="";else"string"==typeof r||this.useRawValueToEscape||(r=O(r));if(r=this.escapeValue?u(this.escape(r)):u(r),e=e.replace(i[0],r),this.regexp.lastIndex=0,++a>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var o,n,i=c({},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});function r(e,t){if(e.indexOf(",")<0)return e;var o=e.split(",");e=o.shift();var n=o.join(",");n=(n=this.interpolate(n,i)).replace(/'/g,'"');try{i=JSON.parse(n),t&&(i=c({},t,i))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return delete i.defaultValue,e}for(i.applyPostProcessor=!1,delete i.defaultValue;o=this.nestingRegexp.exec(e);){if((n=t(r.call(this,o[1].trim(),i),i))&&o[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=O(n)),n||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(e)),n=""),e=e.replace(o[0],n),this.regexp.lastIndex=0}return e}}]),e}();var G=function(e){function t(e,o,n){var i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p(this,t),i=h(this,m(t).call(this)),R.call(g(i)),i.backend=e,i.store=o,i.services=n,i.languageUtils=n.languageUtils,i.options=r,i.logger=T.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,r.backend,r),i}return y(t,e),f(t,[{key:"queueLoad",value:function(e,t,o,n){var i=this,r=[],a=[],s=[],l=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!o.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?a.indexOf(s)<0&&a.push(s):(i.state[s]=1,n=!1,a.indexOf(s)<0&&a.push(s),r.indexOf(s)<0&&r.push(s),l.indexOf(t)<0&&l.push(t)))})),n||s.push(e)})),(r.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:n}),{toLoad:r,pending:a,toLoadLanguages:s,toLoadNamespaces:l}}},{key:"loaded",value:function(e,t,o){var n=S(e.split("|"),2),i=n[0],r=n[1];t&&this.emit("failedLoading",i,r,t),o&&this.store.addResourceBundle(i,r,o),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(o){var n,s,l,u,c,p;n=o.loaded,s=r,u=C(n,[i],Object),c=u.obj,p=u.k,c[p]=c[p]||[],l&&(c[p]=c[p].concat(s)),l||c[p].push(s),function(e,t){for(var o=e.indexOf(t);-1!==o;)e.splice(o,1),o=e.indexOf(t)}(o.pending,e),t&&o.errors.push(t),0!==o.pending.length||o.done||(Object.keys(o.loaded).forEach((function(e){a[e]||(a[e]=[]),o.loaded[e].length&&o.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),o.done=!0,o.errors.length?o.callback(o.errors):o.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,o){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[o](e,t,(function(s,l){s&&l&&i<5?setTimeout((function(){n.read.call(n,e,t,o,i+1,2*r,a)}),r):a(s,l)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var o=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var r=this.queueLoad(e,t,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach((function(e){o.loadOne(e)}))}},{key:"load",value:function(e,t,o){this.prepareLoading(e,t,{},o)}},{key:"reload",value:function(e,t,o){this.prepareLoading(e,t,{reload:!0},o)}},{key:"loadOne",value:function(e){var t=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=S(e.split("|"),2),i=n[0],r=n[1];this.read(i,r,"read",null,null,(function(n,a){n&&t.logger.warn("".concat(o,"loading namespace ").concat(r," for language ").concat(i," failed"),n),!n&&a&&t.logger.log("".concat(o,"loaded namespace ").concat(r," for language ").concat(i),a),t.loaded(e,n,a)}))}},{key:"saveMissing",value:function(e,t,o,n,i){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(o,'" for namespace "').concat(t,'" as the namespace was not yet loaded'),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):(this.backend&&this.backend.create&&this.backend.create(e,t,o,n,null,c({},r,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,o,n))}}]),t}(R);function _(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function q(){}const $=new(function(e){function t(){var e,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(p(this,t),e=h(this,m(t).call(this)),R.call(g(e)),e.options=_(o),e.services={},e.logger=T,e.modules={external:[]},n&&!e.isInitialized&&!o.isClone){if(!e.options.initImmediate)return e.init(o,n),h(e,g(e));setTimeout((function(){e.init(o,n)}),0)}return e}return y(t,e),f(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(o=t,t={}),this.options=c({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===s(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===s(e[2])||"object"===s(e[3])){var o=e[3]||e[2];Object.keys(o).forEach((function(e){t[e]=o[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,o){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}},this.options,_(t)),this.format=this.options.interpolation.format,o||(o=q),!this.options.isClone){this.modules.logger?T.init(n(this.modules.logger),this.options):T.init(null,this.options);var i=new H(this.options);this.store=new I(this.options.resources,this.options);var r=this.services;r.logger=T,r.resourceStore=this.store,r.languageUtils=i,r.pluralResolver=new z(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),r.interpolator=new K(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new G(n(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(r.languageDetector=n(this.modules.languageDetector),r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=n(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new D(this.services,this.options),this.translator.on("*",(function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var o;return(o=e.store)[t].apply(o,arguments)}}));var a=N(),l=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),a.resolve(n),o(t,n)}))};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),a}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var o=[],n=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(this.language)n(this.language);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return n(e)}));this.options.preload&&this.options.preload.forEach((function(e){return n(e)})),this.services.backendConnector.load(o,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,o){var n=N();return e||(e=this.languages),t||(t=this.options.ns),o||(o=q),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),o(e)})),n}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&V.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var o=this,n=N();this.emit("languageChanging",e);var i=function(e){e&&(o.language=e,o.languages=o.services.languageUtils.toResolveHierarchy(e),o.translator.language||o.translator.changeLanguage(e),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage(e)),o.loadResources((function(i){!function(e,i){o.translator.changeLanguage(i),i&&(o.emit("languageChanged",i),o.logger.log("languageChanged",i)),n.resolve((function(){return o.t.apply(o,arguments)})),t&&t(e,(function(){return o.t.apply(o,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var o=this,n=function e(t,n){var i;if("object"!==s(n)){for(var r=arguments.length,a=new Array(r>2?r-2:0),l=2;l<r;l++)a[l-2]=arguments[l];i=o.options.overloadTranslationOptionHandler([t,n].concat(a))}else i=c({},n);return i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,o.t(t,i)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=t,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this;if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.languages[0],n=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===o.toLowerCase())return!0;var r=function(e,o){var n=t.services.backendConnector.state["".concat(e,"|").concat(o)];return-1===n||2===n};return!!this.hasResourceBundle(o,e)||(!this.services.backendConnector.backend||!(!r(o,e)||n&&!r(i,e)))}},{key:"loadNamespaces",value:function(e,t){var o=this,n=N();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){o.options.ns.indexOf(e)<0&&o.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var o=N();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){o.resolve(),t&&t(e)})),o):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q,i=c({},this.options,o,{isClone:!0}),r=new t(i);return["store","services","language"].forEach((function(t){r[t]=e[t]})),r.translator=new D(r.services,r.options),r.translator.on("*",(function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];r.emit.apply(r,[e].concat(o))})),r.init(i,n),r.translator.options=r.options,r}}]),t}(R)),Z=JSON.parse('{"UU":"@ohif/mode-longitudinal"}').UU;var J=r(838);const Y={"viewport-0":"rgb(200, 0, 0)","viewport-1":"rgb(200, 200, 0)","viewport-2":"rgb(0, 200, 0)"},Q={axial:"rgb(200, 0, 0)",sagittal:"rgb(200, 200, 0)",coronal:"rgb(0, 200, 0)"};const X=function(e,t,o){!function(e,t,o,n){const i=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:r,Enums:a}=i.exports,s={active:[{toolName:r.WindowLevel,bindings:[{mouseButton:a.MouseBindings.Primary}]},{toolName:r.Pan,bindings:[{mouseButton:a.MouseBindings.Auxiliary}]},{toolName:r.Zoom,bindings:[{mouseButton:a.MouseBindings.Secondary}]},{toolName:r.StackScroll,bindings:[{mouseButton:a.MouseBindings.Wheel}]}],passive:[{toolName:r.Length},{toolName:r.ArrowAnnotate,configuration:{getTextCallback:(e,t)=>{o.runCommand("arrowTextCallback",{callback:e,eventDetails:t})},changeTextCallback:(e,t,n)=>{o.runCommand("arrowTextCallback",{callback:n,data:e,eventDetails:t})}}},{toolName:r.SegmentBidirectional},{toolName:r.Bidirectional},{toolName:r.DragProbe},{toolName:r.Probe},{toolName:r.EllipticalROI},{toolName:r.CircleROI},{toolName:r.RectangleROI},{toolName:r.StackScroll},{toolName:r.Angle},{toolName:r.CobbAngle},{toolName:r.Magnify},{toolName:r.CalibrationLine},{toolName:r.PlanarFreehandContourSegmentation,configuration:{displayOnePointAsCrosshairs:!0}},{toolName:r.UltrasoundDirectional},{toolName:r.PlanarFreehandROI},{toolName:r.SplineROI},{toolName:r.LivewireContour},{toolName:r.WindowLevelRegion}],enabled:[{toolName:r.ImageOverlayViewer},{toolName:r.ReferenceLines},{toolName:J.toolNames.SRSCOORD3DPoint}],disabled:[{toolName:r.AdvancedMagnify}]};t.createToolGroupAndAddTools(n,s)}(e,t,o,"default"),function(e,t){const o=e.getModuleEntry("@ohif/extension-cornerstone-dicom-sr.utilityModule.tools");if(!o)return;const n=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:i}=o.exports,{toolNames:r,Enums:a}=n.exports,s={active:[{toolName:r.WindowLevel,bindings:[{mouseButton:a.MouseBindings.Primary}]},{toolName:r.Pan,bindings:[{mouseButton:a.MouseBindings.Auxiliary}]},{toolName:r.Zoom,bindings:[{mouseButton:a.MouseBindings.Secondary}]},{toolName:r.StackScroll,bindings:[{mouseButton:a.MouseBindings.Wheel}]}],passive:[{toolName:i.SRLength},{toolName:i.SRArrowAnnotate},{toolName:i.SRBidirectional},{toolName:i.SREllipticalROI},{toolName:i.SRCircleROI},{toolName:i.SRPlanarFreehandROI},{toolName:i.SRRectangleROI},{toolName:r.WindowLevelRegion}],enabled:[{toolName:i.DICOMSRDisplay}]};t.createToolGroupAndAddTools("SRToolGroup",s)}(e,t),function(e,t,o){const n=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),i=e._servicesManager,{cornerstoneViewportService:r}=i.services,{toolNames:a,Enums:s}=n.exports,l={active:[{toolName:a.WindowLevel,bindings:[{mouseButton:s.MouseBindings.Primary}]},{toolName:a.Pan,bindings:[{mouseButton:s.MouseBindings.Auxiliary}]},{toolName:a.Zoom,bindings:[{mouseButton:s.MouseBindings.Secondary}]},{toolName:a.StackScroll,bindings:[{mouseButton:s.MouseBindings.Wheel}]}],passive:[{toolName:a.Length},{toolName:a.ArrowAnnotate,configuration:{getTextCallback:(e,t)=>{o.runCommand("arrowTextCallback",{callback:e,eventDetails:t})},changeTextCallback:(e,t,n)=>{o.runCommand("arrowTextCallback",{callback:n,data:e,eventDetails:t})}}},{toolName:a.Bidirectional},{toolName:a.DragProbe},{toolName:a.Probe},{toolName:a.EllipticalROI},{toolName:a.CircleROI},{toolName:a.RectangleROI},{toolName:a.StackScroll},{toolName:a.Angle},{toolName:a.CobbAngle},{toolName:a.PlanarFreehandROI},{toolName:a.SplineROI},{toolName:a.LivewireContour},{toolName:a.WindowLevelRegion},{toolName:a.PlanarFreehandContourSegmentation,configuration:{displayOnePointAsCrosshairs:!0}}],disabled:[{toolName:a.Crosshairs,configuration:{viewportIndicators:!0,viewportIndicatorsConfig:{circleRadius:5,xOffset:.95,yOffset:.05},disableOnPassive:!0,autoPan:{enabled:!1,panSize:10},getReferenceLineColor:e=>{const t=r.getViewportInfo(e),o=t?.viewportOptions;return o?Y[o.id]||Q[o.orientation]||"#0c0":(console.warn("missing viewport?",e),"#0c0")}}},{toolName:a.AdvancedMagnify},{toolName:a.ReferenceLines}]};t.createToolGroupAndAddTools("mpr",l)}(e,t,o),function(e,t){const o=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:n,Enums:i}=o.exports,r={active:[{toolName:n.TrackballRotateTool,bindings:[{mouseButton:i.MouseBindings.Primary}]},{toolName:n.Zoom,bindings:[{mouseButton:i.MouseBindings.Secondary}]},{toolName:n.Pan,bindings:[{mouseButton:i.MouseBindings.Auxiliary}]}]};t.createToolGroupAndAddTools("volume3d",r)}(e,t)};var ee=r(557),te=r(2);const oe=e=>[{commandName:"setViewportForToolConfiguration",commandOptions:{toolName:e}}],ne={commandName:"setToolActiveToolbar",commandOptions:{toolGroupIds:["default","mpr","SRToolGroup","volume3d"]}},ie=[{id:"MeasurementTools",uiType:"ohif.toolButtonList",props:{buttonSection:"measurementSection",groupId:"MeasurementTools"}},{id:"MoreTools",uiType:"ohif.toolButtonList",props:{buttonSection:"moreToolsSection",groupId:"MoreTools"}},{id:"Reset",uiType:"ohif.toolButton",props:{icon:"tool-reset",label:"Reset View",tooltip:"Reset View",commands:"resetViewport",evaluate:"evaluate.action"}},{id:"rotate-right",uiType:"ohif.toolButton",props:{icon:"tool-rotate-right",label:"Rotate Right",tooltip:"Rotate +90",commands:"rotateViewportCW",evaluate:["evaluate.action",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"flipHorizontal",uiType:"ohif.toolButton",props:{icon:"tool-flip-horizontal",label:"Flip Horizontal",tooltip:"Flip Horizontally",commands:"flipViewportHorizontal",evaluate:["evaluate.viewportProperties.toggle",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video","volume3d"]}]}},{id:"ImageSliceSync",uiType:"ohif.toolButton",props:{icon:"link",label:"Image Slice Sync",tooltip:"Enable position synchronization on stack viewports",commands:{commandName:"toggleSynchronizer",commandOptions:{type:"imageSlice"}},listeners:{[ee.EVENTS.VIEWPORT_NEW_IMAGE_SET]:{commandName:"toggleImageSliceSync",commandOptions:{toggledState:!0}}},evaluate:["evaluate.cornerstone.synchronizer",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video","volume3d"]}]}},{id:"ReferenceLines",uiType:"ohif.toolButton",props:{icon:"tool-referenceLines",label:"Reference Lines",tooltip:"Show Reference Lines",commands:"toggleEnabledDisabledToolbar",listeners:{[te.ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]:oe("ReferenceLines"),[te.ViewportGridService.EVENTS.VIEWPORTS_READY]:oe("ReferenceLines")},evaluate:["evaluate.cornerstoneTool.toggle",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"ImageOverlayViewer",uiType:"ohif.toolButton",props:{icon:"toggle-dicom-overlay",label:"Image Overlay",tooltip:"Toggle Image Overlay",commands:"toggleEnabledDisabledToolbar",evaluate:["evaluate.cornerstoneTool.toggle",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"StackScroll",uiType:"ohif.toolButton",props:{icon:"tool-stack-scroll",label:"Stack Scroll",tooltip:"Stack Scroll",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"invert",uiType:"ohif.toolButton",props:{icon:"tool-invert",label:"Invert",tooltip:"Invert Colors",commands:"invertViewport",evaluate:["evaluate.viewportProperties.toggle",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"Probe",uiType:"ohif.toolButton",props:{icon:"tool-probe",label:"Probe",tooltip:"Probe",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"Cine",uiType:"ohif.toolButton",props:{icon:"tool-cine",label:"Cine",tooltip:"Cine",commands:"toggleCine",evaluate:["evaluate.cine",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["volume3d"]}]}},{id:"Angle",uiType:"ohif.toolButton",props:{icon:"tool-angle",label:"Angle",tooltip:"Angle",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"CobbAngle",uiType:"ohif.toolButton",props:{icon:"icon-tool-cobb-angle",label:"Cobb Angle",tooltip:"Cobb Angle",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"Magnify",uiType:"ohif.toolButton",props:{icon:"tool-magnify",label:"Zoom-in",tooltip:"Zoom-in",commands:ne,evaluate:["evaluate.cornerstoneTool",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"CalibrationLine",uiType:"ohif.toolButton",props:{icon:"tool-calibration",label:"Calibration",tooltip:"Calibration Line",commands:ne,evaluate:["evaluate.cornerstoneTool",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"TagBrowser",uiType:"ohif.toolButton",props:{icon:"dicom-tag-browser",label:"Dicom Tag Browser",tooltip:"Dicom Tag Browser",commands:"openDICOMTagViewer"}},{id:"AdvancedMagnify",uiType:"ohif.toolButton",props:{icon:"icon-tool-loupe",label:"Magnify Probe",tooltip:"Magnify Probe",commands:"toggleActiveDisabledToolbar",evaluate:["evaluate.cornerstoneTool.toggle.ifStrictlyDisabled",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"UltrasoundDirectionalTool",uiType:"ohif.toolButton",props:{icon:"icon-tool-ultrasound-bidirectional",label:"Ultrasound Directional",tooltip:"Ultrasound Directional",commands:ne,evaluate:["evaluate.cornerstoneTool",{name:"evaluate.modality.supported",supportedModalities:["US"]}]}},{id:"WindowLevelRegion",uiType:"ohif.toolButton",props:{icon:"icon-tool-window-region",label:"Window Level Region",tooltip:"Window Level Region",commands:ne,evaluate:["evaluate.cornerstoneTool",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video"]}]}},{id:"Length",uiType:"ohif.toolButton",props:{icon:"tool-length",label:"Length",tooltip:"Length Tool",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"Bidirectional",uiType:"ohif.toolButton",props:{icon:"tool-bidirectional",label:"Bidirectional",tooltip:"Bidirectional Tool",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"ArrowAnnotate",uiType:"ohif.toolButton",props:{icon:"tool-annotate",label:"Annotation",tooltip:"Arrow Annotate",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"EllipticalROI",uiType:"ohif.toolButton",props:{icon:"tool-ellipse",label:"Ellipse",tooltip:"Ellipse ROI",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"RectangleROI",uiType:"ohif.toolButton",props:{icon:"tool-rectangle",label:"Rectangle",tooltip:"Rectangle ROI",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"CircleROI",uiType:"ohif.toolButton",props:{icon:"tool-circle",label:"Circle",tooltip:"Circle Tool",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"PlanarFreehandROI",uiType:"ohif.toolButton",props:{icon:"icon-tool-freehand-roi",label:"Freehand ROI",tooltip:"Freehand ROI",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"SplineROI",uiType:"ohif.toolButton",props:{icon:"icon-tool-spline-roi",label:"Spline ROI",tooltip:"Spline ROI",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"LivewireContour",uiType:"ohif.toolButton",props:{icon:"icon-tool-livewire",label:"Livewire tool",tooltip:"Livewire tool",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"WindowLevel",uiType:"ohif.toolButton",props:{icon:"tool-window-level",label:"Window Level",commands:ne,evaluate:["evaluate.cornerstoneTool",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["wholeSlide"]}]}},{id:"Pan",uiType:"ohif.toolButton",props:{type:"tool",icon:"tool-move",label:"Pan",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"Zoom",uiType:"ohif.toolButton",props:{type:"tool",icon:"tool-zoom",label:"Zoom",commands:ne,evaluate:"evaluate.cornerstoneTool"}},{id:"TrackballRotate",uiType:"ohif.toolButton",props:{type:"tool",icon:"tool-3d-rotate",label:"3D Rotate",commands:ne,evaluate:{name:"evaluate.cornerstoneTool",disabledText:"Select a 3D viewport to enable this tool"}}},{id:"Capture",uiType:"ohif.toolButton",props:{icon:"tool-capture",label:"Capture",commands:"showDownloadViewportModal",evaluate:["evaluate.action",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video","wholeSlide"]}]}},{id:"Layout",uiType:"ohif.layoutSelector",props:{rows:3,columns:4,evaluate:"evaluate.action"}},{id:"Crosshairs",uiType:"ohif.toolButton",props:{type:"tool",icon:"tool-crosshair",label:"Crosshairs",commands:{commandName:"setToolActiveToolbar",commandOptions:{toolGroupIds:["mpr"]}},evaluate:{name:"evaluate.cornerstoneTool",disabledText:"Select an MPR viewport to enable this tool"}}}],re=["ECG","SEG","RTSTRUCT","RTPLAN","PR"],ae="@ohif/extension-default.layoutTemplateModule.viewerLayout",se="@ohif/extension-default.sopClassHandlerModule.stack",le="@ohif/extension-cornerstone.sopClassHandlerModule.DicomMicroscopySopClassHandler",ue="@ohif/extension-cornerstone.panelModule.panelSegmentation",ce="@ohif/extension-measurement-tracking.panelModule.trackedMeasurements",pe="@ohif/extension-measurement-tracking.panelModule.seriesList",de="@ohif/extension-measurement-tracking.viewportModule.cornerstone-tracked",fe="@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr",ge="@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr-3d",he="@ohif/extension-cornerstone-dicom-sr.viewportModule.dicom-sr",me="@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video",ve="@ohif/extension-dicom-pdf.sopClassHandlerModule.dicom-pdf",ye="@ohif/extension-dicom-pdf.viewportModule.dicom-pdf",be="@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg",we="@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg",xe="@ohif/extension-cornerstone-dicom-pmap.sopClassHandlerModule.dicom-pmap",Se="@ohif/extension-cornerstone-dicom-pmap.viewportModule.dicom-pmap",ke="@ohif/extension-cornerstone-dicom-rt.viewportModule.dicom-rt",Te="@ohif/extension-cornerstone-dicom-rt.sopClassHandlerModule.dicom-rt",Re={"@ohif/extension-default":"^3.0.0","@ohif/extension-cornerstone":"^3.0.0","@ohif/extension-measurement-tracking":"^3.0.0","@ohif/extension-cornerstone-dicom-sr":"^3.0.0","@ohif/extension-cornerstone-dicom-seg":"^3.0.0","@ohif/extension-cornerstone-dicom-pmap":"^3.0.0","@ohif/extension-cornerstone-dicom-rt":"^3.0.0","@ohif/extension-dicom-pdf":"^3.0.1","@ohif/extension-dicom-video":"^3.0.1"};const Ne={id:Z,modeFactory:function({modeConfiguration:e}){let t=[];return{id:Z,routeName:"viewer",displayName:$.t("Modes:Basic Viewer"),onModeEnter:function({servicesManager:e,extensionManager:t,commandsManager:o}){const{measurementService:n,toolbarService:i,toolGroupService:r,customizationService:a}=e.services;n.clearMeasurements(),X(t,r,o),i.addButtons(ie),i.createButtonSection("primary",["MeasurementTools","Zoom","Pan","TrackballRotate","WindowLevel","Capture","Layout","Crosshairs","MoreTools"]),i.createButtonSection("measurementSection",["Length","Bidirectional","ArrowAnnotate","EllipticalROI","RectangleROI","CircleROI","PlanarFreehandROI","SplineROI","LivewireContour"]),i.createButtonSection("moreToolsSection",["Reset","rotate-right","flipHorizontal","ImageSliceSync","ReferenceLines","ImageOverlayViewer","StackScroll","invert","Probe","Cine","Angle","CobbAngle","Magnify","CalibrationLine","TagBrowser","AdvancedMagnify","UltrasoundDirectionalTool","WindowLevelRegion"]),a.setCustomizations({"panelSegmentation.disableEditing":{$set:!0}})},onModeExit:({servicesManager:e})=>{const{toolGroupService:o,syncGroupService:n,segmentationService:i,cornerstoneViewportService:r,uiDialogService:a,uiModalService:s}=e.services;t.forEach((e=>e.unsubscribe())),t=[],a.hideAll(),s.hide(),o.destroy(),n.destroy(),i.destroy(),r.destroy()},validationTags:{study:[],series:[]},isValidMode:function({modalities:e}){return{valid:!!e.split("\\").filter((e=>-1===re.indexOf(e))).length,description:"The mode does not support studies that ONLY include the following modalities: SM, ECG, SEG, RTSTRUCT"}},routes:[{path:"longitudinal",layoutTemplate:()=>({id:ae,props:{leftPanels:[pe],leftPanelResizable:!0,rightPanels:[ue,ce],rightPanelClosed:!0,rightPanelResizable:!0,viewports:[{namespace:de,displaySetsToDisplay:[se,me,ge,le]},{namespace:he,displaySetsToDisplay:[fe]},{namespace:ye,displaySetsToDisplay:[ve]},{namespace:we,displaySetsToDisplay:[be]},{namespace:Se,displaySetsToDisplay:[xe]},{namespace:ke,displaySetsToDisplay:[Te]}]}})}],extensions:Re,hangingProtocol:"default",sopClassHandlers:[me,be,xe,se,le,ve,ge,fe,Te],...e}},extensionDependencies:Re};return a=a.default})()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohif/mode-longitudinal",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.2",
|
|
4
4
|
"description": "Longitudinal Workflow",
|
|
5
5
|
"author": "OHIF",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@ohif/core": "3.10.
|
|
38
|
-
"@ohif/extension-cornerstone": "3.10.
|
|
39
|
-
"@ohif/extension-cornerstone-dicom-rt": "3.10.
|
|
40
|
-
"@ohif/extension-cornerstone-dicom-seg": "3.10.
|
|
41
|
-
"@ohif/extension-cornerstone-dicom-sr": "3.10.
|
|
42
|
-
"@ohif/extension-default": "3.10.
|
|
43
|
-
"@ohif/extension-dicom-pdf": "3.10.
|
|
44
|
-
"@ohif/extension-dicom-video": "3.10.
|
|
45
|
-
"@ohif/extension-measurement-tracking": "3.10.
|
|
37
|
+
"@ohif/core": "3.10.2",
|
|
38
|
+
"@ohif/extension-cornerstone": "3.10.2",
|
|
39
|
+
"@ohif/extension-cornerstone-dicom-rt": "3.10.2",
|
|
40
|
+
"@ohif/extension-cornerstone-dicom-seg": "3.10.2",
|
|
41
|
+
"@ohif/extension-cornerstone-dicom-sr": "3.10.2",
|
|
42
|
+
"@ohif/extension-default": "3.10.2",
|
|
43
|
+
"@ohif/extension-dicom-pdf": "3.10.2",
|
|
44
|
+
"@ohif/extension-dicom-video": "3.10.2",
|
|
45
|
+
"@ohif/extension-measurement-tracking": "3.10.2"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@babel/runtime": "^7.20.13",
|