!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).parse_args=e()}(this,function(){"use strict";function i(t,e,s){return void 0===t&&(t={}),void 0===e&&(e={}),void 0===s&&(s=!1),this.args=i.clone(t),this.defaults=e,this.nested=s,this.parse(),this.args}return i.clone=function(t){if("object"!=typeof t)return t;var e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);return e},i.prototype.parse=function(){for(var t in this.defaults)this.defaults.hasOwnProperty(t)&&(!0===this.nested&&"object"==typeof this.defaults[t]?this.args[t]=new i(this.args[t],this.defaults[t],this.nested):void 0===this.args[t]&&(this.args[t]=i.clone(this.defaults[t])))},function(t,e,s){return new i(t,e,s)}});