"use strict";SiplPen.util=function(){function supportsHtmlStorage(){try{return"localStorage"in window&&null!==window.localStorage}catch(t){return!1}}function getText(t){for(var e=" ",n=t.childNodes.length,o=0;o<n;o++){var a=t.childNodes[o];8!=a.nodeType&&(1!=a.nodeType?e+=a.nodeValue:e+=getText(a))}return SiplPen.util.trim(e)}function trim(t){return t.replace(/^\s+|\s+$/g,"")}function fadeIn(t){t.style.opacity=0,t.style.transition="opacity 0.5s",t.style.display="block",setTimeout((function(){t.style.opacity=1}),50),setTimeout((function(){t.style.transition=""}),500)}function fadeOut(t){t.style.opacity=1,t.style.transition="opacity 0.5s",setTimeout((function(){t.style.display="none",t.style.transition=""}),500),t.style.opacity=0}function ajax(t,e,n,o,a){var i;void 0===typeof a&&(a=!0),i=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHtml"),"GET"==(t=t.toUpperCase())?(n&&i.open(t,e+"?"+n,a),i.open(t,e,a),i.send()):"POST"==t&&(i.open(t,e,a),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.send(n)),i.onreadystatechange=function(){4==i.readyState&&200==i.status&&o(i.responseText)}}function loadDebugJS(){var fn=function(x){eval(x)};ajax("GET","js/debugger.js",null,fn,!0)}return{trim:trim,getText:getText,supportsHtmlStorage:supportsHtmlStorage,ajax:ajax,fadeIn:fadeIn,fadeOut:fadeOut,loadDebugJS:loadDebugJS}}();