+
    5i.(                        ^ RI Ht ^ RIHtHtHt ^ RIHtHt ^ RI	H
t
Ht ^ RIHt ^ RIHtHt ^ RIHtHtHtHt ^ RIt^ RIt]P0                  ! R	4      t ! R
 R4      tR tR t ! R R]4      t ! R R]4      t ! R R]4      tR t R t!R t"R t#R t$R t% ^ RI&H't' ]#t(R t,R t-R t.^t/R t0R  t1R!]2! 4       /R" lt3R#   ]) d     ^ RI*H+t+ ]$t( L1  ]) d    ]%t(  L=i ; ii ; i)#    )LerpGlyphSet)AbstractPenBasePenDecomposingPen)AbstractPointPenSegmentToPointPen)RecordingPenDecomposingRecordingPen)	Transform)defaultdictdeque)sqrtcopysignatan2piNzfontTools.varLib.interpolatablec                   r    ] tR t^tRtRtRtRtRtRt	Rt
RtR	tR
tRt]^]^]^]^]	^]
^]^]^]^	]^
]^/tRtR# )InterpolatableProblemnothingmissing	open_path
path_count
node_countnode_incompatibilitycontour_orderwrong_start_pointkinkunderweight
overweight N)__name__
__module____qualname____firstlineno__NOTHINGMISSING	OPEN_PATH
PATH_COUNT
NODE_COUNTNODE_INCOMPATIBILITYCONTOUR_ORDERWRONG_START_POINTKINKUNDERWEIGHT
OVERWEIGHTseverity__static_attributes__r       l/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/fontTools/varLib/interpolatableHelpers.pyr   r      s{    GGIJJ1#M+DKJ 	1AAaq1aQBHr1   r   c                N    \        \        V P                  4       R RR7      4      # )z6Sort problem groups by their most severe problem type.c                 6    \        R  V ^,           4       4      ) # )c              3      "   T F:  p\         P                  VR ,          ,          VP                  R^ 4      ,           x  K<  	  R# 5i)type	toleranceN)r   r/   get).0ps   & r2   	<genexpr>2sort_problems.<locals>.<lambda>.<locals>.<genexpr>1   s:      ! +33AfI>{TUAVVV!s   AA)min)_s   &r2   <lambda>sort_problems.<locals>.<lambda>0   s    3qT r1   T)keyreverse)dictsorteditems)problemss   &r2   sort_problemsrG   +   s+    NN 		
 r1   c                "    W) R V RV)  ,           # )zwRotate list by k items forward.  Ie. item at position 0 will be
at position k in returned list.  Negative k is allowed.Nr   )lks   &&r2   rot_listrK   ;   s     RS6AcrF?r1   c                   T   a  ] tR t^At o RR ltR tR tR tR tR t	R t
R	 tR
tV tR# )PerContourPenNc                Z    \         P                  ! W4       Wn        R V n        . V n        R # N)r   __init___Pen_penvalue)selfPenglyphsets   &&&r2   rP   PerContourPen.__init__B   s#    (		
r1   c                \    V P                  4        V P                  P                  V4       R # rO   )_newItemrR   moveTo)rT   p0s   &&r2   _moveToPerContourPen._moveToH   s    		r1   c                <    V P                   P                  V4       R # rO   )rR   lineTo)rT   p1s   &&r2   _lineToPerContourPen._lineToL   s    		r1   c                <    V P                   P                  W4       R # rO   )rR   qCurveTo)rT   r`   p2s   &&&r2   _qCurveToOnePerContourPen._qCurveToOneO   s    		2"r1   c                >    V P                   P                  WV4       R # rO   )rR   curveTo)rT   r`   re   p3s   &&&&r2   _curveToOnePerContourPen._curveToOneR   s    		""%r1   c                H    V P                   P                  4        R V n         R # rO   )rR   	closePathrT   s   &r2   
_closePathPerContourPen._closePathU   s    			r1   c                H    V P                   P                  4        R V n         R # rO   )rR   endPathro   s   &r2   _endPathPerContourPen._endPathY   s    			r1   c                j    V P                  4       ;V n        pV P                  P                  V4       R # rO   )rQ   rR   rS   append)rT   pens   & r2   rY   PerContourPen._newItem]   s&    ))+%	C

