_splitter _ruleValues _boundRules _unboundRules _liveRulessplits_splits overflowChars_overflowChars _isComplete _constraints_unboundConstraints_boundRulesInUnboundLinesgetValue isBetterThancompareOverlapexpand_isOverlapping_calculateSplits_calculateCost _addLiveRules_initBoundRulesInUnboundLines_initConstraints_initUnboundConstraintstoString SolveStateX LineSplitterRuleSetRule_ensureConstraints_ensureUnboundConstraintsSetSplitSetintboolMapunsplitgetValue overflowCharscostsplitsrulesrule _ruleValues compareTo StateErrorvoidclonecontainsvalue numValuesListtryBindadd _isComplete _liveRulesaddAllenqueuelength_boundRulesInUnboundLines _constraintskeys_unboundConstraints NestingLevelichunksisSplitnestingmarkclearTotalUsedIndentrefreshTotalUsedIndentunmark flushLeftblockIndentationindenttotalUsedIndent indentBlockIndent expressionlineswriter pageWidthSpan shouldSplitAtspansspan identical getColumnspaceWhenUnsplit BlockChunk formatBlockunsplitBlockLengthtextforEachsetCostallConstrainedRules constrainedclearboundconstrainedRulesunbound constrain mustSplitoverrideString StringBufferwriteAllmapfullySplitValuepadLeftboldgraywritetoStringÿ§aK®¹™1JNèê€Ù ../chunk.dart€ñ../constants.dart� �#�&debug�& ../debug.dart�.../nesting_level.dart�N../rule/rule.dart�jline_splitter.dart�‡ rule_set.dart£ ÀPß‚JN€œ€Ø€ð� �-�M�i�†�ž�Ÿ�æ�ê‚3‚ƒ‚̃ƒfƒªƒ®ƒû„K„V„i„‰„¦„§„á„ç…4…R…S…‘…—…䆆†Q†g†m†¶†û‡G‡a‡g‡³ˆˆNˆ‰ˆ�ˆÛ‰*‰u‰{‰ÊŠŠhгŠÈŠÎ‹‹j‹·‹Ö‹×ŒŒ(ŒGŒHŒ˜Œ¦ŒÑŒëŒì�8�U�[�¤�òŽAŽ]ŽxŽyŽÃŽØ���c�œ�¢�ï�<�Š�Õ‘‘‘n‘º‘ñ’’’a’g’¶““:“m“”“•“Ɠޓô“ø“ù”;”c”œ”�”é••,•u•§•˕̖–7–i–o–p–˜–Ä–È–É–ü——Q— —ê˜9˜Y˜_˜«˜ø™ ™&™u™Â™Ö™ÜšššišˆšŽš×›#›n›t›Äœœ%œNœxœyœ¨œÐœþ�7�8�{���‚�ÒžžAžEžFž†žŒžÜŸ)ŸvŸµŸÇŸóŸô 0 H p — ×¡¡G¡H¡n¡¾¡á¢¢¢¢c¢ƒ¢„¢½¢¾£ £2£Y£�£›£œ£À£Ê£Ë¤¤:¤B¤C¤v¤Ÿ¤ë¥3¥z¥‹¥•¥�¥£¥§¥¨¥Ý¦¦Q¦f¦’¦Ä¦Ø¦Þ¦ß§§Z§¦§¼§Ä§Ê§Ë¨¨¨>¨†¨Œ¨�¨×¨ë¨ñ¨ò©#©V©”©•©Úªª<ªDªJªKª\ª`ªaª¬ªÉªå«0«I«w«¯«Ö¬¬8¬V¬€¬ª¬´¬¼¬Â¬Ã¬ð­­­K­c­i­j­›­Ó­ú®7®O®o®—®Õ®Ö®ÿ¯2¯3¯n¯—¯£¯­¯®¯Î¯Ö¯Ü¯à¯á°.°s°�°Û°í°ÿ±±±a±‹±¯±Â±Ã±ß²-²\²�²Ì²Í³³G³j³˜³Ó³ü´ ´´ ´(´)´<´B´C´“´äµ3µuµ”µ•µÙµüµý¶5¶\¶]¶ƒ¶—¶˜¶À¶Ý¶ÿ··*·4·5·ƒ·Ó¸¸¸G¸R¸q¸—¸´¸¿¹ ¹S¹Œ¹—¹çº2ºdº�ºÄºä»"»\»»‰»Š»³»´»Ó»ú¼ ¼7¼?¼@¼a¼‰¼¼¼Î½½-½c½‘½›½£½¤½Ç½Í½Î¾¾@¾t¾|¾}¾¹¾Ü¾ñ¾÷¾ø¿¿;¿<¿W¿[¿\¿­¿³À@À@À@BÀ@fÀ@gÀ@~À@¶À@íÀ@îÀAÀA%ÀA+ÀA,ÀA>ÀABÀACÀA‘ÀA·ÀA½ÀBÀBBÀBpÀBŠÀBªÀBÆÀBÇÀBÿÀC$ÀCWÀCXÀCuÀC‘ÀC™ÀCšÀCÅÀCíÀD ÀDÀD6ÀD>ÀDDÀDEÀDtÀD†ÀDŠÀD‹ÀDÙÀD÷ÀDýÀEHÀE‚ÀE¨ÀEÆÀEâÀEãÀF ÀF3ÀFRÀFaÀF‚ÀFŠÀF�ÀF‘ÀF¶ÀF·ÀFÜÀGÀGHÀGIÀGzÀG´ÀGÖÀHÀH ÀHÀHÀHÀH4ÀH8ÀH9ÀH…ÀH«ÀH±ÀHüÀI6ÀIhÀI™ÀIÂÀJ ÀJRÀJSÀJ‡ÀJ»ÀJ¼ÀJòÀJóÀK5ÀKqÀKrÀK¾ÀKÝÀL ÀL ÀLZÀL¥ÀLñÀMÀMJÀM–ÀM¬ÀM¸ÀM¹ÀMàÀMêÀMòÀMøÀMùÀNÀNÀNÀN)ÀN?ÀN`ÀNaÀN’ÀNÌÀNÍÀNäÀO ÀO=ÀOEÀOFÀOpÀO—ÀOºÀOÉÀOìÀOôÀOõÀP ÀPÀPÀPAÀPBÀP…ÀPºÀP»ÀPÙÀPÝÀP߀؀ð� �'�&�-�M�i�†�ŸÀO?„\„\‚¶/// A possibly incomplete solution in the line splitting search space. /// /// A single [SolveState] binds some subset of the rules to values while /// leaving the rest unbound. If every rule is bound, the solve state describes /// a complete solution to the line splitting problem. Even if rules are /// unbound, a state can also usually be used as a solution by treating all /// unbound rules as unsplit. (The usually is because a state that constrains /// an unbound rule to split can't be used with that rule unsplit.) /// /// From a given solve state, we can explore the search tree to more refined /// solve states by producing new ones that add more bound rules to the current /// state.“—`“—“—“¡“¢“¨“§“²“¸“· „k„~„~„‹„™„™„©€§…E…E€†/// The set of [Rule]s that are bound by [_ruleValues]. /// /// Cached by [_ensureConstraints] for use by [_ensureUnboundConstraints].…U€­…õ…õ€Š/// The set of [Rule]s that are not bound by [_ruleValues]. /// /// Cached by [_ensureConstraints] for use by [_ensureUnboundConstraints].†…Í‹¿‹¿…}/// The unbound rules in this state that can be bound to produce new more /// refined states. /// /// Keeping this set small is the key to make the entire line splitter /// perform well. If we consider too many rules at each state, our /// exploration of the solution space is too branchy and we waste time on /// dead end solutions. /// /// Here is the key insight. The line splitter treats any unbound rule as /// being unsplit. This means refining a solution always means taking a rule /// that is unsplit and making it split. That monotonically increases the /// cost, but may help fit the solution inside the page. /// /// We want to keep the cost low, so the only reason to consider making a /// rule split is if it reduces an overflowing line. It's also the case that /// splitting an earlier rule will often reshuffle the rest of the line. /// /// Taking that into account, the only rules we consider binding to extend a /// solve state are *unbound rules inside the first line that is overflowing*. /// Even if a line has dozens of rules, this generally keeps the branching /// down to a few. It also means rules inside lines that already fit are /// never touched. /// /// There is one other set of rules that go in here. Sometimes a bound rule /// in the solve state constrains some other unbound rule to split. In that /// case, we also consider that active so we know to not leave it at zero.‹Ò‹Ó‹Ì‹Ñ‹ÍŒ*Œ>Œ>ŒÓŒ×Œ×ŒèŒî�ˆŽdŽd�b/// Whether we can treat this state as a complete solution by leaving its /// unbound rules unsplit. /// /// This is generally true but will be false if the state contains any /// unbound rules that are constrained to not be zero by other bound rules. /// This avoids picking a solution that leaves those rules at zero when they /// aren't allowed to be.ŽrŽ{€šŽôŽôZ/// The constraints the bound rules in this state have on the remaining /// unbound rules.����‚ö‘Û‘Û‚‹/// The unbound rule values that are disallowed because they would place /// invalid constraints on the currently bound values. /// /// For example, say rule A is bound to 1 and B is unbound. If B has value /// 1, it constrains A to be 1. Likewise, if B is 2, it constrains A to be /// 2 as well. Since we already know A is 1, that means we know B cannot be /// bound to value 2. This means B is more limited in this state than it /// might be in another state that binds A to a different value. /// /// It's important to track this, because we can't allow to states to overlap /// if one permits more values for some unbound rule than the other does.‘÷’’’�}“Q“Q�/// The bound rules that appear inside lines also containing unbound rules. /// /// By appearing in the same line, it means these bound rules may affect the /// results of binding those unbound rules. This is used to tell if two /// states may diverge by binding unbound rules or not.“s“�“‘‹ÙNŒŒ,/// The set of splits chosen for this state.ŒJ€†Œ°Œ°Y/// The number of characters that do not fit inside the page with this set of /// splits. “û€ ”i”ie/// Gets the value to use for [rule], either the bound value or /// [Rule.unsplit] if it isn't bound.”r ”x”w”Ÿ‚(• • b/// Returns `true` if this state is a better solution to use as the final /// result than [other].••$•#–ˇyœ+œ+…#/// Determines if this state "overlaps" [other]. /// /// Two states overlap if they currently have the same score and we can tell /// for certain that they won't diverge as their unbound rules are bound. If /// that's the case, then whichever state is better now (based on their /// currently bound rule values) is the one that will always win, regardless /// of how they get expanded. /// /// In other words, their entire expanded solution trees also overlap. In /// that case, there's no point in expanding both, so we can just pick the /// winner now and discard the other. /// /// For this to be true, we need to prove that binding an unbound rule won't /// affect one state differently from the other. We have to show that they /// are parallel. /// /// Two things could cause this *not* to be the case. /// /// 1. If one state's bound rules place different constraints on the unbound /// rules than the other. /// /// 2. If one state's different bound rules are in the same line as an /// unbound rule. That affects the indentation and length of the line, /// which affects the context where the unbound rule is being chosen. /// /// If neither of these is the case, the states overlap. Returns `<0` if this /// state is better, or `>0` if [other] wins. If the states do not overlap, /// returns `0`.œ:œFœEžH‡^Ÿ¼Ÿ¼�b/// Enqueues more solve states to consider based on this one. /// /// For each unbound rule in this state that occurred in the first long line, /// enqueue solve states that bind that rule to each value it can have and /// bind all previous rules to zero. (In other words, try all subsolutions /// where that rule becomes the first new rule to split at.)¥ª„µ¥ä¥ä2/// Returns `true` if [other] overlaps this state.¥ó¥ÿ¥þªc…|ªÐªÐc/// Calculates the [SplitSet] for this solve state, assuming any unbound /// rules are set to zero.¯ã�w°z°z€�/// Evaluates the cost (i.e. the relative "badness") of splitting the line /// into [lines] physical lines based on the current set of rules.¿^�ãÀ@&À@&€º/// Adds [rule] and all of the rules it constrains to the set of [_liveRules]. /// /// Only does this if [rule] is a valid soft rule. Returns `true` if any new /// live rules were added.À@4 À@;À@:ÀAEƒDÀBNÀBN€ô/// Used to lazy initialize [_boundRulesInUnboundLines], which is needed to /// compare two states for overlap. /// /// We do this lazily because the calculation is a bit slow, and is only /// needed when we have two states with the same score.ÀD�ƒªÀE“ÀE“€ì/// Used to lazy initializes the [_constraints], which is needed to compare /// two states for overlap. /// /// We do this lazily because the calculation is a bit slow, and is only /// needed when we have two states with the same score.ÀH;…àÀILÀIL€ò/// Used to lazy initialize the [_unboundConstraints], which is needed to /// compare two states for overlap. /// /// We do this lazily because the calculation is a bit slow, and is only /// needed when we have two states with the same score.ÀN‚½ÀN2ÀN2ÀNÀN ‚JN€œ€Ø€ð� �-�M�i�†�ž�Ÿ�æ�ê‚3‚ƒ‚̃ƒfƒªƒ®ƒû„K„V„i„‰„¦„§„á„ç…4…R…S…‘…—…䆆†Q†g†m†¶†û‡G‡a‡g‡³ˆˆNˆ‰ˆ�ˆÛ‰*‰u‰{‰ÊŠŠhгŠÈŠÎ‹‹j‹·‹Ö‹×ŒŒ(ŒGŒHŒ˜Œ¦ŒÑŒëŒì�8�U�[�¤�òŽAŽ]ŽxŽyŽÃŽØ���c�œ�¢�ï�<�Š�Õ‘‘‘n‘º‘ñ’’’a’g’¶““:“m“”“•“Ɠޓô“ø“ù”;”c”œ”�”é••,•u•§•˕̖–7–i–o–p–˜–Ä–È–É–ü——Q— —ê˜9˜Y˜_˜«˜ø™ ™&™u™Â™Ö™ÜšššišˆšŽš×›#›n›t›Äœœ%œNœxœyœ¨œÐœþ�7�8�{���‚�ÒžžAžEžFž†žŒžÜŸ)ŸvŸµŸÇŸóŸô 0 H p — ×¡¡G¡H¡n¡¾¡á¢¢¢¢c¢ƒ¢„¢½¢¾£ £2£Y£�£›£œ£À£Ê£Ë¤¤:¤B¤C¤v¤Ÿ¤ë¥3¥z¥‹¥•¥�¥£¥§¥¨¥Ý¦¦Q¦f¦’¦Ä¦Ø¦Þ¦ß§§Z§¦§¼§Ä§Ê§Ë¨¨¨>¨†¨Œ¨�¨×¨ë¨ñ¨ò©#©V©”©•©Úªª<ªDªJªKª\ª`ªaª¬ªÉªå«0«I«w«¯«Ö¬¬8¬V¬€¬ª¬´¬¼¬Â¬Ã¬ð­­­K­c­i­j­›­Ó­ú®7®O®o®—®Õ®Ö®ÿ¯2¯3¯n¯—¯£¯­¯®¯Î¯Ö¯Ü¯à¯á°.°s°�°Û°í°ÿ±±±a±‹±¯±Â±Ã±ß²-²\²�²Ì²Í³³G³j³˜³Ó³ü´ ´´ ´(´)´<´B´C´“´äµ3µuµ”µ•µÙµüµý¶5¶\¶]¶ƒ¶—¶˜¶À¶Ý¶ÿ··*·4·5·ƒ·Ó¸¸¸G¸R¸q¸—¸´¸¿¹ ¹S¹Œ¹—¹çº2ºdº�ºÄºä»"»\»»‰»Š»³»´»Ó»ú¼ ¼7¼?¼@¼a¼‰¼¼¼Î½½-½c½‘½›½£½¤½Ç½Í½Î¾¾@¾t¾|¾}¾¹¾Ü¾ñ¾÷¾ø¿¿;¿<¿W¿[¿\¿­¿³À@À@À@BÀ@fÀ@gÀ@~À@¶À@íÀ@îÀAÀA%ÀA+ÀA,ÀA>ÀABÀACÀA‘ÀA·ÀA½ÀBÀBBÀBpÀBŠÀBªÀBÆÀBÇÀBÿÀC$ÀCWÀCXÀCuÀC‘ÀC™ÀCšÀCÅÀCíÀD ÀDÀD6ÀD>ÀDDÀDEÀDtÀD†ÀDŠÀD‹ÀDÙÀD÷ÀDýÀEHÀE‚ÀE¨ÀEÆÀEâÀEãÀF ÀF3ÀFRÀFaÀF‚ÀFŠÀF�ÀF‘ÀF¶ÀF·ÀFÜÀGÀGHÀGIÀGzÀG´ÀGÖÀHÀH ÀHÀHÀHÀH4ÀH8ÀH9ÀH…ÀH«ÀH±ÀHüÀI6ÀIhÀI™ÀIÂÀJ ÀJRÀJSÀJ‡ÀJ»ÀJ¼ÀJòÀJóÀK5ÀKqÀKrÀK¾ÀKÝÀL ÀL ÀLZÀL¥ÀLñÀMÀMJÀM–ÀM¬ÀM¸ÀM¹ÀMàÀMêÀMòÀMøÀMùÀNÀNÀNÀN)ÀN?ÀN`ÀNaÀN’ÀNÌÀNÍÀNäÀO ÀO=ÀOEÀOFÀOpÀO—ÀOºÀOÉÀOìÀOôÀOõÀP ÀPÀPÀPAÀPBÀP…ÀPºÀP»ÀPÙÀPÝÀPß SolveState!ô