<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(function(){function m(a){a={Options:a,jZipField:null,Fields:[],FieldsByLevels:{},BuildQueryUpTo:function(a){for(var b="",d=0,e=0;e&lt;this.Fields.length;e++)if(g.IsLessOrEqualLevel(this.Fields[e].MinLevel,a.MinLevel)){var h=this.Fields[e].GetValue();if(0&lt;h.length||this.Fields[e]===a)b+=g.GetLevelsSigns(this.Fields[e].Levels),b+="[",b+=g.EscapeQuery(h),b+="]",d+=h.length}else this.Fields[e].ClearValue();this.jZipField&amp;&amp;(a=this.jZipField.val(),b+=f.ZipLevel.sign,b=b+"["+g.EscapeQuery(a),b+="]",d+=a.length);
return 0&lt;d?b:""},IsTailField:function(a){return null==g.Find(this.Fields,function(b){return g.IsLessLevel(a.MaxLevel,b.MinLevel)&amp;&amp;""!=b.GetValue()})},RefreshForm:function(a,b){this.ClearAllFields();for(var d=null,e=0;e&lt;b.length;e++)d=this.FieldsByLevels[b[e].level],d.AppendValue(b[e].type+" "+b[e].name);d&amp;&amp;d!=a&amp;&amp;d.SetFocus(!0)},ClearAllFields:function(){for(var a=0;a&lt;this.Fields.length;a++)this.Fields[a].ClearValue()},Init:function(){for(var a=this,b=0;b&lt;this.Options.fields.length;b++)this.Fields.push(n(this,
this.Options.fields[b]));for(b=0;b&lt;this.Fields.length;b++)for(Level in f.AddressLevels)g.IsLessOrEqualLevel(this.Fields[b].MinLevel,Level)&amp;&amp;g.IsLessOrEqualLevel(Level,this.Fields[b].MaxLevel)&amp;&amp;(this.FieldsByLevels[Level]=this.Fields[b]);void 0!==this.Options.zip_field&amp;&amp;(b=this.Options.zip_field.id,this.jZipField="string"==typeof b&amp;&amp;"#"!==b[0]&amp;&amp;"."!==b[0]?$("#"+b):$(b),this.jZipField.on("keyup"+f.EventsNamespace,function(){a.ClearAllFields()}),this.jZipField.on("input"+f.EventsNamespace,function(){a.ClearAllFields()}),
this.jZipField.on("change"+f.EventsNamespace,function(){a.ClearAllFields()}))},Dispose:function(){for(var a=0;a&lt;this.Fields.length;a++)this.Fields[a].Dispose()}};a.Init();return a}function n(a,c){var b={Options:g.BuildFieldOptions(c,a.Options,"site/suggest/address"),AddressForm:a,Levels:c.levels,MinLevel:"",MaxLevel:"",EXT:{PrepareQuery:function(a){a="discrete";this.Options.obsolete_names&amp;&amp;(a+="|obsnames");this.Options.obsolete_objects&amp;&amp;(a+="|obsobjects");return{query:this.AddressForm.BuildQueryUpTo(this),
mode:a,addresslim:this.Options.limit}},IsAllowedToSuggestOnFocus:function(){return this.AddressForm.IsTailField(this)&amp;&amp;this.Options.suggest_on_focus},IsAllowedQuery:function(a,b){var c=a.query&amp;&amp;0&lt;a.query.length?!0:!1;c&amp;&amp;0==b.length&amp;&amp;(c=this.Options.suggest_on_empty);return c},OnChooseSuggestion:function(a){var b=[],b=a.a_machine?g.DecodeMachineAddress(a.a_machine):a.f_machine?g.DecodeMachineAddress(a.f_machine):g.DecodeMachineAddress(a.machine);this.AddressForm.RefreshForm(this,b);this.Options.on_fetch&amp;&amp;
(b=$.extend({query:a.sign},this.AddressForm.Options.api_options),b.output=b.output?b.output+"|json":"json",this.Options.user&amp;&amp;(b.user=this.Options.user),$.ajax({type:"GET",url:this.Options.ahunter_url+"site/fetch/address",data:b,cache:!1,context:this,success:function(b){this.Options.on_fetch.call(this.Options.on_fetch_context,a,b.address)}}))},SuggestionViewInList:function(a){return g.AddressSuggestionViewInList(a)},SuggestionViewInField:function(a){return a.value}},ClearValue:function(){this.ResetField("",
!0);this.ClearSuggestions()},AppendValue:function(a){var b=this.GetValue();b&amp;&amp;(b+=", ");this.ResetField(b+a,!0)},Init:function(){this.MinLevel=f.AddressLevels.Flat.name;this.MaxLevel=f.AddressLevels.Region.name;for(var a=0;a&lt;this.Levels.length;a++)g.IsLessLevel(this.Levels[a],this.MinLevel)&amp;&amp;(this.MinLevel=this.Levels[a]),g.IsLessLevel(this.MaxLevel,this.Levels[a])&amp;&amp;(this.MaxLevel=this.Levels[a]);void 0===c.empty_msg&amp;&amp;this.MinLevel===f.AddressLevels.Flat.name&amp;&amp;(this.Options.empty_msg="")}};b.Init();
var d=k(b.Options.id,b.Options.max_height,b.Options.z_index,b.Options.full_url,b.Options.empty_msg,b.Options.append_to);return g.ExtendSuggester(d,b)}function p(a){a={Options:g.BuildFieldOptions(a,{},"site/suggest/address"),EXT:{PrepareQuery:function(a){a={query:a,addresslim:this.Options.limit};var c="";this.Options.obsolete_names&amp;&amp;(c+="obsnames|");this.Options.obsolete_objects&amp;&amp;(c+="obsobjects|");0&lt;c.length&amp;&amp;(a.mode=c);return a},IsAllowedToSuggestOnFocus:function(){return this.Options.suggest_on_focus},
OnChooseSuggestion:function(a){if(this.Options.on_fetch){var c=$.extend({query:a.sign},this.Options.api_options);c.output=c.output?c.output+"|json":"json";this.Options.user&amp;&amp;(c.user=this.Options.user);$.ajax({type:"GET",url:this.Options.ahunter_url+"site/fetch/address",data:c,cache:!1,context:this,success:function(c){this.Options.on_fetch.call(this.Options.on_fetch_context,a,c.address)}})}},SuggestionViewInList:function(a){return g.AddressSuggestionViewInList(a)},SuggestionViewInField:function(a){var c=
null,c=a.a_machine?g.DecodeMachineAddress(a.a_machine):a.f_machine?g.DecodeMachineAddress(a.f_machine):g.DecodeMachineAddress(a.machine);return g.AddressFieldsToString(c,!0)}},Init:function(){}};a.Init();var c=k(a.Options.id,a.Options.max_height,a.Options.z_index,a.Options.full_url,a.Options.empty_msg,a.Options.append_to);return g.ExtendSuggester(c,a)}function q(a){a={Options:a,Fields:[],BuildQueryWithActiveField:function(a){return{active:a.Tag,last_name:this.GetFieldValue("last_name"),first_name:this.GetFieldValue("first_name"),
patronym:this.GetFieldValue("patronym")}},GetFieldValue:function(a){var b=g.Find(this.Fields,function(b){return b.Tag==a});return null!=b?b.GetValue():""},GetPerson:function(){for(var a={last_name:this.GetFieldValue("last_name"),first_name:this.GetFieldValue("first_name"),patronym:this.GetFieldValue("patronym"),full_name:""},b=0;b&lt;this.Fields.length;b++)a.full_name.length&amp;&amp;this.Fields[b].GetValue().length&amp;&amp;(a.full_name+=" "),a.full_name+=this.Fields[b].GetValue();return a},Init:function(){for(var a=
0;a&lt;this.Options.fields.length;a++)this.Fields.push(r(this,this.Options.fields[a]))},Dispose:function(){for(var a=0;a&lt;this.Fields.length;a++)this.Fields[a].Dispose()}};a.Init();return a}function r(a,c){var b={Options:g.BuildFieldOptions(c,a.Options,"site/suggest/person"),PersonForm:a,Tag:c.tag,EXT:{PrepareQuery:function(a){return $.extend(this.PersonForm.BuildQueryWithActiveField(this),{personlim:this.Options.limit})},IsAllowedToSuggestOnFocus:function(){return this.Options.suggest_on_focus},IsAllowedQuery:function(a,
b){return 0&lt;b.length},OnChooseSuggestion:function(a){this.Options.on_fetch&amp;&amp;this.Options.on_fetch.call(this.Options.on_fetch_context,a,this.PersonForm.GetPerson())}},Init:function(){}};b.Init();var d=k(b.Options.id,b.Options.max_height,b.Options.z_index,b.Options.full_url,b.Options.empty_msg,b.Options.append_to);return g.ExtendSuggester(d,b)}function t(a){a={Options:g.BuildFieldOptions(a,{},"site/suggest/person"),EXT:{PrepareQuery:function(a){return{query:a,personlim:this.Options.limit}},IsAllowedToSuggestOnFocus:function(){return this.Options.suggest_on_focus},
OnChooseSuggestion:function(a){this.Options.on_fetch&amp;&amp;this.Options.on_fetch.call(this.Options.on_fetch_context,a,{full_name:a.value})}},Init:function(){}};a.Init();var c=k(a.Options.id,a.Options.max_height,a.Options.z_index,a.Options.full_url,a.Options.empty_msg,a.Options.append_to);return SolidSuggester=g.ExtendSuggester(c,a)}function k(a,c,b,d,e,h){a={EXT:{PrepareQuery:function(a){return{query:a}},IsAllowedToSuggestOnFocus:function(){return!0},IsAllowedQuery:function(a,b){return a.query&amp;&amp;0&lt;a.query.length&amp;&amp;
0&lt;b.length},OnFiledChange:function(a,b){},OnChooseSuggestion:function(a){},SuggestionViewInList:function(a){return a.value},SuggestionViewInField:function(a){return a.value}},jField:"string"==typeof a&amp;&amp;"#"!==a[0]&amp;&amp;"."!==a[0]?$("#"+a):$(a),SuggestionsClass:"u-AhunterSuggestions",SuggestionClass:"u-AhunterSuggestion",SelectedSuggestionClass:"u-AhunterSelectedSuggestion",EmptySuggestionClass:"u-AhunterEmptySuggestion",jSuggestions:$("&lt;div&gt;&lt;/div&gt;"),jAppendTo:"string"==typeof h&amp;&amp;"#"!==h[0]&amp;&amp;"."!==h[0]?
$("#"+h):$(h),Suggestions:[],SelectedIndex:-1,UserValue:"",ShownValue:"",IsHidden:!0,GetValue:function(){return this.jField.val()},SplitText:function(a,b){for(var c=/[\s\\\/,;.\-"'&lt;&gt;\[\]()*]/gi,d=0;d&lt;a.length;){var e=c.exec(a),e=null!==e?e.index:a.length;d&lt;e&amp;&amp;b(d,e);d=e+1}},FormatSuggestionValue:function(a){var b=this.UserValue,c=[];this.SplitText(b,function(a,d){c.push({word:b.substring(a,d).toLowerCase(),prefix:d==b.length})});var d="",e=0;this.SplitText(a,function(b,f){d+=a.substring(e,b);var l=
a.substring(b,f).toLowerCase(),h=g.Find(c,function(a,b){return a.word==l||a.prefix&amp;&amp;a.word==l.substring(0,a.word.length)});h?(d+="&lt;strong&gt;"+a.substring(b,b+h.word.length)+"&lt;/strong&gt;",d+=a.substring(b+h.word.length,f)):d+=a.substring(b,f);e=f});d+=a.substring(e);d.replace(/&amp;/g,"&amp;amp;").replace(/&lt;/g,"&amp;lt;").replace(/&gt;/g,"&amp;gt;").replace(/"/g,"&amp;quot;").replace(/&amp;lt;(\/?strong)&amp;gt;/g,"&lt;$1&gt;");return d},ShowSuggestions:function(){var a=!0;this.UpdatePosition();this.jSuggestions.empty();this.Suggestions||
(this.Suggestions=[]);if(0&lt;this.Suggestions.length)for(var b=0;b&lt;this.Suggestions.length;b++)$("&lt;div&gt;"+this.FormatSuggestionValue(this.EXT.SuggestionViewInList(this.Suggestions[b]))+"&lt;/div&gt;").appendTo(this.jSuggestions).addClass(this.SuggestionClass);else e?$("&lt;div&gt;"+e+"&lt;/div&gt;").appendTo(this.jSuggestions).addClass(this.EmptySuggestionClass):a=!1;a?(this.jSuggestions.show(),this.IsHidden=!1,this.HighliteSuggestion(this.SelectedIndex)):this.ClearSuggestions()},HideSuggestions:function(){this.jSuggestions.hide();
this.IsHidden=!0},ClearSuggestions:function(){this.Suggestions=[];this.SelectedIndex=-1;this.jSuggestions.empty();this.HideSuggestions()},UpdatePosition:function(){var a=this.jField.position(),b=this.jField.offsetParent().offset(),c=this.jAppendTo.offset(),d=a.left+(b.left-c.left),a=a.top+(b.top-c.top);this.jSuggestions.detach();this.jSuggestions.appendTo(this.jAppendTo);this.jSuggestions.css("position","absolute");this.jSuggestions.css("left",d);this.jSuggestions.css("top",a+this.jField.outerHeight()+100);
this.jSuggestions.css("width",this.jField.outerWidth())},NavigateSuggestions:function(a){var b=!1;a.which==f.Keys.ESC?(b=!0,this.ResetField(this.UserValue),this.HideSuggestions()):a.which==f.Keys.DOWN&amp;&amp;0&lt;this.Suggestions.length?(b=!0,this.IsHidden?(this.ShowSuggestions(),this.SelectSuggestion(this.SelectedIndex)):this.SelectSuggestion(this.SelectedIndex+1)):a.which==f.Keys.UP&amp;&amp;0&lt;this.Suggestions.length?(b=!0,this.IsHidden?(this.ShowSuggestions(),this.SelectSuggestion(this.SelectedIndex)):this.SelectSuggestion(this.SelectedIndex-
1)):a.which==f.Keys.ENTER&amp;&amp;!this.IsHidden&amp;&amp;0&lt;=this.SelectedIndex?(b=!0,this.ResetField(this.ShownValue),this.EXT.OnChooseSuggestion.call(this,this.Suggestions[this.SelectedIndex]),this.ClearSuggestions()):a.which!=f.Keys.TAB||this.IsHidden||(0&lt;=this.SelectedIndex?(this.ResetField(this.ShownValue),this.EXT.OnChooseSuggestion.call(this,this.Suggestions[this.SelectedIndex])):this.ResetField(this.UserValue),this.ClearSuggestions());return!b},SelectSuggestion:function(a){this.SelectedIndex=-1&gt;a?this.Suggestions.length-
1:a&gt;=this.Suggestions.length?-1:a;-1!=this.SelectedIndex?(this.ShownValue=this.EXT.SuggestionViewInField(this.Suggestions[this.SelectedIndex]),this.jField.val(this.ShownValue)):this.ResetField(this.UserValue);this.HighliteSuggestion(this.SelectedIndex)},ResetField:function(a,b){this.UserValue===a||b||this.EXT.OnFiledChange.call(this,this.UserValue,a);this.ShownValue=this.UserValue=a;this.jField.val(a)},HighliteSuggestion:function(a){this.jSuggestions.children().removeClass(this.SelectedSuggestionClass);
-1!=a&amp;&amp;a&lt;this.Suggestions.length&amp;&amp;(a=this.jSuggestions.children().get(a),$(a).addClass(this.SelectedSuggestionClass))},UpdateSuggestions:function(a){var b=this.jField.val();if(this.ShownValue!=b||a){var c=this;c.ResetField(b);c.SelectedIndex=-1;a=this.EXT.PrepareQuery.call(this,b);this.EXT.IsAllowedQuery.call(this,a,b)?(b=$.extend({output:"json",ahungest:f.Version},a),$.ajax({type:"GET",url:d,data:b,cache:!1,context:this,success:function(a){c.Suggestions=a.suggestions;c.ShowSuggestions()}})):c.ClearSuggestions()}},
SetFocus:function(a){var b=this.EXT.IsAllowedToSuggestOnFocus;a&amp;&amp;(this.EXT.IsAllowedToSuggestOnFocus=function(){return!1});this.jField.focus();a&amp;&amp;(this.EXT.IsAllowedToSuggestOnFocus=b)},Init:function(){var a=this;this.ResetField(this.jField.val(),!0);this.jSuggestions.addClass(this.SuggestionsClass);this.jSuggestions.css("max-height",c);this.jSuggestions.css("z-index",b);this.jSuggestions.hide();this.UpdatePosition();this.jField.attr("autocomplete","off");this.jSuggestions.on("mouseover"+f.EventsNamespace,
"."+this.SuggestionClass,function(){a.SelectedIndex=$(this).index();a.HighliteSuggestion(a.SelectedIndex)});this.jSuggestions.on("mouseout"+f.EventsNamespace,function(){a.SelectedIndex=-1;a.HighliteSuggestion(a.SelectedIndex)});this.jSuggestions.on("mousedown"+f.EventsNamespace,"."+this.SuggestionClass,function(b){if(1==b.which)return a.SelectedIndex=$(this).index(),a.SelectSuggestion(a.SelectedIndex),a.ResetField(a.ShownValue),a.EXT.OnChooseSuggestion.call(a,a.Suggestions[a.SelectedIndex]),a.ClearSuggestions(),
a.SetFocus(!0),!1});this.jField.on("keydown"+f.EventsNamespace,function(b){return a.NavigateSuggestions(b)});this.jField.on("keyup"+f.EventsNamespace,function(){a.UpdateSuggestions()});this.jField.on("input"+f.EventsNamespace,function(){a.UpdateSuggestions()});this.jField.on("change"+f.EventsNamespace,function(){a.UpdateSuggestions()});this.jField.on("blur"+f.EventsNamespace,function(){a.IsHidden||(a.ResetField(a.UserValue),a.ClearSuggestions())});this.jField.on("focus"+f.EventsNamespace,function(){a.EXT.IsAllowedToSuggestOnFocus.call(a)&amp;&amp;
a.UpdateSuggestions(!0)});$(window).on("resize"+f.EventsNamespace,function(){a.UpdatePosition()})},Dispose:function(){this.jSuggestions.off(f.EventsNamespace);this.jField.off(f.EventsNamespace);$(window).off(f.EventsNamespace);this.jSuggestions.remove()}};a.Init();return a}window.AhunterSuggest={Address:{Discrete:function(a){var c={obj:null,deffered:!1};$(document).ready(function(){c.obj=m(a)});this.Running.push(c);return c},Solid:function(a){var c={obj:null,deffered:!1};$(document).ready(function(){c.obj=
p(a)});this.Running.push(c);return c},Running:[]},Person:{Discrete:function(a){var c={obj:null,deffered:!1};$(document).ready(function(){c.obj=q(a)});this.Running.push(c)},Solid:function(a){var c={obj:null,deffered:!1};$(document).ready(function(){c.obj=t(a)});this.Running.push(c)},Running:[]},Dispose:function(a){this.FindAndDispose(a,this.Address.Running);this.FindAndDispose(a,this.Person.Running);this.DisposeDeffered(this.Address.Running);this.DisposeDeffered(this.Person.Running)},FindAndDispose:function(a,
c){for(var b=-1,d=0;d&lt;c.length;d++)c[d]===a&amp;&amp;(b=d);-1!=b&amp;&amp;(c[b].obj?(c[b].obj.Dispose(),c.splice(b,1)):c[b].deffered=!0)},DisposeDeffered:function(a){for(var c=a.length-1;0&lt;=c;c--)a[c].deffered&amp;&amp;a[c].obj&amp;&amp;(a[c].obj.Dispose(),a.splice(c,1))}};var f={Version:"1.7",EventsNamespace:".ahungest",AddressLevels:{Region:{name:"Region",sign:"r",num:0},District:{name:"District",sign:"d",num:1},City:{name:"City",sign:"c",num:2},Place:{name:"Place",sign:"p",num:3},Site:{name:"Site",sign:"t",num:4},Street:{name:"Street",
sign:"s",num:5},House:{name:"House",sign:"h",num:6},Building:{name:"Building",sign:"b",num:7},Structure:{name:"Structure",sign:"u",num:8},Flat:{name:"Flat",sign:"f",num:9}},ZipLevel:{name:"Zip",sign:"z"},Keys:{ESC:27,TAB:9,ENTER:13,UP:38,DOWN:40},DefaultOptions:{ahunter_url:"https://ahunter.ru/",empty_msg:"Нет подходящей подсказки",limit:10,suggest_on_empty:!1,suggest_on_focus:!0,obsolete_names:!1,obsolete_objects:!1,z_index:9999,max_height:500,append_to:null,id:void 0,on_fetch:void 0,on_fetch_context:void 0,
user:void 0,api_options:void 0}},g={Find:function(a,c){for(var b=null,d=0;d&lt;a.length;d++)if(c(a[d])){b=a[d];break}return b},IsLessLevel:function(a,c){return f.AddressLevels[a].num&lt;f.AddressLevels[c].num},IsLessOrEqualLevel:function(a,c){return f.AddressLevels[a].num&lt;=f.AddressLevels[c].num},IsNumericLevel:function(a){return f.AddressLevels[a].num&gt;=f.AddressLevels.House.num},IsAddressLevel:function(a){return a in f.AddressLevels},FindAddressLevelBySign:function(a){var c="";for(Level in f.AddressLevels)if(f.AddressLevels[Level].sign==
a){c=f.AddressLevels[Level].name;break}return c},GetLevelsSigns:function(a){for(var c="",b=0;b&lt;a.length;b++)c+=f.AddressLevels[a[b]].sign;return c},EscapeQuery:function(a){return a.replace(/([\\\[\]])/g,"\\$1")},DecodeMachineAddress:function(a){for(var c=[],b=0,d="",e={name:"",type:"",level:f.AddressLevels.Region.name};b&lt;a.length;){if("\\"!=a[b]&amp;&amp;":"!=a[b]){var h=g.FindAddressLevelBySign(a[b]);""===h?d+=a[b]:(e.name=d,c.push(e),d="",e={name:"",type:"",level:h},e.level=h)}else"\\"==a[b]?(b++,b&lt;a.length&amp;&amp;
(d+=a[b])):":"==a[b]&amp;&amp;(e.type=d,d="");b++}0&lt;d.length&amp;&amp;(e.name=d,c.push(e));return c},AddressFieldsDelta:function(a,c){for(var b=[],d=0,e=0;d&lt;a.length&amp;&amp;e&lt;c.length;)if(g.IsLessLevel(a[d].level,c[e].level))b.push(a[d]),d++;else if(g.IsLessLevel(c[e].level,a[d].level)){0&lt;d&amp;&amp;d--;break}else a[d].type==c[e].type&amp;&amp;a[d].name==c[e].name||b.push(a[d]),d++,e++;for(;d&lt;a.length;)b.push(a[d]),d++;return b},AddressFieldsToString:function(a,c){for(var b=!1,d="",e=0;e&lt;a.length;e++)d.length&amp;&amp;(d+=", "),d+=a[e].type+
" "+a[e].name,g.IsNumericLevel(a[e].level)&amp;&amp;(b=!0);c&amp;&amp;!b&amp;&amp;(d+=", ");return d},AddressSuggestionViewInList:function(a){var c=a.value;if(a.f_machine||a.a_machine){var b=g.DecodeMachineAddress(a.machine),d=null,e="";a.f_machine&amp;&amp;(d=g.DecodeMachineAddress(a.f_machine),e=g.AddressFieldsDelta(d,b),e=g.AddressFieldsToString(e));var f="";a.a_machine&amp;&amp;(a=g.DecodeMachineAddress(a.a_machine),b=g.AddressFieldsDelta(a,d?d:b),f=g.AddressFieldsToString(b));if(e||f)c+=" (",e&amp;&amp;(c+=" → "+e),f&amp;&amp;(c+=" ⇒ "+f),c+=" )"}return c},
ExtendSuggester:function(a,c){var b=a.EXT;$.extend(a,c);a.EXT=$.extend(b,c.EXT);return a},SelectDefined:function(){for(var a,c=0;c&lt;arguments.length;c++)if(void 0!==arguments[c]){a=arguments[c];break}return a},BuildFieldOptions:function(a,c,b){var d={};for(Name in f.DefaultOptions)d[Name]=g.SelectDefined(a[Name],c[Name],f.DefaultOptions[Name]);"/"!=d.ahunter_url[d.ahunter_url.length-1]&amp;&amp;(d.ahunter_url+="/");d.append_to||(d.append_to=$(document.body));d.full_url=d.ahunter_url+b;return d}}})();
</pre></body></html>