#r1   )rQ   rR   rS   rO   )r    r!   r"   r#   rP   r\   ra   rf   rk   rp   rt   rY   r0   __classdictcell____classdict__s   @r2   rM   rM   A   s2     #& r1   rM   c                   &   a  ] tR t^bt o R tRtV tR# )PerContourOrComponentPenc                j    V P                  4        V P                  R,          P                  W4       R# )   N)rY   rS   addComponent)rT   	glyphNametransformations   &&&r2   r   %PerContourOrComponentPen.addComponentc   s!    

2##I>r1   r   N)r    r!   r"   r#   r   r0   rz   r{   s   @r2   r~   r~   b   s     ? ?r1   r~   c                   L   a  ] tR t^ht o R tRR ltV 3R lR ltRR ltRtV t	R# )	SimpleRecordingPointPenc                    . V n         R # rO   rS   ro   s   &r2   rP    SimpleRecordingPointPen.__init__i   s	    
r1   Nc                    R # rO   r   )rT   
identifierkwargss   &&,r2   	beginPath!SimpleRecordingPointPen.beginPathl       r1   c                   < V ^8  d   QhRR/# )   returnNr   )formatr|   s   "r2   __annotate__$SimpleRecordingPointPen.__annotate__o   s       r1   c                    R # rO   r   ro   s   &r2   rs   SimpleRecordingPointPen.endPatho   r   r1   c                J    V P                   P                  Yf   RMR34       R # )NFT)rS   rw   )rT   ptsegmentTypes   &&&r2   addPoint SimpleRecordingPointPen.addPointr   s    

