(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){if(this.formData={},this.tree={},!(t instanceof FormData))return this;this.formData=t;const e=()=>{const t=new Map;return t.largestIndex=0,t.set=function(e,i){""===e?e=t.largestIndex++:/^[0-9]+$/.test(e)&&(e=parseInt(e),t.largestIndex<=e&&(t.largestIndex=e+1)),Map.prototype.set.call(t,e,i)},t};this.tree=e();const i=/^(?<name>[a-z][-a-z0-9_:]*)(?<array>(?:\[(?:[a-z][-a-z0-9_:]*|[0-9]*)\])*)/i;for(const[t,s]of this.formData){const o=t.match(i);if(o)if(""===o.groups.array)this.tree.set(o.groups.name,s);else{const t=[...o.groups.array.matchAll(/\[([a-z][-a-z0-9_:]*|[0-9]*)\]/gi)].map((([t,e])=>e));t.unshift(o.groups.name);const i=t.pop();t.reduce(((t,i)=>{if(/^[0-9]+$/.test(i)&&(i=parseInt(i)),t.get(i)instanceof Map)return t.get(i);const s=e();return t.set(i,s),s}),this.tree).set(i,s)}}}t.r(e),t.d(e,{all:()=>D,any:()=>M,date:()=>m,dayofweek:()=>u,email:()=>r,enum:()=>h,file:()=>d,maxdate:()=>z,maxfilesize:()=>j,maxitems:()=>v,maxlength:()=>x,maxnumber:()=>y,mindate:()=>A,minfilesize:()=>$,minitems:()=>w,minlength:()=>g,minnumber:()=>b,number:()=>c,required:()=>n,requiredfile:()=>a,stepnumber:()=>I,tel:()=>l,time:()=>f,url:()=>p}),i.prototype.entries=function(){return this.tree.entries()},i.prototype.get=function(t){return this.tree.get(t)},i.prototype.getAll=function(t){if(!this.has(t))return[];const e=t=>{const i=[];if(t instanceof Map)for(const[s,o]of t)i.push(...e(o));else""!==t&&i.push(t);return i};return e(this.get(t))},i.prototype.has=function(t){return this.tree.has(t)},i.prototype.keys=function(){return this.tree.keys()},i.prototype.values=function(){return this.tree.values()};const s=i;function o({rule:t,field:e,error:i,...s}){this.rule=t,this.field=e,this.error=i,this.properties=s}const n=function(t){if(0===t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).length)throw new o(this)},a=function(t){if(0===t.getAll(this.field).length)throw new o(this)},r=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(t.length<6)return!1;if(-1===t.indexOf("@",1))return!1;if(t.indexOf("@")!==t.lastIndexOf("@"))return!1;const[e,i]=t.split("@",2);if(!/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/.test(e))return!1;if(/\.{2,}/.test(i))return!1;if(/(?:^[ \t\n\r\0\x0B.]|[ \t\n\r\0\x0B.]$)/.test(i))return!1;const s=i.split(".");if(s.length<2)return!1;for(const t of s){if(/(?:^[ \t\n\r\0\x0B-]|[ \t\n\r\0\x0B-]$)/.test(t))return!1;if(!/^[a-z0-9-]+$/i.test(t))return!1}return!0})))throw new o(this)},p=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));if(!e.every((t=>{try{return(t=>-1!==["http","https","ftp","ftps","mailto","news","irc","irc6","ircs","gopher","nntp","feed","telnet","mms","rtsp","sms","svn","tel","fax","xmpp","webcal","urn"].indexOf(t))(new URL(t).protocol.replace(/:$/,""))}catch{return!1}})))throw new o(this)},l=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>(((t=(t=t.replace(/[#*].*$/,"")).replaceAll(/[()/.*#\s-]+/g,"")).startsWith("+")||t.startsWith("00"))&&(t=`+${t.replace(/^[+0]+/,"")}`),!!/^[+]?[0-9]+$/.test(t)&&5<t.length&&t.length<16))))throw new o(this)},c=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!!/^[-]?[0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t)||!!/^[-]?(?:[0-9]+)?[.][0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t))))throw new o(this)},m=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(!/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t))return!1;const e=new Date(t);return!Number.isNaN(e.valueOf())})))throw new o(this)},f=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=t.match(/^([0-9]{2})\:([0-9]{2})(?:\:([0-9]{2}))?$/);if(!e)return!1;const i=parseInt(e[1]),s=parseInt(e[2]),o=e[3]?parseInt(e[3]):0;return 0<=i&&i<=23&&0<=s&&s<=59&&0<=o&&o<=59})))throw new o(this)},d=function(t){if(!t.getAll(this.field).every((t=>t instanceof File&&this.accept?.some((e=>/^\.[a-z0-9]+$/i.test(e)?t.name.toLowerCase().endsWith(e.toLowerCase()):(t=>{const e=[],i=t.match(/^(?<toplevel>[a-z]+)\/(?<sub>[*]|[a-z0-9.+-]+)$/i);if(i){const t=i.groups.toplevel.toLowerCase(),s=i.groups.sub.toLowerCase();for(const[o,n]of(()=>{const t=new Map;return t.set("jpg|jpeg|jpe","image/jpeg"),t.set("gif","image/gif"),t.set("png","image/png"),t.set("bmp","image/bmp"),t.set("tiff|tif","image/tiff"),t.set("webp","image/webp"),t.set("ico","image/x-icon"),t.set("heic","image/heic"),t.set("asf|asx","video/x-ms-asf"),t.set("wmv","video/x-ms-wmv"),t.set("wmx","video/x-ms-wmx"),t.set("wm","video/x-ms-wm"),t.set("avi","video/avi"),t.set("divx","video/divx"),t.set("flv","video/x-flv"),t.set("mov|qt","video/quicktime"),t.set("mpeg|mpg|mpe","video/mpeg"),t.set("mp4|m4v","video/mp4"),t.set("ogv","video/ogg"),t.set("webm","video/webm"),t.set("mkv","video/x-matroska"),t.set("3gp|3gpp","video/3gpp"),t.set("3g2|3gp2","video/3gpp2"),t.set("txt|asc|c|cc|h|srt","text/plain"),t.set("csv","text/csv"),t.set("tsv","text/tab-separated-values"),t.set("ics","text/calendar"),t.set("rtx","text/richtext"),t.set("css","text/css"),t.set("htm|html","text/html"),t.set("vtt","text/vtt"),t.set("dfxp","application/ttaf+xml"),t.set("mp3|m4a|m4b","audio/mpeg"),t.set("aac","audio/aac"),t.set("ra|ram","audio/x-realaudio"),t.set("wav","audio/wav"),t.set("ogg|oga","audio/ogg"),t.set("flac","audio/flac"),t.set("mid|midi","audio/midi"),t.set("wma","audio/x-ms-wma"),t.set("wax","audio/x-ms-wax"),t.set("mka","audio/x-matroska"),t.set("rtf","application/rtf"),t.set("js","application/javascript"),t.set("pdf","application/pdf"),t.set("swf","application/x-shockwave-flash"),t.set("class","application/java"),t.set("tar","application/x-tar"),t.set("zip","application/zip"),t.set("gz|gzip","application/x-gzip"),t.set("rar","application/rar"),t.set("7z","application/x-7z-compressed"),t.set("exe","application/x-msdownload"),t.set("psd","application/octet-stream"),t.set("xcf","application/octet-stream"),t.set("doc","application/msword"),t.set("pot|pps|ppt","application/vnd.ms-powerpoint"),t.set("wri","application/vnd.ms-write"),t.set("xla|xls|xlt|xlw","application/vnd.ms-excel"),t.set("mdb","application/vnd.ms-access"),t.set("mpp","application/vnd.ms-project"),t.set("docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t.set("docm","application/vnd.ms-word.document.macroEnabled.12"),t.set("dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"),t.set("dotm","application/vnd.ms-word.template.macroEnabled.12"),t.set("xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t.set("xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"),t.set("xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"),t.set("xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"),t.set("xltm","application/vnd.ms-excel.template.macroEnabled.12"),t.set("xlam","application/vnd.ms-excel.addin.macroEnabled.12"),t.set("pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"),t.set("pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"),t.set("ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"),t.set("ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"),t.set("potx","application/vnd.openxmlformats-officedocument.presentationml.template"),t.set("potm","application/vnd.ms-powerpoint.template.macroEnabled.12"),t.set("ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"),t.set("sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"),t.set("sldm","application/vnd.ms-powerpoint.slide.macroEnabled.12"),t.set("onetoc|onetoc2|onetmp|onepkg","application/onenote"),t.set("oxps","application/oxps"),t.set("xps","application/vnd.ms-xpsdocument"),t.set("odt","application/vnd.oasis.opendocument.text"),t.set("odp","application/vnd.oasis.opendocument.presentation"),t.set("ods","application/vnd.oasis.opendocument.spreadsheet"),t.set("odg","application/vnd.oasis.opendocument.graphics"),t.set("odc","application/vnd.oasis.opendocument.chart"),t.set("odb","application/vnd.oasis.opendocument.database"),t.set("odf","application/vnd.oasis.opendocument.formula"),t.set("wp|wpd","application/wordperfect"),t.set("key","application/vnd.apple.keynote"),t.set("numbers","application/vnd.apple.numbers"),t.set("pages","application/vnd.apple.pages"),t})())("*"===s&&n.startsWith(t+"/")||n===i[0])&&e.push(...o.split("|"))}return e})(e).some((e=>(e="."+e.trim(),t.name.toLowerCase().endsWith(e.toLowerCase())))))))))throw new o(this)},h=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>this.accept?.some((e=>t===String(e))))))throw new o(this)},u=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=0===(i=new Date(t).getDay())?7:i;var i;return this.accept?.some((t=>e===parseInt(t)))})))throw new o(this)},w=function(t){if(t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).length<parseInt(this.threshold))throw new o(this)},v=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));if(parseInt(this.threshold)<e.length)throw new o(this)},g=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),0!==i&&i<parseInt(this.threshold))throw new o(this)},x=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),parseInt(this.threshold)<i)throw new o(this)},b=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(t)<parseFloat(this.threshold)))))throw new o(this)},y=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(this.threshold)<parseFloat(t)))))throw new o(this)},A=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&t<this.threshold))))throw new o(this)},z=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&this.threshold<t))))throw new o(this)},$=function(t){const e=t.getAll(this.field);let i=0;if(e.forEach((t=>{t instanceof File&&(i+=t.size)})),i<parseInt(this.threshold))throw new o(this)},j=function(t){const e=t.getAll(this.field);let i=0;if(e.forEach((t=>{t instanceof File&&(i+=t.size)})),parseInt(this.threshold)<i)throw new o(this)},I=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)),i=parseFloat(this.base),s=parseFloat(this.interval);if(!(0<s))return!0;if(!e.every((t=>{const e=(parseFloat(t)-i)%s;return"0.000000"===Math.abs(e).toFixed(6)||"0.000000"===Math.abs(e-s).toFixed(6)})))throw new o(this)},O=({ruleObj:t,options:i})=>{const{rule:s,...o}=t;return"function"==typeof e[s]&&("function"!=typeof e[s].matches||e[s].matches(o,i))},E=({ruleObj:t,formDataTree:i,options:s})=>{const{rule:o}=t;e[o].call(t,i,s)},k=[],F=t=>[...k].reduce(((t,e)=>i=>e(i,t)),t),D=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.every((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;if(void 0!==t.error)throw t;return!1}return!0})))throw new o(this)},M=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.some((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;return!1}return!0})))throw new o(this)};var L;window.swv={validators:e,validate:(t,e,i={})=>{const n=(t.rules??[]).filter((t=>O({ruleObj:t,options:i})));if(!n.length)return new Map;const a=F(E),r=new s(e),p=n.reduce(((t,e)=>{try{a({ruleObj:e,formDataTree:r,options:i})}catch(e){if(!(e instanceof o))throw e;if(void 0!==e.field&&!t.has(e.field)&&void 0!==e.error)return t.set(e.field,e)}return t}),new Map);for(const t of r.keys())p.has(t)||p.set(t,{validInputs:r.getAll(t)});return p},use:t=>{k.push(t)},...null!==(L=window.swv)&&void 0!==L?L:{}}})();
(()=>{"use strict";const e=window.wp.i18n,t=e=>Math.abs(parseInt(e,10)),a=(e,t,a)=>{const n=new CustomEvent(`wpcf7${t}`,{bubbles:!0,detail:a});"string"==typeof e&&(e=document.querySelector(e)),e.dispatchEvent(n)},n=(e,t)=>{const n=new Map([["init","init"],["validation_failed","invalid"],["acceptance_missing","unaccepted"],["spam","spam"],["aborted","aborted"],["mail_sent","sent"],["mail_failed","failed"],["submitting","submitting"],["resetting","resetting"],["validating","validating"],["payment_required","payment-required"]]);n.has(t)&&(t=n.get(t)),Array.from(n.values()).includes(t)||(t=`custom-${t=(t=t.replace(/[^0-9a-z]+/i," ").trim()).replace(/\s+/,"-")}`);const r=e.getAttribute("data-status");if(e.wpcf7.status=t,e.setAttribute("data-status",t),e.classList.add(t),r&&r!==t){e.classList.remove(r);const t={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,prevStatus:r};a(e,"statuschanged",t)}return t},r=e=>{const{root:t,namespace:a="contact-form-7/v1"}=wpcf7.api;return c.reduceRight(((e,t)=>a=>t(a,e)),(e=>{let n,r,{url:c,path:o,endpoint:s,headers:i,body:l,data:p,...d}=e;"string"==typeof s&&(n=a.replace(/^\/|\/$/g,""),r=s.replace(/^\//,""),o=r?n+"/"+r:n),"string"==typeof o&&(-1!==t.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),c=t+o),i={Accept:"application/json, */*;q=0.1",...i},delete i["X-WP-Nonce"],p&&(l=JSON.stringify(p),i["Content-Type"]="application/json");const f={code:"fetch_error",message:"You are probably offline."},u={code:"invalid_json",message:"The response is not a valid JSON response."};return window.fetch(c||o||window.location.href,{...d,headers:i,body:l}).then((e=>Promise.resolve(e).then((e=>{if(e.status>=200&&e.status<300)return e;throw e})).then((e=>{if(204===e.status)return null;if(e&&e.json)return e.json().catch((()=>{throw u}));throw u}))),(()=>{throw f}))}))(e)},c=[];function o(e,t={}){const{target:a,scope:r=e,...c}=t;if(void 0===e.wpcf7?.schema)return;const o={...e.wpcf7.schema};if(void 0!==a){if(!e.contains(a))return;if(!a.closest(".wpcf7-form-control-wrap[data-name]"))return;if(a.closest(".novalidate"))return}const p=r.querySelectorAll(".wpcf7-form-control-wrap"),d=Array.from(p).reduce(((e,t)=>(t.closest(".novalidate")||t.querySelectorAll(":where(input, textarea, select):enabled").forEach((t=>{if(t.name)switch(t.type){case"button":case"image":case"reset":case"submit":break;case"checkbox":case"radio":t.checked&&e.append(t.name,t.value);break;case"select-multiple":for(const a of t.selectedOptions)e.append(t.name,a.value);break;case"file":for(const a of t.files)e.append(t.name,a);break;default:e.append(t.name,t.value)}})),e)),new FormData),f=e.getAttribute("data-status");Promise.resolve(n(e,"validating")).then((n=>{if(void 0!==swv){const n=swv.validate(o,d,t);for(const t of p){if(void 0===t.dataset.name)continue;const c=t.dataset.name;if(n.has(c)){const{error:t,validInputs:a}=n.get(c);i(e,c),void 0!==t&&s(e,c,t,{scope:r}),l(e,c,null!=a?a:[])}if(t.contains(a))break}}})).finally((()=>{n(e,f)}))}r.use=e=>{c.unshift(e)};const s=(e,t,a,n)=>{const{scope:r=e,...c}=null!=n?n:{},o=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,""),s=e.querySelector(`.wpcf7-form-control-wrap[data-name="${t}"] .wpcf7-form-control`);(()=>{const t=document.createElement("li");t.setAttribute("id",o),s&&s.id?t.insertAdjacentHTML("beforeend",`<a href="#${s.id}">${a}</a>`):t.insertAdjacentText("beforeend",a),e.wpcf7.parent.querySelector(".screen-reader-response ul").appendChild(t)})(),r.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{const t=document.createElement("span");t.classList.add("wpcf7-not-valid-tip"),t.setAttribute("aria-hidden","true"),t.insertAdjacentText("beforeend",a),e.appendChild(t),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","true")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.classList.add("wpcf7-not-valid"),e.setAttribute("aria-describedby",o),"function"==typeof e.setCustomValidity&&e.setCustomValidity(a),e.closest(".use-floating-validation-tip")&&(e.addEventListener("focus",(e=>{t.setAttribute("style","display: none")})),t.addEventListener("click",(e=>{t.setAttribute("style","display: none")})))}))}))},i=(e,t)=>{const a=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,"");e.wpcf7.parent.querySelector(`.screen-reader-response ul li#${a}`)?.remove(),e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{e.querySelector(".wpcf7-not-valid-tip")?.remove(),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","false")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.removeAttribute("aria-describedby"),e.classList.remove("wpcf7-not-valid"),"function"==typeof e.setCustomValidity&&e.setCustomValidity("")}))}))},l=(e,t,a)=>{e.querySelectorAll(`[data-reflection-of="${t}"]`).forEach((e=>{if("output"===e.tagName.toLowerCase()){const t=e;0===a.length&&a.push(t.dataset.default),a.slice(0,1).forEach((e=>{e instanceof File&&(e=e.name),t.textContent=e}))}else e.querySelectorAll("output").forEach((e=>{e.hasAttribute("data-default")?0===a.length?e.removeAttribute("hidden"):e.setAttribute("hidden","hidden"):e.remove()})),a.forEach((a=>{a instanceof File&&(a=a.name);const n=document.createElement("output");n.setAttribute("name",t),n.textContent=a,e.appendChild(n)}))}))};function p(e,t={}){if(wpcf7.blocked)return d(e),void n(e,"submitting");const c=new FormData(e);t.submitter&&t.submitter.name&&c.append(t.submitter.name,t.submitter.value);const o={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(c,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:c};r({endpoint:`contact-forms/${e.wpcf7.id}/feedback`,method:"POST",body:c,wpcf7:{endpoint:"feedback",form:e,detail:o}}).then((t=>{const r=n(e,t.status);return o.status=t.status,o.apiResponse=t,["invalid","unaccepted","spam","aborted"].includes(r)?a(e,r,o):["sent","failed"].includes(r)&&a(e,`mail${r}`,o),a(e,"submit",o),t})).then((t=>{t.posted_data_hash&&(e.querySelector('input[name="_wpcf7_posted_data_hash"]').value=t.posted_data_hash),"mail_sent"===t.status&&(e.reset(),e.wpcf7.resetOnMailSent=!0),t.invalid_fields&&t.invalid_fields.forEach((t=>{s(e,t.field,t.message)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').insertAdjacentText("beforeend",t.message),e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=t.message}))})).catch((e=>console.error(e)))}r.use(((e,t)=>{if(e.wpcf7&&"feedback"===e.wpcf7.endpoint){const{form:t,detail:r}=e.wpcf7;d(t),a(t,"beforesubmit",r),n(t,"submitting")}return t(e)}));const d=e=>{e.querySelectorAll(".wpcf7-form-control-wrap").forEach((t=>{t.dataset.name&&i(e,t.dataset.name)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').innerText="",e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=""}))};function f(e){const t=new FormData(e),c={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(t,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:t};r({endpoint:`contact-forms/${e.wpcf7.id}/refill`,method:"GET",wpcf7:{endpoint:"refill",form:e,detail:c}}).then((t=>{e.wpcf7.resetOnMailSent?(delete e.wpcf7.resetOnMailSent,n(e,"mail_sent")):n(e,"init"),c.apiResponse=t,a(e,"reset",c)})).catch((e=>console.error(e)))}r.use(((e,t)=>{if(e.wpcf7&&"refill"===e.wpcf7.endpoint){const{form:t,detail:a}=e.wpcf7;d(t),n(t,"resetting")}return t(e)}));const u=(e,t)=>{for(const a in t){const n=t[a];e.querySelectorAll(`input[name="${a}"]`).forEach((e=>{e.value=""})),e.querySelectorAll(`img.wpcf7-captcha-${a.replaceAll(":","")}`).forEach((e=>{e.setAttribute("src",n)}));const r=/([0-9]+)\.(png|gif|jpeg)$/.exec(n);r&&e.querySelectorAll(`input[name="_wpcf7_captcha_challenge_${a}"]`).forEach((e=>{e.value=r[1]}))}},m=(e,t)=>{for(const a in t){const n=t[a][0],r=t[a][1];e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${a}"]`).forEach((e=>{e.querySelector(`input[name="${a}"]`).value="",e.querySelector(".wpcf7-quiz-label").textContent=n,e.querySelector(`input[name="_wpcf7_quiz_answer_${a}"]`).value=r}))}};function w(e){const a=new FormData(e);e.wpcf7={id:t(a.get("_wpcf7")),status:e.getAttribute("data-status"),pluginVersion:a.get("_wpcf7_version"),locale:a.get("_wpcf7_locale"),unitTag:a.get("_wpcf7_unit_tag"),containerPost:t(a.get("_wpcf7_container_post")),parent:e.closest(".wpcf7"),get schema(){return wpcf7.schemas.get(this.id)}},wpcf7.schemas.set(e.wpcf7.id,void 0),e.querySelectorAll(".has-spinner").forEach((e=>{e.insertAdjacentHTML("afterend",'<span class="wpcf7-spinner"></span>')})),(e=>{e.querySelectorAll(".wpcf7-exclusive-checkbox").forEach((t=>{t.addEventListener("change",(t=>{const a=t.target.getAttribute("name");e.querySelectorAll(`input[type="checkbox"][name="${a}"]`).forEach((e=>{e!==t.target&&(e.checked=!1)}))}))}))})(e),(e=>{e.querySelectorAll(".has-free-text").forEach((t=>{const a=t.querySelector("input.wpcf7-free-text"),n=t.querySelector('input[type="checkbox"], input[type="radio"]');a.disabled=!n.checked,e.addEventListener("change",(e=>{a.disabled=!n.checked,e.target===n&&n.checked&&a.focus()}))}))})(e),(e=>{e.querySelectorAll(".wpcf7-validates-as-url").forEach((e=>{e.addEventListener("change",(t=>{let a=e.value.trim();a&&!a.match(/^[a-z][a-z0-9.+-]*:/i)&&-1!==a.indexOf(".")&&(a=a.replace(/^\/+/,""),a="http://"+a),e.value=a}))}))})(e),(e=>{if(!e.querySelector(".wpcf7-acceptance")||e.classList.contains("wpcf7-acceptance-as-validation"))return;const t=()=>{let t=!0;e.querySelectorAll(".wpcf7-acceptance").forEach((e=>{if(!t||e.classList.contains("optional"))return;const a=e.querySelector('input[type="checkbox"]');(e.classList.contains("invert")&&a.checked||!e.classList.contains("invert")&&!a.checked)&&(t=!1)})),e.querySelectorAll(".wpcf7-submit").forEach((e=>{e.disabled=!t}))};t(),e.addEventListener("change",(e=>{t()})),e.addEventListener("wpcf7reset",(e=>{t()}))})(e),(e=>{const a=(e,a)=>{const n=t(e.getAttribute("data-starting-value")),r=t(e.getAttribute("data-maximum-value")),c=t(e.getAttribute("data-minimum-value")),o=e.classList.contains("down")?n-a.value.trim().length:a.value.trim().length;e.setAttribute("data-current-value",o),e.innerText=o,r&&r<a.value.length?e.classList.add("too-long"):e.classList.remove("too-long"),c&&a.value.length<c?e.classList.add("too-short"):e.classList.remove("too-short")},n=t=>{t={init:!1,...t},e.querySelectorAll(".wpcf7-character-count").forEach((n=>{const r=n.getAttribute("data-target-name"),c=e.querySelector(`[name="${r}"]`);c&&(c.value=c.defaultValue,a(n,c),t.init&&c.addEventListener("keyup",(e=>{a(n,c)})))}))};n({init:!0}),e.addEventListener("wpcf7reset",(e=>{n()}))})(e),window.addEventListener("load",(t=>{wpcf7.cached&&e.reset()})),e.addEventListener("reset",(t=>{wpcf7.reset(e)})),e.addEventListener("submit",(t=>{wpcf7.submit(e,{submitter:t.submitter}),t.preventDefault()})),e.addEventListener("wpcf7submit",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("wpcf7reset",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("change",(t=>{t.target.closest(".wpcf7-form-control")&&wpcf7.validate(e,{target:t.target})})),e.addEventListener("wpcf7statuschanged",(t=>{const a=t.detail.status;e.querySelectorAll(".active-on-any").forEach((e=>{e.removeAttribute("inert"),e.classList.remove("active-on-any")})),e.querySelectorAll(`.inert-on-${a}`).forEach((e=>{e.setAttribute("inert","inert"),e.classList.add("active-on-any")}))}))}document.addEventListener("DOMContentLoaded",(t=>{var a;if("undefined"!=typeof wpcf7)if(void 0!==wpcf7.api)if("function"==typeof window.fetch)if("function"==typeof window.FormData)if("function"==typeof NodeList.prototype.forEach)if("function"==typeof String.prototype.replaceAll){wpcf7={init:w,submit:p,reset:f,validate:o,schemas:new Map,...null!==(a=wpcf7)&&void 0!==a?a:{}},document.querySelectorAll("form .wpcf7[data-wpcf7-id]").forEach((t=>{const a=document.createElement("p");a.setAttribute("class","wpcf7-form-in-wrong-place");const n=document.createElement("strong");n.append((0,e.__)("Error:","contact-form-7"));const r=(0,e.__)("This contact form is placed in the wrong place.","contact-form-7");a.append(n," ",r),t.replaceWith(a)})),document.querySelectorAll(".wpcf7 > form").forEach((e=>{wpcf7.init(e),e.closest(".wpcf7").classList.replace("no-js","js")}));for(const e of wpcf7.schemas.keys())r({endpoint:`contact-forms/${e}/feedback/schema`,method:"GET"}).then((t=>{wpcf7.schemas.set(e,t)}))}else console.error("Your browser does not support String.replaceAll().");else console.error("Your browser does not support NodeList.forEach().");else console.error("Your browser does not support window.FormData().");else console.error("Your browser does not support window.fetch().");else console.error("wpcf7.api is not defined.");else console.error("wpcf7 is not defined.")}))})();
(function(){
var isIe=/(trident|msie)/i.test(navigator.userAgent);
if(isIe&&document.getElementById&&window.addEventListener){
window.addEventListener('hashchange', function(){
var id=location.hash.substring(1),
element;
if(!(/^[A-z0-9_-]+$/.test(id))){
return;
}
element=document.getElementById(id);
if(element){
if(!(/^(?:a|select|input|button|textarea)$/i.test(element.tagName))){
element.tabIndex=-1;
}
element.focus();
}}, false);
}})();
(function(){function t(t){var n=o("#wpfront-scroll-top-container"),e=!1,i=0,a=function(){clearTimeout(i),n.is(":visible")&&n.stop().fadeTo(t.button_fade_duration,0,function(){n.hide(),e=!1})},c=function(){t.auto_hide&&(clearTimeout(i),i=setTimeout(function(){a()},1e3*t.auto_hide_after))},l=!1,r=function(){l||(l=!0,o(window).scrollTop()>t.scroll_offset?(n.stop().css("opacity",e?1:t.button_opacity).show(),e||c()):a(),l=!1)};o(window).on("scroll",r),o(document).on("scroll",r),n.on("mouseenter",function(){clearTimeout(i),e=!0,o(this).css("opacity",1)}).on("mouseleave",function(){o(this).css("opacity",t.button_opacity),e=!1,c()}).on("click",function(n){if("url"===t.button_action)return!0;if("element"===t.button_action){n.preventDefault();var e=o(t.button_action_element_selector).first(),i=o(t.button_action_container_selector),a=e.offset();if(null==a)return!1;var c=i.last().offset();if(null==c)return!1;t.button_action_element_offset=parseInt(t.button_action_element_offset),isNaN(t.button_action_element_offset)&&(t.button_action_element_offset=0);var l=a.top-c.top-t.button_action_element_offset;return i.animate({scrollTop:l},t.scroll_duration),!1}return n.preventDefault(),o("html, body").animate({scrollTop:0},t.scroll_duration),!1})}var o=jQuery;o(window).on("load",function(){function n(n){n.data.hide_iframe&&o(window).attr("self")!==o(window).attr("top")||(o("<style>").text(n.css).appendTo("head"),o("body").append(n.html),t(n.data))}n(wpfront_scroll_top_data.data)})})();
;(function($){
var ver='2.99';
if($.support==undefined){
$.support={
opacity: !($.browser.msie)
};}
function debug(s){
$.fn.cycle.debug&&log(s);
}
function log(){
window.console&&console.log&&console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
}
$.expr[':'].paused=function(el){
return el.cyclePause;
}
$.fn.cycle=function(options, arg2){
var o={ s: this.selector, c: this.context };
if(this.length===0&&options!='stop'){
if(!$.isReady&&o.s){
log('DOM not ready, queuing slideshow');
$(function(){
$(o.s,o.c).cycle(options,arg2);
});
return this;
}
log('terminating; zero elements found by selector' + ($.isReady ? '':' (DOM not ready)'));
return this;
}
return this.each(function(){
var opts=handleArguments(this, options, arg2);
if(opts===false)
return;
opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;
if(this.cycleTimeout)
clearTimeout(this.cycleTimeout);
this.cycleTimeout=this.cyclePause=0;
var $cont=$(this);
var $slides=opts.slideExpr ? $(opts.slideExpr, this):$cont.children();
var els=$slides.get();
if(els.length < 2){
log('terminating; too few slides: ' + els.length);
return;
}
var opts2=buildOptions($cont, $slides, els, opts, o);
if(opts2===false)
return;
var startTime=opts2.continuous ? 10:getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);
if(startTime){
startTime +=(opts2.delay||0);
if(startTime < 10)
startTime=10;
debug('first timeout: ' + startTime);
this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts.backwards)}, startTime);
}});
};
function handleArguments(cont, options, arg2){
if(cont.cycleStop==undefined)
cont.cycleStop=0;
if(options===undefined||options===null)
options={};
if(options.constructor==String){
switch(options){
case 'destroy':
case 'stop':
var opts=$(cont).data('cycle.opts');
if(!opts)
return false;
cont.cycleStop++;
if(cont.cycleTimeout)
clearTimeout(cont.cycleTimeout);
cont.cycleTimeout=0;
$(cont).removeData('cycle.opts');
if(options=='destroy')
destroy(opts);
return false;
case 'toggle':
cont.cyclePause=(cont.cyclePause===1) ? 0:1;
checkInstantResume(cont.cyclePause, arg2, cont);
return false;
case 'pause':
cont.cyclePause=1;
return false;
case 'resume':
cont.cyclePause=0;
checkInstantResume(false, arg2, cont);
return false;
case 'prev':
case 'next':
var opts=$(cont).data('cycle.opts');
if(!opts){
log('options not found, "prev/next" ignored');
return false;
}
$.fn.cycle[options](opts);
return false;
default:
options={ fx: options };};
return options;
}
else if(options.constructor==Number){
var num=options;
options=$(cont).data('cycle.opts');
if(!options){
log('options not found, can not advance slide');
return false;
}
if(num < 0||num >=options.elements.length){
log('invalid slide index: ' + num);
return false;
}
options.nextSlide=num;
if(cont.cycleTimeout){
clearTimeout(cont.cycleTimeout);
cont.cycleTimeout=0;
}
if(typeof arg2=='string')
options.oneTimeFx=arg2;
go(options.elements, options, 1, num >=options.currSlide);
return false;
}
return options;
function checkInstantResume(isPaused, arg2, cont){
if(!isPaused&&arg2===true){
var options=$(cont).data('cycle.opts');
if(!options){
log('options not found, can not resume');
return false;
}
if(cont.cycleTimeout){
clearTimeout(cont.cycleTimeout);
cont.cycleTimeout=0;
}
go(options.elements, options, 1, !options.backwards);
}}
};
function removeFilter(el, opts){
if(!$.support.opacity&&opts.cleartype&&el.style.filter){
try { el.style.removeAttribute('filter'); }
catch(smother){}}
};
function destroy(opts){
if(opts.next)
$(opts.next).unbind(opts.prevNextEvent);
if(opts.prev)
$(opts.prev).unbind(opts.prevNextEvent);
if(opts.pager||opts.pagerAnchorBuilder)
$.each(opts.pagerAnchors||[], function(){
this.unbind().remove();
});
opts.pagerAnchors=null;
if(opts.destroy)
opts.destroy(opts);
};
function buildOptions($cont, $slides, els, options, o){
var opts=$.extend({}, $.fn.cycle.defaults, options||{}, $.metadata ? $cont.metadata():$.meta ? $cont.data():{});
if(opts.autostop)
opts.countdown=opts.autostopCount||els.length;
var cont=$cont[0];
$cont.data('cycle.opts', opts);
opts.$cont=$cont;
opts.stopCount=cont.cycleStop;
opts.elements=els;
opts.before=opts.before ? [opts.before]:[];
opts.after=opts.after ? [opts.after]:[];
if(!$.support.opacity&&opts.cleartype)
opts.after.push(function(){ removeFilter(this, opts); });
if(opts.continuous)
opts.after.push(function(){ go(els,opts,0,!opts.backwards); });
saveOriginalOpts(opts);
if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)
clearTypeFix($slides);
if($cont.css('position')=='static')
$cont.css('position', 'relative');
if(opts.width)
$cont.width(opts.width);
if(opts.height&&opts.height!='auto')
$cont.height(opts.height);
if(opts.startingSlide)
opts.startingSlide=parseInt(opts.startingSlide);
else if(opts.backwards)
opts.startingSlide=els.length - 1;
if(opts.random){
opts.randomMap=[];
for (var i=0; i < els.length; i++)
opts.randomMap.push(i);
opts.randomMap.sort(function(a,b){return Math.random() - 0.5;});
opts.randomIndex=1;
opts.startingSlide=opts.randomMap[1];
}
else if(opts.startingSlide >=els.length)
opts.startingSlide=0;
opts.currSlide=opts.startingSlide||0;
var first=opts.startingSlide;
$slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i){
var z;
if(opts.backwards)
z=first ? i <=first ? els.length + (i-first):first-i:els.length-i;
else
z=first ? i >=first ? els.length - (i-first):first-i:els.length-i;
$(this).css('z-index', z)
});
$(els[first]).css('opacity',1).show();
removeFilter(els[first], opts);
if(opts.fit&&opts.width)
$slides.width(opts.width);
if(opts.fit&&opts.height&&opts.height!='auto')
$slides.height(opts.height);
var reshape=opts.containerResize&&!$cont.innerHeight();
if(reshape){
var maxw=0, maxh=0;
for(var j=0; j < els.length; j++){
var $e=$(els[j]), e=$e[0], w=$e.outerWidth(), h=$e.outerHeight();
if(!w) w=e.offsetWidth||e.width||$e.attr('width');
if(!h) h=e.offsetHeight||e.height||$e.attr('height');
maxw=w > maxw ? w:maxw;
maxh=h > maxh ? h:maxh;
}
if(maxw > 0&&maxh > 0)
$cont.css({width:maxw+'px',height:maxh+'px'});
}
if(opts.pause)
$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});
if(supportMultiTransitions(opts)===false)
return false;
var requeue=false;
options.requeueAttempts=options.requeueAttempts||0;
$slides.each(function(){
var $el=$(this);
this.cycleH=(opts.fit&&opts.height) ? opts.height:($el.height()||this.offsetHeight||this.height||$el.attr('height')||0);
this.cycleW=(opts.fit&&opts.width) ? opts.width:($el.width()||this.offsetWidth||this.width||$el.attr('width')||0);
if($el.is('img')){
var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);
var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);
var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);
var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);
if(loadingIE||loadingFF||loadingOp||loadingOther){
if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts < 100){
log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
setTimeout(function(){$(o.s,o.c).cycle(options)}, opts.requeueTimeout);
requeue=true;
return false;
}else{
log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
}}
}
return true;
});
if(requeue)
return false;
opts.cssBefore=opts.cssBefore||{};
opts.cssAfter=opts.cssAfter||{};
opts.cssFirst=opts.cssFirst||{};
opts.animIn=opts.animIn||{};
opts.animOut=opts.animOut||{};
$slides.not(':eq('+first+')').css(opts.cssBefore);
$($slides[first]).css(opts.cssFirst);
if(opts.timeout){
opts.timeout=parseInt(opts.timeout);
if(opts.speed.constructor==String)
opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);
if(!opts.sync)
opts.speed=opts.speed / 2;
var buffer=opts.fx=='none' ? 0:opts.fx=='shuffle' ? 500:250;
while((opts.timeout - opts.speed) < buffer)
opts.timeout +=opts.speed;
}
if(opts.easing)
opts.easeIn=opts.easeOut=opts.easing;
if(!opts.speedIn)
opts.speedIn=opts.speed;
if(!opts.speedOut)
opts.speedOut=opts.speed;
opts.slideCount=els.length;
opts.currSlide=opts.lastSlide=first;
if(opts.random){
if(++opts.randomIndex==els.length)
opts.randomIndex=0;
opts.nextSlide=opts.randomMap[opts.randomIndex];
}
else if(opts.backwards)
opts.nextSlide=opts.startingSlide==0 ? (els.length-1):opts.startingSlide-1;
else
opts.nextSlide=opts.startingSlide >=(els.length-1) ? 0:opts.startingSlide+1;
if(!opts.multiFx){
var init=$.fn.cycle.transitions[opts.fx];
if($.isFunction(init))
init($cont, $slides, opts);
else if(opts.fx!='custom'&&!opts.multiFx){
log('unknown transition: ' + opts.fx,'; slideshow terminating');
return false;
}}
var e0=$slides[first];
if(opts.before.length)
opts.before[0].apply(e0, [e0, e0, opts, true]);
if(opts.after.length)
opts.after[0].apply(e0, [e0, e0, opts, true]);
if(opts.next)
$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1)});
if(opts.prev)
$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0)});
if(opts.pager||opts.pagerAnchorBuilder)
buildPager(els,opts);
exposeAddSlide(opts, els);
return opts;
};
function saveOriginalOpts(opts){
opts.original={ before: [], after: [] };
opts.original.cssBefore=$.extend({}, opts.cssBefore);
opts.original.cssAfter=$.extend({}, opts.cssAfter);
opts.original.animIn=$.extend({}, opts.animIn);
opts.original.animOut=$.extend({}, opts.animOut);
$.each(opts.before, function(){ opts.original.before.push(this); });
$.each(opts.after,  function(){ opts.original.after.push(this); });
};
function supportMultiTransitions(opts){
var i, tx, txs=$.fn.cycle.transitions;
if(opts.fx.indexOf(',') > 0){
opts.multiFx=true;
opts.fxs=opts.fx.replace(/\s*/g,'').split(',');
for (i=0; i < opts.fxs.length; i++){
var fx=opts.fxs[i];
tx=txs[fx];
if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){
log('discarding unknown transition: ',fx);
opts.fxs.splice(i,1);
i--;
}}
if(!opts.fxs.length){
log('No valid transitions named; slideshow terminating.');
return false;
}}
else if(opts.fx=='all'){
opts.multiFx=true;
opts.fxs=[];
for (p in txs){
tx=txs[p];
if(txs.hasOwnProperty(p)&&$.isFunction(tx))
opts.fxs.push(p);
}}
if(opts.multiFx&&opts.randomizeEffects){
var r1=Math.floor(Math.random() * 20) + 30;
for (i=0; i < r1; i++){
var r2=Math.floor(Math.random() * opts.fxs.length);
opts.fxs.push(opts.fxs.splice(r2,1)[0]);
}
debug('randomized fx sequence: ',opts.fxs);
}
return true;
};
function exposeAddSlide(opts, els){
opts.addSlide=function(newSlide, prepend){
var $s=$(newSlide), s=$s[0];
if(!opts.autostopCount)
opts.countdown++;
els[prepend?'unshift':'push'](s);
if(opts.els)
opts.els[prepend?'unshift':'push'](s);
opts.slideCount=els.length;
$s.css('position','absolute');
$s[prepend?'prependTo':'appendTo'](opts.$cont);
if(prepend){
opts.currSlide++;
opts.nextSlide++;
}
if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)
clearTypeFix($s);
if(opts.fit&&opts.width)
$s.width(opts.width);
if(opts.fit&&opts.height&&opts.height!='auto')
$s.height(opts.height);
s.cycleH=(opts.fit&&opts.height) ? opts.height:$s.height();
s.cycleW=(opts.fit&&opts.width) ? opts.width:$s.width();
$s.css(opts.cssBefore);
if(opts.pager||opts.pagerAnchorBuilder)
$.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
if($.isFunction(opts.onAddSlide))
opts.onAddSlide($s);
else
$s.hide();
};}
$.fn.cycle.resetState=function(opts, fx){
fx=fx||opts.fx;
opts.before=[]; opts.after=[];
opts.cssBefore=$.extend({}, opts.original.cssBefore);
opts.cssAfter=$.extend({}, opts.original.cssAfter);
opts.animIn=$.extend({}, opts.original.animIn);
opts.animOut=$.extend({}, opts.original.animOut);
opts.fxFn=null;
$.each(opts.original.before, function(){ opts.before.push(this); });
$.each(opts.original.after,  function(){ opts.after.push(this); });
var init=$.fn.cycle.transitions[fx];
if($.isFunction(init))
init(opts.$cont, $(opts.elements), opts);
};
function go(els, opts, manual, fwd){
if(manual&&opts.busy&&opts.manualTrump){
debug('manualTrump in go(), stopping active transition');
$(els).stop(true,true);
opts.busy=0;
}
if(opts.busy){
debug('transition active, ignoring new tx request');
return;
}
var p=opts.$cont[0], curr=els[opts.currSlide], next=els[opts.nextSlide];
if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual)
return;
if(!manual&&!p.cyclePause&&!opts.bounce &&
((opts.autostop&&(--opts.countdown <=0)) ||
(opts.nowrap&&!opts.random&&opts.nextSlide < opts.currSlide))){
if(opts.end)
opts.end(opts);
return;
}
var changed=false;
if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){
changed=true;
var fx=opts.fx;
curr.cycleH=curr.cycleH||$(curr).height();
curr.cycleW=curr.cycleW||$(curr).width();
next.cycleH=next.cycleH||$(next).height();
next.cycleW=next.cycleW||$(next).width();
if(opts.multiFx){
if(opts.lastFx==undefined||++opts.lastFx >=opts.fxs.length)
opts.lastFx=0;
fx=opts.fxs[opts.lastFx];
opts.currFx=fx;
}
if(opts.oneTimeFx){
fx=opts.oneTimeFx;
opts.oneTimeFx=null;
}
$.fn.cycle.resetState(opts, fx);
if(opts.before.length)
$.each(opts.before, function(i,o){
if(p.cycleStop!=opts.stopCount) return;
o.apply(next, [curr, next, opts, fwd]);
});
var after=function(){
opts.busy=0;
$.each(opts.after, function(i,o){
if(p.cycleStop!=opts.stopCount) return;
o.apply(next, [curr, next, opts, fwd]);
});
};
debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
opts.busy=1;
if(opts.fxFn)
opts.fxFn(curr, next, opts, after, fwd, manual&&opts.fastOnEvent);
else if($.isFunction($.fn.cycle[opts.fx]))
$.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual&&opts.fastOnEvent);
else
$.fn.cycle.custom(curr, next, opts, after, fwd, manual&&opts.fastOnEvent);
}
if(changed||opts.nextSlide==opts.currSlide){
opts.lastSlide=opts.currSlide;
if(opts.random){
opts.currSlide=opts.nextSlide;
if(++opts.randomIndex==els.length)
opts.randomIndex=0;
opts.nextSlide=opts.randomMap[opts.randomIndex];
if(opts.nextSlide==opts.currSlide)
opts.nextSlide=(opts.currSlide==opts.slideCount - 1) ? 0:opts.currSlide + 1;
}
else if(opts.backwards){
var roll=(opts.nextSlide - 1) < 0;
if(roll&&opts.bounce){
opts.backwards = !opts.backwards;
opts.nextSlide=1;
opts.currSlide=0;
}else{
opts.nextSlide=roll ? (els.length-1):opts.nextSlide-1;
opts.currSlide=roll ? 0:opts.nextSlide+1;
}}else{
var roll=(opts.nextSlide + 1)==els.length;
if(roll&&opts.bounce){
opts.backwards = !opts.backwards;
opts.nextSlide=els.length-2;
opts.currSlide=els.length-1;
}else{
opts.nextSlide=roll ? 0:opts.nextSlide+1;
opts.currSlide=roll ? els.length-1:opts.nextSlide-1;
}}
}
if(changed&&opts.pager)
opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
var ms=0;
if(opts.timeout&&!opts.continuous)
ms=getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
else if(opts.continuous&&p.cyclePause)
ms=10;
if(ms > 0)
p.cycleTimeout=setTimeout(function(){ go(els, opts, 0, !opts.backwards) }, ms);
};
$.fn.cycle.updateActivePagerLink=function(pager, currSlide, clsName){
$(pager).each(function(){
$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
});
};
function getTimeout(curr, next, opts, fwd){
if(opts.timeoutFn){
var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);
while (opts.fx!='none'&&(t - opts.speed) < 250)
t +=opts.speed;
debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
if(t!==false)
return t;
}
return opts.timeout;
};
$.fn.cycle.next=function(opts){ advance(opts,1); };
$.fn.cycle.prev=function(opts){ advance(opts,0);};
function advance(opts, moveForward){
var val=moveForward ? 1:-1;
var els=opts.elements;
var p=opts.$cont[0], timeout=p.cycleTimeout;
if(timeout){
clearTimeout(timeout);
p.cycleTimeout=0;
}
if(opts.random&&val < 0){
opts.randomIndex--;
if(--opts.randomIndex==-2)
opts.randomIndex=els.length-2;
else if(opts.randomIndex==-1)
opts.randomIndex=els.length-1;
opts.nextSlide=opts.randomMap[opts.randomIndex];
}
else if(opts.random){
opts.nextSlide=opts.randomMap[opts.randomIndex];
}else{
opts.nextSlide=opts.currSlide + val;
if(opts.nextSlide < 0){
if(opts.nowrap) return false;
opts.nextSlide=els.length - 1;
}
else if(opts.nextSlide >=els.length){
if(opts.nowrap) return false;
opts.nextSlide=0;
}}
var cb=opts.onPrevNextEvent||opts.prevNextClick;
if($.isFunction(cb))
cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
go(els, opts, 1, moveForward);
return false;
};
function buildPager(els, opts){
var $p=$(opts.pager);
$.each(els, function(i,o){
$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
});
opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
};
$.fn.cycle.createPagerAnchor=function(i, el, $p, els, opts){
var a;
if($.isFunction(opts.pagerAnchorBuilder)){
a=opts.pagerAnchorBuilder(i,el);
debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
}
else
a='<a href="#">'+(i+1)+'</a>';
if(!a)
return;
var $a=$(a);
if($a.parents('body').length===0){
var arr=[];
if($p.length > 1){
$p.each(function(){
var $clone=$a.clone(true);
$(this).append($clone);
arr.push($clone[0]);
});
$a=$(arr);
}else{
$a.appendTo($p);
}}
opts.pagerAnchors=opts.pagerAnchors||[];
opts.pagerAnchors.push($a);
$a.bind(opts.pagerEvent, function(e){
e.preventDefault();
opts.nextSlide=i;
var p=opts.$cont[0], timeout=p.cycleTimeout;
if(timeout){
clearTimeout(timeout);
p.cycleTimeout=0;
}
var cb=opts.onPagerEvent||opts.pagerClick;
if($.isFunction(cb))
cb(opts.nextSlide, els[opts.nextSlide]);
go(els,opts,1,opts.currSlide < i);
});
if(! /^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble)
$a.bind('click.cycle', function(){return false;});
if(opts.pauseOnPagerHover)
$a.hover(function(){ opts.$cont[0].cyclePause++; }, function(){ opts.$cont[0].cyclePause--; });
};
$.fn.cycle.hopsFromLast=function(opts, fwd){
var hops, l=opts.lastSlide, c=opts.currSlide;
if(fwd)
hops=c > l ? c - l:opts.slideCount - l;
else
hops=c < l ? l - c:l + opts.slideCount - c;
return hops;
};
function clearTypeFix($slides){
debug('applying clearType background-color hack');
function hex(s){
s=parseInt(s).toString(16);
return s.length < 2 ? '0'+s:s;
};
function getBg(e){
for(; e&&e.nodeName.toLowerCase()!='html'; e=e.parentNode){
var v=$.css(e,'background-color');
if(v&&v.indexOf('rgb') >=0){
var rgb=v.match(/\d+/g);
return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
}
if(v&&v!='transparent')
return v;
}
return '#ffffff';
};
$slides.each(function(){ $(this).css('background-color', getBg(this)); });
};
$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){
$(opts.elements).not(curr).hide();
if(typeof opts.cssBefore.opacity=='undefined')
opts.cssBefore.opacity=1;
opts.cssBefore.display='block';
if(opts.slideResize&&w!==false&&next.cycleW > 0)
opts.cssBefore.width=next.cycleW;
if(opts.slideResize&&h!==false&&next.cycleH > 0)
opts.cssBefore.height=next.cycleH;
opts.cssAfter=opts.cssAfter||{};
opts.cssAfter.display='none';
$(curr).css('zIndex',opts.slideCount + (rev===true ? 1:0));
$(next).css('zIndex',opts.slideCount + (rev===true ? 0:1));
};
$.fn.cycle.custom=function(curr, next, opts, cb, fwd, speedOverride){
var $l=$(curr), $n=$(next);
var speedIn=opts.speedIn, speedOut=opts.speedOut, easeIn=opts.easeIn, easeOut=opts.easeOut;
$n.css(opts.cssBefore);
if(speedOverride){
if(typeof speedOverride=='number')
speedIn=speedOut=speedOverride;
else
speedIn=speedOut=1;
easeIn=easeOut=null;
}
var fn=function(){
$n.animate(opts.animIn, speedIn, easeIn, function(){
cb();
});
};
$l.animate(opts.animOut, speedOut, easeOut, function(){
$l.css(opts.cssAfter);
if(!opts.sync)
fn();
});
if(opts.sync) fn();
};
$.fn.cycle.transitions={
fade: function($cont, $slides, opts){
$slides.not(':eq('+opts.currSlide+')').css('opacity',0);
opts.before.push(function(curr,next,opts){
$.fn.cycle.commonReset(curr,next,opts);
opts.cssBefore.opacity=0;
});
opts.animIn={ opacity: 1 };
opts.animOut={ opacity: 0 };
opts.cssBefore={ top: 0, left: 0 };}};
$.fn.cycle.ver=function(){ return ver; };
$.fn.cycle.defaults={
activePagerClass: 'activeSlide',
after:       null,
allowPagerClickBubble: false,
animIn:      null,
animOut:     null,
autostop:    0,
autostopCount: 0,
backwards:     false,
before:      null,
cleartype:     !$.support.opacity,
cleartypeNoBg: false,
containerResize: 1,
continuous:    0,
cssAfter:    null,
cssBefore:     null,
delay:       0,
easeIn:      null,
easeOut:     null,
easing:      null,
end:       null,
fastOnEvent:   0,
fit:       0,
fx:       'fade',
fxFn:      null,
height:     'auto',
manualTrump:   true,
next:      null,
nowrap:      0,
onPagerEvent:  null,
onPrevNextEvent: null,
pager:       null,
pagerAnchorBuilder: null,
pagerEvent:   'click.cycle',
pause:       0,
pauseOnPagerHover: 0,
prev:      null,
prevNextEvent:'click.cycle',
random:      0,
randomizeEffects: 1,
requeueOnImageNotLoaded: true,
requeueTimeout: 250,
rev:       0,
shuffle:     null,
slideExpr:     null,
slideResize:   1,
speed:       1000,
speedIn:     null,
speedOut:    null,
startingSlide: 0,
sync:      1,
timeout:     4000,
timeoutFn:     null,
updateActivePagerLink: null
};})(jQuery);
(function($){
$.fn.cycle.transitions.none=function($cont, $slides, opts){
opts.fxFn=function(curr,next,opts,after){
$(next).show();
$(curr).hide();
after();
};};
$.fn.cycle.transitions.fadeout=function($cont, $slides, opts){
$slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 });
opts.before.push(function(curr,next,opts,w,h,rev){
$(curr).css('zIndex',opts.slideCount + (!rev===true ? 1:0));
$(next).css('zIndex',opts.slideCount + (!rev===true ? 0:1));
});
opts.animIn.opacity=1;
opts.animOut.opacity=0;
opts.cssBefore.opacity=1;
opts.cssBefore.display='block';
opts.cssAfter.zIndex=0;
};
$.fn.cycle.transitions.scrollUp=function($cont, $slides, opts){
$cont.css('overflow','hidden');
opts.before.push($.fn.cycle.commonReset);
var h=$cont.height();
opts.cssBefore.top=h;
opts.cssBefore.left=0;
opts.cssFirst.top=0;
opts.animIn.top=0;
opts.animOut.top=-h;
};
$.fn.cycle.transitions.scrollDown=function($cont, $slides, opts){
$cont.css('overflow','hidden');
opts.before.push($.fn.cycle.commonReset);
var h=$cont.height();
opts.cssFirst.top=0;
opts.cssBefore.top=-h;
opts.cssBefore.left=0;
opts.animIn.top=0;
opts.animOut.top=h;
};
$.fn.cycle.transitions.scrollLeft=function($cont, $slides, opts){
$cont.css('overflow','hidden');
opts.before.push($.fn.cycle.commonReset);
var w=$cont.width();
opts.cssFirst.left=0;
opts.cssBefore.left=w;
opts.cssBefore.top=0;
opts.animIn.left=0;
opts.animOut.left=0-w;
};
$.fn.cycle.transitions.scrollRight=function($cont, $slides, opts){
$cont.css('overflow','hidden');
opts.before.push($.fn.cycle.commonReset);
var w=$cont.width();
opts.cssFirst.left=0;
opts.cssBefore.left=-w;
opts.cssBefore.top=0;
opts.animIn.left=0;
opts.animOut.left=w;
};
$.fn.cycle.transitions.scrollHorz=function($cont, $slides, opts){
$cont.css('overflow','hidden').width();
opts.before.push(function(curr, next, opts, fwd){
if(opts.rev)
fwd = !fwd;
$.fn.cycle.commonReset(curr,next,opts);
opts.cssBefore.left=fwd ? (next.cycleW-1):(1-next.cycleW);
opts.animOut.left=fwd ? -curr.cycleW:curr.cycleW;
});
opts.cssFirst.left=0;
opts.cssBefore.top=0;
opts.animIn.left=0;
opts.animOut.top=0;
};
$.fn.cycle.transitions.scrollVert=function($cont, $slides, opts){
$cont.css('overflow','hidden');
opts.before.push(function(curr, next, opts, fwd){
if(opts.rev)
fwd = !fwd;
$.fn.cycle.commonReset(curr,next,opts);
opts.cssBefore.top=fwd ? (1-next.cycleH):(next.cycleH-1);
opts.animOut.top=fwd ? curr.cycleH:-curr.cycleH;
});
opts.cssFirst.top=0;
opts.cssBefore.left=0;
opts.animIn.top=0;
opts.animOut.left=0;
};
$.fn.cycle.transitions.slideX=function($cont, $slides, opts){
opts.before.push(function(curr, next, opts){
$(opts.elements).not(curr).hide();
$.fn.cycle.commonReset(curr,next,opts,false,true);
opts.animIn.width=next.cycleW;
});
opts.cssBefore.left=0;
opts.cssBefore.top=0;
opts.cssBefore.width=0;
opts.animIn.width='show';
opts.animOut.width=0;
};
$.fn.cycle.transitions.slideY=function($cont, $slides, opts){
opts.before.push(function(curr, next, opts){
$(opts.elements).not(curr).hide();
$.fn.cycle.commonReset(curr,next,opts,true,false);
opts.animIn.height=next.cycleH;
});
opts.cssBefore.left=0;
opts.cssBefore.top=0;
opts.cssBefore.height=0;
opts.animIn.height='show';
opts.animOut.height=0;
};
$.fn.cycle.transitions.shuffle=function($cont, $slides, opts){
var i, w=$cont.css('overflow', 'visible').width();
$slides.css({left: 0, top: 0});
opts.before.push(function(curr,next,opts){
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
});
if(!opts.speedAdjusted){
opts.speed=opts.speed / 2;
opts.speedAdjusted=true;
}
opts.random=0;
opts.shuffle=opts.shuffle||{left:-w, top:15};
opts.els=[];
for (i=0; i < $slides.length; i++)
opts.els.push($slides[i]);
for (i=0; i < opts.currSlide; i++)
opts.els.push(opts.els.shift());
opts.fxFn=function(curr, next, opts, cb, fwd){
if(opts.rev)
fwd = !fwd;
var $el=fwd ? $(curr):$(next);
$(next).css(opts.cssBefore);
var count=opts.slideCount;
$el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function(){
var hops=$.fn.cycle.hopsFromLast(opts, fwd);
for (var k=0; k < hops; k++)
fwd ? opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());
if(fwd){
for (var i=0, len=opts.els.length; i < len; i++)
$(opts.els[i]).css('z-index', len-i+count);
}else{
var z=$(curr).css('z-index');
$el.css('z-index', parseInt(z)+1+count);
}
$el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function(){
$(fwd ? this:curr).hide();
if(cb) cb();
});
});
};
$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
};
$.fn.cycle.transitions.turnUp=function($cont, $slides, opts){
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts,true,false);
opts.cssBefore.top=next.cycleH;
opts.animIn.height=next.cycleH;
opts.animOut.width=next.cycleW;
});
opts.cssFirst.top=0;
opts.cssBefore.left=0;
opts.cssBefore.height=0;
opts.animIn.top=0;
opts.animOut.height=0;
};
$.fn.cycle.transitions.turnDown=function($cont, $slides, opts){
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts,true,false);
opts.animIn.height=next.cycleH;
opts.animOut.top=curr.cycleH;
});
opts.cssFirst.top=0;
opts.cssBefore.left=0;
opts.cssBefore.top=0;
opts.cssBefore.height=0;
opts.animOut.height=0;
};
$.fn.cycle.transitions.turnLeft=function($cont, $slides, opts){
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts,false,true);
opts.cssBefore.left=next.cycleW;
opts.animIn.width=next.cycleW;
});
opts.cssBefore.top=0;
opts.cssBefore.width=0;
opts.animIn.left=0;
opts.animOut.width=0;
};
$.fn.cycle.transitions.turnRight=function($cont, $slides, opts){
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts,false,true);
opts.animIn.width=next.cycleW;
opts.animOut.left=curr.cycleW;
});
$.extend(opts.cssBefore, { top: 0, left: 0, width: 0 });
opts.animIn.left=0;
opts.animOut.width=0;
};
$.fn.cycle.transitions.zoom=function($cont, $slides, opts){
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts,false,false,true);
opts.cssBefore.top=next.cycleH/2;
opts.cssBefore.left=next.cycleW/2;
$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
$.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 });
});
opts.cssFirst.top=0;
opts.cssFirst.left=0;
opts.cssBefore.width=0;
opts.cssBefore.height=0;
};
$.fn.cycle.transitions.fadeZoom=function($cont, $slides, opts){
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts,false,false);
opts.cssBefore.left=next.cycleW/2;
opts.cssBefore.top=next.cycleH/2;
$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
});
opts.cssBefore.width=0;
opts.cssBefore.height=0;
opts.animOut.opacity=0;
};
$.fn.cycle.transitions.blindX=function($cont, $slides, opts){
var w=$cont.css('overflow','hidden').width();
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts);
opts.animIn.width=next.cycleW;
opts.animOut.left=curr.cycleW;
});
opts.cssBefore.left=w;
opts.cssBefore.top=0;
opts.animIn.left=0;
opts.animOut.left=w;
};
$.fn.cycle.transitions.blindY=function($cont, $slides, opts){
var h=$cont.css('overflow','hidden').height();
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts);
opts.animIn.height=next.cycleH;
opts.animOut.top=curr.cycleH;
});
opts.cssBefore.top=h;
opts.cssBefore.left=0;
opts.animIn.top=0;
opts.animOut.top=h;
};
$.fn.cycle.transitions.blindZ=function($cont, $slides, opts){
var h=$cont.css('overflow','hidden').height();
var w=$cont.width();
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts);
opts.animIn.height=next.cycleH;
opts.animOut.top=curr.cycleH;
});
opts.cssBefore.top=h;
opts.cssBefore.left=w;
opts.animIn.top=0;
opts.animIn.left=0;
opts.animOut.top=h;
opts.animOut.left=w;
};
$.fn.cycle.transitions.growX=function($cont, $slides, opts){
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts,false,true);
opts.cssBefore.left=this.cycleW/2;
opts.animIn.left=0;
opts.animIn.width=this.cycleW;
opts.animOut.left=0;
});
opts.cssBefore.top=0;
opts.cssBefore.width=0;
};
$.fn.cycle.transitions.growY=function($cont, $slides, opts){
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts,true,false);
opts.cssBefore.top=this.cycleH/2;
opts.animIn.top=0;
opts.animIn.height=this.cycleH;
opts.animOut.top=0;
});
opts.cssBefore.height=0;
opts.cssBefore.left=0;
};
$.fn.cycle.transitions.curtainX=function($cont, $slides, opts){
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts,false,true,true);
opts.cssBefore.left=next.cycleW/2;
opts.animIn.left=0;
opts.animIn.width=this.cycleW;
opts.animOut.left=curr.cycleW/2;
opts.animOut.width=0;
});
opts.cssBefore.top=0;
opts.cssBefore.width=0;
};
$.fn.cycle.transitions.curtainY=function($cont, $slides, opts){
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts,true,false,true);
opts.cssBefore.top=next.cycleH/2;
opts.animIn.top=0;
opts.animIn.height=next.cycleH;
opts.animOut.top=curr.cycleH/2;
opts.animOut.height=0;
});
opts.cssBefore.height=0;
opts.cssBefore.left=0;
};
$.fn.cycle.transitions.cover=function($cont, $slides, opts){
var d=opts.direction||'left';
var w=$cont.css('overflow','hidden').width();
var h=$cont.height();
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts);
if(d=='right')
opts.cssBefore.left=-w;
else if(d=='up')
opts.cssBefore.top=h;
else if(d=='down')
opts.cssBefore.top=-h;
else
opts.cssBefore.left=w;
});
opts.animIn.left=0;
opts.animIn.top=0;
opts.cssBefore.top=0;
opts.cssBefore.left=0;
};
$.fn.cycle.transitions.uncover=function($cont, $slides, opts){
var d=opts.direction||'left';
var w=$cont.css('overflow','hidden').width();
var h=$cont.height();
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
if(d=='right')
opts.animOut.left=w;
else if(d=='up')
opts.animOut.top=-h;
else if(d=='down')
opts.animOut.top=h;
else
opts.animOut.left=-w;
});
opts.animIn.left=0;
opts.animIn.top=0;
opts.cssBefore.top=0;
opts.cssBefore.left=0;
};
$.fn.cycle.transitions.toss=function($cont, $slides, opts){
var w=$cont.css('overflow','visible').width();
var h=$cont.height();
opts.before.push(function(curr, next, opts){
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
if(!opts.animOut.left&&!opts.animOut.top)
$.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 });
else
opts.animOut.opacity=0;
});
opts.cssBefore.left=0;
opts.cssBefore.top=0;
opts.animIn.left=0;
};
$.fn.cycle.transitions.wipe=function($cont, $slides, opts){
var w=$cont.css('overflow','hidden').width();
var h=$cont.height();
opts.cssBefore=opts.cssBefore||{};
var clip;
if(opts.clip){
if(/l2r/.test(opts.clip))
clip='rect(0px 0px '+h+'px 0px)';
else if(/r2l/.test(opts.clip))
clip='rect(0px '+w+'px '+h+'px '+w+'px)';
else if(/t2b/.test(opts.clip))
clip='rect(0px '+w+'px 0px 0px)';
else if(/b2t/.test(opts.clip))
clip='rect('+h+'px '+w+'px '+h+'px 0px)';
else if(/zoom/.test(opts.clip)){
var top=parseInt(h/2);
var left=parseInt(w/2);
clip='rect('+top+'px '+left+'px '+top+'px '+left+'px)';
}}
opts.cssBefore.clip=opts.cssBefore.clip||clip||'rect(0px 0px 0px 0px)';
var d=opts.cssBefore.clip.match(/(\d+)/g);
var t=parseInt(d[0]), r=parseInt(d[1]), b=parseInt(d[2]), l=parseInt(d[3]);
opts.before.push(function(curr, next, opts){
if(curr==next) return;
var $curr=$(curr), $next=$(next);
$.fn.cycle.commonReset(curr,next,opts,true,true,false);
opts.cssAfter.display='block';
var step=1, count=parseInt((opts.speedIn / 13)) - 1;
(function f(){
var tt=t ? t - parseInt(step * (t/count)):0;
var ll=l ? l - parseInt(step * (l/count)):0;
var bb=b < h ? b + parseInt(step * ((h-b)/count||1)):h;
var rr=r < w ? r + parseInt(step * ((w-r)/count||1)):w;
$next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
(step++ <=count) ? setTimeout(f, 13):$curr.css('display', 'none');
})();
});
$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
opts.animIn={ left: 0 };
opts.animOut={ left: 0 };};
})(jQuery);
if(typeof tb_pathToImage!='string'){
var tb_pathToImage=thickboxL10n.loadingAnimation;
}
jQuery(document).ready(function(){
tb_init('a.thickbox, area.thickbox, input.thickbox');
imgLoader=new Image();
imgLoader.src=tb_pathToImage;
});
function tb_init(domChunk){
jQuery('body')
.on('click', domChunk, tb_click)
.on('thickbox:iframe:loaded', function(){
jQuery('#TB_window').removeClass('thickbox-loading');
});
}
function tb_click(){
var t=this.title||this.name||null;
var a=this.href||this.alt;
var g=this.rel||false;
tb_show(t,a,g);
this.blur();
return false;
}
function tb_show(caption, url, imageGroup){
var $closeBtn;
try {
if(typeof document.body.style.maxHeight==="undefined"){
jQuery("body","html").css({height: "100%", width: "100%"});
jQuery("html").css("overflow","hidden");
if(document.getElementById("TB_HideSelect")===null){
jQuery("body").append("<iframe id='TB_HideSelect'>"+thickboxL10n.noiframes+"</iframe><div id='TB_overlay'></div><div id='TB_window' class='thickbox-loading'></div>");
jQuery("#TB_overlay").on('click', tb_remove);
}}else{
if(document.getElementById("TB_overlay")===null){
jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window' class='thickbox-loading'></div>");
jQuery("#TB_overlay").on('click', tb_remove);
jQuery('body').addClass('modal-open');
}}
if(tb_detectMacXFF()){
jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack");
}else{
jQuery("#TB_overlay").addClass("TB_overlayBG");
}
if(caption===null){caption="";}
jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' width='208' /></div>");
jQuery('#TB_load').show();
var baseURL;
if(url.indexOf("?")!==-1){
baseURL=url.substr(0, url.indexOf("?"));
}else{
baseURL=url;
}
var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$|\.webp$|\.avif$/;
var urlType=baseURL.toLowerCase().match(urlString);
if(urlType=='.jpg' ||
urlType=='.jpeg' ||
urlType=='.png' ||
urlType=='.gif' ||
urlType=='.bmp' ||
urlType=='.webp' ||
urlType=='.avif'
){
TB_PrevCaption="";
TB_PrevURL="";
TB_PrevHTML="";
TB_NextCaption="";
TB_NextURL="";
TB_NextHTML="";
TB_imageCount="";
TB_FoundURL=false;
if(imageGroup){
TB_TempArray=jQuery("a[rel="+imageGroup+"]").get();
for (TB_Counter=0; ((TB_Counter < TB_TempArray.length)&&(TB_NextHTML==="")); TB_Counter++){
var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
if(!(TB_TempArray[TB_Counter].href==url)){
if(TB_FoundURL){
TB_NextCaption=TB_TempArray[TB_Counter].title;
TB_NextURL=TB_TempArray[TB_Counter].href;
TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>"+thickboxL10n.next+"</a></span>";
}else{
TB_PrevCaption=TB_TempArray[TB_Counter].title;
TB_PrevURL=TB_TempArray[TB_Counter].href;
TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>"+thickboxL10n.prev+"</a></span>";
}}else{
TB_FoundURL=true;
TB_imageCount=thickboxL10n.image + ' ' + (TB_Counter + 1) + ' ' + thickboxL10n.of + ' ' + (TB_TempArray.length);
}}
}
imgPreloader=new Image();
imgPreloader.onload=function(){
imgPreloader.onload=null;
var pagesize=tb_getPageSize();
var x=pagesize[0] - 150;
var y=pagesize[1] - 150;
var imageWidth=imgPreloader.width;
var imageHeight=imgPreloader.height;
if(imageWidth > x){
imageHeight=imageHeight * (x / imageWidth);
imageWidth=x;
if(imageHeight > y){
imageWidth=imageWidth * (y / imageHeight);
imageHeight=y;
}}else if(imageHeight > y){
imageWidth=imageWidth * (y / imageHeight);
imageHeight=y;
if(imageWidth > x){
imageHeight=imageHeight * (x / imageWidth);
imageWidth=x;
}}
TB_WIDTH=imageWidth + 30;
TB_HEIGHT=imageHeight + 60;
jQuery("#TB_window").append("<a href='' id='TB_ImageOff'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon' aria-hidden='true'></span></button></div>");
jQuery("#TB_closeWindowButton").on('click', tb_remove);
if(!(TB_PrevHTML==="")){
function goPrev(){
if(jQuery(document).off("click",goPrev)){jQuery(document).off("click",goPrev);}
jQuery("#TB_window").remove();
jQuery("body").append("<div id='TB_window'></div>");
tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
return false;
}
jQuery("#TB_prev").on('click', goPrev);
}
if(!(TB_NextHTML==="")){
function goNext(){
jQuery("#TB_window").remove();
jQuery("body").append("<div id='TB_window'></div>");
tb_show(TB_NextCaption, TB_NextURL, imageGroup);
return false;
}
jQuery("#TB_next").on('click', goNext);
}
jQuery(document).on('keydown.thickbox', function(e){
if(e.which==27){
tb_remove();
}else if(e.which==190){
if(!(TB_NextHTML=="")){
jQuery(document).off('thickbox');
goNext();
}}else if(e.which==188){
if(!(TB_PrevHTML=="")){
jQuery(document).off('thickbox');
goPrev();
}}
return false;
});
tb_position();
jQuery("#TB_load").remove();
jQuery("#TB_ImageOff").on('click', tb_remove);
jQuery("#TB_window").css({'visibility':'visible'});
};
imgPreloader.src=url;
}else{
var queryString=url.replace(/^[^\?]+\??/,'');
var params=tb_parseQuery(queryString);
TB_WIDTH=(params['width']*1) + 30||630;
TB_HEIGHT=(params['height']*1) + 40||440;
ajaxContentW=TB_WIDTH - 30;
ajaxContentH=TB_HEIGHT - 45;
if(url.indexOf('TB_iframe')!=-1){
urlNoQuery=url.split('TB_');
jQuery("#TB_iframeContent").remove();
if(params['modal']!="true"){
jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon' aria-hidden='true'></span></button></div></div><iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>");
}else{
jQuery("#TB_overlay").off();
jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'>"+thickboxL10n.noiframes+"</iframe>");
}}else{
if(jQuery("#TB_window").css("visibility")!="visible"){
if(params['modal']!="true"){
jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon' aria-hidden='true'></span></button></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
}else{
jQuery("#TB_overlay").off();
jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
}}else{
jQuery("#TB_ajaxContent")[0].style.width=ajaxContentW +"px";
jQuery("#TB_ajaxContent")[0].style.height=ajaxContentH +"px";
jQuery("#TB_ajaxContent")[0].scrollTop=0;
jQuery("#TB_ajaxWindowTitle").html(caption);
}}
jQuery("#TB_closeWindowButton").on('click', tb_remove);
if(url.indexOf('TB_inline')!=-1){
jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children());
jQuery("#TB_window").on('tb_unload', function (){
jQuery('#' + params['inlineId']).append(jQuery("#TB_ajaxContent").children());
});
tb_position();
jQuery("#TB_load").remove();
jQuery("#TB_window").css({'visibility':'visible'});
}else if(url.indexOf('TB_iframe')!=-1){
tb_position();
jQuery("#TB_load").remove();
jQuery("#TB_window").css({'visibility':'visible'});
}else{
var load_url=url;
load_url +=-1===url.indexOf('?') ? '?':'&';
jQuery("#TB_ajaxContent").load(load_url +="random=" + (new Date().getTime()),function(){
tb_position();
jQuery("#TB_load").remove();
tb_init("#TB_ajaxContent a.thickbox");
jQuery("#TB_window").css({'visibility':'visible'});
});
}}
if(!params['modal']){
jQuery(document).on('keydown.thickbox', function(e){
if(e.which==27){
tb_remove();
return false;
}});
}
$closeBtn=jQuery('#TB_closeWindowButton');
if($closeBtn.find('.tb-close-icon').is(':visible')){
$closeBtn.trigger('focus');
}} catch(e){
}}
function tb_showIframe(){
jQuery("#TB_load").remove();
jQuery("#TB_window").css({'visibility':'visible'}).trigger('thickbox:iframe:loaded');
}
function tb_remove(){
jQuery("#TB_imageOff").off("click");
jQuery("#TB_closeWindowButton").off("click");
jQuery('#TB_window').fadeOut('fast', function(){
jQuery('#TB_window, #TB_overlay, #TB_HideSelect').trigger('tb_unload').off().remove();
jQuery('body').trigger('thickbox:removed');
});
jQuery('body').removeClass('modal-open');
jQuery("#TB_load").remove();
if(typeof document.body.style.maxHeight=="undefined"){
jQuery("body","html").css({height: "auto", width: "auto"});
jQuery("html").css("overflow","");
}
jQuery(document).off('.thickbox');
return false;
}
function tb_position(){
var isIE6=typeof document.body.style.maxHeight==="undefined";
jQuery("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
if(! isIE6){
jQuery("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
}}
function tb_parseQuery(query){
var Params={};
if(! query){return Params;}
var Pairs=query.split(/[;&]/);
for(var i=0; i < Pairs.length; i++){
var KeyVal=Pairs[i].split('=');
if(! KeyVal||KeyVal.length!=2){continue;}
var key=unescape(KeyVal[0]);
var val=unescape(KeyVal[1]);
val=val.replace(/\+/g, ' ');
Params[key]=val;
}
return Params;
}
function tb_getPageSize(){
var de=document.documentElement;
var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;
var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;
arrayPageSize=[w,h];
return arrayPageSize;
}
function tb_detectMacXFF(){
var userAgent=navigator.userAgent.toLowerCase();
if(userAgent.indexOf('mac')!=-1&&userAgent.indexOf('firefox')!=-1){
return true;
}};