diff --git a/LICENSE.md b/LICENSE.md index 59d826f..8ba3035 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019-2020 FriendsOfFlarum +Copyright (c) 2019-2021 FriendsOfFlarum Copyright (c) 2017-2019 Flagrow Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/composer.json b/composer.json index 5155f45..eddbce7 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ } ], "require": { - "flarum/core": ">=0.1.0-beta.16 <0.1.0-beta.17", + "flarum/core": "^1.0", "symfony/yaml": "^5.0" }, "replace": { diff --git a/js/dist/admin.js b/js/dist/admin.js index 5931e0a..20b9435 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -module.exports=function(t){var n={};function i(a){if(n[a])return n[a].exports;var e=n[a]={i:a,l:!1,exports:{}};return t[a].call(e.exports,e,e.exports,i),e.l=!0,e.exports}return i.m=t,i.c=n,i.d=function(t,n,a){i.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:a})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,n){if(1&n&&(t=i(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var e in t)i.d(a,e,function(n){return t[n]}.bind(null,e));return a},i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,"a",n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="",i(i.s=14)}([function(t,n){t.exports=flarum.core.compat.app},function(t,n){t.exports=flarum.core.compat["common/components/Button"]},function(t,n){t.exports=flarum.core.compat["common/components/Select"]},function(t,n){t.exports=flarum.core.compat["common/Model"]},function(t,n){t.exports=flarum.core.compat["common/utils/extractText"]},function(t,n){t.exports=flarum.core.compat["common/components/Switch"]},function(t,n){t.exports=flarum.core.compat["common/components/Dropdown"]},function(t,n){t.exports=flarum.core.compat["admin/components/LoadingModal"]},function(t,n){t.exports=flarum.core.compat["admin/components/ExtensionPage"]},function(t,n){t.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(t,n){t.exports=flarum.core.compat["common/components/Alert"]},function(t,n){t.exports=flarum.core.compat["common/utils/ItemList"]},function(t,n){t.exports=flarum.core.compat["common/helpers/icon"]},function(t,n){t.exports=flarum.core.compat["common/components/LinkButton"]},function(t,n,i){"use strict";i.r(n);var a=i(0),e=i.n(a);function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t,n){return(r=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function s(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n)}function l(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}var c=i(3),u=i.n(c),f=function(t){function n(){for(var n,i=arguments.length,a=new Array(i),e=0;e$&").split("").map((function(t){return t.toLowerCase()===i?m("span.FoF-Linguist-Highlight",t):t}))},K=function(){function t(){}var n=t.prototype;return n.oninit=function(t){var n=this;this.stringKey=t.attrs.stringKey,this.locale=t.attrs.locale,this.localeKey=this.locale?this.locale.key:null,this.originalString=this.localeKey&&this.stringKey.locales().hasOwnProperty(this.localeKey)?this.stringKey.locales()[this.localeKey]:null,this.string=e.a.store.all("fof-linguist-string").find((function(t){return t.key()===n.stringKey.key()&&t.locale()===n.localeKey})),this.value=this.string?this.string.value():"",this.dirty=!1,this.processing=!1;var i=Object.keys(this.stringKey.locales()).some((function(t){return-1!==n.stringKey.locales()[t].indexOf("\n")}));this.inputType="input",(i||-1!==this.value.indexOf("\n"))&&(this.inputType="textarea")},n.view=function(t){var n=this,i=this.originalString?this.originalString:"("+e.a.translator.trans("fof-linguist.admin.placeholder."+(this.localeKey?"not-translated":"all-locales"))+")";return m(".FoF-Linguist-Locale",[m("label.FoF-Linguist-Label",this.localeName()),m(".FoF-Linguist-Field",{className:(this.value?"FoF-Linguist-Field--with-value":"")+(this.originalString?" FoF-Linguist-Field--with-original-string":""),title:i},[m(".FoF-Linguist-Field-Wrap",[m(this.inputType,{className:"FormControl FoF-Linguist-Input",value:this.value,oninput:function(t){n.value=t.target.value,n.dirty=!0,n.value||n.string||(n.dirty=!1)},disabled:this.processing}),m(".FoF-Linguist-Placeholder",[m("span.FoF-Linguist-Placeholder-Hint",e.a.translator.trans("fof-linguist.admin.placeholder.hint"))," ",m("span",this.originalString?I(i,t.attrs.highlight):i)])])]),m(".FoF-Linguist-Controls",this.actions(t.attrs.onchange).toArray())])},n.localeName=function(){return this.locale?[this.locale.name+" (",m("code",this.locale.key),")"]:e.a.translator.trans("fof-linguist.admin.locales.all")},n.actions=function(t){var n=this,i=new _.a;return i.add("apply",x.a.component({type:"button",className:"Button Button--primary",loading:this.processing,disabled:!this.dirty,onclick:function(){n.saveString(t)}},e.a.translator.trans("fof-linguist.admin.buttons.apply"))),i.add("reset",x.a.component({type:"button",className:"Button",loading:this.processing,disabled:!this.dirty&&!this.string,onclick:function(){n.deleteString(t)}},e.a.translator.trans("fof-linguist.admin.buttons.reset"))),this.originalString&&i.add("copy-original",x.a.component({type:"button",className:"Button",loading:this.processing,onclick:function(){n.value=n.originalString,n.dirty=!0}},e.a.translator.trans("fof-linguist.admin.buttons.copy-original"))),i},n.saveString=function(t){var n=this;this.value?(this.string||(this.string=e.a.store.createRecord("fof-linguist-string",{attributes:{key:this.stringKey.key(),locale:this.localeKey,value:""}})),this.string.data.attributes.value=this.value,this.string.locale()||delete this.string.data.attributes.locale,this.processing=!0,this.string.save(this.string.data.attributes).then((function(){n.processing=!1,n.dirty=!1,t(),m.redraw()})).catch((function(t){throw n.processing=!1,t}))):this.deleteString(t)},n.deleteString=function(t){var n=this;this.string?(this.processing=!0,this.string.delete().then((function(){n.processing=!1,n.dirty=!1,n.string=null,n.value="",t(),m.redraw()})).catch((function(t){throw n.processing=!1,t}))):(this.value="",this.dirty=!1)},t}(),A=function(){function t(){}return t.prototype.view=function(t){var n=t.attrs,i=n.stringKey,a=n.highlight,e=n.onchange;return m(".FoF-Linguist-Key",[m(".FoF-Linguist-Key-Code",m("code",I(i.key(),a))),m(".FoF-Linguist-Locales",[].concat(C().map((function(t){return m(K,{key:t.key,locale:t,stringKey:i,highlight:a,onchange:e})})),[m(K,{key:"all",locale:null,stringKey:i,highlight:a,onchange:e})]))])},t}(),j=function(t){var n=e.a.translator.translations["fof-linguist.admin.known-namespace."+t];return n||t},M=function(t){var n=e.a.translator.translations["fof-linguist.admin.known-frontend."+t];return n||t},q=function(t,n){return n.reduce((function(n,i){return"start"===n?i:"or"===t?n||i:n&&i}),"start")},R=function(){function t(){}var n=t.prototype;return n.oninit=function(t){this.numberOfResultsToShow=20,this.filters=v({search:"",withOwnTranslations:!1,missingTranslationsNegation:"without",missingTranslationsType:"any",missingTranslationsOperation:"or",missingTranslationsInLocales:[],forExtension:null,frontend:null},t.attrs.initialBrowseFilters||{}),this.results=[],this.applyFilters()},n.view=function(t){var n=this,i=this.results.slice(0,this.numberOfResultsToShow);return[m("div","1"===e.a.data.settings["fof.linguist.should-clear-cache"]?T.a.component({dismissible:!1,controls:[x.a.component({className:"Button Button--link",onclick:function(){e.a.modal.show(N.a),e.a.request({method:"DELETE",url:e.a.forum.attribute("apiUrl")+"/cache"}).then((function(){return window.location.reload()}))}},e.a.translator.trans("fof-linguist.admin.clear-cache.button"))]},e.a.translator.trans("fof-linguist.admin.clear-cache.text")):null),m(".FoF-Linguist-Filters",[m("input.FormControl",{value:this.filters.search,oninput:function(t){n.filters.search=t.target.value,n.applyFilters()},placeholder:e.a.translator.trans("fof-linguist.admin.filters.search")}),x.a.component({className:"Button"+(this.filters.withOwnTranslations?" FoF-Linguist-Filter--Selected":""),icon:"far fa-"+(this.filters.withOwnTranslations?"check-square":"square"),onclick:function(){n.filters.withOwnTranslations=!n.filters.withOwnTranslations,n.applyFilters()}},e.a.translator.trans("fof-linguist.admin.filters.with-own-translations")),w.a.component({buttonClassName:"Button"+(this.filters.forExtension?" FoF-Linguist-Filter--Selected":""),label:e.a.translator.trans("fof-linguist.admin.filters.for-extension")},t.attrs.namespaces.map((function(t){return x.a.component({className:"Button",icon:"far fa-"+(n.filters.forExtension===t.namespace?"dot-circle":"circle"),onclick:function(){n.filters.forExtension===t.namespace?n.filters.forExtension=null:n.filters.forExtension=t.namespace,n.applyFilters()}},t.extension?t.extension.extra["flarum-extension"].title:j(t.namespace))}))),w.a.component({buttonClassName:"Button"+(this.filters.frontend?" FoF-Linguist-Filter--Selected":""),label:e.a.translator.trans("fof-linguist.admin.filters.frontend")},["_all_except_admin"].concat(t.attrs.frontends).map((function(t){return x.a.component({className:"Button",icon:"far fa-"+(n.filters.frontend===t?"dot-circle":"circle"),onclick:function(){n.filters.frontend===t?n.filters.frontend=null:n.filters.frontend=t,n.applyFilters()}},"_all_except_admin"===t?e.a.translator.trans("fof-linguist.admin.filters.frontend-all-except-admin"):M(t))}))),w.a.component({buttonClassName:"Button"+(this.filters.missingTranslationsInLocales.length?" FoF-Linguist-Filter--Selected":""),label:e.a.translator.trans("fof-linguist.admin.filters.missing")},[m(".FoF-Linguist-Missing-Filter",{onclick:function(t){t.stopPropagation()}},[L.a.component({value:this.filters.missingTranslationsNegation,onchange:function(t){n.filters.missingTranslationsNegation=t,n.filters.missingTranslationsInLocales.length&&n.applyFilters()},options:{without:e.a.translator.trans("fof-linguist.admin.filters.negation-options.without"),with:e.a.translator.trans("fof-linguist.admin.filters.negation-options.with")}}),L.a.component({value:this.filters.missingTranslationsType,onchange:function(t){n.filters.missingTranslationsType=t,n.filters.missingTranslationsInLocales.length&&n.applyFilters()},options:{any:e.a.translator.trans("fof-linguist.admin.filters.type-options.any"),original:e.a.translator.trans("fof-linguist.admin.filters.type-options.original"),own:e.a.translator.trans("fof-linguist.admin.filters.type-options.own")}}),m("p",e.a.translator.trans("fof-linguist.admin.filters.missing-middle-label")),L.a.component({value:this.filters.missingTranslationsOperation,onchange:function(t){n.filters.missingTranslationsOperation=t,n.filters.missingTranslationsInLocales.length&&n.applyFilters()},options:{or:e.a.translator.trans("fof-linguist.admin.filters.operation-options.or"),and:e.a.translator.trans("fof-linguist.admin.filters.operation-options.and")}})])].concat(C().map((function(t){return x.a.component({className:"Button",icon:"far fa-"+(-1!==n.filters.missingTranslationsInLocales.indexOf(t.key)?"check-square":"square"),onclick:function(){-1!==n.filters.missingTranslationsInLocales.indexOf(t.key)?n.filters.missingTranslationsInLocales=n.filters.missingTranslationsInLocales.filter((function(n){return n!==t.key})):n.filters.missingTranslationsInLocales.push(t.key),n.applyFilters()}},t.name+" ("+t.key+")")})))),w.a.component({buttonClassName:"Button",label:e.a.translator.trans("fof-linguist.admin.filters.mass-edit")},[x.a.component({icon:"far fa-clone",className:"Button",onclick:function(){var t=e.a.store.all("fof-linguist-string").filter((function(t){var n=e.a.store.getById("fof-linguist-string-key",t.key());return n&&n.locales()[t.locale()]===t.value()}));if(confirm(P()(e.a.translator.trans("fof-linguist.admin.buttons.delete-redundant-confirm",{count:t.length+""})))){if(0===t.length)return;e.a.modal.show(N.a),Promise.all(t.map((function(t){return t.delete()}))).then((function(){window.location.reload()}))}}},e.a.translator.trans("fof-linguist.admin.buttons.delete-redundant")),x.a.component({icon:"fas fa-trash",className:"Button",onclick:function(){var t=e.a.store.all("fof-linguist-string");if(confirm(P()(e.a.translator.trans("fof-linguist.admin.buttons.delete-all-confirm",{count:t.length+""})))){if(0===t.length)return;e.a.modal.show(N.a),Promise.all(t.map((function(t){return t.delete()}))).then((function(){window.location.reload()}))}}},e.a.translator.trans("fof-linguist.admin.buttons.delete-all"))])]),m("div",i.map((function(t){return m(A,{key:t.id(),stringKey:t,highlight:n.filters.search,onchange:function(){e.a.data.settings["fof.linguist.should-clear-cache"]="1"}})}))),m(".FoF-Linguist-Results",[e.a.translator.trans("fof-linguist.admin.filters.results",{shown:i.length+"",total:this.results.length+""})," ",this.results.length>i.length?x.a.component({className:"Button",onclick:function(){n.numberOfResultsToShow+=20}},e.a.translator.trans("fof-linguist.admin.buttons.load-more")):null])]},n.applyFilters=function(){var t=this;this.numberOfResultsToShow=20;var n=e.a.store.all("fof-linguist-string").map((function(t){return t.key()})),i={};C().forEach((function(t){i[t.key]=e.a.store.all("fof-linguist-string").filter((function(n){return n.locale()===t.key})).map((function(t){return t.key()}))}));var a="";this.filters.search&&(a=this.filters.search.toLowerCase()),this.results=e.a.store.all("fof-linguist-string-key").filter((function(e){if(t.filters.withOwnTranslations&&-1===n.indexOf(e.key()))return!1;if(t.filters.missingTranslationsInLocales.length){var o=t.filters.missingTranslationsOperation;"without"===t.filters.missingTranslationsNegation&&(o="or"===o?"and":"or");var r=q(o,t.filters.missingTranslationsInLocales.map((function(t){return e.locales().hasOwnProperty(t)}))),s=q(o,t.filters.missingTranslationsInLocales.map((function(t){return-1!==i[t].indexOf(e.key())}))),l=!1;switch(t.filters.missingTranslationsType){case"any":l=r||s;break;case"original":l=r;break;case"own":l=s}if("without"===t.filters.missingTranslationsNegation&&(l=!l),!l)return!1}if(t.filters.forExtension&&0!==e.key().indexOf(t.filters.forExtension+"."))return!1;if(t.filters.frontend){var c=e.key().split(".");if("_all_except_admin"===t.filters.frontend){if(c.length>=2&&"admin"===c[1])return!1}else if(c.length<2||c[1]!==t.filters.frontend)return!1}if(a){if(-1!==e.key().toLowerCase().indexOf(a))return!0;var u=e.locales();for(var f in u)if(u.hasOwnProperty(f)&&-1!==u[f].toLowerCase().indexOf(a))return!0;return!1}return!0})),m.redraw()},t}(),U=i(12),G=i.n(U),W=function(){function t(){}var n=t.prototype;return n.oninit=function(){this.columns="locale",this.showAllFrontends=!1,this.totalPercent=!0,this.locale=[];var t=C().find((function(t){return"en"!==t.key}));t&&(this.locale=t.key)},n.view=function(t){var n=this,i=t.attrs.frontends.slice(0,2);this.showAllFrontends&&(i=t.attrs.frontends);var a=t.attrs.browseWithFilters;return[m(".FoF-Linguist-Filters",[m(".ButtonGroup",[x.a.component({className:"Button"+(this.totalPercent?" active":""),onclick:function(){n.totalPercent=!0}},e.a.translator.trans("fof-linguist.admin.coverage.total-options.percent")),x.a.component({className:"Button"+(this.totalPercent?" ":" active"),onclick:function(){n.totalPercent=!1}},e.a.translator.trans("fof-linguist.admin.coverage.total-options.count"))]),m(".ButtonGroup",[x.a.component({className:"Button"+("locale"===this.columns?" active":""),onclick:function(){n.columns="locale"}},e.a.translator.trans("fof-linguist.admin.coverage.column-options.locale")),x.a.component({className:"Button"+("namespace"===this.columns?" active":""),onclick:function(){n.columns="namespace",n.showAllFrontends=!1}},e.a.translator.trans("fof-linguist.admin.coverage.column-options.namespace"))]),"namespace"===this.columns?m(".ButtonGroup",C().map((function(t){return x.a.component({className:"Button"+(n.locale===t.key?" active":""),onclick:function(){n.locale!==t.key&&(n.locale=t.key)}},t.name+" ("+t.key+")")}))):null]),m("table.FoF-Linguist-Coverage",[m("thead",m("tr",[m("th",e.a.translator.trans("fof-linguist.admin.coverage.columns.namespace")),"locale"===this.columns?C().map((function(t){return m("th",t.name+" ("+t.key+")")})):[this.showAllFrontends?i.map((function(t){return m("th",M(t))})):[m("th",e.a.translator.trans("fof-linguist.admin.coverage.columns.all-except-admin")),m("th",M("admin")),m("th",x.a.component({className:"Button",onclick:function(){n.showAllFrontends=!0}},e.a.translator.trans("fof-linguist.admin.coverage.columns.all-frontends")))]]])),m("tbody",["locale"===this.columns?m("tr",[m("td",[m("span.FoF-Linguist-Coverage-Extension-Icon.FoF-Linguist-Coverage-Namespace-Icon"),m("span.FoF-Linguist-Coverage-Extension-Title",e.a.translator.trans("fof-linguist.admin.coverage.all-namespaces"))]),C().map((function(t){return m("td",n.localeCoverage(a,t.key))}))]):null,t.attrs.namespaces.map((function(t){return m("tr",[m("td",t.extension?[m("span.FoF-Linguist-Coverage-Extension-Icon",{style:t.extension.icon},t.extension.icon?G()(t.extension.icon.name):""),m("span.FoF-Linguist-Coverage-Extension-Title",t.extension.extra["flarum-extension"].title)]:[m("span.FoF-Linguist-Coverage-Extension-Icon.FoF-Linguist-Coverage-Namespace-Icon"),m("span.FoF-Linguist-Coverage-Extension-Title",j(t.namespace))]),"locale"===n.columns?C().map((function(i){return m("td",n.localeCoverage(a,i.key,t.namespace))})):[n.showAllFrontends?i.map((function(i){return m("td",n.prefixCoverage(a,t.namespace,i))})):[m("td",n.prefixCoverage(a,t.namespace,"_all_except_admin")),m("td",n.prefixCoverage(a,t.namespace,"admin"))]]])}))])])]},n.prefixCoverage=function(t,n,i){return this.locale?this.localeCoverage(t,this.locale,n,i):null},n.localeCoverage=function(t,n,i,a){var o=e.a.store.all("fof-linguist-string-key").filter((function(t){if(!i)return!0;var n=t.key().split(".");if(n[0]!==i)return!1;if("_all_except_admin"===a){if(n.length>=2&&"admin"===n[1])return!1}else if(a&&(n.length<2||n[1]!==a))return!1;return!0}));if(0===o.length)return"-";var r=0,s=0;o.forEach((function(t){e.a.store.all("fof-linguist-string").find((function(i){return i.key()===t.key()&&i.locale()===n}))?r++:t.locales().hasOwnProperty(n)&&s++}));var l,c,u=Math.round((r+s)/o.length*100);return 100===u?l="full":u<5&&(l="low"),c=this.totalPercent?e.a.translator.trans("fof-linguist.admin.coverage.count.percent",{percent:u+""}):e.a.translator.trans("fof-linguist.admin.coverage.count.total",{translated:r+s+"",total:o.length}),m(".FoF-Linguist-Coverage-Progress-Wrap",[m(".FoF-Linguist-Progress",{className:l?"FoF-Linguist-Progress--"+l:""},[m(".FoF-Linguist-Progress-Bar",{style:{width:Math.max(u,5)+"%"}}),m(".FoF-Linguist-Progress-Label",c),m(".FoF-Linguist-Progress-More",e.a.translator.trans("fof-linguist.admin.coverage.count.details",{total:o.length,original:s+"",custom:r+""}))]),x.a.component({icon:"fas fa-filter",className:"Button Button--icon",onclick:function(){var e={missingTranslationsInLocales:[n]};i&&(e.forExtension=i),a&&(e.frontend=a),t(e)},title:e.a.translator.trans("fof-linguist.admin.coverage.apply-missing-filter")})])},t}(),D=i(5),$=i.n(D),H=i(13),z=i.n(H),J=function(){function t(){}var n=t.prototype;return n.oninit=function(){this.locale="en",this.namespace=null,this.includeOriginals=!1,this.includeAll=!1,this.loading=!1,this.output="",this.fetchOutput()},n.view=function(t){var n=this,i={};C().forEach((function(t){i[t.key]=t.name+" ("+t.key+")"})),i.all=e.a.translator.trans("fof-linguist.admin.export.locale-all");var a={_all:e.a.translator.trans("fof-linguist.admin.export.namespace-all")};return t.attrs.namespaces.forEach((function(t){t.extension?a[t.namespace]=t.extension.extra["flarum-extension"].title:a[t.namespace]=j(t.namespace)})),[m("h2",e.a.translator.trans("fof-linguist.admin.export.title")),m(".Form-group",m(".Alert",e.a.translator.trans("fof-linguist.admin.export.warning"))),m(".Form-group",[m("label",e.a.translator.trans("fof-linguist.admin.export.locale")),L.a.component({options:i,value:this.locale,onchange:function(t){n.locale=t,n.fetchOutput()}})]),m(".Form-group",[m("label",e.a.translator.trans("fof-linguist.admin.export.namespace")),L.a.component({options:a,value:null===this.namespace?"_all":this.namespace,onchange:function(t){n.namespace="_all"===t?null:t,n.fetchOutput()}})]),m(".Form-group",[$.a.component({state:this.includeOriginals,onchange:function(t){n.includeOriginals=t,n.fetchOutput()}},e.a.translator.trans("fof-linguist.admin.export.include-originals"))]),m(".Form-group",[$.a.component({state:this.includeAll,onchange:function(t){n.includeAll=t,n.fetchOutput()}},e.a.translator.trans("fof-linguist.admin.export.include-all"))]),m(".Form-group",[m("label",[e.a.translator.trans("fof-linguist.admin.export.output")," ",z.a.component({className:"Button Button--primary",href:this.exportUrl(),external:!0,download:(this.namespace||this.locale)+".yml"},e.a.translator.trans("fof-linguist.admin.export.download"))]),m("textarea.FormControl.FoF-Export-Textarea",{readonly:!0,value:this.output,rows:10,placeholder:this.loading?e.a.translator.trans("fof-linguist.admin.export.output-loading"):e.a.translator.trans("fof-linguist.admin.export.output-empty")})])]},n.exportUrl=function(){return e.a.forum.attribute("apiUrl")+"/fof/linguist/export?"+m.buildQueryString({locale:this.locale,namespace:this.namespace,includeOriginals:this.includeOriginals?"1":"0",includeAll:this.includeAll?"1":"0"})},n.fetchOutput=function(){var t=this;this.loading=!0,this.output="",e.a.request({method:"GET",url:this.exportUrl(),extract:function(t){return JSON.stringify(t)}}).then((function(n){t.loading=!1,t.output=n,m.redraw()})).catch((function(n){throw t.loading=!1,m.redraw(),n}))},t}(),Q=function(){function t(){}var n=t.prototype;return n.oninit=function(){this.locale="en",this.overrideExisting=!0,this.input="",this.loading=!1},n.view=function(){var t=this,n={};return C().forEach((function(t){n[t.key]=t.name+" ("+t.key+")"})),n.all=e.a.translator.trans("fof-linguist.admin.import.locale-all"),[m("h2",e.a.translator.trans("fof-linguist.admin.import.title")),m(".Form-group",[m("label",e.a.translator.trans("fof-linguist.admin.import.input")),m("textarea.FormControl",{value:this.input,oninput:function(n){t.input=n.target.value},rows:10,placeholder:e.a.translator.trans("fof-linguist.admin.import.input-placeholder")})]),m(".Form-group",[m("label",e.a.translator.trans("fof-linguist.admin.import.locale")),L.a.component({options:n,value:this.locale,onchange:function(n){t.locale=n,t.fetchOutput()}})]),m(".Form-group",[$.a.component({state:this.overrideExisting,onchange:function(n){t.overrideExisting=n}},e.a.translator.trans("fof-linguist.admin.import.override-existing"))]),m(".Form-group",x.a.component({className:"Button Button--primary",onclick:function(){t.loading=!0,e.a.request({method:"POST",url:e.a.forum.attribute("apiUrl")+"/fof/linguist/import",body:{input:t.input,locale:t.locale,ignoreExisting:!t.overrideExisting}}).then((function(n){t.loading=!1,m.redraw(),confirm(P()(e.a.translator.trans(t.overrideExisting?"fof-linguist.admin.import.results":"fof-linguist.admin.import.results-with-ignore",{imported:n.imported+"",ignored:n.ignored+"",identical:n.identical+""})))&&window.location.reload()})).catch((function(n){throw t.loading=!1,m.redraw(),n}))},disabled:this.loading||!this.input,loading:this.loading},e.a.translator.trans("fof-linguist.admin.import.submit")))]},t}(),V=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var i=n.prototype;return i.oninit=function(n){var i=this;t.prototype.oninit.call(this,n),this.tab="strings",this.ready=!1,this.namespaces=[],this.frontends=["forum","admin","lib","ref","api"],this.initialBrowseFilters={},Promise.all([e.a.request({method:"GET",url:e.a.forum.attribute("apiUrl")+"/fof/linguist/strings"}).then((function(t){e.a.store.pushPayload(t)})),e.a.request({method:"GET",url:e.a.forum.attribute("apiUrl")+"/fof/linguist/string-keys"}).then((function(t){var n=e.a.store.pushPayload(t),a=[];n.forEach((function(t){var n=t.key().split("."),e=n[0];if(-1===["core","validation"].indexOf(e)&&-1===a.indexOf(e)&&a.push(e),n.length>1&&"validation"!==e){var o=n[1];-1===i.frontends.indexOf(o)&&i.frontends.push(o)}})),a.sort(),i.namespaces=[{namespace:"core"},{namespace:"validation"}].concat(a.map((function(t){var n=e.a.data.extensions[t];return n||(n=Object.values(e.a.data.extensions).find((function(n){var i=n.name.replace("/","-");return t===i}))),{namespace:t,extension:n}})))}))]).then((function(){i.ready=!0,m.redraw()}))},i.content=function(){return m(".ExtensionPage-settings",m(".container",[this.contentTab()]))},i.infoItems=function(){var n=this,i=t.prototype.infoItems.call(this);return i.add("linguist-tabs",m("ul.FoF-Linguist-Tabs",[m("li",m("a",{className:"strings"===this.tab?"active":"",onclick:function(){n.tab="strings"}},e.a.translator.trans("fof-linguist.admin.tabs.strings"))),m("li",m("a",{className:"coverage"===this.tab?"active":"",onclick:function(){n.tab="coverage"}},e.a.translator.trans("fof-linguist.admin.tabs.coverage"))),m("li",m("a",{className:"export"===this.tab?"active":"",onclick:function(){n.tab="export"}},e.a.translator.trans("fof-linguist.admin.tabs.export"))),m("li",m("a",{className:"import"===this.tab?"active":"",onclick:function(){n.tab="import"}},e.a.translator.trans("fof-linguist.admin.tabs.import")))]),100),i},i.contentTab=function(){var t=this;if(!this.ready)return y.a.component();switch(this.tab){case"strings":return m(R,{namespaces:this.namespaces,frontends:this.frontends,initialBrowseFilters:this.initialBrowseFilters});case"coverage":return m(W,{namespaces:this.namespaces,frontends:this.frontends,browseWithFilters:function(n){t.initialBrowseFilters=n,t.tab="strings"}});case"export":return m(J,{namespaces:this.namespaces});case"import":return m(Q)}return null},n}(h.a);e.a.initializers.add("fof-linguist",(function(t){t.store.models["fof-linguist-string-key"]=f,t.store.models["fof-linguist-string"]=g,t.extensionData.for("fof-linguist").registerPage(V)}))}]); +module.exports=function(t){var n={};function i(a){if(n[a])return n[a].exports;var e=n[a]={i:a,l:!1,exports:{}};return t[a].call(e.exports,e,e.exports,i),e.l=!0,e.exports}return i.m=t,i.c=n,i.d=function(t,n,a){i.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:a})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,n){if(1&n&&(t=i(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var e in t)i.d(a,e,function(n){return t[n]}.bind(null,e));return a},i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,"a",n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="",i(i.s=14)}([function(t,n){t.exports=flarum.core.compat["admin/app"]},function(t,n){t.exports=flarum.core.compat["common/components/Button"]},function(t,n){t.exports=flarum.core.compat["common/components/Select"]},function(t,n){t.exports=flarum.core.compat["common/Model"]},function(t,n){t.exports=flarum.core.compat["common/utils/extractText"]},function(t,n){t.exports=flarum.core.compat["common/components/Switch"]},function(t,n){t.exports=flarum.core.compat["common/components/Dropdown"]},function(t,n){t.exports=flarum.core.compat["admin/components/LoadingModal"]},function(t,n){t.exports=flarum.core.compat["admin/components/ExtensionPage"]},function(t,n){t.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(t,n){t.exports=flarum.core.compat["common/components/Alert"]},function(t,n){t.exports=flarum.core.compat["common/utils/ItemList"]},function(t,n){t.exports=flarum.core.compat["common/helpers/icon"]},function(t,n){t.exports=flarum.core.compat["common/components/LinkButton"]},function(t,n,i){"use strict";i.r(n);var a=i(0),e=i.n(a);function o(t,n){return(o=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function s(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n)}var r=i(3),l=i.n(r),c=function(t){function n(){for(var n,i=arguments.length,a=new Array(i),e=0;e$&").split("").map((function(t){return t.toLowerCase()===i?m("span.FoF-Linguist-Highlight",t):t}))},S=function(){function t(){}var n=t.prototype;return n.oninit=function(t){var n=this;this.stringKey=t.attrs.stringKey,this.locale=t.attrs.locale,this.localeKey=this.locale?this.locale.key:null,this.originalString=this.localeKey&&this.stringKey.locales().hasOwnProperty(this.localeKey)?this.stringKey.locales()[this.localeKey]:null,this.string=e.a.store.all("fof-linguist-string").find((function(t){return t.key()===n.stringKey.key()&&t.locale()===n.localeKey})),this.value=this.string?this.string.value():"",this.dirty=!1,this.processing=!1;var i=Object.keys(this.stringKey.locales()).some((function(t){return-1!==n.stringKey.locales()[t].indexOf("\n")}));this.inputType="input",(i||-1!==this.value.indexOf("\n"))&&(this.inputType="textarea")},n.view=function(t){var n=this,i=this.originalString?this.originalString:"("+e.a.translator.trans("fof-linguist.admin.placeholder."+(this.localeKey?"not-translated":"all-locales"))+")";return m(".FoF-Linguist-Locale",[m("label.FoF-Linguist-Label",this.localeName()),m(".FoF-Linguist-Field",{className:(this.value?"FoF-Linguist-Field--with-value":"")+(this.originalString?" FoF-Linguist-Field--with-original-string":""),title:i},[m(".FoF-Linguist-Field-Wrap",[m(this.inputType,{className:"FormControl FoF-Linguist-Input",value:this.value,oninput:function(t){n.value=t.target.value,n.dirty=!0,n.value||n.string||(n.dirty=!1)},disabled:this.processing}),m(".FoF-Linguist-Placeholder",[m("span.FoF-Linguist-Placeholder-Hint",e.a.translator.trans("fof-linguist.admin.placeholder.hint"))," ",m("span",this.originalString?C(i,t.attrs.highlight):i)])])]),m(".FoF-Linguist-Controls",this.actions(t.attrs.onchange).toArray())])},n.localeName=function(){return this.locale?[this.locale.name+" (",m("code",this.locale.key),")"]:e.a.translator.trans("fof-linguist.admin.locales.all")},n.actions=function(t){var n=this,i=new P.a;return i.add("apply",y.a.component({type:"button",className:"Button Button--primary",loading:this.processing,disabled:!this.dirty,onclick:function(){n.saveString(t)}},e.a.translator.trans("fof-linguist.admin.buttons.apply"))),i.add("reset",y.a.component({type:"button",className:"Button",loading:this.processing,disabled:!this.dirty&&!this.string,onclick:function(){n.deleteString(t)}},e.a.translator.trans("fof-linguist.admin.buttons.reset"))),this.originalString&&i.add("copy-original",y.a.component({type:"button",className:"Button",loading:this.processing,onclick:function(){n.value=n.originalString,n.dirty=!0}},e.a.translator.trans("fof-linguist.admin.buttons.copy-original"))),i},n.saveString=function(t){var n=this;this.value?(this.string||(this.string=e.a.store.createRecord("fof-linguist-string",{attributes:{key:this.stringKey.key(),locale:this.localeKey,value:""}})),this.string.data.attributes.value=this.value,this.string.locale()||delete this.string.data.attributes.locale,this.processing=!0,this.string.save(this.string.data.attributes).then((function(){n.processing=!1,n.dirty=!1,t(),m.redraw()})).catch((function(t){throw n.processing=!1,t}))):this.deleteString(t)},n.deleteString=function(t){var n=this;this.string?(this.processing=!0,this.string.delete().then((function(){n.processing=!1,n.dirty=!1,n.string=null,n.value="",t(),m.redraw()})).catch((function(t){throw n.processing=!1,t}))):(this.value="",this.dirty=!1)},t}(),_=function(){function t(){}return t.prototype.view=function(t){var n=t.attrs,i=n.stringKey,a=n.highlight,e=n.onchange;return m(".FoF-Linguist-Key",[m(".FoF-Linguist-Key-Code",m("code",C(i.key(),a))),m(".FoF-Linguist-Locales",[].concat(N().map((function(t){return m(S,{key:t.key,locale:t,stringKey:i,highlight:a,onchange:e})})),[m(S,{key:"all",locale:null,stringKey:i,highlight:a,onchange:e})]))])},t}(),I=function(t){var n=e.a.translator.translations["fof-linguist.admin.known-namespace."+t];return n||t},K=function(t){var n=e.a.translator.translations["fof-linguist.admin.known-frontend."+t];return n||t},A=function(t,n){return n.reduce((function(n,i){return"start"===n?i:"or"===t?n||i:n&&i}),"start")},j=function(){function t(){}var n=t.prototype;return n.oninit=function(t){this.numberOfResultsToShow=20,this.filters=Object.assign({search:"",withOwnTranslations:!1,missingTranslationsNegation:"without",missingTranslationsType:"any",missingTranslationsOperation:"or",missingTranslationsInLocales:[],forExtension:null,frontend:null},t.attrs.initialBrowseFilters||{}),this.results=[],this.applyFilters()},n.view=function(t){var n=this,i=this.results.slice(0,this.numberOfResultsToShow);return[m("div","1"===e.a.data.settings["fof.linguist.should-clear-cache"]?k.a.component({dismissible:!1,controls:[y.a.component({className:"Button Button--link",onclick:function(){e.a.modal.show(T.a),e.a.request({method:"DELETE",url:e.a.forum.attribute("apiUrl")+"/cache"}).then((function(){return window.location.reload()}))}},e.a.translator.trans("fof-linguist.admin.clear-cache.button"))]},e.a.translator.trans("fof-linguist.admin.clear-cache.text")):null),m(".FoF-Linguist-Filters",[m("input.FormControl",{value:this.filters.search,oninput:function(t){n.filters.search=t.target.value,n.applyFilters()},placeholder:e.a.translator.trans("fof-linguist.admin.filters.search")}),y.a.component({className:"Button"+(this.filters.withOwnTranslations?" FoF-Linguist-Filter--Selected":""),icon:"far fa-"+(this.filters.withOwnTranslations?"check-square":"square"),onclick:function(){n.filters.withOwnTranslations=!n.filters.withOwnTranslations,n.applyFilters()}},e.a.translator.trans("fof-linguist.admin.filters.with-own-translations")),F.a.component({buttonClassName:"Button"+(this.filters.forExtension?" FoF-Linguist-Filter--Selected":""),label:e.a.translator.trans("fof-linguist.admin.filters.for-extension")},t.attrs.namespaces.map((function(t){return y.a.component({className:"Button",icon:"far fa-"+(n.filters.forExtension===t.namespace?"dot-circle":"circle"),onclick:function(){n.filters.forExtension===t.namespace?n.filters.forExtension=null:n.filters.forExtension=t.namespace,n.applyFilters()}},t.extension?t.extension.extra["flarum-extension"].title:I(t.namespace))}))),F.a.component({buttonClassName:"Button"+(this.filters.frontend?" FoF-Linguist-Filter--Selected":""),label:e.a.translator.trans("fof-linguist.admin.filters.frontend")},["_all_except_admin"].concat(t.attrs.frontends).map((function(t){return y.a.component({className:"Button",icon:"far fa-"+(n.filters.frontend===t?"dot-circle":"circle"),onclick:function(){n.filters.frontend===t?n.filters.frontend=null:n.filters.frontend=t,n.applyFilters()}},"_all_except_admin"===t?e.a.translator.trans("fof-linguist.admin.filters.frontend-all-except-admin"):K(t))}))),F.a.component({buttonClassName:"Button"+(this.filters.missingTranslationsInLocales.length?" FoF-Linguist-Filter--Selected":""),label:e.a.translator.trans("fof-linguist.admin.filters.missing")},[m(".FoF-Linguist-Missing-Filter",{onclick:function(t){t.stopPropagation()}},[w.a.component({value:this.filters.missingTranslationsNegation,onchange:function(t){n.filters.missingTranslationsNegation=t,n.filters.missingTranslationsInLocales.length&&n.applyFilters()},options:{without:e.a.translator.trans("fof-linguist.admin.filters.negation-options.without"),with:e.a.translator.trans("fof-linguist.admin.filters.negation-options.with")}}),w.a.component({value:this.filters.missingTranslationsType,onchange:function(t){n.filters.missingTranslationsType=t,n.filters.missingTranslationsInLocales.length&&n.applyFilters()},options:{any:e.a.translator.trans("fof-linguist.admin.filters.type-options.any"),original:e.a.translator.trans("fof-linguist.admin.filters.type-options.original"),own:e.a.translator.trans("fof-linguist.admin.filters.type-options.own")}}),m("p",e.a.translator.trans("fof-linguist.admin.filters.missing-middle-label")),w.a.component({value:this.filters.missingTranslationsOperation,onchange:function(t){n.filters.missingTranslationsOperation=t,n.filters.missingTranslationsInLocales.length&&n.applyFilters()},options:{or:e.a.translator.trans("fof-linguist.admin.filters.operation-options.or"),and:e.a.translator.trans("fof-linguist.admin.filters.operation-options.and")}})])].concat(N().map((function(t){return y.a.component({className:"Button",icon:"far fa-"+(-1!==n.filters.missingTranslationsInLocales.indexOf(t.key)?"check-square":"square"),onclick:function(){-1!==n.filters.missingTranslationsInLocales.indexOf(t.key)?n.filters.missingTranslationsInLocales=n.filters.missingTranslationsInLocales.filter((function(n){return n!==t.key})):n.filters.missingTranslationsInLocales.push(t.key),n.applyFilters()}},t.name+" ("+t.key+")")})))),F.a.component({buttonClassName:"Button",label:e.a.translator.trans("fof-linguist.admin.filters.mass-edit")},[y.a.component({icon:"far fa-clone",className:"Button",onclick:function(){var t=e.a.store.all("fof-linguist-string").filter((function(t){var n=e.a.store.getById("fof-linguist-string-key",t.key());return n&&n.locales()[t.locale()]===t.value()}));if(confirm(B()(e.a.translator.trans("fof-linguist.admin.buttons.delete-redundant-confirm",{count:t.length+""})))){if(0===t.length)return;e.a.modal.show(T.a),Promise.all(t.map((function(t){return t.delete()}))).then((function(){window.location.reload()}))}}},e.a.translator.trans("fof-linguist.admin.buttons.delete-redundant")),y.a.component({icon:"fas fa-trash",className:"Button",onclick:function(){var t=e.a.store.all("fof-linguist-string");if(confirm(B()(e.a.translator.trans("fof-linguist.admin.buttons.delete-all-confirm",{count:t.length+""})))){if(0===t.length)return;e.a.modal.show(T.a),Promise.all(t.map((function(t){return t.delete()}))).then((function(){window.location.reload()}))}}},e.a.translator.trans("fof-linguist.admin.buttons.delete-all"))])]),m("div",i.map((function(t){return m(_,{key:t.id(),stringKey:t,highlight:n.filters.search,onchange:function(){e.a.data.settings["fof.linguist.should-clear-cache"]="1"}})}))),m(".FoF-Linguist-Results",[e.a.translator.trans("fof-linguist.admin.filters.results",{shown:i.length+"",total:this.results.length+""})," ",this.results.length>i.length?y.a.component({className:"Button",onclick:function(){n.numberOfResultsToShow+=20}},e.a.translator.trans("fof-linguist.admin.buttons.load-more")):null])]},n.applyFilters=function(){var t=this;this.numberOfResultsToShow=20;var n=e.a.store.all("fof-linguist-string").map((function(t){return t.key()})),i={};N().forEach((function(t){i[t.key]=e.a.store.all("fof-linguist-string").filter((function(n){return n.locale()===t.key})).map((function(t){return t.key()}))}));var a="";this.filters.search&&(a=this.filters.search.toLowerCase()),this.results=e.a.store.all("fof-linguist-string-key").filter((function(e){if(t.filters.withOwnTranslations&&-1===n.indexOf(e.key()))return!1;if(t.filters.missingTranslationsInLocales.length){var o=t.filters.missingTranslationsOperation;"without"===t.filters.missingTranslationsNegation&&(o="or"===o?"and":"or");var s=A(o,t.filters.missingTranslationsInLocales.map((function(t){return e.locales().hasOwnProperty(t)}))),r=A(o,t.filters.missingTranslationsInLocales.map((function(t){return-1!==i[t].indexOf(e.key())}))),l=!1;switch(t.filters.missingTranslationsType){case"any":l=s||r;break;case"original":l=s;break;case"own":l=r}if("without"===t.filters.missingTranslationsNegation&&(l=!l),!l)return!1}if(t.filters.forExtension&&0!==e.key().indexOf(t.filters.forExtension+"."))return!1;if(t.filters.frontend){var c=e.key().split(".");if("_all_except_admin"===t.filters.frontend){if(c.length>=2&&"admin"===c[1])return!1}else if(c.length<2||c[1]!==t.filters.frontend)return!1}if(a){if(-1!==e.key().toLowerCase().indexOf(a))return!0;var u=e.locales();for(var f in u)if(u.hasOwnProperty(f)&&-1!==u[f].toLowerCase().indexOf(a))return!0;return!1}return!0})),m.redraw()},t}(),M=i(12),q=i.n(M),U=function(){function t(){}var n=t.prototype;return n.oninit=function(){this.columns="locale",this.showAllFrontends=!1,this.totalPercent=!0,this.locale=[];var t=N().find((function(t){return"en"!==t.key}));t&&(this.locale=t.key)},n.view=function(t){var n=this,i=t.attrs.frontends.slice(0,2);this.showAllFrontends&&(i=t.attrs.frontends);var a=t.attrs.browseWithFilters;return[m(".FoF-Linguist-Filters",[m(".ButtonGroup",[y.a.component({className:"Button"+(this.totalPercent?" active":""),onclick:function(){n.totalPercent=!0}},e.a.translator.trans("fof-linguist.admin.coverage.total-options.percent")),y.a.component({className:"Button"+(this.totalPercent?" ":" active"),onclick:function(){n.totalPercent=!1}},e.a.translator.trans("fof-linguist.admin.coverage.total-options.count"))]),m(".ButtonGroup",[y.a.component({className:"Button"+("locale"===this.columns?" active":""),onclick:function(){n.columns="locale"}},e.a.translator.trans("fof-linguist.admin.coverage.column-options.locale")),y.a.component({className:"Button"+("namespace"===this.columns?" active":""),onclick:function(){n.columns="namespace",n.showAllFrontends=!1}},e.a.translator.trans("fof-linguist.admin.coverage.column-options.namespace"))]),"namespace"===this.columns?m(".ButtonGroup",N().map((function(t){return y.a.component({className:"Button"+(n.locale===t.key?" active":""),onclick:function(){n.locale!==t.key&&(n.locale=t.key)}},t.name+" ("+t.key+")")}))):null]),m("table.FoF-Linguist-Coverage",[m("thead",m("tr",[m("th",e.a.translator.trans("fof-linguist.admin.coverage.columns.namespace")),"locale"===this.columns?N().map((function(t){return m("th",t.name+" ("+t.key+")")})):[this.showAllFrontends?i.map((function(t){return m("th",K(t))})):[m("th",e.a.translator.trans("fof-linguist.admin.coverage.columns.all-except-admin")),m("th",K("admin")),m("th",y.a.component({className:"Button",onclick:function(){n.showAllFrontends=!0}},e.a.translator.trans("fof-linguist.admin.coverage.columns.all-frontends")))]]])),m("tbody",["locale"===this.columns?m("tr",[m("td",[m("span.FoF-Linguist-Coverage-Extension-Icon.FoF-Linguist-Coverage-Namespace-Icon"),m("span.FoF-Linguist-Coverage-Extension-Title",e.a.translator.trans("fof-linguist.admin.coverage.all-namespaces"))]),N().map((function(t){return m("td",n.localeCoverage(a,t.key))}))]):null,t.attrs.namespaces.map((function(t){return m("tr",[m("td",t.extension?[m("span.FoF-Linguist-Coverage-Extension-Icon",{style:t.extension.icon},t.extension.icon?q()(t.extension.icon.name):""),m("span.FoF-Linguist-Coverage-Extension-Title",t.extension.extra["flarum-extension"].title)]:[m("span.FoF-Linguist-Coverage-Extension-Icon.FoF-Linguist-Coverage-Namespace-Icon"),m("span.FoF-Linguist-Coverage-Extension-Title",I(t.namespace))]),"locale"===n.columns?N().map((function(i){return m("td",n.localeCoverage(a,i.key,t.namespace))})):[n.showAllFrontends?i.map((function(i){return m("td",n.prefixCoverage(a,t.namespace,i))})):[m("td",n.prefixCoverage(a,t.namespace,"_all_except_admin")),m("td",n.prefixCoverage(a,t.namespace,"admin"))]]])}))])])]},n.prefixCoverage=function(t,n,i){return this.locale?this.localeCoverage(t,this.locale,n,i):null},n.localeCoverage=function(t,n,i,a){var o=e.a.store.all("fof-linguist-string-key").filter((function(t){if(!i)return!0;var n=t.key().split(".");if(n[0]!==i)return!1;if("_all_except_admin"===a){if(n.length>=2&&"admin"===n[1])return!1}else if(a&&(n.length<2||n[1]!==a))return!1;return!0}));if(0===o.length)return"-";var s=0,r=0;o.forEach((function(t){e.a.store.all("fof-linguist-string").find((function(i){return i.key()===t.key()&&i.locale()===n}))?s++:t.locales().hasOwnProperty(n)&&r++}));var l,c,u=Math.round((s+r)/o.length*100);return 100===u?l="full":u<5&&(l="low"),c=this.totalPercent?e.a.translator.trans("fof-linguist.admin.coverage.count.percent",{percent:u+""}):e.a.translator.trans("fof-linguist.admin.coverage.count.total",{translated:s+r+"",total:o.length}),m(".FoF-Linguist-Coverage-Progress-Wrap",[m(".FoF-Linguist-Progress",{className:l?"FoF-Linguist-Progress--"+l:""},[m(".FoF-Linguist-Progress-Bar",{style:{width:Math.max(u,5)+"%"}}),m(".FoF-Linguist-Progress-Label",c),m(".FoF-Linguist-Progress-More",e.a.translator.trans("fof-linguist.admin.coverage.count.details",{total:o.length,original:r+"",custom:s+""}))]),y.a.component({icon:"fas fa-filter",className:"Button Button--icon",onclick:function(){var e={missingTranslationsInLocales:[n]};i&&(e.forExtension=i),a&&(e.frontend=a),t(e)},title:e.a.translator.trans("fof-linguist.admin.coverage.apply-missing-filter")})])},t}(),R=i(5),G=i.n(R),W=i(13),D=i.n(W),$=function(){function t(){}var n=t.prototype;return n.oninit=function(){this.locale="en",this.namespace=null,this.includeOriginals=!1,this.includeAll=!1,this.loading=!1,this.output="",this.fetchOutput()},n.view=function(t){var n=this,i={};N().forEach((function(t){i[t.key]=t.name+" ("+t.key+")"})),i.all=e.a.translator.trans("fof-linguist.admin.export.locale-all");var a={_all:e.a.translator.trans("fof-linguist.admin.export.namespace-all")};return t.attrs.namespaces.forEach((function(t){t.extension?a[t.namespace]=t.extension.extra["flarum-extension"].title:a[t.namespace]=I(t.namespace)})),[m("h2",e.a.translator.trans("fof-linguist.admin.export.title")),m(".Form-group",m(".Alert",e.a.translator.trans("fof-linguist.admin.export.warning"))),m(".Form-group",[m("label",e.a.translator.trans("fof-linguist.admin.export.locale")),w.a.component({options:i,value:this.locale,onchange:function(t){n.locale=t,n.fetchOutput()}})]),m(".Form-group",[m("label",e.a.translator.trans("fof-linguist.admin.export.namespace")),w.a.component({options:a,value:null===this.namespace?"_all":this.namespace,onchange:function(t){n.namespace="_all"===t?null:t,n.fetchOutput()}})]),m(".Form-group",[G.a.component({state:this.includeOriginals,onchange:function(t){n.includeOriginals=t,n.fetchOutput()}},e.a.translator.trans("fof-linguist.admin.export.include-originals"))]),m(".Form-group",[G.a.component({state:this.includeAll,onchange:function(t){n.includeAll=t,n.fetchOutput()}},e.a.translator.trans("fof-linguist.admin.export.include-all"))]),m(".Form-group",[m("label",[e.a.translator.trans("fof-linguist.admin.export.output")," ",D.a.component({className:"Button Button--primary",href:this.exportUrl(),external:!0,download:(this.namespace||this.locale)+".yml"},e.a.translator.trans("fof-linguist.admin.export.download"))]),m("textarea.FormControl.FoF-Export-Textarea",{readonly:!0,value:this.output,rows:10,placeholder:this.loading?e.a.translator.trans("fof-linguist.admin.export.output-loading"):e.a.translator.trans("fof-linguist.admin.export.output-empty")})])]},n.exportUrl=function(){return e.a.forum.attribute("apiUrl")+"/fof/linguist/export?"+m.buildQueryString({locale:this.locale,namespace:this.namespace,includeOriginals:this.includeOriginals?"1":"0",includeAll:this.includeAll?"1":"0"})},n.fetchOutput=function(){var t=this;this.loading=!0,this.output="",e.a.request({method:"GET",url:this.exportUrl(),extract:function(t){return JSON.stringify(t)}}).then((function(n){t.loading=!1,t.output=n,m.redraw()})).catch((function(n){throw t.loading=!1,m.redraw(),n}))},t}(),H=function(){function t(){}var n=t.prototype;return n.oninit=function(){this.locale="en",this.overrideExisting=!0,this.input="",this.loading=!1},n.view=function(){var t=this,n={};return N().forEach((function(t){n[t.key]=t.name+" ("+t.key+")"})),n.all=e.a.translator.trans("fof-linguist.admin.import.locale-all"),[m("h2",e.a.translator.trans("fof-linguist.admin.import.title")),m(".Form-group",[m("label",e.a.translator.trans("fof-linguist.admin.import.input")),m("textarea.FormControl",{value:this.input,oninput:function(n){t.input=n.target.value},rows:10,placeholder:e.a.translator.trans("fof-linguist.admin.import.input-placeholder")})]),m(".Form-group",[m("label",e.a.translator.trans("fof-linguist.admin.import.locale")),w.a.component({options:n,value:this.locale,onchange:function(n){t.locale=n,t.fetchOutput()}})]),m(".Form-group",[G.a.component({state:this.overrideExisting,onchange:function(n){t.overrideExisting=n}},e.a.translator.trans("fof-linguist.admin.import.override-existing"))]),m(".Form-group",y.a.component({className:"Button Button--primary",onclick:function(){t.loading=!0,e.a.request({method:"POST",url:e.a.forum.attribute("apiUrl")+"/fof/linguist/import",body:{input:t.input,locale:t.locale,ignoreExisting:!t.overrideExisting}}).then((function(n){t.loading=!1,m.redraw(),confirm(B()(e.a.translator.trans(t.overrideExisting?"fof-linguist.admin.import.results":"fof-linguist.admin.import.results-with-ignore",{imported:n.imported+"",ignored:n.ignored+"",identical:n.identical+""})))&&window.location.reload()})).catch((function(n){throw t.loading=!1,m.redraw(),n}))},disabled:this.loading||!this.input,loading:this.loading},e.a.translator.trans("fof-linguist.admin.import.submit")))]},t}(),z=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var i=n.prototype;return i.oninit=function(n){var i=this;t.prototype.oninit.call(this,n),this.tab="strings",this.ready=!1,this.namespaces=[],this.frontends=["forum","admin","lib","ref","api"],this.initialBrowseFilters={},Promise.all([e.a.request({method:"GET",url:e.a.forum.attribute("apiUrl")+"/fof/linguist/strings"}).then((function(t){e.a.store.pushPayload(t)})),e.a.request({method:"GET",url:e.a.forum.attribute("apiUrl")+"/fof/linguist/string-keys"}).then((function(t){var n=e.a.store.pushPayload(t),a=[];n.forEach((function(t){var n=t.key().split("."),e=n[0];if(-1===["core","validation"].indexOf(e)&&-1===a.indexOf(e)&&a.push(e),n.length>1&&"validation"!==e){var o=n[1];-1===i.frontends.indexOf(o)&&i.frontends.push(o)}})),a.sort(),i.namespaces=[{namespace:"core"},{namespace:"validation"}].concat(a.map((function(t){var n=e.a.data.extensions[t];return n||(n=Object.values(e.a.data.extensions).find((function(n){var i=n.name.replace("/","-");return t===i}))),{namespace:t,extension:n}})))}))]).then((function(){i.ready=!0,m.redraw()}))},i.content=function(){return m(".ExtensionPage-settings",m(".container",[this.contentTab()]))},i.infoItems=function(){var n=this,i=t.prototype.infoItems.call(this);return i.add("linguist-tabs",m("ul.FoF-Linguist-Tabs",[m("li",m("a",{className:"strings"===this.tab?"active":"",onclick:function(){n.tab="strings"}},e.a.translator.trans("fof-linguist.admin.tabs.strings"))),m("li",m("a",{className:"coverage"===this.tab?"active":"",onclick:function(){n.tab="coverage"}},e.a.translator.trans("fof-linguist.admin.tabs.coverage"))),m("li",m("a",{className:"export"===this.tab?"active":"",onclick:function(){n.tab="export"}},e.a.translator.trans("fof-linguist.admin.tabs.export"))),m("li",m("a",{className:"import"===this.tab?"active":"",onclick:function(){n.tab="import"}},e.a.translator.trans("fof-linguist.admin.tabs.import")))]),100),i},i.contentTab=function(){var t=this;if(!this.ready)return h.a.component();switch(this.tab){case"strings":return m(j,{namespaces:this.namespaces,frontends:this.frontends,initialBrowseFilters:this.initialBrowseFilters});case"coverage":return m(U,{namespaces:this.namespaces,frontends:this.frontends,browseWithFilters:function(n){t.initialBrowseFilters=n,t.tab="strings"}});case"export":return m($,{namespaces:this.namespaces});case"import":return m(H)}return null},n}(g.a);e.a.initializers.add("fof-linguist",(function(t){t.store.models["fof-linguist-string-key"]=c,t.store.models["fof-linguist-string"]=u,t.extensionData.for("fof-linguist").registerPage(z)}))}]); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index de6a340..d3a9676 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@fof/linguist/webpack/bootstrap","webpack://@fof/linguist/external \"flarum.core.compat['app']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/Button']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/Select']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/Model']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/Switch']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/Dropdown']\"","webpack://@fof/linguist/external \"flarum.core.compat['admin/components/LoadingModal']\"","webpack://@fof/linguist/external \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/Alert']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/LinkButton']\"","webpack://@fof/linguist/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@fof/linguist/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/linguist/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/linguist/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@fof/linguist/./src/admin/models/StringKey.js","webpack://@fof/linguist/./src/admin/models/TextString.js","webpack://@fof/linguist/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/linguist/./src/admin/utils/localesAsArray.js","webpack://@fof/linguist/./src/admin/utils/highlightMithril.js","webpack://@fof/linguist/./src/admin/components/StringLocale.js","webpack://@fof/linguist/./src/admin/components/StringKey.js","webpack://@fof/linguist/./src/admin/utils/namespaceLabel.js","webpack://@fof/linguist/./src/admin/utils/frontendLabel.js","webpack://@fof/linguist/./src/admin/utils/booleanCheck.js","webpack://@fof/linguist/./src/admin/pages/StringsPage.js","webpack://@fof/linguist/./src/admin/pages/CoveragePage.js","webpack://@fof/linguist/./src/admin/pages/ExportPage.js","webpack://@fof/linguist/./src/admin/pages/ImportPage.js","webpack://@fof/linguist/./src/admin/pages/LinguistPage.js","webpack://@fof/linguist/./src/admin/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","_assertThisInitialized","self","ReferenceError","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","constructor","_defineProperty","obj","configurable","writable","StringKey","Model","attribute","TextString","apiEndpoint","this","exists","data","id","_extends","assign","target","arguments","length","source","apply","locales","app","push","string","highlight","lowercaseHighliht","toLowerCase","regex","RegExp","replace","HIGHLIGHT_DELIMITER","split","map","text","StringLocale","oninit","vnode","stringKey","attrs","locale","localeKey","originalString","store","all","find","dirty","processing","originalHasNewLine","keys","some","indexOf","inputType","view","placeholderText","translator","trans","localeName","className","title","oninput","event","disabled","highlightMithril","actions","onchange","toArray","items","ItemList","add","Button","component","type","loading","onclick","saveString","deleteString","createRecord","attributes","save","then","redraw","err","localesAsArray","namespace","translation","translations","frontend","operation","booleans","reduce","a","b","StringsPage","numberOfResultsToShow","filters","search","withOwnTranslations","missingTranslationsNegation","missingTranslationsType","missingTranslationsOperation","missingTranslationsInLocales","forExtension","initialBrowseFilters","results","applyFilters","slice","settings","Alert","dismissible","controls","modal","show","LoadingModal","request","method","url","forum","window","location","reload","placeholder","icon","Dropdown","buttonClassName","label","namespaces","extension","extra","namespaceLabel","frontends","frontendLabel","stopPropagation","Select","options","without","with","any","original","own","or","and","filter","strings","getById","confirm","extractText","count","Promise","shown","total","keysWithCustomTranslations","keysWithCustomTranslationsIn","forEach","lowercaseSearch","hasOriginalTranslation","booleanCheck","hasOwnTranslation","matchesType","parts","CoveragePage","columns","showAllFrontends","totalPercent","firstNonEnglishLocale","visibleFrontends","browseWithFilters","localeCoverage","style","prefixCoverage","stringKeys","customCount","originalCount","specialStyle","percent","Math","round","translated","width","max","custom","ExportPage","includeOriginals","includeAll","output","fetchOutput","localeOptions","namespaceOptions","_all","Switch","state","LinkButton","href","exportUrl","external","download","readonly","rows","buildQueryString","extract","raw","JSON","stringify","error","overrideExisting","input","body","ignoreExisting","imported","ignored","identical","LinguistPage","tab","ready","result","pushPayload","sort","extensions","values","packageNameWithDash","content","contentTab","infoItems","LoadingIndicator","ImportPage","ExtensionPage","initializers","models","extensionData","registerPage"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,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BlC,WAAYpH,KAAKoH,WACjBI,UAAWxH,KAAKwH,UAChBoC,kBAAmB,SAAAvE,GACf,EAAKQ,qBAAuBR,EAC5B,EAAKqH,IAAM,aAGvB,IAAK,SACD,OAAO5P,EAAE6N,EAAY,CACjBvD,WAAYpH,KAAKoH,aAEzB,IAAK,SACD,OAAOtK,EAAEwQ,GAGjB,OAAO,M,GAxJ2BC,KCL1C3M,IAAI4M,aAAa7J,IAAI,gBAAgB,SAAA/C,GACjCA,EAAIqB,MAAMwL,OAAO,2BAA6B9N,EAC9CiB,EAAIqB,MAAMwL,OAAO,uBAAyB3N,EAE1Cc,EAAI8M,cAAJ,IAAsB,gBAAgBC,aAAalB","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 14);\n","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['common/components/Button'];","module.exports = flarum.core.compat['common/components/Select'];","module.exports = flarum.core.compat['common/Model'];","module.exports = flarum.core.compat['common/utils/extractText'];","module.exports = flarum.core.compat['common/components/Switch'];","module.exports = flarum.core.compat['common/components/Dropdown'];","module.exports = flarum.core.compat['admin/components/LoadingModal'];","module.exports = flarum.core.compat['admin/components/ExtensionPage'];","module.exports = flarum.core.compat['common/components/LoadingIndicator'];","module.exports = flarum.core.compat['common/components/Alert'];","module.exports = flarum.core.compat['common/utils/ItemList'];","module.exports = flarum.core.compat['common/helpers/icon'];","module.exports = flarum.core.compat['common/components/LinkButton'];","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import Model from 'flarum/common/Model';\n\nexport default class StringKey extends Model {\n key = Model.attribute('key');\n locales = Model.attribute('locales');\n}\n","import Model from 'flarum/common/Model';\n\nexport default class TextString extends Model {\n key = Model.attribute('key');\n locale = Model.attribute('locale');\n value = Model.attribute('value');\n\n apiEndpoint() {\n return '/fof/linguist/strings' + (this.exists ? '/' + this.data.id : '');\n }\n}\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","import app from 'flarum/app';\n\nexport default function () {\n let locales = [];\n\n for (let key in app.data.locales) {\n if (!app.data.locales.hasOwnProperty(key)) {\n continue;\n }\n\n locales.push({\n key,\n name: app.data.locales[key],\n });\n }\n\n return locales;\n}\n","/* global m */\n\nconst HIGHLIGHT_DELIMITER = '';\n\n// Takes a string and highlight a keyword with a span with mithril template\n// The output will be an array if a keyword is given\nexport default function (string, highlight) {\n if (!highlight) {\n return string;\n }\n\n const lowercaseHighliht = highlight.toLowerCase();\n\n // Regex to match the highlighted work in a case-insensitive manner\n const regex = new RegExp(lowercaseHighliht.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), 'i');\n\n return string\n .replace(regex, HIGHLIGHT_DELIMITER + '$&' + HIGHLIGHT_DELIMITER)\n .split(HIGHLIGHT_DELIMITER)\n .map(text => {\n if (text.toLowerCase() === lowercaseHighliht) {\n return m('span.FoF-Linguist-Highlight', text);\n }\n\n return text;\n });\n}\n","import app from 'flarum/app';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Button from 'flarum/common/components/Button';\nimport highlightMithril from '../utils/highlightMithril';\n\n/* global m */\n\nexport default class StringLocale {\n oninit(vnode) {\n this.stringKey = vnode.attrs.stringKey;\n this.locale = vnode.attrs.locale;\n this.localeKey = this.locale ? this.locale.key : null;\n this.originalString = this.localeKey && this.stringKey.locales().hasOwnProperty(this.localeKey) ? this.stringKey.locales()[this.localeKey] : null;\n\n this.string = app.store.all('fof-linguist-string').find(\n string => string.key() === this.stringKey.key() && string.locale() === this.localeKey\n );\n\n this.value = this.string ? this.string.value() : '';\n this.dirty = false;\n this.processing = false;\n\n // We check whether any original translation in any language has a newline\n // By not hard-coding to English, this should work pretty well even if the fallback locale is modified,\n // or if a text happens to not be available in the fallback language\n const originalHasNewLine = Object.keys(this.stringKey.locales()).some(key => this.stringKey.locales()[key].indexOf('\\n') !== -1);\n\n this.inputType = 'input';\n\n // We will enable multi-line editing if the original has a newline, or if the current custom value already has one\n if (originalHasNewLine || this.value.indexOf('\\n') !== -1) {\n this.inputType = 'textarea';\n }\n }\n\n view(vnode) {\n const placeholderText = this.originalString ? this.originalString : '(' + app.translator.trans('fof-linguist.admin.placeholder.' + (this.localeKey ? 'not-translated' : 'all-locales')) + ')';\n\n return m('.FoF-Linguist-Locale', [\n m('label.FoF-Linguist-Label', this.localeName()),\n m('.FoF-Linguist-Field', {\n className: (this.value ? 'FoF-Linguist-Field--with-value' : '') + (this.originalString ? ' FoF-Linguist-Field--with-original-string' : ''),\n title: placeholderText,\n }, [\n m('.FoF-Linguist-Field-Wrap', [\n m(this.inputType, {\n className: 'FormControl FoF-Linguist-Input',\n value: this.value,\n oninput: event => {\n this.value = event.target.value;\n this.dirty = true;\n\n // Remove dirty state if the user erased his text without saving\n if (!this.value && !this.string) {\n this.dirty = false;\n }\n },\n disabled: this.processing,\n }),\n m('.FoF-Linguist-Placeholder', [\n m('span.FoF-Linguist-Placeholder-Hint', app.translator.trans('fof-linguist.admin.placeholder.hint')),\n ' ',\n m('span', this.originalString ? highlightMithril(placeholderText, vnode.attrs.highlight) : placeholderText),\n ]),\n ]),\n ]),\n m('.FoF-Linguist-Controls', this.actions(vnode.attrs.onchange).toArray()),\n ]);\n }\n\n localeName() {\n if (this.locale) {\n return [this.locale.name + ' (', m('code', this.locale.key), ')'];\n } else {\n return app.translator.trans('fof-linguist.admin.locales.all');\n }\n }\n\n actions(onchange) {\n const items = new ItemList();\n\n items.add('apply', Button.component({\n type: 'button',\n className: 'Button Button--primary',\n loading: this.processing,\n disabled: !this.dirty,\n onclick: () => {\n this.saveString(onchange);\n },\n }, app.translator.trans('fof-linguist.admin.buttons.apply')));\n\n items.add('reset', Button.component({\n type: 'button',\n className: 'Button',\n loading: this.processing,\n disabled: !this.dirty && !this.string,\n onclick: () => {\n this.deleteString(onchange);\n },\n }, app.translator.trans('fof-linguist.admin.buttons.reset')));\n\n if (this.originalString) {\n items.add('copy-original', Button.component({\n type: 'button',\n className: 'Button',\n loading: this.processing,\n onclick: () => {\n this.value = this.originalString;\n this.dirty = true;\n },\n }, app.translator.trans('fof-linguist.admin.buttons.copy-original')));\n }\n\n return items;\n }\n\n saveString(onchange) {\n if (!this.value) {\n this.deleteString(onchange);\n\n return;\n }\n\n if (!this.string) {\n this.string = app.store.createRecord('fof-linguist-string', {\n attributes: {\n key: this.stringKey.key(),\n locale: this.localeKey,\n value: '',\n },\n });\n }\n\n this.string.data.attributes.value = this.value;\n\n if (!this.string.locale()) delete this.string.data.attributes.locale;\n\n this.processing = true;\n\n this.string.save(this.string.data.attributes).then(() => {\n this.processing = false;\n this.dirty = false;\n\n onchange();\n\n m.redraw();\n }).catch(err => {\n this.processing = false;\n\n throw err;\n });\n }\n\n deleteString(onchange) {\n if (this.string) {\n this.processing = true;\n\n this.string.delete().then(() => {\n this.processing = false;\n this.dirty = false;\n\n this.string = null;\n this.value = '';\n\n onchange();\n\n m.redraw();\n }).catch(err => {\n this.processing = false;\n\n throw err;\n });\n } else {\n this.value = '';\n this.dirty = false;\n }\n }\n}\n","import StringLocale from '../components/StringLocale';\nimport localesAsArray from '../utils/localesAsArray';\nimport highlightMithril from '../utils/highlightMithril';\n\n/* global m */\n\nexport default class StringKey {\n view(vnode) {\n const {\n stringKey,\n highlight,\n onchange,\n } = vnode.attrs;\n\n return m('.FoF-Linguist-Key', [\n m('.FoF-Linguist-Key-Code', m('code', highlightMithril(stringKey.key(), highlight))),\n m('.FoF-Linguist-Locales', [\n ...localesAsArray().map(locale => m(StringLocale, {\n key: locale.key,\n locale,\n stringKey,\n highlight,\n onchange,\n })),\n m(StringLocale, {\n key: 'all',\n locale: null,\n stringKey,\n highlight,\n onchange,\n }),\n ]),\n ]);\n }\n}\n","import app from 'flarum/app';\n\nexport default function (namespace) {\n const translation = app.translator.translations['fof-linguist.admin.known-namespace.' + namespace];\n\n if (translation) {\n return translation;\n }\n\n return namespace;\n}\n","import app from 'flarum/app';\n\nexport default function (frontend) {\n const translation = app.translator.translations['fof-linguist.admin.known-frontend.' + frontend];\n\n if (translation) {\n return translation;\n }\n\n return frontend;\n}\n","export default function (operation, booleans) {\n return booleans.reduce((a, b) => {\n if (a === 'start') {\n return b;\n }\n\n if (operation === 'or') {\n return a || b;\n }\n\n return a && b;\n }, 'start');\n}\n","import app from 'flarum/app';\nimport Button from 'flarum/common/components/Button';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Select from 'flarum/common/components/Select';\nimport Alert from 'flarum/common/components/Alert';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport extractText from 'flarum/common/utils/extractText';\nimport localesAsArray from '../utils/localesAsArray';\nimport StringKey from '../components/StringKey';\nimport namespaceLabel from '../utils/namespaceLabel';\nimport frontendLabel from '../utils/frontendLabel';\nimport booleanCheck from '../utils/booleanCheck';\n\n/* global m */\n\nconst RESULTS_PER_PAGE = 20;\n\nexport default class StringsPage {\n oninit(vnode) {\n this.numberOfResultsToShow = RESULTS_PER_PAGE;\n\n this.filters = Object.assign({\n search: '',\n withOwnTranslations: false,\n missingTranslationsNegation: 'without',\n missingTranslationsType: 'any',\n missingTranslationsOperation: 'or',\n missingTranslationsInLocales: [],\n forExtension: null,\n frontend: null,\n }, vnode.attrs.initialBrowseFilters || {});\n\n this.results = [];\n\n this.applyFilters();\n }\n\n view(vnode) {\n const keys = this.results.slice(0, this.numberOfResultsToShow);\n\n return [\n // Additional divs are used to reduce Mithril redraws as much as possible when the conditional components appear\n m('div', app.data.settings['fof.linguist.should-clear-cache'] === '1' ? Alert.component({\n dismissible: false,\n controls: [Button.component({\n className: 'Button Button--link',\n onclick() {\n // Same logic as in core StatusWidget\n app.modal.show(LoadingModal);\n\n app.request({\n method: 'DELETE',\n url: app.forum.attribute('apiUrl') + '/cache',\n }).then(() => window.location.reload());\n },\n }, app.translator.trans('fof-linguist.admin.clear-cache.button'))],\n }, app.translator.trans('fof-linguist.admin.clear-cache.text')) : null),\n m('.FoF-Linguist-Filters', [\n m('input.FormControl', {\n value: this.filters.search,\n oninput: event => {\n this.filters.search = event.target.value;\n this.applyFilters();\n },\n placeholder: app.translator.trans('fof-linguist.admin.filters.search'),\n }),\n Button.component({\n className: 'Button' + (this.filters.withOwnTranslations ? ' FoF-Linguist-Filter--Selected' : ''),\n icon: `far fa-${this.filters.withOwnTranslations ? 'check-square' : 'square'}`,\n onclick: () => {\n this.filters.withOwnTranslations = !this.filters.withOwnTranslations;\n this.applyFilters();\n },\n }, app.translator.trans('fof-linguist.admin.filters.with-own-translations')),\n Dropdown.component({\n buttonClassName: 'Button' + (this.filters.forExtension ? ' FoF-Linguist-Filter--Selected' : ''),\n label: app.translator.trans('fof-linguist.admin.filters.for-extension'),\n }, vnode.attrs.namespaces.map(\n namespace => Button.component({\n className: 'Button',\n icon: `far fa-${this.filters.forExtension === namespace.namespace ? 'dot-circle' : 'circle'}`,\n onclick: () => {\n if (this.filters.forExtension === namespace.namespace) {\n this.filters.forExtension = null;\n } else {\n this.filters.forExtension = namespace.namespace;\n }\n\n this.applyFilters();\n },\n }, namespace.extension ? namespace.extension.extra['flarum-extension'].title : namespaceLabel(namespace.namespace))\n )),\n Dropdown.component({\n buttonClassName: 'Button' + (this.filters.frontend ? ' FoF-Linguist-Filter--Selected' : ''),\n label: app.translator.trans('fof-linguist.admin.filters.frontend'),\n }, [\n '_all_except_admin',\n ...vnode.attrs.frontends,\n ].map(\n frontend => Button.component({\n className: 'Button',\n icon: `far fa-${this.filters.frontend === frontend ? 'dot-circle' : 'circle'}`,\n onclick: () => {\n if (this.filters.frontend === frontend) {\n this.filters.frontend = null;\n } else {\n this.filters.frontend = frontend;\n }\n\n this.applyFilters();\n },\n }, frontend === '_all_except_admin' ? app.translator.trans('fof-linguist.admin.filters.frontend-all-except-admin') : frontendLabel(frontend))\n )),\n Dropdown.component({\n buttonClassName: 'Button' + (this.filters.missingTranslationsInLocales.length ? ' FoF-Linguist-Filter--Selected' : ''),\n label: app.translator.trans('fof-linguist.admin.filters.missing'),\n }, [\n m('.FoF-Linguist-Missing-Filter', {\n onclick(event) {\n // Prevent closing the dropdown\n event.stopPropagation();\n },\n }, [\n Select.component({\n value: this.filters.missingTranslationsNegation,\n onchange: value => {\n this.filters.missingTranslationsNegation = value;\n\n if (this.filters.missingTranslationsInLocales.length) {\n this.applyFilters();\n }\n },\n options: {\n without: app.translator.trans('fof-linguist.admin.filters.negation-options.without'),\n with: app.translator.trans('fof-linguist.admin.filters.negation-options.with'),\n },\n }),\n Select.component({\n value: this.filters.missingTranslationsType,\n onchange: value => {\n this.filters.missingTranslationsType = value;\n\n if (this.filters.missingTranslationsInLocales.length) {\n this.applyFilters();\n }\n },\n options: {\n any: app.translator.trans('fof-linguist.admin.filters.type-options.any'),\n original: app.translator.trans('fof-linguist.admin.filters.type-options.original'),\n own: app.translator.trans('fof-linguist.admin.filters.type-options.own'),\n },\n }),\n m('p', app.translator.trans('fof-linguist.admin.filters.missing-middle-label')),\n Select.component({\n value: this.filters.missingTranslationsOperation,\n onchange: value => {\n this.filters.missingTranslationsOperation = value;\n\n if (this.filters.missingTranslationsInLocales.length) {\n this.applyFilters();\n }\n },\n options: {\n or: app.translator.trans('fof-linguist.admin.filters.operation-options.or'),\n and: app.translator.trans('fof-linguist.admin.filters.operation-options.and'),\n },\n }),\n ]),\n ...localesAsArray().map(\n locale => Button.component({\n className: 'Button',\n icon: `far fa-${this.filters.missingTranslationsInLocales.indexOf(locale.key) !== -1 ? 'check-square' : 'square'}`,\n onclick: () => {\n if (this.filters.missingTranslationsInLocales.indexOf(locale.key) !== -1) {\n this.filters.missingTranslationsInLocales = this.filters.missingTranslationsInLocales.filter(key => key !== locale.key);\n } else {\n this.filters.missingTranslationsInLocales.push(locale.key);\n }\n\n this.applyFilters();\n },\n }, locale.name + ' (' + locale.key + ')')\n ),\n ]),\n Dropdown.component({\n buttonClassName: 'Button',\n label: app.translator.trans('fof-linguist.admin.filters.mass-edit'),\n }, [\n Button.component({\n icon: 'far fa-clone',\n className: 'Button',\n onclick: () => {\n const strings = app.store.all('fof-linguist-string').filter(string => {\n const key = app.store.getById('fof-linguist-string-key', string.key());\n\n return key && key.locales()[string.locale()] === string.value();\n });\n\n if (confirm(extractText(app.translator.trans('fof-linguist.admin.buttons.delete-redundant-confirm', {\n count: strings.length + '',\n })))) {\n if (strings.length === 0) {\n return;\n }\n\n app.modal.show(LoadingModal);\n\n Promise.all(strings.map(string => string.delete())).then(() => {\n window.location.reload();\n });\n }\n },\n }, app.translator.trans('fof-linguist.admin.buttons.delete-redundant')),\n Button.component({\n icon: 'fas fa-trash',\n className: 'Button',\n onclick: () => {\n const strings = app.store.all('fof-linguist-string');\n\n if (confirm(extractText(app.translator.trans('fof-linguist.admin.buttons.delete-all-confirm', {\n count: strings.length + '',\n })))) {\n if (strings.length === 0) {\n return;\n }\n\n app.modal.show(LoadingModal);\n\n Promise.all(strings.map(string => string.delete())).then(() => {\n window.location.reload();\n });\n }\n },\n }, app.translator.trans('fof-linguist.admin.buttons.delete-all')),\n ]),\n ]),\n m('div', keys.map(stringKey => m(StringKey, {\n key: stringKey.id(),\n stringKey,\n highlight: this.filters.search,\n onchange: () => {\n // We use the setting and not a local variable because we need to preserve state\n // if we navigate away and back to the Linguist page without refreshing the admin panel\n app.data.settings['fof.linguist.should-clear-cache'] = '1';\n },\n }))),\n m('.FoF-Linguist-Results', [\n app.translator.trans('fof-linguist.admin.filters.results', {\n shown: keys.length + '', // cast to string otherwise number isn't displayed\n total: this.results.length + '',\n }),\n ' ',\n (this.results.length > keys.length ? Button.component({\n className: 'Button',\n onclick: () => {\n this.numberOfResultsToShow += RESULTS_PER_PAGE;\n },\n }, app.translator.trans('fof-linguist.admin.buttons.load-more')) : null),\n ]),\n ];\n }\n\n applyFilters() {\n this.numberOfResultsToShow = RESULTS_PER_PAGE;\n\n const keysWithCustomTranslations = app.store.all('fof-linguist-string').map(string => string.key());\n\n const keysWithCustomTranslationsIn = {};\n localesAsArray().forEach(locale => {\n keysWithCustomTranslationsIn[locale.key] = app.store.all('fof-linguist-string')\n .filter(string => string.locale() === locale.key)\n .map(string => string.key());\n });\n\n let lowercaseSearch = '';\n\n if (this.filters.search) {\n lowercaseSearch = this.filters.search.toLowerCase();\n }\n\n this.results = app.store.all('fof-linguist-string-key').filter(key => {\n if (this.filters.withOwnTranslations && keysWithCustomTranslations.indexOf(key.key()) === -1) {\n return false;\n }\n\n if (this.filters.missingTranslationsInLocales.length) {\n let operation = this.filters.missingTranslationsOperation;\n\n // Because the whole operation is reversed at the end based on with or without,\n // we actually need to make the opposite boolean computation on the \"has\" variables\n if (this.filters.missingTranslationsNegation === 'without') {\n operation = operation === 'or' ? 'and' : 'or';\n }\n\n const hasOriginalTranslation = booleanCheck(operation, this.filters.missingTranslationsInLocales.map(locale => {\n return key.locales().hasOwnProperty(locale);\n }));\n const hasOwnTranslation = booleanCheck(operation, this.filters.missingTranslationsInLocales.map(locale => {\n return keysWithCustomTranslationsIn[locale].indexOf(key.key()) !== -1;\n }));\n\n let matchesType = false;\n\n switch (this.filters.missingTranslationsType) {\n case 'any':\n matchesType = hasOriginalTranslation || hasOwnTranslation;\n break;\n case 'original':\n matchesType = hasOriginalTranslation;\n break;\n case 'own':\n matchesType = hasOwnTranslation;\n break;\n }\n\n if (this.filters.missingTranslationsNegation === 'without') {\n matchesType = !matchesType;\n }\n\n if (!matchesType) {\n return false;\n }\n }\n\n if (this.filters.forExtension) {\n if (key.key().indexOf(this.filters.forExtension + '.') !== 0) {\n return false;\n }\n }\n\n if (this.filters.frontend) {\n const parts = key.key().split('.');\n\n if (this.filters.frontend === '_all_except_admin') {\n // We will keep everything that isn't admin, including if it's a single level deep\n if (parts.length >= 2 && parts[1] === 'admin') {\n return false;\n }\n } else {\n // Keep only parts with 2 levels or more where second level matches frontend\n if (parts.length < 2 || parts[1] !== this.filters.frontend) {\n return false;\n }\n }\n }\n\n if (lowercaseSearch) {\n if (key.key().toLowerCase().indexOf(lowercaseSearch) !== -1) {\n return true;\n }\n\n const locales = key.locales();\n\n for (let locale in locales) {\n if (locales.hasOwnProperty(locale) && locales[locale].toLowerCase().indexOf(lowercaseSearch) !== -1) {\n return true;\n }\n }\n\n return false;\n }\n\n return true;\n });\n\n m.redraw();\n }\n}\n","import app from 'flarum/app';\nimport Button from 'flarum/common/components/Button';\nimport icon from 'flarum/common/helpers/icon';\nimport localesAsArray from '../utils/localesAsArray';\nimport namespaceLabel from '../utils/namespaceLabel';\nimport frontendLabel from '../utils/frontendLabel';\n\n/* global m */\n\nexport default class CoveragePage {\n oninit() {\n this.columns = 'locale';\n this.showAllFrontends = false;\n this.totalPercent = true;\n this.locale = [];\n\n const firstNonEnglishLocale = localesAsArray().find(locale => locale.key !== 'en');\n\n if (firstNonEnglishLocale) {\n this.locale = firstNonEnglishLocale.key;\n }\n }\n\n view(vnode) {\n let visibleFrontends = vnode.attrs.frontends.slice(0, 2);\n\n if (this.showAllFrontends) {\n visibleFrontends = vnode.attrs.frontends;\n }\n\n const {browseWithFilters} = vnode.attrs;\n\n return [\n m('.FoF-Linguist-Filters', [\n m('.ButtonGroup', [\n Button.component({\n className: 'Button' + (this.totalPercent ? ' active' : ''),\n onclick: () => {\n this.totalPercent = true;\n },\n }, app.translator.trans('fof-linguist.admin.coverage.total-options.percent')),\n Button.component({\n className: 'Button' + (this.totalPercent ? ' ' : ' active'),\n onclick: () => {\n this.totalPercent = false;\n },\n }, app.translator.trans('fof-linguist.admin.coverage.total-options.count')),\n ]),\n m('.ButtonGroup', [\n Button.component({\n className: 'Button' + (this.columns === 'locale' ? ' active' : ''),\n onclick: () => {\n this.columns = 'locale';\n },\n }, app.translator.trans('fof-linguist.admin.coverage.column-options.locale')),\n Button.component({\n className: 'Button' + (this.columns === 'namespace' ? ' active' : ''),\n onclick: () => {\n this.columns = 'namespace';\n this.showAllFrontends = false;\n },\n }, app.translator.trans('fof-linguist.admin.coverage.column-options.namespace')),\n ]),\n this.columns === 'namespace' ? m('.ButtonGroup', localesAsArray().map(\n locale => Button.component({\n className: 'Button' + (this.locale === locale.key ? ' active' : ''),\n onclick: () => {\n if (this.locale !== locale.key) {\n this.locale = locale.key;\n }\n },\n }, locale.name + ' (' + locale.key + ')')\n )) : null,\n ]),\n m('table.FoF-Linguist-Coverage', [\n m('thead', m('tr', [\n m('th', app.translator.trans('fof-linguist.admin.coverage.columns.namespace')),\n this.columns === 'locale' ? localesAsArray().map(locale => m('th', locale.name + ' (' + locale.key + ')')) : [\n this.showAllFrontends ? visibleFrontends.map(frontend => m('th', frontendLabel(frontend))) : [\n m('th', app.translator.trans('fof-linguist.admin.coverage.columns.all-except-admin')),\n m('th', frontendLabel('admin')),\n m('th', Button.component({\n className: 'Button',\n onclick: () => {\n this.showAllFrontends = true;\n },\n }, app.translator.trans('fof-linguist.admin.coverage.columns.all-frontends'))),\n ],\n ],\n ])),\n m('tbody', [\n this.columns === 'locale' ? m('tr', [\n m('td', [\n m('span.FoF-Linguist-Coverage-Extension-Icon.FoF-Linguist-Coverage-Namespace-Icon'),\n m('span.FoF-Linguist-Coverage-Extension-Title', app.translator.trans('fof-linguist.admin.coverage.all-namespaces')),\n ]),\n localesAsArray().map(locale => m('td', this.localeCoverage(browseWithFilters, locale.key))),\n ]) : null,\n vnode.attrs.namespaces.map(namespace => {\n return m('tr', [\n m('td', namespace.extension ? [\n m('span.FoF-Linguist-Coverage-Extension-Icon', {\n style: namespace.extension.icon,\n }, namespace.extension.icon ? icon(namespace.extension.icon.name) : ''),\n m('span.FoF-Linguist-Coverage-Extension-Title', namespace.extension.extra['flarum-extension'].title),\n ] : [\n m('span.FoF-Linguist-Coverage-Extension-Icon.FoF-Linguist-Coverage-Namespace-Icon'),\n m('span.FoF-Linguist-Coverage-Extension-Title', namespaceLabel(namespace.namespace)),\n ]),\n this.columns === 'locale' ? localesAsArray().map(locale => m('td', this.localeCoverage(browseWithFilters, locale.key, namespace.namespace))) : [\n this.showAllFrontends ?\n visibleFrontends.map(frontend => m('td', this.prefixCoverage(browseWithFilters, namespace.namespace, frontend))) : [\n m('td', this.prefixCoverage(browseWithFilters, namespace.namespace, '_all_except_admin')),\n m('td', this.prefixCoverage(browseWithFilters, namespace.namespace, 'admin')),\n ],\n ],\n ]);\n }),\n ]),\n ]),\n ];\n }\n\n prefixCoverage(browseWithFilters, namespace, frontend) {\n if (!this.locale) {\n return null;\n }\n\n return this.localeCoverage(browseWithFilters, this.locale, namespace, frontend);\n }\n\n localeCoverage(browseWithFilters, locale, namespace, frontend) {\n const stringKeys = app.store.all('fof-linguist-string-key').filter(key => {\n if (!namespace) {\n return true;\n }\n\n const parts = key.key().split('.');\n\n if (parts[0] !== namespace) {\n return false;\n }\n\n if (frontend === '_all_except_admin') {\n if (parts.length >= 2 && parts[1] === 'admin') {\n return false;\n }\n } else if (frontend && (parts.length < 2 || parts[1] !== frontend)) {\n return false;\n }\n\n return true;\n });\n\n if (stringKeys.length === 0) {\n return '-';\n }\n\n let customCount = 0;\n let originalCount = 0;\n\n stringKeys.forEach(stringKey => {\n const customString = app.store.all('fof-linguist-string').find(\n string => string.key() === stringKey.key() && string.locale() === locale\n );\n\n if (customString) {\n customCount++;\n } else if (stringKey.locales().hasOwnProperty(locale)) {\n originalCount++;\n }\n });\n\n const percent = Math.round(((customCount + originalCount) / stringKeys.length) * 100);\n\n let specialStyle;\n\n if (percent === 100) {\n specialStyle = 'full';\n } else if (percent < 5) {\n specialStyle = 'low';\n }\n\n let label;\n\n if (this.totalPercent) {\n label = app.translator.trans('fof-linguist.admin.coverage.count.percent', {\n percent: percent + '', // Keeps zero as string\n });\n } else {\n label = app.translator.trans('fof-linguist.admin.coverage.count.total', {\n translated: (customCount + originalCount) + '', // Keeps zero as string\n total: stringKeys.length,\n });\n }\n\n return m('.FoF-Linguist-Coverage-Progress-Wrap', [\n m('.FoF-Linguist-Progress', {\n className: specialStyle ? 'FoF-Linguist-Progress--' + specialStyle : '',\n }, [\n m('.FoF-Linguist-Progress-Bar', {\n style: {\n width: Math.max(percent, 5) + '%', // Always show the progress bar even if very close to 0\n },\n }),\n m('.FoF-Linguist-Progress-Label', label),\n m('.FoF-Linguist-Progress-More', app.translator.trans('fof-linguist.admin.coverage.count.details', {\n total: stringKeys.length,\n original: originalCount + '', // Cast to string to preserve zero\n custom: customCount + '',\n })),\n ]),\n Button.component({\n icon: 'fas fa-filter',\n className: 'Button Button--icon',\n onclick: () => {\n const options = {\n missingTranslationsInLocales: [locale],\n };\n\n if (namespace) {\n options.forExtension = namespace;\n }\n\n if (frontend) {\n options.frontend = frontend;\n }\n\n browseWithFilters(options);\n },\n title: app.translator.trans('fof-linguist.admin.coverage.apply-missing-filter'),\n }),\n ]);\n }\n}\n","import app from 'flarum/app';\nimport Select from 'flarum/common/components/Select';\nimport Switch from 'flarum/common/components/Switch';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport localesAsArray from '../utils/localesAsArray';\nimport namespaceLabel from '../utils/namespaceLabel';\n\n/* global m */\n\nexport default class ExportPage {\n oninit() {\n this.locale = 'en';\n this.namespace = null;\n this.includeOriginals = false;\n this.includeAll = false;\n this.loading = false;\n this.output = '';\n\n this.fetchOutput();\n }\n\n view(vnode) {\n const localeOptions = {};\n\n localesAsArray().forEach(locale => {\n localeOptions[locale.key] = locale.name + ' (' + locale.key + ')';\n });\n\n localeOptions.all = app.translator.trans('fof-linguist.admin.export.locale-all')\n\n const namespaceOptions = {\n _all: app.translator.trans('fof-linguist.admin.export.namespace-all'),\n };\n\n vnode.attrs.namespaces.forEach(namespace => {\n if (namespace.extension) {\n namespaceOptions[namespace.namespace] = namespace.extension.extra['flarum-extension'].title;\n } else {\n namespaceOptions[namespace.namespace] = namespaceLabel(namespace.namespace);\n\n }\n });\n\n return [\n m('h2', app.translator.trans('fof-linguist.admin.export.title')),\n m('.Form-group', m('.Alert', app.translator.trans('fof-linguist.admin.export.warning'))),\n m('.Form-group', [\n m('label', app.translator.trans('fof-linguist.admin.export.locale')),\n Select.component({\n options: localeOptions,\n value: this.locale,\n onchange: value => {\n this.locale = value;\n\n this.fetchOutput();\n },\n }),\n ]),\n m('.Form-group', [\n m('label', app.translator.trans('fof-linguist.admin.export.namespace')),\n Select.component({\n options: namespaceOptions,\n value: this.namespace === null ? '_all' : this.namespace,\n onchange: value => {\n this.namespace = value === '_all' ? null : value;\n\n this.fetchOutput();\n },\n }),\n ]),\n m('.Form-group', [\n Switch.component({\n state: this.includeOriginals,\n onchange: value => {\n this.includeOriginals = value;\n\n this.fetchOutput();\n }\n }, app.translator.trans('fof-linguist.admin.export.include-originals')),\n ]),\n m('.Form-group', [\n Switch.component({\n state: this.includeAll,\n onchange: value => {\n this.includeAll = value;\n\n this.fetchOutput();\n }\n }, app.translator.trans('fof-linguist.admin.export.include-all')),\n ]),\n m('.Form-group', [\n m('label', [\n app.translator.trans('fof-linguist.admin.export.output'),\n ' ',\n LinkButton.component({\n className: 'Button Button--primary',\n href: this.exportUrl(),\n external: true,\n // If a namespace is selected, we use it as filename (language pack convention)\n // otherwise we use the locale as filename (extension convention)\n download: (this.namespace || this.locale) + '.yml',\n }, app.translator.trans('fof-linguist.admin.export.download')),\n ]),\n m('textarea.FormControl.FoF-Export-Textarea', {\n readonly: true,\n value: this.output,\n rows: 10,\n placeholder: this.loading ? app.translator.trans('fof-linguist.admin.export.output-loading') : app.translator.trans('fof-linguist.admin.export.output-empty'),\n }),\n ]),\n ];\n }\n\n exportUrl() {\n return app.forum.attribute('apiUrl') + '/fof/linguist/export?' + m.buildQueryString({\n locale: this.locale,\n namespace: this.namespace,\n includeOriginals: this.includeOriginals ? '1' : '0',\n includeAll: this.includeAll ? '1' : '0',\n });\n }\n\n fetchOutput() {\n this.loading = true;\n this.output = '';\n\n app.request({\n method: 'GET',\n url: this.exportUrl(),\n // Flarum doesn't support a raw to have the raw text response\n // So we'll encode the response with JSON so Flarum can parse if afterwards\n extract: raw => JSON.stringify(raw),\n }).then(output => {\n this.loading = false;\n this.output = output;\n m.redraw();\n }).catch(error => {\n this.loading = false;\n m.redraw();\n throw error;\n });\n }\n}\n","import app from 'flarum/app';\nimport Button from 'flarum/common/components/Button';\nimport Select from 'flarum/common/components/Select';\nimport Switch from 'flarum/common/components/Switch';\nimport extractText from 'flarum/common/utils/extractText';\nimport localesAsArray from '../utils/localesAsArray';\n\n/* global m */\n\nexport default class ExportPage {\n oninit() {\n this.locale = 'en';\n this.overrideExisting = true;\n this.input = '';\n this.loading = false;\n }\n\n view() {\n const localeOptions = {};\n\n localesAsArray().forEach(locale => {\n localeOptions[locale.key] = locale.name + ' (' + locale.key + ')';\n });\n\n localeOptions.all = app.translator.trans('fof-linguist.admin.import.locale-all')\n\n return [\n m('h2', app.translator.trans('fof-linguist.admin.import.title')),\n m('.Form-group', [\n m('label', app.translator.trans('fof-linguist.admin.import.input')),\n m('textarea.FormControl', {\n value: this.input,\n oninput: event => {\n this.input = event.target.value;\n },\n rows: 10,\n placeholder: app.translator.trans('fof-linguist.admin.import.input-placeholder'),\n }),\n ]),\n m('.Form-group', [\n m('label', app.translator.trans('fof-linguist.admin.import.locale')),\n Select.component({\n options: localeOptions,\n value: this.locale,\n onchange: value => {\n this.locale = value;\n\n this.fetchOutput();\n },\n }),\n ]),\n m('.Form-group', [\n Switch.component({\n state: this.overrideExisting,\n onchange: value => {\n this.overrideExisting = value;\n }\n }, app.translator.trans('fof-linguist.admin.import.override-existing')),\n ]),\n m('.Form-group', Button.component({\n className: 'Button Button--primary',\n onclick: () => {\n this.loading = true;\n\n app.request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/fof/linguist/import',\n body: {\n input: this.input,\n locale: this.locale,\n ignoreExisting: !this.overrideExisting,\n },\n }).then(data => {\n this.loading = false;\n m.redraw();\n\n if (confirm(extractText(app.translator.trans(this.overrideExisting ? 'fof-linguist.admin.import.results' : 'fof-linguist.admin.import.results-with-ignore', {\n imported: data.imported + '', // Cast to string to preserve zeros\n ignored: data.ignored + '',\n identical: data.identical + '',\n })))) {\n window.location.reload();\n }\n }).catch(error => {\n this.loading = false;\n m.redraw();\n throw error;\n });\n },\n disabled: this.loading || !this.input,\n loading: this.loading,\n }, app.translator.trans('fof-linguist.admin.import.submit'))),\n ];\n }\n}\n","import app from 'flarum/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport StringsPage from './StringsPage';\nimport CoveragePage from './CoveragePage';\nimport ExportPage from './ExportPage';\nimport ImportPage from './ImportPage';\n\n/* global m */\n\nexport default class LinguistPage extends ExtensionPage {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.tab = 'strings';\n this.ready = false;\n this.namespaces = []; // First level of translation keys. Usually an extension ID, but also core and validation\n this.frontends = [\n 'forum',\n 'admin',\n 'lib',\n 'ref',\n 'api',\n ]; // Second level of translation keys: forum, admin, ...\n this.initialBrowseFilters = {};\n\n Promise.all([\n app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/fof/linguist/strings',\n }).then(result => {\n app.store.pushPayload(result);\n }),\n app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/fof/linguist/string-keys',\n }).then(result => {\n const keys = app.store.pushPayload(result);\n\n const namespaces = [];\n\n keys.forEach(key => {\n const parts = key.key().split('.');\n\n const namespace = parts[0];\n\n if (['core', 'validation'].indexOf(namespace) === -1 && namespaces.indexOf(namespace) === -1) {\n namespaces.push(namespace);\n }\n\n if (parts.length > 1 && namespace !== 'validation') {\n const frontend = parts[1];\n\n if (this.frontends.indexOf(frontend) === -1) {\n this.frontends.push(frontend);\n }\n }\n });\n\n namespaces.sort();\n\n this.namespaces = [\n {\n namespace: 'core',\n },\n {\n namespace: 'validation',\n },\n ...namespaces.map(namespace => {\n // First we look if the namespace matches an extension ID, that's the most common naming\n let extension = app.data.extensions[namespace];\n\n // If that's unsuccessful, we'll look if the full package name was used as namespace\n if (!extension) {\n extension = Object.values(app.data.extensions).find(extension => {\n const packageNameWithDash = extension.name.replace('/', '-');\n\n return namespace === packageNameWithDash;\n });\n }\n\n return {\n namespace,\n extension,\n };\n }),\n ];\n }),\n ]).then(() => {\n this.ready = true;\n m.redraw();\n });\n }\n\n content() {\n return m('.ExtensionPage-settings', m('.container', [\n this.contentTab(),\n ]));\n }\n\n infoItems() {\n const items = super.infoItems();\n\n items.add('linguist-tabs', m('ul.FoF-Linguist-Tabs', [\n m('li', m('a', {\n className: this.tab === 'strings' ? 'active' : '',\n onclick: () => {\n this.tab = 'strings';\n },\n }, app.translator.trans('fof-linguist.admin.tabs.strings'))),\n m('li', m('a', {\n className: this.tab === 'coverage' ? 'active' : '',\n onclick: () => {\n this.tab = 'coverage';\n },\n }, app.translator.trans('fof-linguist.admin.tabs.coverage'))),\n m('li', m('a', {\n className: this.tab === 'export' ? 'active' : '',\n onclick: () => {\n this.tab = 'export';\n },\n }, app.translator.trans('fof-linguist.admin.tabs.export'))),\n m('li', m('a', {\n className: this.tab === 'import' ? 'active' : '',\n onclick: () => {\n this.tab = 'import';\n },\n }, app.translator.trans('fof-linguist.admin.tabs.import'))),\n ]), 100);\n\n return items;\n }\n\n contentTab() {\n if (!this.ready) {\n return LoadingIndicator.component();\n }\n\n switch (this.tab) {\n case 'strings':\n return m(StringsPage, {\n namespaces: this.namespaces,\n frontends: this.frontends,\n initialBrowseFilters: this.initialBrowseFilters,\n });\n case 'coverage':\n return m(CoveragePage, {\n namespaces: this.namespaces,\n frontends: this.frontends,\n browseWithFilters: filters => {\n this.initialBrowseFilters = filters;\n this.tab = 'strings';\n },\n });\n case 'export':\n return m(ExportPage, {\n namespaces: this.namespaces,\n });\n case 'import':\n return m(ImportPage);\n }\n\n return null;\n }\n}\n","import app from 'flarum/app';\nimport StringKey from './models/StringKey';\nimport TextString from './models/TextString';\nimport LinguistPage from './pages/LinguistPage';\n\napp.initializers.add('fof-linguist', app => {\n app.store.models['fof-linguist-string-key'] = StringKey;\n app.store.models['fof-linguist-string'] = TextString;\n\n app.extensionData.for('fof-linguist').registerPage(LinguistPage);\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@fof/linguist/webpack/bootstrap","webpack://@fof/linguist/external \"flarum.core.compat['admin/app']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/Button']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/Select']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/Model']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/Switch']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/Dropdown']\"","webpack://@fof/linguist/external \"flarum.core.compat['admin/components/LoadingModal']\"","webpack://@fof/linguist/external \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/Alert']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/linguist/external \"flarum.core.compat['common/components/LinkButton']\"","webpack://@fof/linguist/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/linguist/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/linguist/./src/admin/models/StringKey.js","webpack://@fof/linguist/./src/admin/models/TextString.js","webpack://@fof/linguist/./src/admin/utils/localesAsArray.js","webpack://@fof/linguist/./src/admin/utils/highlightMithril.js","webpack://@fof/linguist/./src/admin/components/StringLocale.js","webpack://@fof/linguist/./src/admin/components/StringKey.js","webpack://@fof/linguist/./src/admin/utils/namespaceLabel.js","webpack://@fof/linguist/./src/admin/utils/frontendLabel.js","webpack://@fof/linguist/./src/admin/utils/booleanCheck.js","webpack://@fof/linguist/./src/admin/pages/StringsPage.js","webpack://@fof/linguist/./src/admin/pages/CoveragePage.js","webpack://@fof/linguist/./src/admin/pages/ExportPage.js","webpack://@fof/linguist/./src/admin/pages/ImportPage.js","webpack://@fof/linguist/./src/admin/pages/LinguistPage.js","webpack://@fof/linguist/./src/admin/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","constructor","StringKey","Model","attribute","locales","TextString","locale","apiEndpoint","this","exists","data","id","app","push","string","highlight","lowercaseHighliht","toLowerCase","regex","RegExp","replace","HIGHLIGHT_DELIMITER","split","map","text","StringLocale","oninit","vnode","stringKey","attrs","localeKey","originalString","store","all","find","dirty","processing","originalHasNewLine","keys","some","indexOf","inputType","view","placeholderText","translator","trans","localeName","className","title","oninput","event","target","disabled","highlightMithril","actions","onchange","toArray","items","ItemList","add","Button","component","type","loading","onclick","saveString","deleteString","createRecord","attributes","save","then","redraw","err","localesAsArray","namespace","translation","translations","frontend","operation","booleans","reduce","a","b","StringsPage","numberOfResultsToShow","filters","assign","search","withOwnTranslations","missingTranslationsNegation","missingTranslationsType","missingTranslationsOperation","missingTranslationsInLocales","forExtension","initialBrowseFilters","results","applyFilters","slice","settings","Alert","dismissible","controls","modal","show","LoadingModal","request","method","url","forum","window","location","reload","placeholder","icon","Dropdown","buttonClassName","label","namespaces","extension","extra","namespaceLabel","frontends","frontendLabel","length","stopPropagation","Select","options","without","with","any","original","own","or","and","filter","strings","getById","confirm","extractText","count","Promise","shown","total","keysWithCustomTranslations","keysWithCustomTranslationsIn","forEach","lowercaseSearch","hasOriginalTranslation","booleanCheck","hasOwnTranslation","matchesType","parts","CoveragePage","columns","showAllFrontends","totalPercent","firstNonEnglishLocale","visibleFrontends","browseWithFilters","localeCoverage","style","prefixCoverage","stringKeys","customCount","originalCount","specialStyle","percent","Math","round","translated","width","max","custom","ExportPage","includeOriginals","includeAll","output","fetchOutput","localeOptions","namespaceOptions","_all","Switch","state","LinkButton","href","exportUrl","external","download","readonly","rows","buildQueryString","extract","raw","JSON","stringify","error","overrideExisting","input","body","ignoreExisting","imported","ignored","identical","LinguistPage","tab","ready","result","pushPayload","sort","extensions","values","packageNameWithDash","content","contentTab","infoItems","LoadingIndicator","ImportPage","ExtensionPage","initializers","models","extensionData","registerPage"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,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ACD,OAAOnI,EAAE6L,EAAc,CACnBnC,WAAY7G,KAAK6G,WACjBI,UAAWjH,KAAKiH,UAChBqC,kBAAmB,SAAAzE,GACf,EAAKS,qBAAuBT,EAC5B,EAAKuH,IAAM,aAGvB,IAAK,SACD,OAAOjP,EAAEkN,EAAY,CACjBxD,WAAY7G,KAAK6G,aAEzB,IAAK,SACD,OAAO1J,EAAE6P,GAGjB,OAAO,M,GAxJ2BC,KCL1C7M,IAAI8M,aAAa/J,IAAI,gBAAgB,SAAA/C,GACjCA,EAAIoB,MAAM2L,OAAO,2BAA6B1N,EAC9CW,EAAIoB,MAAM2L,OAAO,uBAAyBtN,EAE1CO,EAAIgN,cAAJ,IAAsB,gBAAgBC,aAAalB","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 14);\n","module.exports = flarum.core.compat['admin/app'];","module.exports = flarum.core.compat['common/components/Button'];","module.exports = flarum.core.compat['common/components/Select'];","module.exports = flarum.core.compat['common/Model'];","module.exports = flarum.core.compat['common/utils/extractText'];","module.exports = flarum.core.compat['common/components/Switch'];","module.exports = flarum.core.compat['common/components/Dropdown'];","module.exports = flarum.core.compat['admin/components/LoadingModal'];","module.exports = flarum.core.compat['admin/components/ExtensionPage'];","module.exports = flarum.core.compat['common/components/LoadingIndicator'];","module.exports = flarum.core.compat['common/components/Alert'];","module.exports = flarum.core.compat['common/utils/ItemList'];","module.exports = flarum.core.compat['common/helpers/icon'];","module.exports = flarum.core.compat['common/components/LinkButton'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import Model from 'flarum/common/Model';\n\nexport default class StringKey extends Model {\n key = Model.attribute('key');\n locales = Model.attribute('locales');\n}\n","import Model from 'flarum/common/Model';\n\nexport default class TextString extends Model {\n key = Model.attribute('key');\n locale = Model.attribute('locale');\n value = Model.attribute('value');\n\n apiEndpoint() {\n return '/fof/linguist/strings' + (this.exists ? '/' + this.data.id : '');\n }\n}\n","import app from 'flarum/admin/app';\n\nexport default function () {\n let locales = [];\n\n for (let key in app.data.locales) {\n if (!app.data.locales.hasOwnProperty(key)) {\n continue;\n }\n\n locales.push({\n key,\n name: app.data.locales[key],\n });\n }\n\n return locales;\n}\n","/* global m */\n\nconst HIGHLIGHT_DELIMITER = '';\n\n// Takes a string and highlight a keyword with a span with mithril template\n// The output will be an array if a keyword is given\nexport default function (string, highlight) {\n if (!highlight) {\n return string;\n }\n\n const lowercaseHighliht = highlight.toLowerCase();\n\n // Regex to match the highlighted work in a case-insensitive manner\n const regex = new RegExp(lowercaseHighliht.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), 'i');\n\n return string\n .replace(regex, HIGHLIGHT_DELIMITER + '$&' + HIGHLIGHT_DELIMITER)\n .split(HIGHLIGHT_DELIMITER)\n .map(text => {\n if (text.toLowerCase() === lowercaseHighliht) {\n return m('span.FoF-Linguist-Highlight', text);\n }\n\n return text;\n });\n}\n","import app from 'flarum/admin/app';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Button from 'flarum/common/components/Button';\nimport highlightMithril from '../utils/highlightMithril';\n\n/* global m */\n\nexport default class StringLocale {\n oninit(vnode) {\n this.stringKey = vnode.attrs.stringKey;\n this.locale = vnode.attrs.locale;\n this.localeKey = this.locale ? this.locale.key : null;\n this.originalString = this.localeKey && this.stringKey.locales().hasOwnProperty(this.localeKey) ? this.stringKey.locales()[this.localeKey] : null;\n\n this.string = app.store.all('fof-linguist-string').find(\n string => string.key() === this.stringKey.key() && string.locale() === this.localeKey\n );\n\n this.value = this.string ? this.string.value() : '';\n this.dirty = false;\n this.processing = false;\n\n // We check whether any original translation in any language has a newline\n // By not hard-coding to English, this should work pretty well even if the fallback locale is modified,\n // or if a text happens to not be available in the fallback language\n const originalHasNewLine = Object.keys(this.stringKey.locales()).some(key => this.stringKey.locales()[key].indexOf('\\n') !== -1);\n\n this.inputType = 'input';\n\n // We will enable multi-line editing if the original has a newline, or if the current custom value already has one\n if (originalHasNewLine || this.value.indexOf('\\n') !== -1) {\n this.inputType = 'textarea';\n }\n }\n\n view(vnode) {\n const placeholderText = this.originalString ? this.originalString : '(' + app.translator.trans('fof-linguist.admin.placeholder.' + (this.localeKey ? 'not-translated' : 'all-locales')) + ')';\n\n return m('.FoF-Linguist-Locale', [\n m('label.FoF-Linguist-Label', this.localeName()),\n m('.FoF-Linguist-Field', {\n className: (this.value ? 'FoF-Linguist-Field--with-value' : '') + (this.originalString ? ' FoF-Linguist-Field--with-original-string' : ''),\n title: placeholderText,\n }, [\n m('.FoF-Linguist-Field-Wrap', [\n m(this.inputType, {\n className: 'FormControl FoF-Linguist-Input',\n value: this.value,\n oninput: event => {\n this.value = event.target.value;\n this.dirty = true;\n\n // Remove dirty state if the user erased his text without saving\n if (!this.value && !this.string) {\n this.dirty = false;\n }\n },\n disabled: this.processing,\n }),\n m('.FoF-Linguist-Placeholder', [\n m('span.FoF-Linguist-Placeholder-Hint', app.translator.trans('fof-linguist.admin.placeholder.hint')),\n ' ',\n m('span', this.originalString ? highlightMithril(placeholderText, vnode.attrs.highlight) : placeholderText),\n ]),\n ]),\n ]),\n m('.FoF-Linguist-Controls', this.actions(vnode.attrs.onchange).toArray()),\n ]);\n }\n\n localeName() {\n if (this.locale) {\n return [this.locale.name + ' (', m('code', this.locale.key), ')'];\n } else {\n return app.translator.trans('fof-linguist.admin.locales.all');\n }\n }\n\n actions(onchange) {\n const items = new ItemList();\n\n items.add('apply', Button.component({\n type: 'button',\n className: 'Button Button--primary',\n loading: this.processing,\n disabled: !this.dirty,\n onclick: () => {\n this.saveString(onchange);\n },\n }, app.translator.trans('fof-linguist.admin.buttons.apply')));\n\n items.add('reset', Button.component({\n type: 'button',\n className: 'Button',\n loading: this.processing,\n disabled: !this.dirty && !this.string,\n onclick: () => {\n this.deleteString(onchange);\n },\n }, app.translator.trans('fof-linguist.admin.buttons.reset')));\n\n if (this.originalString) {\n items.add('copy-original', Button.component({\n type: 'button',\n className: 'Button',\n loading: this.processing,\n onclick: () => {\n this.value = this.originalString;\n this.dirty = true;\n },\n }, app.translator.trans('fof-linguist.admin.buttons.copy-original')));\n }\n\n return items;\n }\n\n saveString(onchange) {\n if (!this.value) {\n this.deleteString(onchange);\n\n return;\n }\n\n if (!this.string) {\n this.string = app.store.createRecord('fof-linguist-string', {\n attributes: {\n key: this.stringKey.key(),\n locale: this.localeKey,\n value: '',\n },\n });\n }\n\n this.string.data.attributes.value = this.value;\n\n if (!this.string.locale()) delete this.string.data.attributes.locale;\n\n this.processing = true;\n\n this.string.save(this.string.data.attributes).then(() => {\n this.processing = false;\n this.dirty = false;\n\n onchange();\n\n m.redraw();\n }).catch(err => {\n this.processing = false;\n\n throw err;\n });\n }\n\n deleteString(onchange) {\n if (this.string) {\n this.processing = true;\n\n this.string.delete().then(() => {\n this.processing = false;\n this.dirty = false;\n\n this.string = null;\n this.value = '';\n\n onchange();\n\n m.redraw();\n }).catch(err => {\n this.processing = false;\n\n throw err;\n });\n } else {\n this.value = '';\n this.dirty = false;\n }\n }\n}\n","import StringLocale from '../components/StringLocale';\nimport localesAsArray from '../utils/localesAsArray';\nimport highlightMithril from '../utils/highlightMithril';\n\n/* global m */\n\nexport default class StringKey {\n view(vnode) {\n const {\n stringKey,\n highlight,\n onchange,\n } = vnode.attrs;\n\n return m('.FoF-Linguist-Key', [\n m('.FoF-Linguist-Key-Code', m('code', highlightMithril(stringKey.key(), highlight))),\n m('.FoF-Linguist-Locales', [\n ...localesAsArray().map(locale => m(StringLocale, {\n key: locale.key,\n locale,\n stringKey,\n highlight,\n onchange,\n })),\n m(StringLocale, {\n key: 'all',\n locale: null,\n stringKey,\n highlight,\n onchange,\n }),\n ]),\n ]);\n }\n}\n","import app from 'flarum/admin/app';\n\nexport default function (namespace) {\n const translation = app.translator.translations['fof-linguist.admin.known-namespace.' + namespace];\n\n if (translation) {\n return translation;\n }\n\n return namespace;\n}\n","import app from 'flarum/admin/app';\n\nexport default function (frontend) {\n const translation = app.translator.translations['fof-linguist.admin.known-frontend.' + frontend];\n\n if (translation) {\n return translation;\n }\n\n return frontend;\n}\n","export default function (operation, booleans) {\n return booleans.reduce((a, b) => {\n if (a === 'start') {\n return b;\n }\n\n if (operation === 'or') {\n return a || b;\n }\n\n return a && b;\n }, 'start');\n}\n","import app from 'flarum/admin/app';\nimport Button from 'flarum/common/components/Button';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Select from 'flarum/common/components/Select';\nimport Alert from 'flarum/common/components/Alert';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport extractText from 'flarum/common/utils/extractText';\nimport localesAsArray from '../utils/localesAsArray';\nimport StringKey from '../components/StringKey';\nimport namespaceLabel from '../utils/namespaceLabel';\nimport frontendLabel from '../utils/frontendLabel';\nimport booleanCheck from '../utils/booleanCheck';\n\n/* global m */\n\nconst RESULTS_PER_PAGE = 20;\n\nexport default class StringsPage {\n oninit(vnode) {\n this.numberOfResultsToShow = RESULTS_PER_PAGE;\n\n this.filters = Object.assign({\n search: '',\n withOwnTranslations: false,\n missingTranslationsNegation: 'without',\n missingTranslationsType: 'any',\n missingTranslationsOperation: 'or',\n missingTranslationsInLocales: [],\n forExtension: null,\n frontend: null,\n }, vnode.attrs.initialBrowseFilters || {});\n\n this.results = [];\n\n this.applyFilters();\n }\n\n view(vnode) {\n const keys = this.results.slice(0, this.numberOfResultsToShow);\n\n return [\n // Additional divs are used to reduce Mithril redraws as much as possible when the conditional components appear\n m('div', app.data.settings['fof.linguist.should-clear-cache'] === '1' ? Alert.component({\n dismissible: false,\n controls: [Button.component({\n className: 'Button Button--link',\n onclick() {\n // Same logic as in core StatusWidget\n app.modal.show(LoadingModal);\n\n app.request({\n method: 'DELETE',\n url: app.forum.attribute('apiUrl') + '/cache',\n }).then(() => window.location.reload());\n },\n }, app.translator.trans('fof-linguist.admin.clear-cache.button'))],\n }, app.translator.trans('fof-linguist.admin.clear-cache.text')) : null),\n m('.FoF-Linguist-Filters', [\n m('input.FormControl', {\n value: this.filters.search,\n oninput: event => {\n this.filters.search = event.target.value;\n this.applyFilters();\n },\n placeholder: app.translator.trans('fof-linguist.admin.filters.search'),\n }),\n Button.component({\n className: 'Button' + (this.filters.withOwnTranslations ? ' FoF-Linguist-Filter--Selected' : ''),\n icon: `far fa-${this.filters.withOwnTranslations ? 'check-square' : 'square'}`,\n onclick: () => {\n this.filters.withOwnTranslations = !this.filters.withOwnTranslations;\n this.applyFilters();\n },\n }, app.translator.trans('fof-linguist.admin.filters.with-own-translations')),\n Dropdown.component({\n buttonClassName: 'Button' + (this.filters.forExtension ? ' FoF-Linguist-Filter--Selected' : ''),\n label: app.translator.trans('fof-linguist.admin.filters.for-extension'),\n }, vnode.attrs.namespaces.map(\n namespace => Button.component({\n className: 'Button',\n icon: `far fa-${this.filters.forExtension === namespace.namespace ? 'dot-circle' : 'circle'}`,\n onclick: () => {\n if (this.filters.forExtension === namespace.namespace) {\n this.filters.forExtension = null;\n } else {\n this.filters.forExtension = namespace.namespace;\n }\n\n this.applyFilters();\n },\n }, namespace.extension ? namespace.extension.extra['flarum-extension'].title : namespaceLabel(namespace.namespace))\n )),\n Dropdown.component({\n buttonClassName: 'Button' + (this.filters.frontend ? ' FoF-Linguist-Filter--Selected' : ''),\n label: app.translator.trans('fof-linguist.admin.filters.frontend'),\n }, [\n '_all_except_admin',\n ...vnode.attrs.frontends,\n ].map(\n frontend => Button.component({\n className: 'Button',\n icon: `far fa-${this.filters.frontend === frontend ? 'dot-circle' : 'circle'}`,\n onclick: () => {\n if (this.filters.frontend === frontend) {\n this.filters.frontend = null;\n } else {\n this.filters.frontend = frontend;\n }\n\n this.applyFilters();\n },\n }, frontend === '_all_except_admin' ? app.translator.trans('fof-linguist.admin.filters.frontend-all-except-admin') : frontendLabel(frontend))\n )),\n Dropdown.component({\n buttonClassName: 'Button' + (this.filters.missingTranslationsInLocales.length ? ' FoF-Linguist-Filter--Selected' : ''),\n label: app.translator.trans('fof-linguist.admin.filters.missing'),\n }, [\n m('.FoF-Linguist-Missing-Filter', {\n onclick(event) {\n // Prevent closing the dropdown\n event.stopPropagation();\n },\n }, [\n Select.component({\n value: this.filters.missingTranslationsNegation,\n onchange: value => {\n this.filters.missingTranslationsNegation = value;\n\n if (this.filters.missingTranslationsInLocales.length) {\n this.applyFilters();\n }\n },\n options: {\n without: app.translator.trans('fof-linguist.admin.filters.negation-options.without'),\n with: app.translator.trans('fof-linguist.admin.filters.negation-options.with'),\n },\n }),\n Select.component({\n value: this.filters.missingTranslationsType,\n onchange: value => {\n this.filters.missingTranslationsType = value;\n\n if (this.filters.missingTranslationsInLocales.length) {\n this.applyFilters();\n }\n },\n options: {\n any: app.translator.trans('fof-linguist.admin.filters.type-options.any'),\n original: app.translator.trans('fof-linguist.admin.filters.type-options.original'),\n own: app.translator.trans('fof-linguist.admin.filters.type-options.own'),\n },\n }),\n m('p', app.translator.trans('fof-linguist.admin.filters.missing-middle-label')),\n Select.component({\n value: this.filters.missingTranslationsOperation,\n onchange: value => {\n this.filters.missingTranslationsOperation = value;\n\n if (this.filters.missingTranslationsInLocales.length) {\n this.applyFilters();\n }\n },\n options: {\n or: app.translator.trans('fof-linguist.admin.filters.operation-options.or'),\n and: app.translator.trans('fof-linguist.admin.filters.operation-options.and'),\n },\n }),\n ]),\n ...localesAsArray().map(\n locale => Button.component({\n className: 'Button',\n icon: `far fa-${this.filters.missingTranslationsInLocales.indexOf(locale.key) !== -1 ? 'check-square' : 'square'}`,\n onclick: () => {\n if (this.filters.missingTranslationsInLocales.indexOf(locale.key) !== -1) {\n this.filters.missingTranslationsInLocales = this.filters.missingTranslationsInLocales.filter(key => key !== locale.key);\n } else {\n this.filters.missingTranslationsInLocales.push(locale.key);\n }\n\n this.applyFilters();\n },\n }, locale.name + ' (' + locale.key + ')')\n ),\n ]),\n Dropdown.component({\n buttonClassName: 'Button',\n label: app.translator.trans('fof-linguist.admin.filters.mass-edit'),\n }, [\n Button.component({\n icon: 'far fa-clone',\n className: 'Button',\n onclick: () => {\n const strings = app.store.all('fof-linguist-string').filter(string => {\n const key = app.store.getById('fof-linguist-string-key', string.key());\n\n return key && key.locales()[string.locale()] === string.value();\n });\n\n if (confirm(extractText(app.translator.trans('fof-linguist.admin.buttons.delete-redundant-confirm', {\n count: strings.length + '',\n })))) {\n if (strings.length === 0) {\n return;\n }\n\n app.modal.show(LoadingModal);\n\n Promise.all(strings.map(string => string.delete())).then(() => {\n window.location.reload();\n });\n }\n },\n }, app.translator.trans('fof-linguist.admin.buttons.delete-redundant')),\n Button.component({\n icon: 'fas fa-trash',\n className: 'Button',\n onclick: () => {\n const strings = app.store.all('fof-linguist-string');\n\n if (confirm(extractText(app.translator.trans('fof-linguist.admin.buttons.delete-all-confirm', {\n count: strings.length + '',\n })))) {\n if (strings.length === 0) {\n return;\n }\n\n app.modal.show(LoadingModal);\n\n Promise.all(strings.map(string => string.delete())).then(() => {\n window.location.reload();\n });\n }\n },\n }, app.translator.trans('fof-linguist.admin.buttons.delete-all')),\n ]),\n ]),\n m('div', keys.map(stringKey => m(StringKey, {\n key: stringKey.id(),\n stringKey,\n highlight: this.filters.search,\n onchange: () => {\n // We use the setting and not a local variable because we need to preserve state\n // if we navigate away and back to the Linguist page without refreshing the admin panel\n app.data.settings['fof.linguist.should-clear-cache'] = '1';\n },\n }))),\n m('.FoF-Linguist-Results', [\n app.translator.trans('fof-linguist.admin.filters.results', {\n shown: keys.length + '', // cast to string otherwise number isn't displayed\n total: this.results.length + '',\n }),\n ' ',\n (this.results.length > keys.length ? Button.component({\n className: 'Button',\n onclick: () => {\n this.numberOfResultsToShow += RESULTS_PER_PAGE;\n },\n }, app.translator.trans('fof-linguist.admin.buttons.load-more')) : null),\n ]),\n ];\n }\n\n applyFilters() {\n this.numberOfResultsToShow = RESULTS_PER_PAGE;\n\n const keysWithCustomTranslations = app.store.all('fof-linguist-string').map(string => string.key());\n\n const keysWithCustomTranslationsIn = {};\n localesAsArray().forEach(locale => {\n keysWithCustomTranslationsIn[locale.key] = app.store.all('fof-linguist-string')\n .filter(string => string.locale() === locale.key)\n .map(string => string.key());\n });\n\n let lowercaseSearch = '';\n\n if (this.filters.search) {\n lowercaseSearch = this.filters.search.toLowerCase();\n }\n\n this.results = app.store.all('fof-linguist-string-key').filter(key => {\n if (this.filters.withOwnTranslations && keysWithCustomTranslations.indexOf(key.key()) === -1) {\n return false;\n }\n\n if (this.filters.missingTranslationsInLocales.length) {\n let operation = this.filters.missingTranslationsOperation;\n\n // Because the whole operation is reversed at the end based on with or without,\n // we actually need to make the opposite boolean computation on the \"has\" variables\n if (this.filters.missingTranslationsNegation === 'without') {\n operation = operation === 'or' ? 'and' : 'or';\n }\n\n const hasOriginalTranslation = booleanCheck(operation, this.filters.missingTranslationsInLocales.map(locale => {\n return key.locales().hasOwnProperty(locale);\n }));\n const hasOwnTranslation = booleanCheck(operation, this.filters.missingTranslationsInLocales.map(locale => {\n return keysWithCustomTranslationsIn[locale].indexOf(key.key()) !== -1;\n }));\n\n let matchesType = false;\n\n switch (this.filters.missingTranslationsType) {\n case 'any':\n matchesType = hasOriginalTranslation || hasOwnTranslation;\n break;\n case 'original':\n matchesType = hasOriginalTranslation;\n break;\n case 'own':\n matchesType = hasOwnTranslation;\n break;\n }\n\n if (this.filters.missingTranslationsNegation === 'without') {\n matchesType = !matchesType;\n }\n\n if (!matchesType) {\n return false;\n }\n }\n\n if (this.filters.forExtension) {\n if (key.key().indexOf(this.filters.forExtension + '.') !== 0) {\n return false;\n }\n }\n\n if (this.filters.frontend) {\n const parts = key.key().split('.');\n\n if (this.filters.frontend === '_all_except_admin') {\n // We will keep everything that isn't admin, including if it's a single level deep\n if (parts.length >= 2 && parts[1] === 'admin') {\n return false;\n }\n } else {\n // Keep only parts with 2 levels or more where second level matches frontend\n if (parts.length < 2 || parts[1] !== this.filters.frontend) {\n return false;\n }\n }\n }\n\n if (lowercaseSearch) {\n if (key.key().toLowerCase().indexOf(lowercaseSearch) !== -1) {\n return true;\n }\n\n const locales = key.locales();\n\n for (let locale in locales) {\n if (locales.hasOwnProperty(locale) && locales[locale].toLowerCase().indexOf(lowercaseSearch) !== -1) {\n return true;\n }\n }\n\n return false;\n }\n\n return true;\n });\n\n m.redraw();\n }\n}\n","import app from 'flarum/admin/app';\nimport Button from 'flarum/common/components/Button';\nimport icon from 'flarum/common/helpers/icon';\nimport localesAsArray from '../utils/localesAsArray';\nimport namespaceLabel from '../utils/namespaceLabel';\nimport frontendLabel from '../utils/frontendLabel';\n\n/* global m */\n\nexport default class CoveragePage {\n oninit() {\n this.columns = 'locale';\n this.showAllFrontends = false;\n this.totalPercent = true;\n this.locale = [];\n\n const firstNonEnglishLocale = localesAsArray().find(locale => locale.key !== 'en');\n\n if (firstNonEnglishLocale) {\n this.locale = firstNonEnglishLocale.key;\n }\n }\n\n view(vnode) {\n let visibleFrontends = vnode.attrs.frontends.slice(0, 2);\n\n if (this.showAllFrontends) {\n visibleFrontends = vnode.attrs.frontends;\n }\n\n const {browseWithFilters} = vnode.attrs;\n\n return [\n m('.FoF-Linguist-Filters', [\n m('.ButtonGroup', [\n Button.component({\n className: 'Button' + (this.totalPercent ? ' active' : ''),\n onclick: () => {\n this.totalPercent = true;\n },\n }, app.translator.trans('fof-linguist.admin.coverage.total-options.percent')),\n Button.component({\n className: 'Button' + (this.totalPercent ? ' ' : ' active'),\n onclick: () => {\n this.totalPercent = false;\n },\n }, app.translator.trans('fof-linguist.admin.coverage.total-options.count')),\n ]),\n m('.ButtonGroup', [\n Button.component({\n className: 'Button' + (this.columns === 'locale' ? ' active' : ''),\n onclick: () => {\n this.columns = 'locale';\n },\n }, app.translator.trans('fof-linguist.admin.coverage.column-options.locale')),\n Button.component({\n className: 'Button' + (this.columns === 'namespace' ? ' active' : ''),\n onclick: () => {\n this.columns = 'namespace';\n this.showAllFrontends = false;\n },\n }, app.translator.trans('fof-linguist.admin.coverage.column-options.namespace')),\n ]),\n this.columns === 'namespace' ? m('.ButtonGroup', localesAsArray().map(\n locale => Button.component({\n className: 'Button' + (this.locale === locale.key ? ' active' : ''),\n onclick: () => {\n if (this.locale !== locale.key) {\n this.locale = locale.key;\n }\n },\n }, locale.name + ' (' + locale.key + ')')\n )) : null,\n ]),\n m('table.FoF-Linguist-Coverage', [\n m('thead', m('tr', [\n m('th', app.translator.trans('fof-linguist.admin.coverage.columns.namespace')),\n this.columns === 'locale' ? localesAsArray().map(locale => m('th', locale.name + ' (' + locale.key + ')')) : [\n this.showAllFrontends ? visibleFrontends.map(frontend => m('th', frontendLabel(frontend))) : [\n m('th', app.translator.trans('fof-linguist.admin.coverage.columns.all-except-admin')),\n m('th', frontendLabel('admin')),\n m('th', Button.component({\n className: 'Button',\n onclick: () => {\n this.showAllFrontends = true;\n },\n }, app.translator.trans('fof-linguist.admin.coverage.columns.all-frontends'))),\n ],\n ],\n ])),\n m('tbody', [\n this.columns === 'locale' ? m('tr', [\n m('td', [\n m('span.FoF-Linguist-Coverage-Extension-Icon.FoF-Linguist-Coverage-Namespace-Icon'),\n m('span.FoF-Linguist-Coverage-Extension-Title', app.translator.trans('fof-linguist.admin.coverage.all-namespaces')),\n ]),\n localesAsArray().map(locale => m('td', this.localeCoverage(browseWithFilters, locale.key))),\n ]) : null,\n vnode.attrs.namespaces.map(namespace => {\n return m('tr', [\n m('td', namespace.extension ? [\n m('span.FoF-Linguist-Coverage-Extension-Icon', {\n style: namespace.extension.icon,\n }, namespace.extension.icon ? icon(namespace.extension.icon.name) : ''),\n m('span.FoF-Linguist-Coverage-Extension-Title', namespace.extension.extra['flarum-extension'].title),\n ] : [\n m('span.FoF-Linguist-Coverage-Extension-Icon.FoF-Linguist-Coverage-Namespace-Icon'),\n m('span.FoF-Linguist-Coverage-Extension-Title', namespaceLabel(namespace.namespace)),\n ]),\n this.columns === 'locale' ? localesAsArray().map(locale => m('td', this.localeCoverage(browseWithFilters, locale.key, namespace.namespace))) : [\n this.showAllFrontends ?\n visibleFrontends.map(frontend => m('td', this.prefixCoverage(browseWithFilters, namespace.namespace, frontend))) : [\n m('td', this.prefixCoverage(browseWithFilters, namespace.namespace, '_all_except_admin')),\n m('td', this.prefixCoverage(browseWithFilters, namespace.namespace, 'admin')),\n ],\n ],\n ]);\n }),\n ]),\n ]),\n ];\n }\n\n prefixCoverage(browseWithFilters, namespace, frontend) {\n if (!this.locale) {\n return null;\n }\n\n return this.localeCoverage(browseWithFilters, this.locale, namespace, frontend);\n }\n\n localeCoverage(browseWithFilters, locale, namespace, frontend) {\n const stringKeys = app.store.all('fof-linguist-string-key').filter(key => {\n if (!namespace) {\n return true;\n }\n\n const parts = key.key().split('.');\n\n if (parts[0] !== namespace) {\n return false;\n }\n\n if (frontend === '_all_except_admin') {\n if (parts.length >= 2 && parts[1] === 'admin') {\n return false;\n }\n } else if (frontend && (parts.length < 2 || parts[1] !== frontend)) {\n return false;\n }\n\n return true;\n });\n\n if (stringKeys.length === 0) {\n return '-';\n }\n\n let customCount = 0;\n let originalCount = 0;\n\n stringKeys.forEach(stringKey => {\n const customString = app.store.all('fof-linguist-string').find(\n string => string.key() === stringKey.key() && string.locale() === locale\n );\n\n if (customString) {\n customCount++;\n } else if (stringKey.locales().hasOwnProperty(locale)) {\n originalCount++;\n }\n });\n\n const percent = Math.round(((customCount + originalCount) / stringKeys.length) * 100);\n\n let specialStyle;\n\n if (percent === 100) {\n specialStyle = 'full';\n } else if (percent < 5) {\n specialStyle = 'low';\n }\n\n let label;\n\n if (this.totalPercent) {\n label = app.translator.trans('fof-linguist.admin.coverage.count.percent', {\n percent: percent + '', // Keeps zero as string\n });\n } else {\n label = app.translator.trans('fof-linguist.admin.coverage.count.total', {\n translated: (customCount + originalCount) + '', // Keeps zero as string\n total: stringKeys.length,\n });\n }\n\n return m('.FoF-Linguist-Coverage-Progress-Wrap', [\n m('.FoF-Linguist-Progress', {\n className: specialStyle ? 'FoF-Linguist-Progress--' + specialStyle : '',\n }, [\n m('.FoF-Linguist-Progress-Bar', {\n style: {\n width: Math.max(percent, 5) + '%', // Always show the progress bar even if very close to 0\n },\n }),\n m('.FoF-Linguist-Progress-Label', label),\n m('.FoF-Linguist-Progress-More', app.translator.trans('fof-linguist.admin.coverage.count.details', {\n total: stringKeys.length,\n original: originalCount + '', // Cast to string to preserve zero\n custom: customCount + '',\n })),\n ]),\n Button.component({\n icon: 'fas fa-filter',\n className: 'Button Button--icon',\n onclick: () => {\n const options = {\n missingTranslationsInLocales: [locale],\n };\n\n if (namespace) {\n options.forExtension = namespace;\n }\n\n if (frontend) {\n options.frontend = frontend;\n }\n\n browseWithFilters(options);\n },\n title: app.translator.trans('fof-linguist.admin.coverage.apply-missing-filter'),\n }),\n ]);\n }\n}\n","import app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Switch from 'flarum/common/components/Switch';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport localesAsArray from '../utils/localesAsArray';\nimport namespaceLabel from '../utils/namespaceLabel';\n\n/* global m */\n\nexport default class ExportPage {\n oninit() {\n this.locale = 'en';\n this.namespace = null;\n this.includeOriginals = false;\n this.includeAll = false;\n this.loading = false;\n this.output = '';\n\n this.fetchOutput();\n }\n\n view(vnode) {\n const localeOptions = {};\n\n localesAsArray().forEach(locale => {\n localeOptions[locale.key] = locale.name + ' (' + locale.key + ')';\n });\n\n localeOptions.all = app.translator.trans('fof-linguist.admin.export.locale-all')\n\n const namespaceOptions = {\n _all: app.translator.trans('fof-linguist.admin.export.namespace-all'),\n };\n\n vnode.attrs.namespaces.forEach(namespace => {\n if (namespace.extension) {\n namespaceOptions[namespace.namespace] = namespace.extension.extra['flarum-extension'].title;\n } else {\n namespaceOptions[namespace.namespace] = namespaceLabel(namespace.namespace);\n\n }\n });\n\n return [\n m('h2', app.translator.trans('fof-linguist.admin.export.title')),\n m('.Form-group', m('.Alert', app.translator.trans('fof-linguist.admin.export.warning'))),\n m('.Form-group', [\n m('label', app.translator.trans('fof-linguist.admin.export.locale')),\n Select.component({\n options: localeOptions,\n value: this.locale,\n onchange: value => {\n this.locale = value;\n\n this.fetchOutput();\n },\n }),\n ]),\n m('.Form-group', [\n m('label', app.translator.trans('fof-linguist.admin.export.namespace')),\n Select.component({\n options: namespaceOptions,\n value: this.namespace === null ? '_all' : this.namespace,\n onchange: value => {\n this.namespace = value === '_all' ? null : value;\n\n this.fetchOutput();\n },\n }),\n ]),\n m('.Form-group', [\n Switch.component({\n state: this.includeOriginals,\n onchange: value => {\n this.includeOriginals = value;\n\n this.fetchOutput();\n }\n }, app.translator.trans('fof-linguist.admin.export.include-originals')),\n ]),\n m('.Form-group', [\n Switch.component({\n state: this.includeAll,\n onchange: value => {\n this.includeAll = value;\n\n this.fetchOutput();\n }\n }, app.translator.trans('fof-linguist.admin.export.include-all')),\n ]),\n m('.Form-group', [\n m('label', [\n app.translator.trans('fof-linguist.admin.export.output'),\n ' ',\n LinkButton.component({\n className: 'Button Button--primary',\n href: this.exportUrl(),\n external: true,\n // If a namespace is selected, we use it as filename (language pack convention)\n // otherwise we use the locale as filename (extension convention)\n download: (this.namespace || this.locale) + '.yml',\n }, app.translator.trans('fof-linguist.admin.export.download')),\n ]),\n m('textarea.FormControl.FoF-Export-Textarea', {\n readonly: true,\n value: this.output,\n rows: 10,\n placeholder: this.loading ? app.translator.trans('fof-linguist.admin.export.output-loading') : app.translator.trans('fof-linguist.admin.export.output-empty'),\n }),\n ]),\n ];\n }\n\n exportUrl() {\n return app.forum.attribute('apiUrl') + '/fof/linguist/export?' + m.buildQueryString({\n locale: this.locale,\n namespace: this.namespace,\n includeOriginals: this.includeOriginals ? '1' : '0',\n includeAll: this.includeAll ? '1' : '0',\n });\n }\n\n fetchOutput() {\n this.loading = true;\n this.output = '';\n\n app.request({\n method: 'GET',\n url: this.exportUrl(),\n // Flarum doesn't support a raw to have the raw text response\n // So we'll encode the response with JSON so Flarum can parse if afterwards\n extract: raw => JSON.stringify(raw),\n }).then(output => {\n this.loading = false;\n this.output = output;\n m.redraw();\n }).catch(error => {\n this.loading = false;\n m.redraw();\n throw error;\n });\n }\n}\n","import app from 'flarum/admin/app';\nimport Button from 'flarum/common/components/Button';\nimport Select from 'flarum/common/components/Select';\nimport Switch from 'flarum/common/components/Switch';\nimport extractText from 'flarum/common/utils/extractText';\nimport localesAsArray from '../utils/localesAsArray';\n\n/* global m */\n\nexport default class ExportPage {\n oninit() {\n this.locale = 'en';\n this.overrideExisting = true;\n this.input = '';\n this.loading = false;\n }\n\n view() {\n const localeOptions = {};\n\n localesAsArray().forEach(locale => {\n localeOptions[locale.key] = locale.name + ' (' + locale.key + ')';\n });\n\n localeOptions.all = app.translator.trans('fof-linguist.admin.import.locale-all')\n\n return [\n m('h2', app.translator.trans('fof-linguist.admin.import.title')),\n m('.Form-group', [\n m('label', app.translator.trans('fof-linguist.admin.import.input')),\n m('textarea.FormControl', {\n value: this.input,\n oninput: event => {\n this.input = event.target.value;\n },\n rows: 10,\n placeholder: app.translator.trans('fof-linguist.admin.import.input-placeholder'),\n }),\n ]),\n m('.Form-group', [\n m('label', app.translator.trans('fof-linguist.admin.import.locale')),\n Select.component({\n options: localeOptions,\n value: this.locale,\n onchange: value => {\n this.locale = value;\n\n this.fetchOutput();\n },\n }),\n ]),\n m('.Form-group', [\n Switch.component({\n state: this.overrideExisting,\n onchange: value => {\n this.overrideExisting = value;\n }\n }, app.translator.trans('fof-linguist.admin.import.override-existing')),\n ]),\n m('.Form-group', Button.component({\n className: 'Button Button--primary',\n onclick: () => {\n this.loading = true;\n\n app.request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/fof/linguist/import',\n body: {\n input: this.input,\n locale: this.locale,\n ignoreExisting: !this.overrideExisting,\n },\n }).then(data => {\n this.loading = false;\n m.redraw();\n\n if (confirm(extractText(app.translator.trans(this.overrideExisting ? 'fof-linguist.admin.import.results' : 'fof-linguist.admin.import.results-with-ignore', {\n imported: data.imported + '', // Cast to string to preserve zeros\n ignored: data.ignored + '',\n identical: data.identical + '',\n })))) {\n window.location.reload();\n }\n }).catch(error => {\n this.loading = false;\n m.redraw();\n throw error;\n });\n },\n disabled: this.loading || !this.input,\n loading: this.loading,\n }, app.translator.trans('fof-linguist.admin.import.submit'))),\n ];\n }\n}\n","import app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport StringsPage from './StringsPage';\nimport CoveragePage from './CoveragePage';\nimport ExportPage from './ExportPage';\nimport ImportPage from './ImportPage';\n\n/* global m */\n\nexport default class LinguistPage extends ExtensionPage {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.tab = 'strings';\n this.ready = false;\n this.namespaces = []; // First level of translation keys. Usually an extension ID, but also core and validation\n this.frontends = [\n 'forum',\n 'admin',\n 'lib',\n 'ref',\n 'api',\n ]; // Second level of translation keys: forum, admin, ...\n this.initialBrowseFilters = {};\n\n Promise.all([\n app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/fof/linguist/strings',\n }).then(result => {\n app.store.pushPayload(result);\n }),\n app.request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + '/fof/linguist/string-keys',\n }).then(result => {\n const keys = app.store.pushPayload(result);\n\n const namespaces = [];\n\n keys.forEach(key => {\n const parts = key.key().split('.');\n\n const namespace = parts[0];\n\n if (['core', 'validation'].indexOf(namespace) === -1 && namespaces.indexOf(namespace) === -1) {\n namespaces.push(namespace);\n }\n\n if (parts.length > 1 && namespace !== 'validation') {\n const frontend = parts[1];\n\n if (this.frontends.indexOf(frontend) === -1) {\n this.frontends.push(frontend);\n }\n }\n });\n\n namespaces.sort();\n\n this.namespaces = [\n {\n namespace: 'core',\n },\n {\n namespace: 'validation',\n },\n ...namespaces.map(namespace => {\n // First we look if the namespace matches an extension ID, that's the most common naming\n let extension = app.data.extensions[namespace];\n\n // If that's unsuccessful, we'll look if the full package name was used as namespace\n if (!extension) {\n extension = Object.values(app.data.extensions).find(extension => {\n const packageNameWithDash = extension.name.replace('/', '-');\n\n return namespace === packageNameWithDash;\n });\n }\n\n return {\n namespace,\n extension,\n };\n }),\n ];\n }),\n ]).then(() => {\n this.ready = true;\n m.redraw();\n });\n }\n\n content() {\n return m('.ExtensionPage-settings', m('.container', [\n this.contentTab(),\n ]));\n }\n\n infoItems() {\n const items = super.infoItems();\n\n items.add('linguist-tabs', m('ul.FoF-Linguist-Tabs', [\n m('li', m('a', {\n className: this.tab === 'strings' ? 'active' : '',\n onclick: () => {\n this.tab = 'strings';\n },\n }, app.translator.trans('fof-linguist.admin.tabs.strings'))),\n m('li', m('a', {\n className: this.tab === 'coverage' ? 'active' : '',\n onclick: () => {\n this.tab = 'coverage';\n },\n }, app.translator.trans('fof-linguist.admin.tabs.coverage'))),\n m('li', m('a', {\n className: this.tab === 'export' ? 'active' : '',\n onclick: () => {\n this.tab = 'export';\n },\n }, app.translator.trans('fof-linguist.admin.tabs.export'))),\n m('li', m('a', {\n className: this.tab === 'import' ? 'active' : '',\n onclick: () => {\n this.tab = 'import';\n },\n }, app.translator.trans('fof-linguist.admin.tabs.import'))),\n ]), 100);\n\n return items;\n }\n\n contentTab() {\n if (!this.ready) {\n return LoadingIndicator.component();\n }\n\n switch (this.tab) {\n case 'strings':\n return m(StringsPage, {\n namespaces: this.namespaces,\n frontends: this.frontends,\n initialBrowseFilters: this.initialBrowseFilters,\n });\n case 'coverage':\n return m(CoveragePage, {\n namespaces: this.namespaces,\n frontends: this.frontends,\n browseWithFilters: filters => {\n this.initialBrowseFilters = filters;\n this.tab = 'strings';\n },\n });\n case 'export':\n return m(ExportPage, {\n namespaces: this.namespaces,\n });\n case 'import':\n return m(ImportPage);\n }\n\n return null;\n }\n}\n","import app from 'flarum/admin/app';\nimport StringKey from './models/StringKey';\nimport TextString from './models/TextString';\nimport LinguistPage from './pages/LinguistPage';\n\napp.initializers.add('fof-linguist', app => {\n app.store.models['fof-linguist-string-key'] = StringKey;\n app.store.models['fof-linguist-string'] = TextString;\n\n app.extensionData.for('fof-linguist').registerPage(LinguistPage);\n});\n"],"sourceRoot":""} \ No newline at end of file diff --git a/js/package-lock.json b/js/package-lock.json index 217d1ee..0b907a8 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -12,39 +12,38 @@ } }, "@babel/compat-data": { - "version": "7.13.11", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.11.tgz", - "integrity": "sha512-BwKEkO+2a67DcFeS3RLl0Z3Gs2OvdXewuWjc1Hfokhb5eQWP9YRYH1/+VrVZvql2CfjOiNGqSAFOYt4lsqTHzg==" + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.0.tgz", + "integrity": "sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q==" }, "@babel/core": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.10.tgz", - "integrity": "sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.3.tgz", + "integrity": "sha512-jB5AmTKOCSJIZ72sd78ECEhuPiDMKlQdDI/4QRI6lzYATx5SSogS1oQA2AoPecRCknm30gHi2l+QVvNUu3wZAg==", "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-compilation-targets": "^7.13.10", - "@babel/helper-module-transforms": "^7.13.0", - "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.10", + "@babel/generator": "^7.14.3", + "@babel/helper-compilation-targets": "^7.13.16", + "@babel/helper-module-transforms": "^7.14.2", + "@babel/helpers": "^7.14.0", + "@babel/parser": "^7.14.3", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0", + "@babel/traverse": "^7.14.2", + "@babel/types": "^7.14.2", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.1.2", - "lodash": "^4.17.19", "semver": "^6.3.0", "source-map": "^0.5.0" } }, "@babel/generator": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.3.tgz", + "integrity": "sha512-bn0S6flG/j0xtQdz3hsjJ624h3W0r3llttBMfyHX3YrZ/KtLYr15bjA0FXkgW7FpvrDuTuElXeVjiKlYRpnOFA==", "requires": { - "@babel/types": "^7.13.0", + "@babel/types": "^7.14.2", "jsesc": "^2.5.1", "source-map": "^0.5.0" } @@ -67,41 +66,42 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.10.tgz", - "integrity": "sha512-/Xju7Qg1GQO4mHZ/Kcs6Au7gfafgZnwm+a7sy/ow/tV1sHeraRUHbjdat8/UvDor4Tez+siGKDk6zIKtCPKVJA==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz", + "integrity": "sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==", "requires": { - "@babel/compat-data": "^7.13.8", + "@babel/compat-data": "^7.13.15", "@babel/helper-validator-option": "^7.12.17", "browserslist": "^4.14.5", "semver": "^6.3.0" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.13.11", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.11.tgz", - "integrity": "sha512-ays0I7XYq9xbjCSvT+EvysLgfc3tOkwCULHjrnscGT3A9qD4sk3wXnJ3of0MAWsWGjdinFvajHU2smYuqXKMrw==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.3.tgz", + "integrity": "sha512-BnEfi5+6J2Lte9LeiL6TxLWdIlEv9Woacc1qXzXBgbikcOzMRM2Oya5XGg/f/ngotv1ej2A/b+3iJH8wbS1+lQ==", "requires": { - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-member-expression-to-functions": "^7.13.0", + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-function-name": "^7.14.2", + "@babel/helper-member-expression-to-functions": "^7.13.12", "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/helper-replace-supers": "^7.13.0", + "@babel/helper-replace-supers": "^7.14.3", "@babel/helper-split-export-declaration": "^7.12.13" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.17.tgz", - "integrity": "sha512-p2VGmBu9oefLZ2nQpgnEnG0ZlRPvL8gAGvPUMQwUdaE8k49rOMuZpOwdQoy5qJf6K8jL3bcAMhVUlHAjIgJHUg==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.3.tgz", + "integrity": "sha512-JIB2+XJrb7v3zceV2XzDhGIB902CmKGSpSl4q2C6agU9SNLG/2V1RtFRGPG1Ajh9STj3+q6zJMOC+N/pp2P9DA==", "requires": { "@babel/helper-annotate-as-pure": "^7.12.13", "regexpu-core": "^4.7.1" } }, "@babel/helper-define-polyfill-provider": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.1.5.tgz", - "integrity": "sha512-nXuzCSwlJ/WKr8qxzW816gwyT6VZgiJG17zR40fou70yfAcqjoNyTLl/DQ+FExw5Hx5KNqshmN8Ldl/r2N7cTg==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz", + "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==", "requires": { "@babel/helper-compilation-targets": "^7.13.0", "@babel/helper-module-imports": "^7.12.13", @@ -122,13 +122,13 @@ } }, "@babel/helper-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.2.tgz", + "integrity": "sha512-NYZlkZRydxw+YT56IlhIcS8PAhb+FEUiOzuhFTfqDyPmzAhRge6ua0dQYT/Uh0t/EDHq05/i+e5M2d4XvjgarQ==", "requires": { "@babel/helper-get-function-arity": "^7.12.13", "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" + "@babel/types": "^7.14.2" } }, "@babel/helper-get-function-arity": { @@ -140,44 +140,43 @@ } }, "@babel/helper-hoist-variables": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.0.tgz", - "integrity": "sha512-0kBzvXiIKfsCA0y6cFEIJf4OdzfpRuNk4+YTeHZpGGc666SATFKTz6sRncwFnQk7/ugJ4dSrCj6iJuvW4Qwr2g==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.16.tgz", + "integrity": "sha512-1eMtTrXtrwscjcAeO4BVK+vvkxaLJSPFz1w1KLawz6HLNi9bPFGBNwwDyVfiu1Tv/vRRFYfoGaKhmAQPGPn5Wg==", "requires": { - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.13.15", + "@babel/types": "^7.13.16" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.0.tgz", - "integrity": "sha512-yvRf8Ivk62JwisqV1rFRMxiSMDGnN6KH1/mDMmIrij4jztpQNRoHqqMG3U6apYbGRPJpgPalhva9Yd06HlUxJQ==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", + "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", "requires": { - "@babel/types": "^7.13.0" + "@babel/types": "^7.13.12" } }, "@babel/helper-module-imports": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz", - "integrity": "sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", + "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", "requires": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.13.12" } }, "@babel/helper-module-transforms": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.0.tgz", - "integrity": "sha512-Ls8/VBwH577+pw7Ku1QkUWIyRRNHpYlts7+qSqBBFCW3I8QteB9DxfcZ5YJpOwH6Ihe/wn8ch7fMGOP1OhEIvw==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.2.tgz", + "integrity": "sha512-OznJUda/soKXv0XhpvzGWDnml4Qnwp16GN+D/kZIdLsWoHj05kyu8Rm5kXmMef+rVJZ0+4pSGLkeixdqNUATDA==", "requires": { - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-replace-supers": "^7.13.0", - "@babel/helper-simple-access": "^7.12.13", + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-replace-supers": "^7.13.12", + "@babel/helper-simple-access": "^7.13.12", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0", - "lodash": "^4.17.19" + "@babel/traverse": "^7.14.2", + "@babel/types": "^7.14.2" } }, "@babel/helper-optimise-call-expression": { @@ -204,22 +203,22 @@ } }, "@babel/helper-replace-supers": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz", - "integrity": "sha512-Segd5me1+Pz+rmN/NFBOplMbZG3SqRJOBlY+mA0SxAv6rjj7zJqr1AVr3SfzUVTLCv7ZLU5FycOM/SBGuLPbZw==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.14.3.tgz", + "integrity": "sha512-Rlh8qEWZSTfdz+tgNV/N4gz1a0TMNwCUcENhMjHTHKp3LseYH5Jha0NSlyTQWMnjbYcwFt+bqAMqSLHVXkQ6UA==", "requires": { - "@babel/helper-member-expression-to-functions": "^7.13.0", + "@babel/helper-member-expression-to-functions": "^7.13.12", "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.14.2", + "@babel/types": "^7.14.2" } }, "@babel/helper-simple-access": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz", - "integrity": "sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", + "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", "requires": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.13.12" } }, "@babel/helper-skip-transparent-expression-wrappers": { @@ -239,9 +238,9 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", + "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==" }, "@babel/helper-validator-option": { "version": "7.12.17", @@ -260,34 +259,44 @@ } }, "@babel/helpers": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", - "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.0.tgz", + "integrity": "sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg==", "requires": { "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, "@babel/highlight": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", - "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", + "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", "requires": { - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.13.11", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.11.tgz", - "integrity": "sha512-PhuoqeHoO9fc4ffMEVk4qb/w/s2iOSWohvbHxLtxui0eBg3Lg5gN1U8wp1V1u61hOWkPQJJyJzGH6Y+grwkq8Q==" + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.3.tgz", + "integrity": "sha512-7MpZDIfI7sUC5zWo2+foJ50CSI5lcqDehZ0lVgIhSi4bFEk94fLAKlF3Q0nzSQQ+ca0lm+O6G9ztKVBeu8PMRQ==" + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.13.12.tgz", + "integrity": "sha512-d0u3zWKcoZf379fOeJdr1a5WPDny4aOFZ6hlfKivgK0LY7ZxNfoaHL2fWwdGtHyVvra38FC+HVYkO+byfSA8AQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.13.12" + } }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.8.tgz", - "integrity": "sha512-rPBnhj+WgoSmgq+4gQUtXx/vOcU+UYtjy1AA/aeD61Hwj410fwYyqfUcRP3lR8ucgliVJL/G7sXcNUecC75IXA==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.2.tgz", + "integrity": "sha512-b1AM4F6fwck4N8ItZ/AtC4FP/cqZqmKRQ4FaTDutwSYyjuhtvsGEMLK4N/ztV/ImP40BjIDyMgBQAeAMsQYVFQ==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-remap-async-to-generator": "^7.13.0", @@ -303,85 +312,95 @@ "@babel/helper-plugin-utils": "^7.13.0" } }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.14.3.tgz", + "integrity": "sha512-HEjzp5q+lWSjAgJtSluFDrGGosmwTgKwCXdDQZvhKsRlwv3YdkUEqxNrrjesJd+B9E9zvr1PVPVBvhYZ9msjvQ==", + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.3", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-class-static-block": "^7.12.13" + } + }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.13.8.tgz", - "integrity": "sha512-ONWKj0H6+wIRCkZi9zSbZtE/r73uOhMVHh256ys0UzfM7I3d4n+spZNWjOnJv2gzopumP2Wxi186vI8N0Y2JyQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.2.tgz", + "integrity": "sha512-oxVQZIWFh91vuNEMKltqNsKLFWkOIyJc95k2Gv9lWVyDfPUQGSSlbDEgWuJUU1afGE9WwlzpucMZ3yDRHIItkA==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-dynamic-import": "^7.8.3" } }, "@babel/plugin-proposal-export-namespace-from": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.13.tgz", - "integrity": "sha512-INAgtFo4OnLN3Y/j0VwAgw3HDXcDtX+C/erMvWzuV9v71r7urb6iyMXu7eM9IgLr1ElLlOkaHjJ0SbCmdOQ3Iw==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.2.tgz", + "integrity": "sha512-sRxW3z3Zp3pFfLAgVEvzTFutTXax837oOatUIvSG9o5gRj9mKwm3br1Se5f4QalTQs9x4AzlA/HrCWbQIHASUQ==", "requires": { - "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.13.8.tgz", - "integrity": "sha512-w4zOPKUFPX1mgvTmL/fcEqy34hrQ1CRcGxdphBc6snDnnqJ47EZDIyop6IwXzAC8G916hsIuXB2ZMBCExC5k7Q==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.2.tgz", + "integrity": "sha512-w2DtsfXBBJddJacXMBhElGEYqCZQqN99Se1qeYn8DVLB33owlrlLftIbMzn5nz1OITfDVknXF433tBrLEAOEjA==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-json-strings": "^7.8.3" } }, "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.13.8.tgz", - "integrity": "sha512-aul6znYB4N4HGweImqKn59Su9RS8lbUIqxtXTOcAGtNIDczoEFv+l1EhmX8rUBp3G1jMjKJm8m0jXVp63ZpS4A==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.2.tgz", + "integrity": "sha512-1JAZtUrqYyGsS7IDmFeaem+/LJqujfLZ2weLR9ugB0ufUPjzf8cguyVT1g5im7f7RXxuLq1xUxEzvm68uYRtGg==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.13.8.tgz", - "integrity": "sha512-iePlDPBn//UhxExyS9KyeYU7RM9WScAG+D3Hhno0PLJebAEpDZMocbDe64eqynhNAnwz/vZoL/q/QB2T1OH39A==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.2.tgz", + "integrity": "sha512-ebR0zU9OvI2N4qiAC38KIAK75KItpIPTpAtd2r4OZmMFeKbKJpUFLYP2EuDut82+BmYi8sz42B+TfTptJ9iG5Q==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.13.tgz", - "integrity": "sha512-O1jFia9R8BUCl3ZGB7eitaAPu62TXJRHn7rh+ojNERCFyqRwJMTmhz+tJ+k0CwI6CLjX/ee4qW74FSqlq9I35w==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.2.tgz", + "integrity": "sha512-DcTQY9syxu9BpU3Uo94fjCB3LN9/hgPS8oUL7KrSW3bA2ePrKZZPJcc5y0hoJAM9dft3pGfErtEUvxXQcfLxUg==", "requires": { - "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.13.8.tgz", - "integrity": "sha512-DhB2EuB1Ih7S3/IRX5AFVgZ16k3EzfRbq97CxAVI1KSYcW+lexV8VZb7G7L8zuPVSdQMRn0kiBpf/Yzu9ZKH0g==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.2.tgz", + "integrity": "sha512-hBIQFxwZi8GIp934+nj5uV31mqclC1aYDhctDu5khTi9PCCUOczyy0b34W0oE9U/eJXiqQaKyVsmjeagOaSlbw==", "requires": { - "@babel/compat-data": "^7.13.8", - "@babel/helper-compilation-targets": "^7.13.8", + "@babel/compat-data": "^7.14.0", + "@babel/helper-compilation-targets": "^7.13.16", "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.13.0" + "@babel/plugin-transform-parameters": "^7.14.2" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.13.8.tgz", - "integrity": "sha512-0wS/4DUF1CuTmGo+NiaHfHcVSeSLj5S3e6RivPTg/2k3wOv3jO35tZ6/ZWsQhQMvdgI7CwphjQa/ccarLymHVA==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.2.tgz", + "integrity": "sha512-XtkJsmJtBaUbOxZsNk0Fvrv8eiqgneug0A6aqLFZ4TSkar2L5dSXWcnUKHgmjJt49pyB/6ZHvkr3dPgl9MOWRQ==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.13.8.tgz", - "integrity": "sha512-hpbBwbTgd7Cz1QryvwJZRo1U0k1q8uyBmeXOSQUjdg/A2TASkhR/rz7AyqZ/kS8kbpsNA80rOYbxySBJAqmhhQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.2.tgz", + "integrity": "sha512-qQByMRPwMZJainfig10BoaDldx/+VDtNcrA7qdNaEOAj6VXud+gfrkA8j4CRAU5HjnWREXqIpSpH30qZX1xivA==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", @@ -397,6 +416,17 @@ "@babel/helper-plugin-utils": "^7.13.0" } }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.14.0.tgz", + "integrity": "sha512-59ANdmEwwRUkLjB7CRtwJxxwtjESw+X2IePItA+RGQh+oy5RmpCh/EvVVvh5XQc3yxsm5gtv0+i9oBZhaDNVTg==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-create-class-features-plugin": "^7.14.0", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-private-property-in-object": "^7.14.0" + } + }, "@babel/plugin-proposal-unicode-property-regex": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.13.tgz", @@ -422,6 +452,14 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.12.13.tgz", + "integrity": "sha512-ZmKQ0ZXR0nYpHZIIuj9zE7oIqCx2hw9TKi+lIo73NNrMPAZGHfS92/VRV0ZmPj6H2ffBgyFHXvJ5NYsNeEaP2A==", + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", @@ -502,6 +540,14 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.0.tgz", + "integrity": "sha512-bda3xF8wGl5/5btF794utNOL0Jw+9jE5C1sLZcoK7c4uonE/y3iQiyG+KbkF3WBV/paX58VCpjhxLPkdj5Fe4w==", + "requires": { + "@babel/helper-plugin-utils": "^7.13.0" + } + }, "@babel/plugin-syntax-top-level-await": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz", @@ -510,6 +556,14 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, + "@babel/plugin-syntax-typescript": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz", + "integrity": "sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w==", + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, "@babel/plugin-transform-arrow-functions": { "version": "7.13.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.13.0.tgz", @@ -537,23 +591,23 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz", - "integrity": "sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.2.tgz", + "integrity": "sha512-neZZcP19NugZZqNwMTH+KoBjx5WyvESPSIOQb4JHpfd+zPfqcH65RMu5xJju5+6q/Y2VzYrleQTr+b6METyyxg==", "requires": { - "@babel/helper-plugin-utils": "^7.12.13" + "@babel/helper-plugin-utils": "^7.13.0" } }, "@babel/plugin-transform-classes": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.13.0.tgz", - "integrity": "sha512-9BtHCPUARyVH1oXGcSJD3YpsqRLROJx5ZNP6tN5vnk17N0SVf9WCtf8Nuh1CFmgByKKAIMstitKduoCmsaDK5g==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.2.tgz", + "integrity": "sha512-7oafAVcucHquA/VZCsXv/gmuiHeYd64UJyyTYU+MPfNu0KeNlxw06IeENBO8bJjXVbolu+j1MM5aKQtH1OMCNg==", "requires": { "@babel/helper-annotate-as-pure": "^7.12.13", - "@babel/helper-function-name": "^7.12.13", + "@babel/helper-function-name": "^7.14.2", "@babel/helper-optimise-call-expression": "^7.12.13", "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-replace-supers": "^7.13.0", + "@babel/helper-replace-supers": "^7.13.12", "@babel/helper-split-export-declaration": "^7.12.13", "globals": "^11.1.0" } @@ -567,9 +621,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.0.tgz", - "integrity": "sha512-zym5em7tePoNT9s964c0/KU3JPPnuq7VhIxPRefJ4/s82cD+q1mgKfuGRDMCPL0HTyKz4dISuQlCusfgCJ86HA==", + "version": "7.13.17", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.17.tgz", + "integrity": "sha512-UAUqiLv+uRLO+xuBKKMEpC+t7YRNVRqBsWWq1yKXbBZBje/t3IXCiSinZhjn/DC3qzBfICeYd2EFGEbHsh5RLA==", "requires": { "@babel/helper-plugin-utils": "^7.13.0" } @@ -634,23 +688,23 @@ } }, "@babel/plugin-transform-modules-amd": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.13.0.tgz", - "integrity": "sha512-EKy/E2NHhY/6Vw5d1k3rgoobftcNUmp9fGjb9XZwQLtTctsRBOTRO7RHHxfIky1ogMN5BxN7p9uMA3SzPfotMQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.2.tgz", + "integrity": "sha512-hPC6XBswt8P3G2D1tSV2HzdKvkqOpmbyoy+g73JG0qlF/qx2y3KaMmXb1fLrpmWGLZYA0ojCvaHdzFWjlmV+Pw==", "requires": { - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-module-transforms": "^7.14.2", "@babel/helper-plugin-utils": "^7.13.0", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.13.8.tgz", - "integrity": "sha512-9QiOx4MEGglfYZ4XOnU79OHr6vIWUakIj9b4mioN8eQIoEh+pf5p/zEB36JpDFWA12nNMiRf7bfoRvl9Rn79Bw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.0.tgz", + "integrity": "sha512-EX4QePlsTaRZQmw9BsoPeyh5OCtRGIhwfLquhxGp5e32w+dyL8htOcDwamlitmNFK6xBZYlygjdye9dbd9rUlQ==", "requires": { - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-module-transforms": "^7.14.0", "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-simple-access": "^7.12.13", + "@babel/helper-simple-access": "^7.13.12", "babel-plugin-dynamic-import-node": "^2.3.3" } }, @@ -667,11 +721,11 @@ } }, "@babel/plugin-transform-modules-umd": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.13.0.tgz", - "integrity": "sha512-D/ILzAh6uyvkWjKKyFE/W0FzWwasv6vPTSqPcjxFqn6QpX3u8DjRVliq4F2BamO2Wee/om06Vyy+vPkNrd4wxw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.0.tgz", + "integrity": "sha512-nPZdnWtXXeY7I87UZr9VlsWme3Y0cfFFE41Wbxz4bbaexAjNMInXPFUpRRUJ8NoMm0Cw+zxbqjdPmLhcjfazMw==", "requires": { - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-module-transforms": "^7.14.0", "@babel/helper-plugin-utils": "^7.13.0" } }, @@ -709,9 +763,9 @@ } }, "@babel/plugin-transform-parameters": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.13.0.tgz", - "integrity": "sha512-Jt8k/h/mIwE2JFEOb3lURoY5C85ETcYPnbuAJ96zRBzh1XHtQZfs62ChZ6EP22QlC8c7Xqr9q+e1SU5qttwwjw==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.2.tgz", + "integrity": "sha512-NxoVmA3APNCC1JdMXkdYXuQS+EMdqy0vIwyDHeKHiJKRxmp1qGSdb0JLEIoPRhkx6H/8Qi3RJ3uqOCYw8giy9A==", "requires": { "@babel/helper-plugin-utils": "^7.13.0" } @@ -725,23 +779,23 @@ } }, "@babel/plugin-transform-react-display-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.13.tgz", - "integrity": "sha512-MprESJzI9O5VnJZrL7gg1MpdqmiFcUv41Jc7SahxYsNP2kDkFqClxxTZq+1Qv4AFCamm+GXMRDQINNn+qrxmiA==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.14.2.tgz", + "integrity": "sha512-zCubvP+jjahpnFJvPaHPiGVfuVUjXHhFvJKQdNnsmSsiU9kR/rCZ41jHc++tERD2zV+p7Hr6is+t5b6iWTCqSw==", "requires": { - "@babel/helper-plugin-utils": "^7.12.13" + "@babel/helper-plugin-utils": "^7.13.0" } }, "@babel/plugin-transform-react-jsx": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.17.tgz", - "integrity": "sha512-mwaVNcXV+l6qJOuRhpdTEj8sT/Z0owAVWf9QujTZ0d2ye9X/K+MTOTSizcgKOj18PGnTc/7g1I4+cIUjsKhBcw==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.3.tgz", + "integrity": "sha512-uuxuoUNVhdgYzERiHHFkE4dWoJx+UFVyuAl0aqN8P2/AKFHwqgUC5w2+4/PjpKXJsFgBlYAFXlUmDQ3k3DUkXw==", "requires": { "@babel/helper-annotate-as-pure": "^7.12.13", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-jsx": "^7.12.13", - "@babel/types": "^7.12.17" + "@babel/types": "^7.14.2" } }, "@babel/plugin-transform-react-jsx-development": { @@ -762,9 +816,9 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.13.tgz", - "integrity": "sha512-lxb2ZAvSLyJ2PEe47hoGWPmW22v7CtSl9jW8mingV4H2sEX/JOcrAj2nPuGWi56ERUm2bUpjKzONAuT6HCn2EA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.13.15.tgz", + "integrity": "sha512-Bk9cOLSz8DiurcMETZ8E2YtIVJbFCPGW28DJWUakmyVWtQSm6Wsf0p4B4BfEr/eL2Nkhe/CICiUiMOCi1TPhuQ==", "requires": { "regenerator-transform": "^0.14.2" } @@ -778,15 +832,15 @@ } }, "@babel/plugin-transform-runtime": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.10.tgz", - "integrity": "sha512-Y5k8ipgfvz5d/76tx7JYbKQTcgFSU6VgJ3kKQv4zGTKr+a9T/KBvfRvGtSFgKDQGt/DBykQixV0vNWKIdzWErA==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.14.3.tgz", + "integrity": "sha512-t960xbi8wpTFE623ef7sd+UpEC5T6EEguQlTBJDEO05+XwnIWVfuqLw/vdLWY6IdFmtZE+65CZAfByT39zRpkg==", "requires": { - "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-module-imports": "^7.13.12", "@babel/helper-plugin-utils": "^7.13.0", - "babel-plugin-polyfill-corejs2": "^0.1.4", - "babel-plugin-polyfill-corejs3": "^0.1.3", - "babel-plugin-polyfill-regenerator": "^0.1.2", + "babel-plugin-polyfill-corejs2": "^0.2.0", + "babel-plugin-polyfill-corejs3": "^0.2.0", + "babel-plugin-polyfill-regenerator": "^0.2.0", "semver": "^6.3.0" } }, @@ -831,6 +885,16 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, + "@babel/plugin-transform-typescript": { + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.14.3.tgz", + "integrity": "sha512-G5Bb5pY6tJRTC4ag1visSgiDoGgJ1u1fMUgmc2ijLkcIdzP83Q1qyZX4ggFQ/SkR+PNOatkaYC+nKcTlpsX4ag==", + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.3", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-typescript": "^7.12.13" + } + }, "@babel/plugin-transform-unicode-escapes": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.13.tgz", @@ -849,29 +913,33 @@ } }, "@babel/preset-env": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.13.10.tgz", - "integrity": "sha512-nOsTScuoRghRtUsRr/c69d042ysfPHcu+KOB4A9aAO9eJYqrkat+LF8G1yp1HD18QiwixT2CisZTr/0b3YZPXQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.14.2.tgz", + "integrity": "sha512-7dD7lVT8GMrE73v4lvDEb85cgcQhdES91BSD7jS/xjC6QY8PnRhux35ac+GCpbiRhp8crexBvZZqnaL6VrY8TQ==", "requires": { - "@babel/compat-data": "^7.13.8", - "@babel/helper-compilation-targets": "^7.13.10", + "@babel/compat-data": "^7.14.0", + "@babel/helper-compilation-targets": "^7.13.16", "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-validator-option": "^7.12.17", - "@babel/plugin-proposal-async-generator-functions": "^7.13.8", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.13.12", + "@babel/plugin-proposal-async-generator-functions": "^7.14.2", "@babel/plugin-proposal-class-properties": "^7.13.0", - "@babel/plugin-proposal-dynamic-import": "^7.13.8", - "@babel/plugin-proposal-export-namespace-from": "^7.12.13", - "@babel/plugin-proposal-json-strings": "^7.13.8", - "@babel/plugin-proposal-logical-assignment-operators": "^7.13.8", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8", - "@babel/plugin-proposal-numeric-separator": "^7.12.13", - "@babel/plugin-proposal-object-rest-spread": "^7.13.8", - "@babel/plugin-proposal-optional-catch-binding": "^7.13.8", - "@babel/plugin-proposal-optional-chaining": "^7.13.8", + "@babel/plugin-proposal-class-static-block": "^7.13.11", + "@babel/plugin-proposal-dynamic-import": "^7.14.2", + "@babel/plugin-proposal-export-namespace-from": "^7.14.2", + "@babel/plugin-proposal-json-strings": "^7.14.2", + "@babel/plugin-proposal-logical-assignment-operators": "^7.14.2", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2", + "@babel/plugin-proposal-numeric-separator": "^7.14.2", + "@babel/plugin-proposal-object-rest-spread": "^7.14.2", + "@babel/plugin-proposal-optional-catch-binding": "^7.14.2", + "@babel/plugin-proposal-optional-chaining": "^7.14.2", "@babel/plugin-proposal-private-methods": "^7.13.0", + "@babel/plugin-proposal-private-property-in-object": "^7.14.0", "@babel/plugin-proposal-unicode-property-regex": "^7.12.13", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.12.13", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", "@babel/plugin-syntax-json-strings": "^7.8.3", @@ -881,14 +949,15 @@ "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.0", "@babel/plugin-syntax-top-level-await": "^7.12.13", "@babel/plugin-transform-arrow-functions": "^7.13.0", "@babel/plugin-transform-async-to-generator": "^7.13.0", "@babel/plugin-transform-block-scoped-functions": "^7.12.13", - "@babel/plugin-transform-block-scoping": "^7.12.13", - "@babel/plugin-transform-classes": "^7.13.0", + "@babel/plugin-transform-block-scoping": "^7.14.2", + "@babel/plugin-transform-classes": "^7.14.2", "@babel/plugin-transform-computed-properties": "^7.13.0", - "@babel/plugin-transform-destructuring": "^7.13.0", + "@babel/plugin-transform-destructuring": "^7.13.17", "@babel/plugin-transform-dotall-regex": "^7.12.13", "@babel/plugin-transform-duplicate-keys": "^7.12.13", "@babel/plugin-transform-exponentiation-operator": "^7.12.13", @@ -896,16 +965,16 @@ "@babel/plugin-transform-function-name": "^7.12.13", "@babel/plugin-transform-literals": "^7.12.13", "@babel/plugin-transform-member-expression-literals": "^7.12.13", - "@babel/plugin-transform-modules-amd": "^7.13.0", - "@babel/plugin-transform-modules-commonjs": "^7.13.8", + "@babel/plugin-transform-modules-amd": "^7.14.2", + "@babel/plugin-transform-modules-commonjs": "^7.14.0", "@babel/plugin-transform-modules-systemjs": "^7.13.8", - "@babel/plugin-transform-modules-umd": "^7.13.0", + "@babel/plugin-transform-modules-umd": "^7.14.0", "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.13", "@babel/plugin-transform-new-target": "^7.12.13", "@babel/plugin-transform-object-super": "^7.12.13", - "@babel/plugin-transform-parameters": "^7.13.0", + "@babel/plugin-transform-parameters": "^7.14.2", "@babel/plugin-transform-property-literals": "^7.12.13", - "@babel/plugin-transform-regenerator": "^7.12.13", + "@babel/plugin-transform-regenerator": "^7.13.15", "@babel/plugin-transform-reserved-words": "^7.12.13", "@babel/plugin-transform-shorthand-properties": "^7.12.13", "@babel/plugin-transform-spread": "^7.13.0", @@ -915,10 +984,10 @@ "@babel/plugin-transform-unicode-escapes": "^7.12.13", "@babel/plugin-transform-unicode-regex": "^7.12.13", "@babel/preset-modules": "^0.1.4", - "@babel/types": "^7.13.0", - "babel-plugin-polyfill-corejs2": "^0.1.4", - "babel-plugin-polyfill-corejs3": "^0.1.3", - "babel-plugin-polyfill-regenerator": "^0.1.2", + "@babel/types": "^7.14.2", + "babel-plugin-polyfill-corejs2": "^0.2.0", + "babel-plugin-polyfill-corejs3": "^0.2.0", + "babel-plugin-polyfill-regenerator": "^0.2.0", "core-js-compat": "^3.9.0", "semver": "^6.3.0" } @@ -936,21 +1005,32 @@ } }, "@babel/preset-react": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.12.13.tgz", - "integrity": "sha512-TYM0V9z6Abb6dj1K7i5NrEhA13oS5ujUYQYDfqIBXYHOc2c2VkFgc+q9kyssIyUfy4/hEwqrgSlJ/Qgv8zJLsA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.13.13.tgz", + "integrity": "sha512-gx+tDLIE06sRjKJkVtpZ/t3mzCDOnPG+ggHZG9lffUbX8+wC739x20YQc9V35Do6ZAxaUc/HhVHIiOzz5MvDmA==", "requires": { - "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-validator-option": "^7.12.17", "@babel/plugin-transform-react-display-name": "^7.12.13", - "@babel/plugin-transform-react-jsx": "^7.12.13", - "@babel/plugin-transform-react-jsx-development": "^7.12.12", + "@babel/plugin-transform-react-jsx": "^7.13.12", + "@babel/plugin-transform-react-jsx-development": "^7.12.17", "@babel/plugin-transform-react-pure-annotations": "^7.12.1" } }, + "@babel/preset-typescript": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.13.0.tgz", + "integrity": "sha512-LXJwxrHy0N3f6gIJlYbLta1D9BDtHpQeqwzM0LIfjDlr6UE/D5Mc7W4iDiQzaE+ks0sTjT26ArcHWnJVt0QiHw==", + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-validator-option": "^7.12.17", + "@babel/plugin-transform-typescript": "^7.13.0" + } + }, "@babel/runtime": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz", - "integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.0.tgz", + "integrity": "sha512-JELkvo/DlpNdJ7dlyw/eY7E0suy5i5GQH+Vlxaq1nsNJ+H7f4Vtv3jMeCEgRhZZQFXTjldYfQgv2qmM6M1v5wA==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -966,31 +1046,34 @@ } }, "@babel/traverse": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", - "integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.2.tgz", + "integrity": "sha512-TsdRgvBFHMyHOOzcP9S6QU0QQtjxlRpEYOy3mcCO5RgmC305ki42aSAmfZEMSSYBla2oZ9BMqYlncBaKmD/7iA==", "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.0", - "@babel/helper-function-name": "^7.12.13", + "@babel/generator": "^7.14.2", + "@babel/helper-function-name": "^7.14.2", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.0", - "@babel/types": "^7.13.0", + "@babel/parser": "^7.14.2", + "@babel/types": "^7.14.2", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.2.tgz", + "integrity": "sha512-SdjAG/3DikRHpUOjxZgnkbR11xUlyDMUFJdvnIgZEE16mqmY0BINMmc4//JMJglEmn6i7sq6p+mGrFWyZ98EEw==", "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-validator-identifier": "^7.14.0", "to-fast-properties": "^2.0.0" } }, + "@polka/url": { + "version": "1.0.0-next.15", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.15.tgz", + "integrity": "sha512-15spi3V28QdevleWBNXE4pIls3nFZmBbUGrW9IVPwiQczuSb9n76TCB4bsk8TSel+I1OkHEdPhu5QKMfY6rQHA==" + }, "@types/json-schema": { "version": "7.0.7", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", @@ -1164,9 +1247,14 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.4.tgz", + "integrity": "sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==" + }, + "acorn-walk": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.0.tgz", + "integrity": "sha512-mjmzmv12YIG/G8JQdQuz2MUDShEJ6teYpT5bmWA4q7iwoGen8xtt3twF3OvzIUl+Q06aWIjvnwQUKvQ6TtMRjg==" }, "ajv": { "version": "6.12.6", @@ -1203,9 +1291,9 @@ } }, "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "optional": true, "requires": { "normalize-path": "^3.0.0", @@ -1315,36 +1403,36 @@ } }, "babel-plugin-polyfill-corejs2": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.1.10.tgz", - "integrity": "sha512-DO95wD4g0A8KRaHKi0D51NdGXzvpqVLnLu5BTvDlpqUEpTmeEtypgC1xqesORaWmiUOQI14UHKlzNd9iZ2G3ZA==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz", + "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==", "requires": { - "@babel/compat-data": "^7.13.0", - "@babel/helper-define-polyfill-provider": "^0.1.5", + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.2.2", "semver": "^6.1.1" } }, "babel-plugin-polyfill-corejs3": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.1.7.tgz", - "integrity": "sha512-u+gbS9bbPhZWEeyy1oR/YaaSpod/KDT07arZHb80aTpl8H5ZBq+uN1nN9/xtX7jQyfLdPfoqI4Rue/MQSWJquw==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.2.tgz", + "integrity": "sha512-l1Cf8PKk12eEk5QP/NQ6TH8A1pee6wWDJ96WjxrMXFLHLOBFzYM4moG80HFgduVhTqAFez4alnZKEhP/bYHg0A==", "requires": { - "@babel/helper-define-polyfill-provider": "^0.1.5", - "core-js-compat": "^3.8.1" + "@babel/helper-define-polyfill-provider": "^0.2.2", + "core-js-compat": "^3.9.1" } }, "babel-plugin-polyfill-regenerator": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.1.6.tgz", - "integrity": "sha512-OUrYG9iKPKz8NxswXbRAdSwF0GhRdIEMTloQATJi4bDuFqrXaXcCUT/VGNrr8pBcjMh1RxZ7Xt9cytVJTJfvMg==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz", + "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==", "requires": { - "@babel/helper-define-polyfill-provider": "^0.1.5" + "@babel/helper-define-polyfill-provider": "^0.2.2" } }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "base": { "version": "0.11.2", @@ -1557,18 +1645,6 @@ "electron-to-chromium": "^1.3.723", "escalade": "^3.1.1", "node-releases": "^1.1.71" - }, - "dependencies": { - "caniuse-lite": { - "version": "1.0.30001230", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001230.tgz", - "integrity": "sha512-5yBd5nWCBS+jWKTcHOzXwo5xzcj4ePE/yjtkZyUV1BTUmrBaA9MRGC+e7mxnqXSA90CmCA8L3eKLaSUkt099IQ==" - }, - "electron-to-chromium": { - "version": "1.3.738", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.738.tgz", - "integrity": "sha512-vCMf4gDOpEylPSLPLSwAEsz+R3ShP02Y3cAKMZvTqule3XcPp7tgc/0ESI7IS6ZeyBlGClE50N53fIOkcIVnpw==" - } } }, "buffer": { @@ -1648,6 +1724,11 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, + "caniuse-lite": { + "version": "1.0.30001230", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001230.tgz", + "integrity": "sha512-5yBd5nWCBS+jWKTcHOzXwo5xzcj4ePE/yjtkZyUV1BTUmrBaA9MRGC+e7mxnqXSA90CmCA8L3eKLaSUkt099IQ==" + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -1715,12 +1796,9 @@ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", - "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", - "requires": { - "tslib": "^1.9.0" - } + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" }, "cipher-base": { "version": "1.0.4", @@ -1790,9 +1868,9 @@ "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==" }, "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" }, "commondir": { "version": "1.0.1", @@ -1857,11 +1935,11 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "core-js-compat": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.9.1.tgz", - "integrity": "sha512-jXAirMQxrkbiiLsCx9bQPJFA6llDadKMpYrBJQJ3/c4/vsPP/fAf29h24tviRlvwUL6AmY5CHLu2GvjuYviQqA==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.13.0.tgz", + "integrity": "sha512-jhbI2zpVskgfDC9mGRaDo1gagd0E0i/kYW0+WvibL/rafEHKAHO653hEXIxJHqRlRLITluXtRH3AGTL5qJmifQ==", "requires": { - "browserslist": "^4.16.3", + "browserslist": "^4.16.6", "semver": "7.0.0" }, "dependencies": { @@ -2059,6 +2137,11 @@ "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" + }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -2070,6 +2153,11 @@ "stream-shift": "^1.0.0" } }, + "electron-to-chromium": { + "version": "1.3.741", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.741.tgz", + "integrity": "sha512-4i3T0cwnHo1O4Mnp9JniEco8bZiXoqbm3PhW5hv7uu8YLg35iajYrRnNyKFaN8/8SSTskU2hYqVTeYVPceSpUA==" + }, "elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", @@ -2400,19 +2488,23 @@ "dev": true }, "flarum-webpack-config": { - "version": "0.1.0-beta.10", - "resolved": "https://registry.npmjs.org/flarum-webpack-config/-/flarum-webpack-config-0.1.0-beta.10.tgz", - "integrity": "sha512-Iri/5sGBW4ebUQIZw9thR3LdS/avhdlgqgOxy2so1Abh6IyVNjaHInPgHNJSCMxbvfQJz4K3kcsbIpjwi3YB+g==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/flarum-webpack-config/-/flarum-webpack-config-1.0.0.tgz", + "integrity": "sha512-T+olIRaIVetPJMP8xlbMnp7tzT/d/ZWI6Mr7twRBdsKbKO7dpKS2+fjnKL6QqNYgOLElT/TWrRSbTp7EiL1yXA==", "requires": { - "@babel/core": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-transform-object-assign": "^7.0.0", - "@babel/plugin-transform-react-jsx": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/preset-react": "^7.0.0", - "@babel/runtime": "^7.0.0", - "babel-loader": "^8.0.0" + "@babel/core": "^7.14.3", + "@babel/plugin-proposal-class-properties": "^7.13.0", + "@babel/plugin-proposal-private-methods": "^7.13.0", + "@babel/plugin-transform-object-assign": "^7.12.13", + "@babel/plugin-transform-react-jsx": "^7.14.3", + "@babel/plugin-transform-runtime": "^7.14.3", + "@babel/preset-env": "^7.14.2", + "@babel/preset-react": "^7.13.13", + "@babel/preset-typescript": "^7.13.0", + "@babel/runtime": "^7.14.0", + "babel-loader": "^8.2.2", + "typescript": "^4.3.2", + "webpack-bundle-analyzer": "^4.4.2" } }, "flush-write-stream": { @@ -2499,9 +2591,9 @@ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2562,6 +2654,14 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" }, + "gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "requires": { + "duplexer": "^0.1.2" + } + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -2794,9 +2894,9 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", + "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", "requires": { "has": "^1.0.3" } @@ -3070,6 +3170,11 @@ } } }, + "mime": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", + "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==" + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -3221,9 +3326,9 @@ } }, "node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==" + "version": "1.1.72", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.72.tgz", + "integrity": "sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw==" }, "normalize-path": { "version": "3.0.0", @@ -3304,6 +3409,11 @@ "wrappy": "1" } }, + "opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==" + }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -3394,14 +3504,14 @@ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -3411,9 +3521,9 @@ } }, "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "optional": true }, "pify": { @@ -3613,9 +3723,9 @@ "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==" }, "regjsparser": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.7.tgz", - "integrity": "sha512-ib77G0uxsA2ovgiYbCVGx4Pv3PSttAx2vIwidqQzbL2U5S4Q+j00HdSAneSBuyVcMvEnTXMjiGgB+DlXozVhpQ==", + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", + "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", "requires": { "jsesc": "~0.5.0" }, @@ -3634,9 +3744,9 @@ "optional": true }, "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==" }, "repeat-string": { "version": "1.6.1", @@ -3825,6 +3935,16 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, + "sirv": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.12.tgz", + "integrity": "sha512-+jQoCxndz7L2tqQL4ZyzfDhky0W/4ZJip3XoOuxyQWnAwMxindLl3Xv1qT4x1YX/re0leShvTm8Uk0kQspGhBg==", + "requires": { + "@polka/url": "^1.0.0-next.15", + "mime": "^2.3.1", + "totalist": "^1.0.0" + } + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -4097,6 +4217,11 @@ "source-map-support": "~0.5.12" }, "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -4264,10 +4389,10 @@ "repeat-string": "^1.6.1" } }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "totalist": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", + "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==" }, "tty-browserify": { "version": "0.0.0", @@ -4279,6 +4404,11 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "typescript": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz", + "integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==" + }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -4582,6 +4712,11 @@ "webpack-sources": "^1.4.1" }, "dependencies": { + "acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" + }, "schema-utils": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", @@ -4594,6 +4729,67 @@ } } }, + "webpack-bundle-analyzer": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.2.tgz", + "integrity": "sha512-PIagMYhlEzFfhMYOzs5gFT55DkUdkyrJi/SxJp8EF3YMWhS+T9vvs2EoTetpk5qb6VsCq02eXTlRDOydRhDFAQ==", + "requires": { + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "chalk": "^4.1.0", + "commander": "^6.2.0", + "gzip-size": "^6.0.0", + "lodash": "^4.17.20", + "opener": "^1.5.2", + "sirv": "^1.0.7", + "ws": "^7.3.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "webpack-cli": { "version": "3.3.12", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.12.tgz", @@ -4674,15 +4870,20 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==" + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" }, "yallist": { "version": "3.1.1", diff --git a/js/package.json b/js/package.json index 6474e1f..1683667 100644 --- a/js/package.json +++ b/js/package.json @@ -2,15 +2,15 @@ "private": true, "name": "@fof/linguist", "dependencies": { - "flarum-webpack-config": "0.1.0-beta.10", - "webpack": "^4.0.0", - "webpack-cli": "^3.0.7" + "flarum-webpack-config": "^1.0", + "webpack": "^4.0", + "webpack-cli": "^3.0" }, "scripts": { "dev": "webpack --mode development --watch", "build": "webpack --mode production" }, "devDependencies": { - "flarum": "0.1.0-beta.16" + "flarum": "^0.1.0-beta.16" } } diff --git a/js/src/admin/components/StringLocale.js b/js/src/admin/components/StringLocale.js index a89eb54..c3f6f89 100644 --- a/js/src/admin/components/StringLocale.js +++ b/js/src/admin/components/StringLocale.js @@ -1,4 +1,4 @@ -import app from 'flarum/app'; +import app from 'flarum/admin/app'; import ItemList from 'flarum/common/utils/ItemList'; import Button from 'flarum/common/components/Button'; import highlightMithril from '../utils/highlightMithril'; diff --git a/js/src/admin/index.js b/js/src/admin/index.js index d698729..680fcd2 100644 --- a/js/src/admin/index.js +++ b/js/src/admin/index.js @@ -1,4 +1,4 @@ -import app from 'flarum/app'; +import app from 'flarum/admin/app'; import StringKey from './models/StringKey'; import TextString from './models/TextString'; import LinguistPage from './pages/LinguistPage'; diff --git a/js/src/admin/pages/CoveragePage.js b/js/src/admin/pages/CoveragePage.js index 8cf5df8..264c7b6 100644 --- a/js/src/admin/pages/CoveragePage.js +++ b/js/src/admin/pages/CoveragePage.js @@ -1,4 +1,4 @@ -import app from 'flarum/app'; +import app from 'flarum/admin/app'; import Button from 'flarum/common/components/Button'; import icon from 'flarum/common/helpers/icon'; import localesAsArray from '../utils/localesAsArray'; diff --git a/js/src/admin/pages/ExportPage.js b/js/src/admin/pages/ExportPage.js index ab7eb8f..de0ae1a 100644 --- a/js/src/admin/pages/ExportPage.js +++ b/js/src/admin/pages/ExportPage.js @@ -1,4 +1,4 @@ -import app from 'flarum/app'; +import app from 'flarum/admin/app'; import Select from 'flarum/common/components/Select'; import Switch from 'flarum/common/components/Switch'; import LinkButton from 'flarum/common/components/LinkButton'; diff --git a/js/src/admin/pages/ImportPage.js b/js/src/admin/pages/ImportPage.js index bb6db16..d7847bd 100644 --- a/js/src/admin/pages/ImportPage.js +++ b/js/src/admin/pages/ImportPage.js @@ -1,4 +1,4 @@ -import app from 'flarum/app'; +import app from 'flarum/admin/app'; import Button from 'flarum/common/components/Button'; import Select from 'flarum/common/components/Select'; import Switch from 'flarum/common/components/Switch'; diff --git a/js/src/admin/pages/LinguistPage.js b/js/src/admin/pages/LinguistPage.js index b0c9621..c5c20de 100644 --- a/js/src/admin/pages/LinguistPage.js +++ b/js/src/admin/pages/LinguistPage.js @@ -1,4 +1,4 @@ -import app from 'flarum/app'; +import app from 'flarum/admin/app'; import ExtensionPage from 'flarum/admin/components/ExtensionPage'; import LoadingIndicator from 'flarum/common/components/LoadingIndicator'; import StringsPage from './StringsPage'; diff --git a/js/src/admin/pages/StringsPage.js b/js/src/admin/pages/StringsPage.js index f001a06..5213cd0 100644 --- a/js/src/admin/pages/StringsPage.js +++ b/js/src/admin/pages/StringsPage.js @@ -1,4 +1,4 @@ -import app from 'flarum/app'; +import app from 'flarum/admin/app'; import Button from 'flarum/common/components/Button'; import Dropdown from 'flarum/common/components/Dropdown'; import Select from 'flarum/common/components/Select'; diff --git a/js/src/admin/utils/frontendLabel.js b/js/src/admin/utils/frontendLabel.js index d2194c8..8ba5152 100644 --- a/js/src/admin/utils/frontendLabel.js +++ b/js/src/admin/utils/frontendLabel.js @@ -1,4 +1,4 @@ -import app from 'flarum/app'; +import app from 'flarum/admin/app'; export default function (frontend) { const translation = app.translator.translations['fof-linguist.admin.known-frontend.' + frontend]; diff --git a/js/src/admin/utils/localesAsArray.js b/js/src/admin/utils/localesAsArray.js index 787e65b..41371b0 100644 --- a/js/src/admin/utils/localesAsArray.js +++ b/js/src/admin/utils/localesAsArray.js @@ -1,4 +1,4 @@ -import app from 'flarum/app'; +import app from 'flarum/admin/app'; export default function () { let locales = []; diff --git a/js/src/admin/utils/namespaceLabel.js b/js/src/admin/utils/namespaceLabel.js index b23c126..3ea8b30 100644 --- a/js/src/admin/utils/namespaceLabel.js +++ b/js/src/admin/utils/namespaceLabel.js @@ -1,4 +1,4 @@ -import app from 'flarum/app'; +import app from 'flarum/admin/app'; export default function (namespace) { const translation = app.translator.translations['fof-linguist.admin.known-namespace.' + namespace]; diff --git a/src/Api/Controllers/ImportController.php b/src/Api/Controllers/ImportController.php index 7d2d420..6db674d 100644 --- a/src/Api/Controllers/ImportController.php +++ b/src/Api/Controllers/ImportController.php @@ -3,6 +3,7 @@ namespace FoF\Linguist\Api\Controllers; use Flarum\Foundation\ValidationException; +use FoF\Linguist\Repositories\StringRepository; use FoF\Linguist\TextString; use Illuminate\Support\Arr; use Illuminate\Support\Str; @@ -15,6 +16,13 @@ class ImportController implements RequestHandlerInterface { + protected $repository; + + public function __construct(StringRepository $repository) + { + $this->repository = $repository; + } + public function handle(ServerRequestInterface $request): ResponseInterface { $request->getAttribute('actor')->assertAdmin(); @@ -81,6 +89,10 @@ public function handle(ServerRequestInterface $request): ResponseInterface $totalImported++; } + if ($totalImported > 0) { + $this->repository->cacheShouldBeCleared(); + } + return new JsonResponse([ 'imported' => $totalImported, 'ignored' => $totalIgnored, diff --git a/src/Api/Serializers/StringKeySerializer.php b/src/Api/Serializers/StringKeySerializer.php index b1740fb..698fd96 100644 --- a/src/Api/Serializers/StringKeySerializer.php +++ b/src/Api/Serializers/StringKeySerializer.php @@ -7,17 +7,17 @@ class StringKeySerializer extends AbstractSerializer { - public function getType($model) + public function getType($model): string { return 'fof-linguist-string-key'; } - public function getId($model) + public function getId($model): string { return Arr::get($model, 'key'); } - protected function getDefaultAttributes($model) + protected function getDefaultAttributes($model): array { return $model; } diff --git a/src/Api/Serializers/StringSerializer.php b/src/Api/Serializers/StringSerializer.php index 51a337d..7fb17ba 100644 --- a/src/Api/Serializers/StringSerializer.php +++ b/src/Api/Serializers/StringSerializer.php @@ -6,12 +6,12 @@ class StringSerializer extends AbstractSerializer { - public function getType($model) + public function getType($model): string { return 'fof-linguist-string'; } - protected function getDefaultAttributes($model) + protected function getDefaultAttributes($model): array { return $model->toArray(); } diff --git a/src/Repositories/StringRepository.php b/src/Repositories/StringRepository.php index 85d37e9..2d95dc2 100644 --- a/src/Repositories/StringRepository.php +++ b/src/Repositories/StringRepository.php @@ -90,7 +90,7 @@ public function delete(TextString $string) $this->cacheShouldBeCleared(); } - protected function cacheShouldBeCleared() + public function cacheShouldBeCleared() { // This flags lets the frontend know it should suggest to the user to clear the cache $this->settings->set('fof.linguist.should-clear-cache', '1'); diff --git a/src/TranslationLock.php b/src/TranslationLock.php index 86a2b0b..4d7743a 100644 --- a/src/TranslationLock.php +++ b/src/TranslationLock.php @@ -6,17 +6,17 @@ class TranslationLock { protected static $apply = true; - public static function stopLoadingTranslations() + public static function stopLoadingTranslations(): void { self::$apply = false; } - public static function continueLoadingTranslations() + public static function continueLoadingTranslations(): void { self::$apply = true; } - public static function shouldLoadTranslations() + public static function shouldLoadTranslations(): bool { return self::$apply; } diff --git a/src/Validators/StringValidator.php b/src/Validators/StringValidator.php index 27dee44..a89d97e 100644 --- a/src/Validators/StringValidator.php +++ b/src/Validators/StringValidator.php @@ -6,7 +6,7 @@ class StringValidator extends AbstractValidator { - protected function getRules() + protected function getRules(): array { return [ 'key' => 'required|string',