2(;uFGr1   r   rO   )
r    r!   r"   r#   rP   r   rs   r   r0   rz   r{   s   @r2   r   r   h   s%      H Hr1   r   c                 `    ^ p\        W4       F  w  r4WC,
          pW%V,          ,          pK  	  V# r   )zipv0v1sx0x1ds   &&    r2   vdiff_hypot2r   v   s0    	Ab+G	U
  Hr1   c                     ^ p\        W4       FR  w  r4WC,
          pW%P                  VP                  ,          VP                  VP                  ,          ,           ,          pKT  	  V# r   )r   realimagr   s   &&    r2   vdiff_hypot2_complexr   ~   sJ    	Ab+G	VVaff_qvv.. 
 Hr1   c                 @   a  \        V 3R  l\        V4       4       4      # )c              3   H   <"   T F  w  rSV,          V,          x  K  	  R # 5irO   r   )r9   ijGs   &  r2   r;    matching_cost.<locals>.<genexpr>   s     7#641qtAww#6   ")sum	enumerate)r   matchings   f&r2   matching_costr      s    79X#6777r1   c                     \        V 4      p\        V 4      w  r#V\        \        V4      4      8H  P	                  4       '       g   Q h\        R  V 4       4      p\        V4      \        W4      3# )c              3   8   "   T F  p\        V4      x  K  	  R # 5irO   )int)r9   es   & r2   r;   <min_cost_perfect_bipartite_matching_scipy.<locals>.<genexpr>   s     %1As   )lenlinear_sum_assignmentlistrangeallr   )r   nrowscolss   &   r2   )min_cost_perfect_bipartite_matching_scipyr      s_    AA&q)JDDqN"'')))) %%%D:}Q---r1   c                     \        V 4      pR .V,          p\        4       P                  V 4       F	  w  r4WBV&   K  	  V\        W4      3# rO   )r   Munkrescomputer   )r   r   r   rowcols   &    r2   +min_cost_perfect_bipartite_matching_munkresr      sF    AA6A:DI%%a(S	 )q'''r1   c                    \        V 4      pV^8  d   \        R4      h\        P                  ! \	        V4      4      p\        \        V4      4      p\        W4      pV F"  p\        W4      pWd8  g   K  \        V4      TrCK$  	  W43# )   z4Install Python module 'munkres' or 'scipy >= 0.17.0')r   	Exception	itertoolspermutationsr   r   nextr   )r   r   r   best	best_costr:   costs   &      r2   .min_cost_perfect_bipartite_matching_bruteforcer      s|    AA1uNOO ))%(3L\"#Da&IQ""1gt)  ?r1   )r   )r   c                    \        \        V P                  4      4      p\        WP                  4      V P                  V P
                  V P                  ^,          V P                  ^,          V P                  V,          3# )r   )	r   absarear   meanXmeanYstddevXstddevYcorrelation)statssizes   & r2   contour_vector_from_statsr      s`     EJJ D$$D  r1   c                    a \        V 4      pV  UUu. uF  q1 Uu. uF  p\        W44      NK  	  upNK  	  uppo\        S4      w  pp\        V3R  l\	        V4       4       4      pWVV3# u upi u uppi )c              3   D   <"   T F  pSV,          V,          x  K  	  R # 5irO   r   )r9   r   costss   & r2   r;   'matching_for_vectors.<locals>.<genexpr>   s     6XaXs    )r   r   #min_cost_perfect_bipartite_matchingr   r   )	m0m1r   r   r   r   r   identity_costr   s	   &&      @r2   matching_for_vectorsr      sp    BA;=>2RR0Rrl2"R02>E 	,E26U1X66MM11 1>s   A.A)A.)A.c                 R    ^ p\        V 4       F  w  r#V^,          V,          pK  	  V# r   )reversed)pointsbitsr   bs   &   r2   points_characteristic_bitsr      s*    D&!	Q "Kr1   c                 4   . pV '       g   V# V  UUu. uF  w  r#\        V!  NK  	  p pp\        V 4      p\        ^8X  g   Q hV P                  V R\        ^,
           4       \        V 4      \        8  d"   V P                  V R\        ^,
           4       K5  \	        V4       F  pW,          pVP                  V4       W^,           ,          pWv,
          pVP                  V^,          4       W^,           ,          p	W,
          p
VP                  W,
          4       VP                  V
P                  ,          VP                  V
P                  ,          ,
          p\        \        \        V4      4      V4      pVP                  V^,          4       K  	  V# u uppi )   N)complexr   $_NUM_ITEMS_PER_POINTS_COMPLEX_VECTORextendr   rw   r   r   r   r   r   )r   vectorr   r>   r   r   r[   r`   d0re   d1crosss   &           r2   points_complex_vectorr      sA   F(./urgrlF/FA/1444
MM&C?!CDE
f+<
<fGCaGHI1X Yb E]Wb1f E]Wbg "''!BGGbgg$55c%j)51eai + . M; 0s   Fc                    \        V 4      p\        V 4      pV'       d   V R R R1,          p \        V 4      pMTp\        V 4      p\        V4      V,          ^ 8X  g   Q h\        V4      V,          p^V,          ^,
          p\        V4       Fk  p	WTV	,
          ,          V,          WY,	          ,          p
W8X  g   K.  TP	                  \        Wi) V,          4      V'       d   V^,
          V	,
          MT	V34       Km  	  R # )Nr   )r   r   r   r   rw   rK   )r   isomorphismsrB   reference_bitsr   r   r   multmaskr   r   s   &&&        r2   add_isomorphismsr     s    /7NFA
 ")&1"6*Fv;?av;!DFa<D1X1uo%$)4&"t),7a!eai7S r1   discrete_axesc          	        aa R .\        \        \        V 4      ^,
          4      4      ,           p\        \        \        V 4      4      4      pV'       Ed   \        V4       UUu. uFe  w  rV\        ;QJ d-    V3R lVP                  4        4       F  '       d   K   RM"	  RM! V3R lVP                  4        4       4      '       g   Kc  VNKg  	  pppV'       d"   \        P                  R\        V4      V4       M\        P                  R4        ^ RI	H
