|
|
|
!function(a){window.Ply=a(window)}(function(a){"use strict";function b(a){return"function"==typeof a}function c(a){if(C)return new C(a);var b=B.Deferred();return a(b.resolve,b.reject),b}function d(a){return C?C.all(a):B.when.apply(B,a)}function e(a){return function(){setTimeout(a,1)}}function f(a,b){if(a)for(var c in a)a.hasOwnProperty(c)&&b(a[c],c,a)}function g(a){var c={};return f(a,function(a,d){c[d]=b(a)?a:a instanceof Object?g(a):a}),c}function h(a){for(var b=Array.prototype.slice,c=b.call(arguments,1),d=0,e=c.length;e>d;d++)f(c[d],function(b,c){a[c]=b});return a}function i(a,b){try{return(b||A).querySelector(a)}catch(c){return B(a,b)[0]}}function j(a,b){return a.getElementsByTagName(b)}function k(a,b){a&&b&&a.appendChild(b)}function l(a){a&&a.parentNode&&a.parentNode.removeChild(a)}function m(a,b,c){var d=c.handle=c.handle||function(b){b.target||(b.target=b.srcElement||A),3===b.target.nodeType&&(b.target=b.target.parentNode),b.preventDefault||(b.preventDefault=function(){b.returnValue=!1}),b.stopPropagation||(b.stopPropagation=function(){b.cancelBubble=!0}),c.call(a,b)};a.addEventListener?a.addEventListener(b,d,!1):a.attachEvent("on"+b,d)}function n(a,b,c){var d=c.handle;d&&(a.removeEventListener?a.removeEventListener(b,d,!1):a.detachEvent("on"+b,d))}function o(a,b,c){if(a&&a.style)if(b instanceof Object)for(var d in b)o(a,d,b[d]);else{if(void 0===c)return A.defaultView&&A.defaultView.getComputedStyle?c=A.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];a.style[E[b]||b]=c}}function p(a){if(null==a&&(a="div"),a.appendChild)return a;if(a.skip)return A.createDocumentFragment();"string"==typeof a&&(a={tag:a});var b,c=a.children,d=D.exec(a.tag||"");return delete a.children,a.tag=d[1]||"div",a.id=a.id||(d[2]||"").substr(1),d=(d[3]||"").split("."),d[0]=a.className||"",a.className=d.join(" "),b=A.createElement(a.tag),delete a.tag,f(a,function(c,d){c&&("css"===d?o(b,a.css):"text"===d?null!=c&&k(b,A.createTextNode(c)):"html"===d?null!=c&&(b.innerHTML=c):"ply"===d?b.setAttribute(J,c):d in b?b[d]=c:/^data-/.test(d)&&b.setAttribute(d,c))}),c&&c.appendChild?k(b,c):f(c,function(a,c){a&&("string"==typeof a?a={text:a}:"object"!=typeof a&&(a={}),"string"==typeof c&&(a.tag=a.tag||c),k(b,p(a)))}),b}function q(a){for(var b,c,d=j(a,"input"),e=0,f=d.length;f>e;e++)if(b=d[e],"submit"===b.type)!c&&(c=b);else if(!/hidden|check|radio/.test(b.type)&&""==b.value){c=b;break}c||(c=j(a,"button")[0]);try{c.focus()}catch(g){}}function r(a){return s(!0),c(function(b){for(var c,d=j(a,"img"),e=d.length,f=e,g=function(){if(--f<=0){for(e=d.length;e--;)c=d[e],n(c,"load",g),n(c,"error",g);s(!1),b()}};e--;)c=d[e],c.complete?f--:(m(c,"load",g),m(c,"error",g));!f&&g()})}function s(a){var b=s.get();clearTimeout(s.pid),s.pid=a?setTimeout(function(){k(A.body,b)},100):setTimeout(function(){l(b)},100)}function t(a,b){var c=p({css:{padding:"20px 20px 40px",display:"inline-block",position:"relative",textAlign:"left",whiteSpace:"normal",verticalAlign:"middle",transform:"translate3d(0, 0, 0)"},children:a});return b&&o(a,b),o(a,{overflow:"hidden",position:"relative",backfaceVisibility:"hidden"}),c.setAttribute(J,"layer"),k(c,a),c}function u(a){var b=p();return a&&(o(b,a),o(b,{top:0,left:0,right:0,bottom:0,position:"fixed"}),b.setAttribute(J,"overlay")),b}function v(a,b,c){a.wrapEl=p({css:{whiteSpace:"nowrap"}}),c||(a.overlayEl=u(b.overlay),k(a.wrapEl,a.overlayEl));var d=p();o(d,{height:"100%",display:"inline-block",verticalAlign:"middle"}),k(a.wrapEl,d);var e=b.el;return a.el=e&&e.cloneNode?e.cloneNode(!0):p({html:e||""}),a.layerEl=t(a.el,b.layer),a.contentEl=a.layerEl.firstChild,a.context=new x(a.layerEl),k(a.wrapEl,a.layerEl),a.bodyEl=b.body&&i(b.body)||A.body,a.wrapEl.tabIndex=-1,o(a.wrapEl,{top:0,left:0,right:0,bottom:0,position:"fixed",textAlign:"center",overflow:"auto",outline:0}),a}function w(a){var b=this;b.cid="c"+y++,b.options=a=h({layer:K.layer,overlay:K.overlay,init:z,open:z,close:z,destroy:z,callback:z},a),a.flags=h({},K.flags,a.flags),v(b,a),b.setEffect(a.effect),b.fx={queue:c(function(a){a()})},b.fx.add=function(a
|