window.bablic=window.bablic||{};bablic.Site='6078ee771c511c00012482b3';bablic.version=3.9;bablic.conf=[1722987448721,"en",0,0,1,1,1,1,[[0,0,0,0,"pt","Português",0,0,["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],0,0,[1,4,2,3],[],[],"pt-PT",[],{}],[0,0,0,0,"vi","Tiếng Việt",0,0,[],0,0,[1,4,2,3],[],[],"vi-VN",[],{}],[0,0,0,0,"tl","Filipino",0,0,[],0,0,[1,4,2,3],[],[],"tl-TL",[],{}],[0,0,0,0,"zh_cn","汉语",0,0,["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],0,0,[1,4,2,3],[],["*"],"zh-CN",[],{}],[0,0,0,0,"es","Español",0,0,["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],0,0,[1,4,2,3],[],[],"es",[],{}],[0,0,0,0,"ru","русский",0,0,["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"],0,0,[1,4,2,3],[],[],"ru-RU",[],{}],[0,0,0,0,"uk","українська мова",0,0,[],0,0,[1,4,2,3],[],[],"uk-UA",[],{}],[0,0,1,0,"ar","العربية",0,0,["يناير/ كانون الثاني","فبراير/ شباط","مارس/ آذار","أبريل/ نيسان","مايو/ أيار","يونيو/ حزيران","يوليو/ تموز","أغسطس/ آب","سبتمبر/ أيلول","أكتوبر/ تشرين الأول","نوفمبر/ تشرين الثاني","ديسمبر/ كانون الأول"],0,0,[1,4,2,3,5],[],[],"ar-AR",[],{}],[0,0,0,0,"ko","한국어",0,0,["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],0,0,[1,4,2,3],[],[],"ko-KR",[],{}],[0,0,0,"sferap.com/","en","English",0,0,["January","February","March","April","May","June","July","August","September","October","November","December"],0,0,[],0,0,"en",[],{"dir":"ltr","name":"English","originalName":"English","prefix":null,"iso":"en","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"days":[],"dateFormat":"","timeFormat":"","quantityFormat":"","percentFormat":"","durationFormat":""}]],[[1,0,0,3,0,0,[5,350,"px",0],["#01AEDA","#262e30","#ffffff","#262626"],0,0,0,0],[1,0,1,2,0,0,[6,20,"px",0],["#01AEDA","#262e30","#ffffff","#262626"],0,0,0,0]],1,".gm-style,.gm-sm,.pac-container","",0,0,0,1,"sferap.com/",0,{},[],[],[["sferap.com","*keepoaklandhoused.bayareacs.org","*","*koh.bayareacs.org","*hpp.bayareacs.org","*keepfremonthoused.bayareacs.org","*housing.bayareacs.org","*sfrenthelp.com","*stayhousedsf.com","*sfevictprev.com","*sferap.com"],["hpp.bayareacs.org"],["keepfremonthoused.bayareacs.org"],["keepoaklandhoused.bayareacs.org"],["sfevictprev.com"]],0,"",0,"en",1,["pt","vi","pa","pa_pk","hi","am","fr","tl","zh_cn","es","ru","uk","ar","ko"],0,[],0,1,0,3.9,["_v",1.2]];var bablic=window.bablic||window._bab||{};!function(){var loadAll=function(bablic,WIN){if(!bablic.ignoreAll){var EDITOR_FRAME,EDITOR,winObject=WIN;do{winObject=winObject.parent;try{winObject.VisualEditor&&(EDITOR=winObject.VisualEditor,EDITOR_FRAME=winObject)}catch(e){}}while(winObject.parent!==winObject);if(bablic.Mutation&&bablic.Site){bablic.isActivated=!0,console.log("Bablic already loaded");try{if(EDITOR&&EDITOR.snippetDetected)EDITOR.snippetDetected();else if(bablic.preview)var interval=setInterval(function(){for(var e,t=0;tp;p++)if(g=t[p],m=w.style[g],!!~(""+g).indexOf("-")&&(g=a(g)),w.style[g]!==n){if(u||r(c,"undefined"))return d(),"pfx"!=o||g;try{w.style[g]=c}catch(e){}if(w.style[g]!=m)return d(),"pfx"!=o||g}return d(),!1}function u(e,t,n,a,i){var l=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+y.join(l+" ")+l).split(" ");return r(t,"string")||r(t,"undefined")?c(s,t,a,i):function(e,t,n){var a;for(var i in e)if(e[i]in t)return!1===n?e[i]:r(a=t[e[i]],"function")?o(a,n||t):a;return!1}(s=(e+" "+v.join(l+" ")+l).split(" "),t,n)}function d(e,t,r){return u(e,n,n,t,r)}var b=[],f={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){b.push({name:e,fn:t,options:n})},addAsyncTest:function(e){b.push({name:null,fn:e})}},p=function(){};p.prototype=f,(p=new p).addTest("localstorage",function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}});var h=f._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];f._prefixes=h;var g=[],m="Moz O ms Webkit",v=f._config.usePrefixes?m.toLowerCase().split(" "):[];f._domPrefixes=v;var y=f._config.usePrefixes?m.split(" "):[];f._cssomPrefixes=y;var _=function(t){var r,a=h.length,i=e.CSSRule;if(void 0===i)return n;if(!t)return!1;if((r=(t=t.replace(/^@/,"")).replace(/-/g,"_").toUpperCase()+"_RULE")in i)return"@"+t;for(var o=0;a>o;o++){var l=h[o];if(l.toUpperCase()+"_"+r in i)return"@-"+l.toLowerCase()+"-"+t}return!1};f.atRule=_;var A,T=t.documentElement,L="svg"===T.nodeName.toLowerCase(),C=(A=!("onblur"in t.documentElement),function(e,t){var r;return!!e&&(t&&"string"!=typeof t||(t=i(t||"div")),!(r=(e="on"+e)in t)&&A&&(t.setAttribute||(t=i("div")),t.setAttribute(e,""),r="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),r)});f.hasEvent=C;var D=i("input"),E="autocomplete autofocus list placeholder max min multiple pattern required step".split(" "),x={};p.input=function(t){for(var n=0,r=t.length;r>n;n++)x[t[n]]=!!(t[n]in D);return x.list&&(x.list=!(!i("datalist")||!e.HTMLDataListElement)),x}(E);var N=f.testStyles=l;p.addTest("touchevents",function(){var n;if("ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch)n=!0;else{var r=["@media (",h.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");N(r,function(e){n=9===e.offsetTop})}return n});var S={elem:i("modernizr")};p._q.push(function(){delete S.elem});var w={style:S.elem.style};p._q.unshift(function(){delete w.style}),f.testAllProps=u,f.testAllProps=d,p.addTest("cssanimations",d("animationName","a",!0)),p.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&d("transform","scale(1)",!0)}),p.addTest("csstransitions",d("transition","all",!0));var O,I=f.prefixed=function(e,t,n){return 0===e.indexOf("@")?_(e):(-1!=e.indexOf("-")&&(e=a(e)),t?u(e,t,n):u(e,"pfx"))};try{O=I("indexedDB",e)}catch(e){}p.addTest("indexeddb",!!O),O&&p.addTest("indexeddb.deletedatabase","deleteDatabase"in O),function(){var e,t,n,a,i,o;for(var l in b)if(b.hasOwnProperty(l)){if(e=[],(t=b[l]).name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n-1}),String.prototype.includes||(String.prototype.includes=function(e,t){return this.indexOf(e,t)>-1});var e,t=function(){},n=typeof HTMLCollection==strundefined?t:HTMLCollection,r=typeof NodeList==strundefined?t:NodeList;e=function(t,a){if(!(this instanceof e))return new e(t,a);if(t){var i;if("string"==typeof t)i="<"==t[0]?l(t):(a||d).querySelectorAll(t);else{if(t instanceof e)return t;t===WIN||t.self&&t.self==t?i=[t]:t.nodeType?i=[t]:(Array.isArray(t)||t instanceof n||"HTMLCollection"==t.constructor.name||t instanceof r||t===d||"number"==typeof t.length)&&(i=t)}this.element=i}};var a=/^\s+/,i=/\s+$/,o=function(e){return e.trim?e.trim():e.replace(a,"").replace(i,"")};String.prototype.trim||(String.prototype.trim=function(){return this.replace(a,"").replace(i,"")});var l=function(e){return s.innerHTML=o(e),s.childNodes[0]},s=d.createElement("div"),c=function(e,t){for(var n in t)e[n]=t[n]};e.extend=function(e,t){for(var n=1;n-1){var o=e.exec(a[i].getAttribute("src"))[1];bablic.Site=o}if(!bablic.Site&&a[i].getAttribute("data-bablic")&&(bablic.Site=a[i].getAttribute("data-bablic")),!bablic.data&&a[i].getAttribute("data-bablic-m")){var l=a[i].getAttribute("data-bablic-m");if(l){l=l.replace(/[“”]/g,"").replace(/[‘’]/g,"'");try{l=JSON.parse(l.replace(/'/g,'"')),l=decodeSnippetData(l),bablic.data=l}catch(e){console.error("malformed code snippet",e)}}}var s=a[i].getAttribute("src");if(s&&/(cdn2|staging)\.bablic\.com/.test(s)){var c={};if($.each((s.split("?")[1]||"").split("&"),function(e,t){var n=t.split("="),r=decodeURIComponent(n[0]).replace("amp;","");c[r]=decodeURIComponent(n[1])}),c.site&&!bablic.Site&&(bablic.Site=c.site),!bablic.data&&c.meta)try{l=JSON.parse(c.meta.replace(/'/g,'"')),l=decodeSnippetData(l),bablic.data=l}catch(e){bablic.error(e)}}}}(),bablic.$.prototype.animate=function(e,t,n){return bablic.Modernizr.csstransitions?(this.each(function(){var r=this;r._babStop&&r._babStop();var a=Ei||(Ei=function(){if(!WIN.getComputedStyle)return{};var e=WIN.getComputedStyle(DOC.DOCElement,""),t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];return{dom:"WebKit|Moz|MS|O".match(new RegExp("("+t+")","i"))[1],lowercase:t,css:"-"+t+"-",js:t[0].toUpperCase()+t.substr(1)}}()),i=t.duration||".5s",o=Object.keys(e).map(function(e){return e+" "+i}).join(",");r._babStop=function(){clearTimeout(s),n=null,l()};var l=function(){r.style[a.lowercase+"Transition"]="",r.style.transition="",new Array("transitionEnd",a.lowercase+"TransitionEnd").forEach(function(e){$(r).off(e,l)}),delete r._babStop,n&&n(),n=null};new Array("transitionEnd",a.lowercase+"TransitionEnd").forEach(function(e){$(r).on(e,l)}),r.style[a.lowercase+"Transition"]=o,r.style.transition=o;var s=setTimeout(function(){for(var t in e)r.style[t]=e[t]},0)}),this):setTimeout(n,0)},function(){function e(e){return WIN.btoa(function(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}(function(e,a){e[a>>5]|=128<<24-a%32,e[15+(a+64>>9<<4)]=a;for(var i=Array(80),o=1732584193,l=-271733879,s=-1732584194,c=271733878,u=-1009589776,d=0;d>2),n=0;n>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}(a=function(e){var t,n,r="",a=-1;for(;++a>>6&31,128|63&t):t<=65535?r+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(r+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return r}(e||"")),8*a.length)));var a}function t(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function r(e,t){return e<>>32-t}WIN.atob||WIN.btoa||function(e){var t="=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function r(e,t){var n=e.charCodeAt(t);if(n>255)throw"INVALID_CHARACTER_ERR: DOM Exception 5";return n}WIN.btoa=function(e){if(1!==arguments.length)throw"SyntaxError: exactly one argument required";var a,i=[],o=(e=String(e)).length-e.length%3;if(!e.length)return e;for(a=0;a>18),i[i.length]=n.charAt(l>>12&63),i[i.length]=n.charAt(l>>6&63),i[i.length]=n.charAt(63&l);switch(e.length-o){case 1:l=r(e,a)<<16,i[i.length]=n.charAt(l>>18)+n.charAt(l>>12&63)+t+t;break;case 2:l=r(e,a)<<16|r(e,a+1)<<8,i[i.length]=n.charAt(l>>18)+n.charAt(l>>12&63)+n.charAt(l>>6&63)+t}for(var l=0,s=i.length,c="";l-1?"//"+i+e+".json?t="+(LDATA?LDATA.timestamp:""):"//"+a+e+".json?t="+(LDATA?LDATA.timestamp:"")},fetchFromCDN=function(e,t){var n=getPageTranslationURL(e);ajaxGet(n,null,function(e){t(null,e)},function(e){t(e)})};var o=function(e,t,r,a,i,l,s){a=a||function(){n.log("bablic POST success")},i=i||function(e){n.log("bablic POST request failed "+e.responseText||e)},s=s||0;var c=t.indexOf("//")>-1,u=t.indexOf("?")>-1?"&":"?",d=l?"https:":"";if(WIN.XDomainRequest){if(!WIN.JSON)return i("not supported");var b=new XDomainRequest;l&&!parent.SESSION_KEY&&(b.withCredentials="true"),b.open(e,c?t:(n.preview?editorPath:d+root_path)+t+u+build_query_string()),b.onload=function(){setTimeout(function(){if("application/json"==b.contentType){var e=JSON.parse(b.responseText);null!=e&&void 0!==e||(e=JSON.parse(r.firstChild.textContent)),a(e)}else a(b.responseText)},1)},b.onerror=function(){i(b)},r?b.send(JSON.stringify(r)):b.send()}else{var f=new XMLHttpRequest;f.open(e,c?t:(n.preview?editorPath:d+root_path)+t+u+build_query_string()),"POST"==e&&f.setRequestHeader("Content-type","application/json"),l&&!parent.SESSION_KEY&&(f.withCredentials="true",f.setRequestHeader("x-with-credentials","1")),f.onreadystatechange=function(){if(4==f.readyState){var n=f.responseText;if("string"==typeof n&&/^\s*(\{|\[|"|[0-9])/.test(n))try{n=JSON.parse(n)}catch(e){}if(f.status<200||f.status>=300)return!(f.status>=400&&f.status<=409||500==f.status)&&s++<2?setTimeout(function(){o(e,t,r,a,i,l,s)},(429==f.status?1500:100)*s):i(n||f.status||"failed");a(n)}},r?f.send(JSON.stringify(r)):f.send()}};ajaxPost=function(e,t,n,r,a){return o("POST",e,t,n,a,r)},ajaxGet=function(e,t,n,r,a,i){return o("GET",e,null,n,r,a,i)},build_query_string=function(){return"s="+n.Site+(n.locale?"&l="+n.locale:"")+(n.package&&!n.dedicated?"&package="+n.package:"")+"&uri="+encodeURIComponent(pageUri())+"&v="+n.version+(n.localeURL?"&ld="+n.localeURL:"")+(n.preview?"&preview="+encodeURIComponent(n.preview):"")+(n.previewMode?"&previewMode="+encodeURIComponent(n.previewMode):"")+(r?"&_c="+r:"")}}(Date,Array,bablic),function(e){function t(e,n){return 1===arguments.length?function(){var n=$.makeArray(arguments);return n.unshift(e),t.apply(this,n)}:(arguments.length>2&&n.constructor!==Array&&(n=$.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),$.each(n,function(t,n){e=e.replace(new RegExp("\\{"+t+"\\}","g"),n).replace("%s",n)}),e)}var n=e.getText=e.__=function(e,n,a){return n=n||[],arguments.length>2&&n.constructor!==Array&&(n=$.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),t(r(e,null,a),n)};function r(t,n,r){if(!LDATA||!LDATA.content)return e.log("translation not loaded yet"),t;if(!Text)return t;n=n||{},!Text.stripText&&Text.prepare&&Text.prepare();var a={nodeType:3,nodeValue:t,nodeName:"#text"};return processNodeWithEngine(a,{tagName:"P",_fake:!0},n,Text.index,null,null,r),LDATA.report&&send_ldata_report(!1),LDATA.usage&&send_usage_report(),a._nodeValue||a.nodeValue}e.getTextWithMarkup=function(e,n,a){return a=a||[],arguments.length>3&&a.constructor!==Array&&(a=$.makeArray(arguments).slice(2)),a.constructor!==Array&&(a=[a]),t(r(e,n),a)},e.__n=e.getTextPlural=function(e,n,a,i){i=i||[],arguments.length>4&&i&&i.constructor!==Array&&(i=$.makeArray(arguments).slice(3)),i.constructor!==Array&&(i=[i]);var o=r(e),l=r(n);return t(1==a?o.replace(/%\s*?d/g,a):l.replace(/%\s*?d/g,a||0),i)};var a=WIN.alert;WIN.alert=function(){var e=n.apply(null,arguments);return a(e)},e.alert=function(){return a.apply(WIN,arguments)};var i=WIN.confirm;WIN.confirm=function(){var e=n.apply(null,arguments);return i(e)},e.confirm=function(){return i.apply(WIN,arguments)};var o=WIN.prompt;WIN.prompt=function(){var e=n.apply(null,arguments);return o(e)},e.prompt=function(){return o.apply(WIN,arguments)}}(bablic);var Mutation=bablic.Mutation={},attributeObserver,setNodeValue=function(e,t){e.nodeValue=t},turnObserverOn,turnObserverOff,prefetchOnFirstView,LocalDB;!function(bablic){Mutation.events=bablic._e||{},WIN.MutationObserver=WIN.MutationObserver||WIN.WebKitMutationObserver||WIN.MozMutationObserver;var _observer=WIN.MutationObserver,lastBablic=0;function detectPingPong(e){if(e._lp=Date.now(),Date.now()-lastBablic<200){if(e._pp=e._pp||0,e._pp++,e._pp>20)return!0}else{if(e._pp>20&&Date.now()-lastBablic<1e3)return!0;e._pp=0}}if(_observer){var ua=WIN.navigator.userAgent,isIE=/MSIE|Trident/.test(ua);if(!isIE){function _callback(e){return e?function(t){if(!detectPingPong(e))return e.apply(this,arguments)}:e}try{var functionName=_callback.name||"_callback";eval("class MutationObserve extends _observer { constructor(func) { super("+functionName+"?"+functionName+"(func):func); }} window.MutationObserver = MutationObserve;")}catch(e){try{WIN.MutationObserver=function(e){this._obs22=new _observer(_callback(e))};for(var methods=["disconnect","observe","takeRecords"],i=0;i0))for(var t=0;t-1)){var r=n.attributes[e[t].attributeName];if(r&&DOC.contains(n)&&readNodeAttr(r,"bablic_last_value",n)!=getNodeValue(r))return processElement(n,!0)}}});attributeObserver=function(e,t){var n=e._babi=e._babi||{};n[t.nodeName]||(n[t.nodeName]=!0,setTimeout(function(){observer.observe(e,{attributeFilter:[t.nodeName],attributes:!0})},1))}}else attributeObserver=function(e,t){var n=readNodeAttr(t,"_babi",e);n&&clearInterval(n),n=setInterval(function(){readNodeAttr(t,"bablic_replaced_value",e)!=getNodeValue(t)&&mutationCallbackSingle(e)},200),setNodeAttr(t,"_babi",n,e)};Mutation.on=function(e,t){$.each(e.trim().split(/\s+/),function(e,n){Mutation.events[n]=Mutation.events[n]||[],Mutation.events[n].push(t),"locale"==n&&LDATA&&bablic.getLocale&&bablic.getLocale()&&setTimeout(function(){t(bablic.getLocale())},0)})},Mutation.once=function(e,t){Mutation.events[e]=Mutation.events[e]||[];var n=function(){try{t()}catch(e){}Mutation.unbind(e,n)};Mutation.events[e].push(n)},Mutation.unbind=function(e,t){Mutation.events[e]=Mutation.events[e]||[];var n=Mutation.events[e].indexOf(t);n>-1&&Mutation.events[e].splice(n,1)},Mutation.emit=function(e,t){var n;Mutation.events[e]=Mutation.events[e]||[];for(var r=0;r0)){for(var t={},n=0,r=1e5,a=0;an&&(n=l),lr;d--){if(c.parentElement._babSt){u=!0;break}c=c.parentElement}u||o.push(s[a])}}mutationCallback(o)}}});turnObserverOff=function(){e.disconnect()},(turnObserverOn=function(){e.observe(DOC.body,{characterData:!0,childList:!0,subtree:!0})})()}else{var t=function(e){var t=e.srcElement||e.relatedNode||e.originalEvent&&e.originalEvent.srcElement||e.originalEvent&&e.originalEvent.relatedNode;mutationCallbackSingle(t)};turnObserverOff=function(){$(DOC.documentElement).off("DOMNodeInserted",t).off("DOMCharacterDataModified",t)},(turnObserverOn=function(){$(DOC.documentElement).on("DOMNodeInserted",t).on("DOMCharacterDataModified",t)})()}setInterval(function(){LDATA&&LDATA.content&&processElement(DOC.documentElement)},5e3),listening=!0}};var THROTTLE_GLOBAL_WINDOW=5e3,THROTTLE_GLOBAL_MAX=30,THROTTLE_ELEMENT_WINDOW=1e3,THROTTLE_ELEMENT_MAX=2,lastFired=Date.now();function calculateThrottle(e,t,n){var r=(t-Math.max(t-n,Date.now()-n))/n;return r<0?1:e*r+1}function pushThrottled(e,t){return e._babTh?(e._babTc=calculateThrottle(e._babTc,e._babTh,t),e._babTh=Date.now(),e._babTc):(e._babTh=Date.now(),e._babTc=1,1)}var stalledQueue=[],globalThrottle={};function throttleEvent(e){return!bablic.noMutationThrottle&&(pushThrottled(globalThrottle,THROTTLE_GLOBAL_WINDOW)>THROTTLE_GLOBAL_MAX?(bablic.log("canceled because short time"),!0):pushThrottled(e,THROTTLE_ELEMENT_WINDOW)>THROTTLE_ELEMENT_MAX&&(bablic.log("canceled because short time"),!0))}var BULK_PULL=10,consumeQueueInner=function(){consumeQueueTimeout=started=null;var e=stalledQueue;if(stalledQueue=[],e.length>80)return processElement(document.body);var t=function(){var n=e.splice(0,BULK_PULL);if(n.length){for(var r=0;r1250||(consumeQueueTimeout&&clearTimeout(consumeQueueTimeout),started||(started=Date.now()),consumeQueueTimeout=setTimeout(consumeQueueInner,250))},mutationCallbackSingle=function(e){if(LDATA&&LDATA.content&&!(bablic.mutation_listen_off>0)){if(e&&"SPAN"==(e.tagName||"").toUpperCase()&&"bablicLink"==e.id&&parent.parentNode)return e.parentNode.removeChild(e);if(!bablic.noMutationListening&&e&&e!=WIN){for(1!=e.nodeType&&(e=e.parentNode);e&&e.parentElement&&1==e.nodeType&&!("bablic_last_value"in e)&&e!=DOC.body&&"HEAD"!=e.tagName;)e=e.parentElement;mutationCallback([e])}}},mutationCallback=Mutation.callback=function(e){Mutation.emit("mutation");var t=Date.now()-lastBablic;lastBablic=Date.now();for(var n=0,r=0;r0&&(lastFired=Date.now()),n')}prefetchOnFirstView=function(){e.proxy||$.each(e.locales,function(n,r){var a=normalizedCurrentPath(),i="/page?s="+e.Site+"&l="+r.key+"&page="+encodeURIComponent(a),o=getPageTranslationURL(i);t(o=LOC.protocol+jsonpURL(o,i)),e.log("prefetch",o),i="/conf?s="+e.Site+"&l="+r.key,o=getPageTranslationURL(i),t(o=LOC.protocol+jsonpURL(o,i)),e.log("prefetch",o)})}}(bablic);var USE_LOCAL_DB=!PROXY&&!bablic.preview||-1!=location.search.indexOf("testBablicLS"),USE_INDEXED_DB=USE_LOCAL_DB,_c1="continu",hideWidget,showFlags,getFlag,bidiInline,es;!function(e){var t,n=_c1+"e",r=function(){try{if(WIN.localStorage)return WIN.localStorage}catch(e){console.log("cant get local storage")}return t||(t={getItem:function(e){return LocalDB.cookie.getCookie(e)},setItem:function(e,t){LocalDB.cookie.setCookie(e,t)}})},a={},i={};function o(t){if(!e.locale||!WIN.indexedDB)return t(new Error("No indexed db"));if(e.locale in a)return t(null,a[e.locale]);if(e.locale in i)return i[e.locale].push(t);var n=e.locale;try{var r=indexedDB.open("bablic_"+n,4);i[n]=[];var o=setTimeout(function(){l("Timeout"),console.log("cant load indexeddb")},5e3),l=function(e,r){r&&(a[n]=r),clearTimeout(o),e&&LocalDB.setSync("dbdown",Math.floor(Date.now()/1e3)),t&&(t(e,r),i[n].forEach(function(t){t(e,r)}),delete i[n],t=null)};r.onupgradeneeded=function(e){var n=e.target.result;if(!n)return t(new Error("Not created"));e.target.transaction.onerror=t,n.createObjectStore("a",{keyPath:"id"}).createIndex("page","page",{unique:!1,multiEntry:!0})},r.onsuccess=function(e){l(null,e.target.result)},r.onerror=function(e){l(e)}}catch(e){t(e)}}if(LocalDB={cookie:{setCookie:function(t,n,r){if(!(n.length>1e3)){var a=new Date;a.setDate(a.getDate()+r);var i="",o=(e.conf||e.data||{}).domain;if(o){var l=o.indexOf("/");l>-1&&(o=o.substr(0,l))}o&&LOC.hostname.indexOf(o)>-1&&(i=";domain="+o);var s=escape(n)+(null==r?"":"; expires="+a.toUTCString())+"; path=/"+i;DOC.cookie=t+"="+s}},getCookie:function(e){var t,n,r,a=DOC.cookie.split(";");for(t=a.length-1;t>=0;t--)if(n=a[t].substr(0,a[t].indexOf("=")),r=a[t].substr(a[t].indexOf("=")+1),(n=n.replace(/^\s+|\s+$/g,""))==e)return unescape(r)},clear:function(e){var t=new Date(Date.now()-36e7);DOC.cookie=e+"=; expires="+t.toUTCString()+"; path=/"}},getSync:function(t,n,a){try{return n?LocalDB.cookie.getCookie("bab_"+t):USE_LOCAL_DB||a?r().getItem("bab_"+t):null}catch(t){e.error("LocalDB Failed",t)}},setSync:function(t,n,a,i){try{if(a)return LocalDB.cookie.setCookie("bab_"+t,n,365);if(!USE_LOCAL_DB&&!i)return;r().setItem("bab_"+t,n)}catch(t){e.error("LocalDB failed",t)}},getConf:function(){return JSON.parse(LocalDB.getSync("bablic")||"null")},setConf:function(e){LocalDB.setSync("bablic",JSON.stringify(e))},getByIds:function(e,t){if(!USE_INDEXED_DB)return t(!0);try{o(function(n,r){if(n||!r)return t(n);try{var a=r.transaction(["a"],"readonly").objectStore("a"),i={};parallelEach(e,function(e,t){var n=a.get(e);n.onsuccess=function(n){var r=n.target.result;r&&(i[e]=r.value),t()},n.onerror=function(e){t()}},function(e){t(e,i)})}catch(e){t(e)}})}catch(e){t(e)}},getByPage:function(t,r){if(!USE_LOCAL_DB)return r(!0);try{if(WIN.localStorage){var a=localStorage.getItem("bab_p_"+t);if(a)return r(null,JSON.parse(a))}}catch(t){e.error(t)}if(!USE_INDEXED_DB)return r(!0);try{o(function(e,a){if(e||!a)return r(e);try{var i=a.transaction(["a"],"readonly"),o=i.objectStore("a").index("page"),l=IDBKeyRange.only(t),s={},c=!1;o.openCursor(l).onsuccess=function(e){var t=e.target.result;t&&("__set__"!=t.value.id?s[t.value.id]=t.value.value:c=!0,t[n]())},i.oncomplete=function(){if(!c&&$.isEmptyObject(s))return r("not found",s,a);r(null,s,a)}}catch(e){r(e)}})}catch(e){r(e)}},setByPage:function(t,n){if(USE_LOCAL_DB){try{if(WIN.localStorage&&t.length<1e3){var r=JSON.stringify(t);return void localStorage.setItem("bab_p_"+n,r)}}catch(t){e.error(t)}USE_INDEXED_DB&&($.isEmptyObject(t)&&(t.__set__="true"),LocalDB.getByPage(n,function(r,a,i){if(!i||!a)return e.error(r);var o=[],l=[];for(var s in t)s in a||function(e,t){o.push(function(r){i.transaction(["a"],"readonly").objectStore("a").get(e).onsuccess=function(a){var i=a.target.result;if(i){if(i.page.indexOf(n)>-1)return;i.page.push(n)}else i={id:e,value:t,page:[n]};l.push(i),r()}})}(s,t[s]);parallel(o,function(t){if(t)return e.error(t);var n=i.transaction(["a"],"readwrite"),r=n.objectStore("a");l.forEach(function(e){r.put(e)}),n.oncomplete=function(t){e.log(t)},n.onerror=function(t){e.error(t)}})}))}},clearSync:function(e,t){WIN.localStorage&&localStorage.removeItem("bab_"+e),LocalDB.cookie.clear("bab_"+e)},clearAll:function(t){var n=["bablic","unused"];if($.each(e.locales||[],function(e,t){n.push("global"+t.key),n.push("home_"+t.key),$.each(Object.keys(LDATA&&LDATA.packages||{}),function(e,r){n.push("p_"+t.key+"_"+r),n.push("@"+t.key+"_"+r)})}),$.each(n,function(e,t){LocalDB.clearSync(t)}),!WIN.indexedDB)return t&&t();parallelEach(e.locales||[],function(t,n){try{var r=indexedDB.deleteDatabase("bablic_"+t.key);r.onsuccess=function(){e.log("Deleted database successfully"),delete a[t.key],n&&n(),n=null},r.onerror=function(){e.error("Couldn't delete database"),n&&n(),n=null},r.onblocked=function(){e.error("Couldn't delete database due to the operation being blocked"),n&&n(),n=null},setTimeout(function(){n&&(e.error("timeout in deleting db"),n(),n=null)},1e3)}catch(e){n&&n(),n=null}},t)}},e.cookie=LocalDB.cookie,USE_LOCAL_DB){var l=LocalDB.getSync("dbdown");USE_INDEXED_DB=!(l&&Number(l)>(Date.now()-3e5)/1e3)}}(WIN._bab||bablic),function(bablic){var _functionToString=WIN.Function&&Function.prototype.toString;function printFunction(e){return _functionToString?_functionToString.apply(e):e.toString()}var SIZES={1:16,2:24,3:32,4:48,5:64,6:128},EMBEDDED_WIDGET='
    {@_.l}
  • {{_.name}}
  • {/?}
',WIDGET_TYPES={flags:{html:'',css:'body{ direction:ltr; } .notice_icon { width: 100%; } ul{ position:absolute; {{_.c.position.corner%8>3?"bottom:0":"top:0"}}; list-style: none; margin:0; {?!_.c.expanded} transition: height 300ms,width 300ms; -webkit-transition: height 300ms,width 300ms; -moz-transition: height 300ms,width 300ms; -ms-transition: height 300ms,width 300ms; -o-transition: height 300ms,width 300ms; {/?} background-color: {{_.c.colors[0]}}; overflow:hidden; left:0; right:auto; } ul.vertical{ width: {{_.sizeNum}}px; height: {{_.sizeNum}}px; padding:4px 6px; } ul.horizontal{ width: {{_.sizeNum+14}}px; height: {{_.sizeNum+8}}px; padding:0; } ul.corner2,ul.corner3,ul.corner4,ul.corner5{ right:0; left:auto; } a.item{ color:{{_.c.colors[1]}}; text-decoration:none; font-family:Arial; text-transform:uppercase; display:block; text-align:center; line-height:{{_.sizeNum}}px; white-space: nowrap; } ul.corner1,ul.corner2{ border-radius: 0 0 5px 5px; } ul.corner3,ul.corner4{ border-radius: 5px 0 0 5px; } ul.corner5,ul.corner6{ border-radius: 5px 5px 0 0; } ul.corner7,ul.corner8{ border-radius: 0 5px 5px 0; } ul li{ height: {{_.sizeNum}}px; width:{{_.sizeNum}}px; display:none; float:left; } ul.horizontal li{ padding:4px 7px; } ul.corner2 li,ul.corner3 li,ul.corner4 li,ul.corner5 li{ float:right; } ul.expanded li,ul li.selected{ display:block; } ul li a img{ height:100%; } ul li.logo a img{ width:70%; height:70%; //top:15%; //left:15%; padding:15%; position:relative; }',js:function(){var e=parent._bab||parent.bablic;e.trigger("widget");var t=e.$,n=t(document.getElementsByTagName("ul"));e.resizeWidget(n.width(),n.height());var r=Date.now(),a=function(n){if(!parent.isInClickElement||!parent.isInClickElement(n.clientX,n.clientY)){if(n.ctrlKey||n.shiftKey||n.altKey)return!0;var a=t(this).attr("data-locale");return!a||(n.preventDefault(),h&&!e.widgetConf.expanded&&e.Modernizr.touchevents&&(!i||Date.now()-o<500)?(o=null,!1):e.Modernizr.touchevents&&Date.now()-r<800?(o=null,!1):a?void e.redirectTo(a,null,n):e.logo())}n.preventDefault()};t.byTag("a",document).on("click",a);var i,o,l,s,c=parseInt(n.css("padding-top"))+parseInt(n.css("padding-bottom"))||0,u=parseInt(n.css("padding-left"))+parseInt(n.css("padding-right"))||0,d=n.children("li").length(),b=Math.ceil(d/15),f=n.height()||0,p=n.width()||0,h=d>1;e.widgetConf.widgetType.indexOf("Horiz")>-1?(l=(f-c)*b+c,s=(p-u)*Math.ceil(d/b)+u):(l=(f-c)*Math.ceil(d/b)+c,s=(p-u)*b+u),s||e.error("No width");var g,m,v=function(){i||(e.trigger("expand"),e.resizeWidget(s,l),n.css("height",l-c).css("width",s-u),t.byTag("li",document).css("display","block"),i=!0,o=Date.now(),g&&clearTimeout(g),g=null)},y=function(){if(e.trigger("collapse"),i=!1,o=null,n.css("height",f-c).css("width",p-u),t.byTag("li",document).css("display",""),e.Modernizr&&!e.Modernizr.csstransitions)return e.resizeWidget(p,f);g=setTimeout(function(){g=null,e.resizeWidget(p,f)},500)};if(window.expand=v,window.collapse=y,e.widgetConf.expanded)return e.resizeWidget(s,l),void n.css("height",l-c).css("width",s-u);window.onClickOutside=y,n.on("mouseenter",v).on("mouseleave",y),e.Modernizr.touchevents&&t.byTag("a",document).on("touchstart",function(e){n.off("mouseenter",v).off("mouseleave",y);var t=a.apply(this,[e]);return!1===t?v.apply(this,[e]):t});var _=function(){clearTimeout(m)};t.byTag("a",document).on("focus",function(){_(),v()}).on("blur",function(){_(),m=setTimeout(y,200)})}},labels:{html:'
{{_.s._name}} {?_.expired} {/?}
{?_.c.logo && _.c.position.corner > 3} {/?} {@_.l} {{_._name}} {/@} {?_.c.logo && _.c.position.corner < 3} {/?} {?_.expired} {/?}
',css:'body { direction:ltr; font-family: sans-serif; color: {{_.c.colors[2]}}; font-weight:bold; width:400px; height:1000px; } div,a{ display:block; } a,a:visited,a:focus,a:active,.desktop a:hover{ color: inherit; text-decoration: none; } a:focus { outline: none; box-shadow: inset 0.5px 0 0 4px {{_.c.colors[1]}}; } #widget{ position:fixed; overflow:hidden; border-radius:{{_.c.size+1}}px; box-shadow: 0px 0px 1px 1px rgba(0,0,0,0.2); font-size:{{_.c.size*3+6}}px; line-height:{{_.c.size*9+15}}px; } #widget #list{ visibility:hidden; } #widget.active #list{ display:none; visibility:visible; } #widget.expanded.active #list{ display:block; } #widget.expanded #current{ display:none; } a{ text-align:center; padding:0 {{_.c.size*8+2}}px; min-width: {{_.c.size*10+10}}px; border-bottom:1px solid {{_.c.colors[3]}}; margin-bottom:-1px; position:relative; white-space:nowrap; } a:before{ content:""; display:block; position:absolute; top:0; left:0; right:0; bottom:0; background:{{_.c.colors[0]}}; opacity:0.95; z-index:-1; } a:hover:before { background:{{_.c.colors[1]}}; opacity:1; } a:focus:before { background:{{_.c.colors[1]}}; opacity: 1; } {?_.c.size>2} a.logo{ padding:0 23px; } {/?} a.logo:before{ background:rgb(1, 174, 218); } a.logo:after{ content: ""; background-image: url(https://uploads.bablic.com/flags/logo/unbabel.png); position: absolute; width: 56px; height: 13px; background-size: cover; bottom: 3px; left: 0px; right: 0; margin: auto; display:none; } {?_.c.size>2} a.logo:after{ display:block; } {/?} {?_.c.size==4} a.logo:after{ width: 62px; height: 13px; bottom: 4px; } {/?} {?_.c.size==5} a.logo:after{ width: 69px; height: 14px; bottom: 6px; } {/?} a.logo img{ height:{{_.c.size*4+3}}px; } #widget.corner1,#widget.corner2 { top:0; border-top-left-radius:0; border-top-right-radius:0; } #widget.corner1{ left:1px; } #widget.corner2{ right:1px; } #widget.corner5,#widget.corner6 { bottom:0; border-bottom-left-radius:0; border-bottom-right-radius:0; } #widget.corner5{ right:1px; } #widget.corner6{ left:1px; } .expired{ max-width: 20px; max-height: 20px; display: block; position: absolute; top: 0; right: 0; }',js:function(){var e,t,n=parent._bab||parent.bablic,r=n.$,a=document,i=r.byId("widget",a),o=n.widgetConf.expanded,l=r.byId("list",a),s=!o&&r.byId("current",a),c=l.children("a").length()>1,u="ontouchstart"in a.body,d=function(){return Date.now()};r.byTag("a",a).on("click",function(a){if(parent.isInClickElement&&parent.isInClickElement(a.clientX,a.clientY))a.preventDefault();else{if(a.ctrlKey||a.shiftKey||a.altKey)return!0;if(c&&!o&&u&&(!e||d()-t<500))return t=null,a.preventDefault(),!1;var i=r(this).attr("data-locale");i&&(a.preventDefault(),n.redirectTo(i,null,a))}});var b=function(){n.resizeWidget(e||o?A:y+2,e||o?T:_+1)},f=window.expand=function(){i.addClass("expanded"),e=!0,t=Date.now(),b()},p=window.collapse=function(){i.removeClass("expanded"),e=!1,t=null,b()};if(o)i.addClass("expanded");else{var h;window.onClickOutside=p,s.on("mouseover",f),l.on("mouseleave",p);var g=function(){u||(m(),h=setTimeout(p,200))},m=function(){u||clearTimeout(h)};s.children("a").on("focus",function(){u||(f(),l.children("a").get(0).focus())}).on("blur",g),l.children("a").on("focus",m).on("blur",g)}var v=null;r(a).on("touchstart",function(){v=d(),u=!0}),r(a).on("mousemove",function(){!u||v&&d()-v<500||(u=!1)});var y,_,A,T,L=1;!function e(){l.get(0).offsetHeight;o||s.get(0).offsetHeight,A=l.width(),T=l.height(),o||(l.get(0).style.display="none",l.get(0).offsetHeight,y=s.width(),_=s.height(),l.get(0).style.display="",l.get(0).offsetHeight),A&&T?(i.addClass("active"),a.body.style.width="auto",a.body.style.height="auto",b()):setTimeout(e,L++)}()}}};WIDGET_TYPES.labels2=WIDGET_TYPES.labels,WIDGET_TYPES.flagsHoriz=WIDGET_TYPES.letters=WIDGET_TYPES.lettersHoriz=WIDGET_TYPES.flags;var FOREACH_REGEX=/\{@([^\s]+)\}((?:.|\n)*?)\{\/@}/g,VAR_REGEX=/\{\{(.*?)\}\}/g,IF_REGEX=/\{\?(.*?)\}((?:.|\n)*?)\{\/\?\}/g;function renderTags(context,template){var saveUnderscore=WIN._;WIN._=context;var renderedHTML=template.replace(FOREACH_REGEX,function(a0,collectionVar,inner){for(var localesHTML=[],collection=eval(collectionVar),i=0;i '+o+"