!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.klona=t()}(this,(function(){return function e(t){if("object"!=typeof t)return t;var o,n,r=Object.prototype.toString.call(t);if("[object Object]"===r){if(t.constructor!==Object&&"function"==typeof t.constructor)for(o in n=new t.constructor,t)n.hasOwnProperty(o)&&n[o]!==t[o]&&(n[o]=e(t[o]));else for(o in n={},t)"__proto__"===o?Object.defineProperty(n,o,{value:e(t[o]),configurable:!0,enumerable:!0,writable:!0}):n[o]=e(t[o]);return n}if("[object Array]"===r){for(o=t.length,n=Array(o);o--;)n[o]=e(t[o]);return n}return"[object Set]"===r?(n=new Set,t.forEach((function(t){n.add(e(t))})),n):"[object Map]"===r?(n=new Map,t.forEach((function(t,o){n.set(e(o),e(t))})),n):"[object Date]"===r?new Date(+t):"[object RegExp]"===r?((n=new RegExp(t.source,t.flags)).lastIndex=t.lastIndex,n):"Array]"===r.slice(-6)?new t.constructor(t):t}}));