"use strict";var a=b(require("lodash/has"));Object.defineProperty(exports,"__esModule",{value:!0}),exports.getTranslatedExtensions=j;function b(a){return a&&a.__esModule?a:{default:a}}function c(a,b){var c="undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(!c){if(Array.isArray(a)||(c=d(a))||b&&a&&"number"==typeof a.length){c&&(a=c);var e=0,f=function(){};return{s:f,n:function n(){return e>=a.length?{done:!0}:{done:!1,value:a[e++]}},e:function e(a){throw a},f:f}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var g,h=!0,j=!1;return{s:function s(){c=c.call(a)},n:function n(){var a=c.next();return h=a.done,a},e:function e(a){j=!0,g=a},f:function f(){try{h||null==c["return"]||c["return"]()}finally{if(j)throw g}}}}function d(a,b){if(a){if("string"==typeof a)return e(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(a):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?e(a,b):void 0}}function e(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c<b;c++)d[c]=a[c];return d}var f="x-ibm-languages",g=i();function h(a){var b=[];if(a&&(b.push(a.toLowerCase()),-1!==a.indexOf("-"))){var c=a.split("-")[0];b.push(c.toLowerCase())}return b}function i(){var b=null,c=window.navigator,d=null;return(0,a["default"])(window,"apiConnectExplorer.options")&&(d=window.apiConnectExplorer.options),(0,a["default"])(window,"drupalSettings.api.explorer")?d=window.drupalSettings.api.explorer.options:(0,a["default"])(window,"Drupal.settings.api.explorer")&&(d=window.Drupal.settings.api.explorer.options),d&&d.locale?b=d.locale:c&&(c.languages?b=c.languages[0]:c.language?b=c.language:c.browserLanguage&&(b=c.browserLanguage)),b=h(b),b}function j(a,b){var d=null;if(a&&a[f]&&a[f][b]){var e,h=c(g);try{for(h.s();!(e=h.n()).done;){var i=e.value;if(a[f][b][i]){d=a[f][b][i];break}}}catch(a){h.e(a)}finally{h.f()}}return null===d&&a&&a[b]&&(d=a[b]),d}