p \        \        V4      4       U	u. uF  p	^ .\        V4      ,          NK  	  p
p	\        4       pV F"  oVP                  SP                  4       4       K$  	  \        V4      pV Uau. uF5  o\        ;QJ d    . V3R lV 4       F  NK  	  5M! V3R lV 4       4      NK7  	  pp\         P"                  ! \        \        V4      4      ^4       F  w  r]\%        WV,          4       UUu/ uF  w  rVS9   g   K  WbK  	  ppp\%        WV,          4       UUu/ uF  w  rVS9   g   K  WbK  	  pppVV8w  d   Kj  \'        W,          W,          4      W,          V&   K  	  V! V
RR7      pVP)                  4       w  pp\+        \        4      p
\%        VV4       F6  w  ppV
V,          P-                  V4       V
V,          P-                  V4       K8  	  R .\        V4      ,          p. p\        4       p\/        V4      pV'       dk   VP1                  4       pVP-                  V4       VP3                  V4       \        W,          4       F!  pVV9  g   K  WSV&   VP3                  V4       K#  	  Kr  \        V4      \        V4      8X  g   Q R	4       h \        P                  R
V4       \        P                  RV4       W43# u uppi u up	i u upi u uppi u uppi   \4         d     LXi ; i)Nc              3   D   <"   T F  w  rVS9  g   K  V^ 8H  x  K  	  R# 5ir   Nr   )r9   rJ   vr   s   &  r2   r;   )find_parents_and_order.<locals>.<genexpr>/  s      Jida1M3I616is     FTzFound %s base masters: %szNo base master location found)minimum_spanning_treec              3   H   <"   T F  pSP                  V^ 4      x  K  	  R# 5ir  )r8   )r9   rJ   rI   s   & r2   r;   r  ?  s     7$QQUU1a[[$r   )	overwritez.Not all masters are reachable; report an issuezParents: %sz	Order: %s)r   r   r   r   r   rE   loginfowarningscipy.sparse.csgraphr  setupdatekeysrD   tupler   combinationsr   r   nonzeror   addr   popleftrw   ImportError)	glyphsets	locationsr   parentsorderr   rI   basesr  r>   graphaxesvectorsr   rJ   r  i_discrete_locationj_discrete_locationtreer   r   r   r   visitedqueues   &&d   `                  r2   find_parents_and_orderr#  '  sF   ftE#i.1"4566Gs9~&'Ey "),
,sJaggiJsssJaggiJJ A, 	 

 HH0#e*eDKK78-	B38Y3HI3HaaS3y>))3HEI5DAFFH% $<DAJKAuu7$7uu7$77GK!..uS^/DaH%(qz%:'%:TQa=>PDAD%: $ ' &)qz%:'%:TQa=>PDAD%: $ ' '*==*7:wzB I )$?DJD$$EdOSc
s#c
s# ,
 fs9~-GEeG%LEMMOAQ)A'%&
Q * u:"  @?@  	(e$>y
 J
 L''>  		s|   #4O)OOO; ,O%AO; O*+O*AO; O/O/"O; :O5
O5CO; %A
O; 4;O; %O; ;P	P	)4fontTools.ttLib.ttGlyphSetr   fontTools.pens.basePenr   r   r   fontTools.pens.pointPenr   r   fontTools.pens.recordingPenr	   r
   fontTools.misc.transformr   collectionsr   r   mathr   r   r   r   r   logging	getLoggerr	  r   rG   rK   rM   r~   r   r   r   r   r   r   r   scipy.optimizer   r   r  munkresr   r   r   r   r   r   r   r  r#  r   r1   r2   <module>r/     s   3 G G G M . * * *  9: 8 G B?} ?H. H8.((
4*S'	2 () $!H6A#% Ac  

	
# 8 	,  
: 	,


s*   C   C#C	CC#CC#