Current Path : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/js/landing/client/ |
Current File : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/js/landing/client/google_fonts.min.js |
(function(){"use strict";BX.namespace("BX.Landing.Client");var n=BX.Landing.Utils.isEmpty;var t=BX.Landing.Utils.clone;BX.Landing.Client.GoogleFonts=function(){this.key="AIzaSyCqOG-HakgzOQh9prxtkuWLA16lnkNZvsg";this.patch="https://www.googleapis.com/webfonts/v1/webfonts?sort=popularity&key=";this.fontUrl="https://";this.fontUrl+=window.fontsProxyUrl||"fonts.googleapis.com";this.fontUrl+="/css2";this.response={}};BX.Landing.Client.GoogleFonts.getInstance=function(){return BX.Landing.Client.GoogleFonts.instance||(BX.Landing.Client.GoogleFonts.instance=new BX.Landing.Client.GoogleFonts)};BX.Landing.Client.GoogleFonts.prototype={getList:function(){if(!n(this.response)){return Promise.resolve(t(this.response))}return this.request().then(function(n){this.response=n;return t(this.response)}.bind(this))},request:function(){return new Promise(function(n){BX.ajax({url:this.patch+this.key,method:"GET",onsuccess:function(t){var s;try{s=JSON.parse(t);s="items"in s?s.items:s}catch(n){s=[];console.error(n)}n(s)}})}.bind(this))},makeUrl:function(n){return BX.util.add_url_param(this.fontUrl,n)}}})(); //# sourceMappingURL=google_fonts.map.js