Files
crm.clientright.ru/libraries/jquery/jquery.printf.min.js
Fedor ac7467f0b4 Major CRM updates: AI Assistant, Court Status API, S3 integration improvements, and extensive file storage system
- Added comprehensive AI Assistant system (aiassist/ directory):
  * Vector search and embedding capabilities
  * Typebot proxy integration
  * Elastic search functionality
  * Message classification and chat history
  * MCP proxy for external integrations

- Implemented Court Status API (GetCourtStatus.php):
  * Real-time court document status checking
  * Integration with external court systems
  * Comprehensive error handling and logging

- Enhanced S3 integration:
  * Improved file backup system with metadata
  * Batch processing capabilities
  * Enhanced error logging and recovery
  * Copy operations with URL fixing

- Added Telegram contact creation API
- Improved error logging across all modules
- Enhanced callback system for AI responses
- Extensive backup file storage with timestamps
- Updated documentation and README files

- File storage improvements:
  * Thousands of backup files with proper metadata
  * Fix operations for broken file references
  * Project-specific backup and recovery systems
  * Comprehensive file integrity checking

Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
2025-10-16 11:17:21 +03:00

101 lines
4.1 KiB
JavaScript

/*##############################################################################
# ____________________________________________________________________
# / \
# | ____ __ ___ _____ / ___ ___ |
# | ____ / \/ \ ' / \ / / /__ / \ / \ |
# | / _ \ / / / / / / ___/ \__ / /____/ / / |
# | / |_ / / / / / / / / / \ / / /____/ |
# | \____/ / / \/_/ / \__/ _____/ \__/ \___/ / |
# | / |
# | |
# | Copyright (c) 2007 MindStep SCOP SARL |
# | Herve Masson |
# | |
# | www.mindstep.com www.mjslib.com |
# | info-oss@mindstep.com mjslib@mjslib.com |
# \____________________________________________________________________/
#
# Version: 1.0.0
#
# (Svn version: $Id: jquery.printf.js 3434 2007-08-27 09:31:20Z herve $)
#
#----------[This product is distributed under a BSD license]-----------------
##############################################################################*/
(function($){$.sprintf=function(fmt)
{return _sprintf_(fmt,arguments,1);}
$.vsprintf=function(args,offset)
{if(offset===undefined)
{offset=0;}
return _sprintf_(args[offset],args,offset+1);}
$.alertf=function()
{return alert($.vsprintf(arguments));}
$.vlogf=function(args)
{if("console"in window)
{console.info($.vsprintf(args));}}
$.verrorf=function(args)
{if("console"in window)
{console.error($.vsprintf(args));}}
$.errorf=function()
{$.verrorf(arguments);}
$.logf=function()
{$.vlogf(arguments);}
FREGEXP=/^([^%]*)%([-+])?(0)?(\d+)?(\.(\d+))?([doxXcsf])(.*)$/;HDIGITS=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function _empty(str)
{if(str===undefined||str===null)
{return true;}
return(str=="")?true:false;}
function _int_(val)
{return Math.floor(val);}
function _printf_num_(val,base,pad,sign,width)
{val=parseInt(val,10);if(isNaN(val))
{return"NaN";}
aval=(val<0)?-val:val;var ret="";if(aval==0)
{ret="0";}
else
{while(aval>0)
{ret=HDIGITS[aval%base]+ret;aval=_int_(aval/base);}}
if(val<0)
{ret="-"+ret;}
if(sign=="-")
{pad=" ";}
return _printf_str_(ret,pad,sign,width,-1);}
function _printf_float_(val,base,pad,sign,prec)
{if(prec==undefined)
{if(parseInt(val)!=val)
{return""+val;}
prec=5;}
var p10=Math.pow(10,prec);var ival=""+Math.round(val*p10);var ilen=ival.length-prec;if(ilen==0)
{return"0."+ival.substr(ilen,prec);}
return ival.substr(0,ilen)+"."+ival.substr(ilen,prec);}
function _printf_str_(val,pad,sign,width,prec)
{var npad;if(val===undefined)
{return"(undefined)";}
if(val===null)
{return"(null)";}
if((npad=width-val.length)>0)
{if(sign=="-")
{while(npad>0)
{val+=pad;npad--;}}
else
{while(npad>0)
{val=pad+val;npad--;}}}
if(prec>0)
{return val.substr(0,prec);}
return val;}
function _sprintf_(fmt,av,index)
{var output="";var i,m,line,match;line=fmt.split("\n");for(i=0;i<line.length;i++)
{if(i>0)
{output+="\n";}
fmt=line[i];while(match=FREGEXP.exec(fmt))
{var sign="";var pad=" ";if(!_empty(match[1]))
{output+=match[1];}
if(!_empty(match[2]))
{sign=match[2];}
if(!_empty(match[3]))
{pad="0";}
var width=match[4];var prec=match[6];var type=match[7];fmt=match[8];if(index>=av.length)
{output+="[missing parameter for type '"+type+"']";continue;}
var val=av[index++];switch(type)
{case"d":output+=_printf_num_(val,10,pad,sign,width);break;case"o":output+=_printf_num_(val,8,pad,sign,width);break;case"x":output+=_printf_num_(val,16,pad,sign,width);break;case"X":output+=_printf_num_(val,16,pad,sign,width).toUpperCase();break;case"c":output+=String.fromCharCode(parseInt(val,10));break;case"s":output+=_printf_str_(val,pad,sign,width,prec);break;case"f":output+=_printf_float_(val,pad,sign,width,prec);break;default:output+="[unknown format '"+type+"']";break;}}
output+=fmt;}
return output;}})(jQuery);