/* Unminified and untranspiled code at https://github.com/galobtter/libSettings - this obviously shouldn't be edited directly. */
!function(){"use strict";var t={594:function(t){t.exports=JSON.parse('{"libSettings-settings-title":"Settings","libSettings-save-label":"Save settings","libSettings-cancel-label":"Cancel","libSettings-showDefaults-label":"Show defaults","libSettings-showCurrentSettings-label":"Show current settings","libSettings-save-success-message":"Settings for $1 successfully saved.","libSettings-save-fail-message":"Could not save settings for $1."}')}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,n),i.exports}!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var n=0;nw:en:MediaWiki:Gadget-libSettings.js).")}}}),this.API.saveOption(this.optionName,JSON.stringify(this.newUserOptions)).then((function(){return t.notifySave(!0)}),(function(){return t.notifySave(!1)})).always((function(){t.emit("endSave")}))):this.newUserOptions}},{key:"displayMain",value:function(){var t=this;if(!this.windowManager){var e=v();e.static.name="settingsDialog",e.static.title=this.title,e.static.actions=[{action:"save",label:this.saveLabel,flags:["primary","progressive"]},{action:"cancel",label:this.cancelLabel,flags:["safe","destructive"]},{action:"showDefault",label:this.showDefaultsLabel}],Object.keys(this.userOptions).length>0&&e.static.actions.push({action:"showCurrentSettings",label:this.showCurrentSettingsLabel}),this.settingsDialog=new e({size:this.size,classes:["libSettings-SettingsDialog"]},this.optionsConfig,this.height),this.settingsDialog.connect(this,{startSave:"save"}),this.connect(this.settingsDialog,{endSave:"close"}),this.optionsConfig.traverse((function(e){e.connect(t.settingsDialog,{change:"changeHandler"})})),this.windowManager=new OO.ui.WindowManager,document.body.appendChild(this.windowManager.$element[0]),this.windowManager.addWindows([this.settingsDialog]),this.windowManager.on("closing",(function(){}))}return this.windowManager.openWindow(this.settingsDialog),this.windowManager}},{key:"display",value:function(){var t=this;return this.get(),mw.loader.using(["oojs-ui-core","oojs-ui-widgets","oojs-ui-windows"]).then((function(){return t.displayMain()}))}}])&&d(e.prototype,n),o&&d(e,o),Object.defineProperty(e,"prototype",{writable:!1}),i}();function P(t,e){for(var n=0;n