text: !function(a){"use strict";function b(b){var c=a("");try{c=a(b).clone()}catch(d){c=a("<span />").html(b)}return c}function c(b,c,d){var e=a.Deferred();try{b=b.contentWindow||b.contentDocument||b;var f=b.document||b.contentDocument||b;d.doctype&&f.write(d.doctype),f.write(c),f.close();var g=!1,h=function(){if(!g){b.focus();try{b.document.execCommand("print",!1,null)||b.print(),a("body").focus()}catch(a){b.print()}b.close(),g=!0,e.resolve()}};a(b).on("load",h),setTimeout(h,d.timeout)}catch(a){e.reject(a)}return e}function d(b,d){var f=a(d.iframe+""),g=f.length;return 0===g&&(f=a('<iframe height="0" width="0" border="0" wmode="Opaque"/>').prependTo("body").css({position:"absolute",top:-999,left:-999})),c(f.get(0),b,d).done(function(){setTimeout(function(){0===g&&f.remove()},1e3)}).fail(function(a){console.error("Failed to print from iframe",a),e(b,d)}).always(function(){try{d.deferred.resolve()}catch(a){console.warn("Error notifying deferred",a)}})}function e(a,b){return c(window.open(),a,b).always(function(){try{b.deferred.resolve()}catch(a){console.warn("Error notifying deferred",a)}})}function f(a){return!!("object"==typeof Node?a instanceof Node:a&&"object"==typeof a&&"number"==typeof a.nodeType&&"string"==typeof a.nodeName)}a.print=a.fn.print=function(){var c,g,h=this;h instanceof a&&(h=h.get(0)),f(h)?(g=a(h),arguments.length>0&&(c=arguments[0])):arguments.length>0?(g=a(arguments[0]),f(g[0])?arguments.length>1&&(c=arguments[1]):(c=arguments[0],g=a("html"))):g=a("html");var i={globalStyles:!0,mediaPrint:!1,stylesheet:null,noPrintSelector:".no-print",iframe:!0,append:null,prepend:null,manuallyCopyFormValues:!0,deferred:a.Deferred(),timeout:750,title:null,doctype:"<!doctype html>"};c=a.extend({},i,c||{});var j=a("");c.globalStyles?j=a("style, link, meta, base, title"):c.mediaPrint&&(j=a("link[media=print]")),c.stylesheet&&(j=a.merge(j,a('<link rel="stylesheet" href="'+c.stylesheet+'">')));var k=g.clone();if(k=a("<span/>").append(k),k.find(c.noPrintSelector).remove(),k.append(j.clone()),c.title){var l=a("title",k);0===l.length&&(l=a("<title />"),k.append(l)),l.text(c.title)}k.append(b(c.append)),k.prepend(b(c.prepend)),c.manuallyCopyFormValues&&(k.find("input").each(function(){var b=a(this);b.is("[type='radio']")||b.is("[type='checkbox']")?b.prop("checked")&&b.attr("checked","checked"):b.attr("value",b.val())}),k.find("select").each(function(){a(this).find(":selected").attr("selected","selected")}),k.find("textarea").each(function(){var b=a(this);b.text(b.val())}));var m=k.html();try{c.deferred.notify("generated_markup",m,k)}catch(a){console.warn("Error notifying deferred",a)}if(k.remove(),c.iframe)try{d(m,c)}catch(a){console.error("Failed to print from iframe",a.stack,a.message),e(m,c)}else e(m,c);return this}}(jQuery);